diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json
index e9977b8ac7c..c3bb723f01a 100644
--- a/Godeps/Godeps.json
+++ b/Godeps/Godeps.json
@@ -28,6 +28,11 @@
"Comment": "v0.7.3",
"Rev": "bed164a424e75154a40550c04c313ef51a7bb275"
},
+ {
+ "ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/ec2query",
+ "Comment": "v0.7.3",
+ "Rev": "bed164a424e75154a40550c04c313ef51a7bb275"
+ },
{
"ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/query",
"Comment": "v0.7.3",
@@ -53,6 +58,11 @@
"Comment": "v0.7.3",
"Rev": "bed164a424e75154a40550c04c313ef51a7bb275"
},
+ {
+ "ImportPath": "github.com/aws/aws-sdk-go/service/ec2",
+ "Comment": "v0.7.3",
+ "Rev": "bed164a424e75154a40550c04c313ef51a7bb275"
+ },
{
"ImportPath": "github.com/davecgh/go-spew/spew",
"Rev": "2df174808ee097f90d259e432cc04442cf60be21"
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/build.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/build.go
new file mode 100644
index 00000000000..e3d4147ee33
--- /dev/null
+++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/build.go
@@ -0,0 +1,32 @@
+// Package ec2query provides serialisation of AWS EC2 requests and responses.
+package ec2query
+
+//go:generate go run ../../fixtures/protocol/generate.go ../../fixtures/protocol/input/ec2.json build_test.go
+
+import (
+ "net/url"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/awserr"
+ "github.com/aws/aws-sdk-go/internal/protocol/query/queryutil"
+)
+
+// Build builds a request for the EC2 protocol.
+func Build(r *aws.Request) {
+ body := url.Values{
+ "Action": {r.Operation.Name},
+ "Version": {r.Service.APIVersion},
+ }
+ if err := queryutil.Parse(body, r.Params, true); err != nil {
+ r.Error = awserr.New("SerializationError", "failed encoding EC2 Query request", err)
+ }
+
+ if r.ExpireTime == 0 {
+ r.HTTPRequest.Method = "POST"
+ r.HTTPRequest.Header.Set("Content-Type", "application/x-www-form-urlencoded; charset=utf-8")
+ r.SetBufferBody([]byte(body.Encode()))
+ } else { // This is a pre-signed request
+ r.HTTPRequest.Method = "GET"
+ r.HTTPRequest.URL.RawQuery = body.Encode()
+ }
+}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/build_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/build_test.go
new file mode 100644
index 00000000000..7973dd3baec
--- /dev/null
+++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/build_test.go
@@ -0,0 +1,860 @@
+package ec2query_test
+
+import (
+ "bytes"
+ "encoding/json"
+ "encoding/xml"
+ "io"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+ "testing"
+ "time"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/internal/protocol/ec2query"
+ "github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil"
+ "github.com/aws/aws-sdk-go/internal/signer/v4"
+ "github.com/aws/aws-sdk-go/internal/util"
+ "github.com/stretchr/testify/assert"
+)
+
+var _ bytes.Buffer // always import bytes
+var _ http.Request
+var _ json.Marshaler
+var _ time.Time
+var _ xmlutil.XMLNode
+var _ xml.Attr
+var _ = ioutil.Discard
+var _ = util.Trim("")
+var _ = url.Values{}
+var _ = io.EOF
+
+type InputService1ProtocolTest struct {
+ *aws.Service
+}
+
+// New returns a new InputService1ProtocolTest client.
+func NewInputService1ProtocolTest(config *aws.Config) *InputService1ProtocolTest {
+ service := &aws.Service{
+ Config: aws.DefaultConfig.Merge(config),
+ ServiceName: "inputservice1protocoltest",
+ APIVersion: "2014-01-01",
+ }
+ service.Initialize()
+
+ // Handlers
+ service.Handlers.Sign.PushBack(v4.Sign)
+ service.Handlers.Build.PushBack(ec2query.Build)
+ service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
+ service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
+ service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
+
+ return &InputService1ProtocolTest{service}
+}
+
+// newRequest creates a new request for a InputService1ProtocolTest operation and runs any
+// custom request initialization.
+func (c *InputService1ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
+ req := aws.NewRequest(c.Service, op, params, data)
+
+ return req
+}
+
+const opInputService1TestCaseOperation1 = "OperationName"
+
+// InputService1TestCaseOperation1Request generates a request for the InputService1TestCaseOperation1 operation.
+func (c *InputService1ProtocolTest) InputService1TestCaseOperation1Request(input *InputService1TestShapeInputShape) (req *aws.Request, output *InputService1TestShapeInputService1TestCaseOperation1Output) {
+ op := &aws.Operation{
+ Name: opInputService1TestCaseOperation1,
+ }
+
+ if input == nil {
+ input = &InputService1TestShapeInputShape{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &InputService1TestShapeInputService1TestCaseOperation1Output{}
+ req.Data = output
+ return
+}
+
+func (c *InputService1ProtocolTest) InputService1TestCaseOperation1(input *InputService1TestShapeInputShape) (*InputService1TestShapeInputService1TestCaseOperation1Output, error) {
+ req, out := c.InputService1TestCaseOperation1Request(input)
+ err := req.Send()
+ return out, err
+}
+
+type InputService1TestShapeInputService1TestCaseOperation1Output struct {
+ metadataInputService1TestShapeInputService1TestCaseOperation1Output `json:"-" xml:"-"`
+}
+
+type metadataInputService1TestShapeInputService1TestCaseOperation1Output struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type InputService1TestShapeInputShape struct {
+ Bar *string `type:"string"`
+
+ Foo *string `type:"string"`
+
+ metadataInputService1TestShapeInputShape `json:"-" xml:"-"`
+}
+
+type metadataInputService1TestShapeInputShape struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type InputService2ProtocolTest struct {
+ *aws.Service
+}
+
+// New returns a new InputService2ProtocolTest client.
+func NewInputService2ProtocolTest(config *aws.Config) *InputService2ProtocolTest {
+ service := &aws.Service{
+ Config: aws.DefaultConfig.Merge(config),
+ ServiceName: "inputservice2protocoltest",
+ APIVersion: "2014-01-01",
+ }
+ service.Initialize()
+
+ // Handlers
+ service.Handlers.Sign.PushBack(v4.Sign)
+ service.Handlers.Build.PushBack(ec2query.Build)
+ service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
+ service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
+ service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
+
+ return &InputService2ProtocolTest{service}
+}
+
+// newRequest creates a new request for a InputService2ProtocolTest operation and runs any
+// custom request initialization.
+func (c *InputService2ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
+ req := aws.NewRequest(c.Service, op, params, data)
+
+ return req
+}
+
+const opInputService2TestCaseOperation1 = "OperationName"
+
+// InputService2TestCaseOperation1Request generates a request for the InputService2TestCaseOperation1 operation.
+func (c *InputService2ProtocolTest) InputService2TestCaseOperation1Request(input *InputService2TestShapeInputShape) (req *aws.Request, output *InputService2TestShapeInputService2TestCaseOperation1Output) {
+ op := &aws.Operation{
+ Name: opInputService2TestCaseOperation1,
+ }
+
+ if input == nil {
+ input = &InputService2TestShapeInputShape{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &InputService2TestShapeInputService2TestCaseOperation1Output{}
+ req.Data = output
+ return
+}
+
+func (c *InputService2ProtocolTest) InputService2TestCaseOperation1(input *InputService2TestShapeInputShape) (*InputService2TestShapeInputService2TestCaseOperation1Output, error) {
+ req, out := c.InputService2TestCaseOperation1Request(input)
+ err := req.Send()
+ return out, err
+}
+
+type InputService2TestShapeInputService2TestCaseOperation1Output struct {
+ metadataInputService2TestShapeInputService2TestCaseOperation1Output `json:"-" xml:"-"`
+}
+
+type metadataInputService2TestShapeInputService2TestCaseOperation1Output struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type InputService2TestShapeInputShape struct {
+ Bar *string `locationName:"barLocationName" type:"string"`
+
+ Foo *string `type:"string"`
+
+ Yuck *string `locationName:"yuckLocationName" queryName:"yuckQueryName" type:"string"`
+
+ metadataInputService2TestShapeInputShape `json:"-" xml:"-"`
+}
+
+type metadataInputService2TestShapeInputShape struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type InputService3ProtocolTest struct {
+ *aws.Service
+}
+
+// New returns a new InputService3ProtocolTest client.
+func NewInputService3ProtocolTest(config *aws.Config) *InputService3ProtocolTest {
+ service := &aws.Service{
+ Config: aws.DefaultConfig.Merge(config),
+ ServiceName: "inputservice3protocoltest",
+ APIVersion: "2014-01-01",
+ }
+ service.Initialize()
+
+ // Handlers
+ service.Handlers.Sign.PushBack(v4.Sign)
+ service.Handlers.Build.PushBack(ec2query.Build)
+ service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
+ service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
+ service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
+
+ return &InputService3ProtocolTest{service}
+}
+
+// newRequest creates a new request for a InputService3ProtocolTest operation and runs any
+// custom request initialization.
+func (c *InputService3ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
+ req := aws.NewRequest(c.Service, op, params, data)
+
+ return req
+}
+
+const opInputService3TestCaseOperation1 = "OperationName"
+
+// InputService3TestCaseOperation1Request generates a request for the InputService3TestCaseOperation1 operation.
+func (c *InputService3ProtocolTest) InputService3TestCaseOperation1Request(input *InputService3TestShapeInputShape) (req *aws.Request, output *InputService3TestShapeInputService3TestCaseOperation1Output) {
+ op := &aws.Operation{
+ Name: opInputService3TestCaseOperation1,
+ }
+
+ if input == nil {
+ input = &InputService3TestShapeInputShape{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &InputService3TestShapeInputService3TestCaseOperation1Output{}
+ req.Data = output
+ return
+}
+
+func (c *InputService3ProtocolTest) InputService3TestCaseOperation1(input *InputService3TestShapeInputShape) (*InputService3TestShapeInputService3TestCaseOperation1Output, error) {
+ req, out := c.InputService3TestCaseOperation1Request(input)
+ err := req.Send()
+ return out, err
+}
+
+type InputService3TestShapeInputService3TestCaseOperation1Output struct {
+ metadataInputService3TestShapeInputService3TestCaseOperation1Output `json:"-" xml:"-"`
+}
+
+type metadataInputService3TestShapeInputService3TestCaseOperation1Output struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type InputService3TestShapeInputShape struct {
+ StructArg *InputService3TestShapeStructType `locationName:"Struct" type:"structure"`
+
+ metadataInputService3TestShapeInputShape `json:"-" xml:"-"`
+}
+
+type metadataInputService3TestShapeInputShape struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type InputService3TestShapeStructType struct {
+ ScalarArg *string `locationName:"Scalar" type:"string"`
+
+ metadataInputService3TestShapeStructType `json:"-" xml:"-"`
+}
+
+type metadataInputService3TestShapeStructType struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type InputService4ProtocolTest struct {
+ *aws.Service
+}
+
+// New returns a new InputService4ProtocolTest client.
+func NewInputService4ProtocolTest(config *aws.Config) *InputService4ProtocolTest {
+ service := &aws.Service{
+ Config: aws.DefaultConfig.Merge(config),
+ ServiceName: "inputservice4protocoltest",
+ APIVersion: "2014-01-01",
+ }
+ service.Initialize()
+
+ // Handlers
+ service.Handlers.Sign.PushBack(v4.Sign)
+ service.Handlers.Build.PushBack(ec2query.Build)
+ service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
+ service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
+ service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
+
+ return &InputService4ProtocolTest{service}
+}
+
+// newRequest creates a new request for a InputService4ProtocolTest operation and runs any
+// custom request initialization.
+func (c *InputService4ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
+ req := aws.NewRequest(c.Service, op, params, data)
+
+ return req
+}
+
+const opInputService4TestCaseOperation1 = "OperationName"
+
+// InputService4TestCaseOperation1Request generates a request for the InputService4TestCaseOperation1 operation.
+func (c *InputService4ProtocolTest) InputService4TestCaseOperation1Request(input *InputService4TestShapeInputShape) (req *aws.Request, output *InputService4TestShapeInputService4TestCaseOperation1Output) {
+ op := &aws.Operation{
+ Name: opInputService4TestCaseOperation1,
+ }
+
+ if input == nil {
+ input = &InputService4TestShapeInputShape{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &InputService4TestShapeInputService4TestCaseOperation1Output{}
+ req.Data = output
+ return
+}
+
+func (c *InputService4ProtocolTest) InputService4TestCaseOperation1(input *InputService4TestShapeInputShape) (*InputService4TestShapeInputService4TestCaseOperation1Output, error) {
+ req, out := c.InputService4TestCaseOperation1Request(input)
+ err := req.Send()
+ return out, err
+}
+
+type InputService4TestShapeInputService4TestCaseOperation1Output struct {
+ metadataInputService4TestShapeInputService4TestCaseOperation1Output `json:"-" xml:"-"`
+}
+
+type metadataInputService4TestShapeInputService4TestCaseOperation1Output struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type InputService4TestShapeInputShape struct {
+ ListArg []*string `type:"list"`
+
+ metadataInputService4TestShapeInputShape `json:"-" xml:"-"`
+}
+
+type metadataInputService4TestShapeInputShape struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type InputService5ProtocolTest struct {
+ *aws.Service
+}
+
+// New returns a new InputService5ProtocolTest client.
+func NewInputService5ProtocolTest(config *aws.Config) *InputService5ProtocolTest {
+ service := &aws.Service{
+ Config: aws.DefaultConfig.Merge(config),
+ ServiceName: "inputservice5protocoltest",
+ APIVersion: "2014-01-01",
+ }
+ service.Initialize()
+
+ // Handlers
+ service.Handlers.Sign.PushBack(v4.Sign)
+ service.Handlers.Build.PushBack(ec2query.Build)
+ service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
+ service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
+ service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
+
+ return &InputService5ProtocolTest{service}
+}
+
+// newRequest creates a new request for a InputService5ProtocolTest operation and runs any
+// custom request initialization.
+func (c *InputService5ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
+ req := aws.NewRequest(c.Service, op, params, data)
+
+ return req
+}
+
+const opInputService5TestCaseOperation1 = "OperationName"
+
+// InputService5TestCaseOperation1Request generates a request for the InputService5TestCaseOperation1 operation.
+func (c *InputService5ProtocolTest) InputService5TestCaseOperation1Request(input *InputService5TestShapeInputShape) (req *aws.Request, output *InputService5TestShapeInputService5TestCaseOperation1Output) {
+ op := &aws.Operation{
+ Name: opInputService5TestCaseOperation1,
+ }
+
+ if input == nil {
+ input = &InputService5TestShapeInputShape{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &InputService5TestShapeInputService5TestCaseOperation1Output{}
+ req.Data = output
+ return
+}
+
+func (c *InputService5ProtocolTest) InputService5TestCaseOperation1(input *InputService5TestShapeInputShape) (*InputService5TestShapeInputService5TestCaseOperation1Output, error) {
+ req, out := c.InputService5TestCaseOperation1Request(input)
+ err := req.Send()
+ return out, err
+}
+
+type InputService5TestShapeInputService5TestCaseOperation1Output struct {
+ metadataInputService5TestShapeInputService5TestCaseOperation1Output `json:"-" xml:"-"`
+}
+
+type metadataInputService5TestShapeInputService5TestCaseOperation1Output struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type InputService5TestShapeInputShape struct {
+ ListArg []*string `locationName:"ListMemberName" locationNameList:"item" type:"list"`
+
+ metadataInputService5TestShapeInputShape `json:"-" xml:"-"`
+}
+
+type metadataInputService5TestShapeInputShape struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type InputService6ProtocolTest struct {
+ *aws.Service
+}
+
+// New returns a new InputService6ProtocolTest client.
+func NewInputService6ProtocolTest(config *aws.Config) *InputService6ProtocolTest {
+ service := &aws.Service{
+ Config: aws.DefaultConfig.Merge(config),
+ ServiceName: "inputservice6protocoltest",
+ APIVersion: "2014-01-01",
+ }
+ service.Initialize()
+
+ // Handlers
+ service.Handlers.Sign.PushBack(v4.Sign)
+ service.Handlers.Build.PushBack(ec2query.Build)
+ service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
+ service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
+ service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
+
+ return &InputService6ProtocolTest{service}
+}
+
+// newRequest creates a new request for a InputService6ProtocolTest operation and runs any
+// custom request initialization.
+func (c *InputService6ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
+ req := aws.NewRequest(c.Service, op, params, data)
+
+ return req
+}
+
+const opInputService6TestCaseOperation1 = "OperationName"
+
+// InputService6TestCaseOperation1Request generates a request for the InputService6TestCaseOperation1 operation.
+func (c *InputService6ProtocolTest) InputService6TestCaseOperation1Request(input *InputService6TestShapeInputShape) (req *aws.Request, output *InputService6TestShapeInputService6TestCaseOperation1Output) {
+ op := &aws.Operation{
+ Name: opInputService6TestCaseOperation1,
+ }
+
+ if input == nil {
+ input = &InputService6TestShapeInputShape{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &InputService6TestShapeInputService6TestCaseOperation1Output{}
+ req.Data = output
+ return
+}
+
+func (c *InputService6ProtocolTest) InputService6TestCaseOperation1(input *InputService6TestShapeInputShape) (*InputService6TestShapeInputService6TestCaseOperation1Output, error) {
+ req, out := c.InputService6TestCaseOperation1Request(input)
+ err := req.Send()
+ return out, err
+}
+
+type InputService6TestShapeInputService6TestCaseOperation1Output struct {
+ metadataInputService6TestShapeInputService6TestCaseOperation1Output `json:"-" xml:"-"`
+}
+
+type metadataInputService6TestShapeInputService6TestCaseOperation1Output struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type InputService6TestShapeInputShape struct {
+ ListArg []*string `locationName:"ListMemberName" queryName:"ListQueryName" locationNameList:"item" type:"list"`
+
+ metadataInputService6TestShapeInputShape `json:"-" xml:"-"`
+}
+
+type metadataInputService6TestShapeInputShape struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type InputService7ProtocolTest struct {
+ *aws.Service
+}
+
+// New returns a new InputService7ProtocolTest client.
+func NewInputService7ProtocolTest(config *aws.Config) *InputService7ProtocolTest {
+ service := &aws.Service{
+ Config: aws.DefaultConfig.Merge(config),
+ ServiceName: "inputservice7protocoltest",
+ APIVersion: "2014-01-01",
+ }
+ service.Initialize()
+
+ // Handlers
+ service.Handlers.Sign.PushBack(v4.Sign)
+ service.Handlers.Build.PushBack(ec2query.Build)
+ service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
+ service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
+ service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
+
+ return &InputService7ProtocolTest{service}
+}
+
+// newRequest creates a new request for a InputService7ProtocolTest operation and runs any
+// custom request initialization.
+func (c *InputService7ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
+ req := aws.NewRequest(c.Service, op, params, data)
+
+ return req
+}
+
+const opInputService7TestCaseOperation1 = "OperationName"
+
+// InputService7TestCaseOperation1Request generates a request for the InputService7TestCaseOperation1 operation.
+func (c *InputService7ProtocolTest) InputService7TestCaseOperation1Request(input *InputService7TestShapeInputShape) (req *aws.Request, output *InputService7TestShapeInputService7TestCaseOperation1Output) {
+ op := &aws.Operation{
+ Name: opInputService7TestCaseOperation1,
+ }
+
+ if input == nil {
+ input = &InputService7TestShapeInputShape{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &InputService7TestShapeInputService7TestCaseOperation1Output{}
+ req.Data = output
+ return
+}
+
+func (c *InputService7ProtocolTest) InputService7TestCaseOperation1(input *InputService7TestShapeInputShape) (*InputService7TestShapeInputService7TestCaseOperation1Output, error) {
+ req, out := c.InputService7TestCaseOperation1Request(input)
+ err := req.Send()
+ return out, err
+}
+
+type InputService7TestShapeInputService7TestCaseOperation1Output struct {
+ metadataInputService7TestShapeInputService7TestCaseOperation1Output `json:"-" xml:"-"`
+}
+
+type metadataInputService7TestShapeInputService7TestCaseOperation1Output struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type InputService7TestShapeInputShape struct {
+ BlobArg []byte `type:"blob"`
+
+ metadataInputService7TestShapeInputShape `json:"-" xml:"-"`
+}
+
+type metadataInputService7TestShapeInputShape struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type InputService8ProtocolTest struct {
+ *aws.Service
+}
+
+// New returns a new InputService8ProtocolTest client.
+func NewInputService8ProtocolTest(config *aws.Config) *InputService8ProtocolTest {
+ service := &aws.Service{
+ Config: aws.DefaultConfig.Merge(config),
+ ServiceName: "inputservice8protocoltest",
+ APIVersion: "2014-01-01",
+ }
+ service.Initialize()
+
+ // Handlers
+ service.Handlers.Sign.PushBack(v4.Sign)
+ service.Handlers.Build.PushBack(ec2query.Build)
+ service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
+ service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
+ service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
+
+ return &InputService8ProtocolTest{service}
+}
+
+// newRequest creates a new request for a InputService8ProtocolTest operation and runs any
+// custom request initialization.
+func (c *InputService8ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
+ req := aws.NewRequest(c.Service, op, params, data)
+
+ return req
+}
+
+const opInputService8TestCaseOperation1 = "OperationName"
+
+// InputService8TestCaseOperation1Request generates a request for the InputService8TestCaseOperation1 operation.
+func (c *InputService8ProtocolTest) InputService8TestCaseOperation1Request(input *InputService8TestShapeInputShape) (req *aws.Request, output *InputService8TestShapeInputService8TestCaseOperation1Output) {
+ op := &aws.Operation{
+ Name: opInputService8TestCaseOperation1,
+ }
+
+ if input == nil {
+ input = &InputService8TestShapeInputShape{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &InputService8TestShapeInputService8TestCaseOperation1Output{}
+ req.Data = output
+ return
+}
+
+func (c *InputService8ProtocolTest) InputService8TestCaseOperation1(input *InputService8TestShapeInputShape) (*InputService8TestShapeInputService8TestCaseOperation1Output, error) {
+ req, out := c.InputService8TestCaseOperation1Request(input)
+ err := req.Send()
+ return out, err
+}
+
+type InputService8TestShapeInputService8TestCaseOperation1Output struct {
+ metadataInputService8TestShapeInputService8TestCaseOperation1Output `json:"-" xml:"-"`
+}
+
+type metadataInputService8TestShapeInputService8TestCaseOperation1Output struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type InputService8TestShapeInputShape struct {
+ TimeArg *time.Time `type:"timestamp" timestampFormat:"iso8601"`
+
+ metadataInputService8TestShapeInputShape `json:"-" xml:"-"`
+}
+
+type metadataInputService8TestShapeInputShape struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+//
+// Tests begin here
+//
+
+func TestInputService1ProtocolTestScalarMembersCase1(t *testing.T) {
+ svc := NewInputService1ProtocolTest(nil)
+ svc.Endpoint = "https://test"
+
+ input := &InputService1TestShapeInputShape{
+ Bar: aws.String("val2"),
+ Foo: aws.String("val1"),
+ }
+ req, _ := svc.InputService1TestCaseOperation1Request(input)
+ r := req.HTTPRequest
+
+ // build request
+ ec2query.Build(req)
+ assert.NoError(t, req.Error)
+
+ // assert body
+ assert.NotNil(t, r.Body)
+ body, _ := ioutil.ReadAll(r.Body)
+ assert.Equal(t, util.Trim(`Action=OperationName&Bar=val2&Foo=val1&Version=2014-01-01`), util.Trim(string(body)))
+
+ // assert URL
+ assert.Equal(t, "https://test/", r.URL.String())
+
+ // assert headers
+
+}
+
+func TestInputService2ProtocolTestStructureWithLocationNameAndQueryNameAppliedToMembersCase1(t *testing.T) {
+ svc := NewInputService2ProtocolTest(nil)
+ svc.Endpoint = "https://test"
+
+ input := &InputService2TestShapeInputShape{
+ Bar: aws.String("val2"),
+ Foo: aws.String("val1"),
+ Yuck: aws.String("val3"),
+ }
+ req, _ := svc.InputService2TestCaseOperation1Request(input)
+ r := req.HTTPRequest
+
+ // build request
+ ec2query.Build(req)
+ assert.NoError(t, req.Error)
+
+ // assert body
+ assert.NotNil(t, r.Body)
+ body, _ := ioutil.ReadAll(r.Body)
+ assert.Equal(t, util.Trim(`Action=OperationName&BarLocationName=val2&Foo=val1&Version=2014-01-01&yuckQueryName=val3`), util.Trim(string(body)))
+
+ // assert URL
+ assert.Equal(t, "https://test/", r.URL.String())
+
+ // assert headers
+
+}
+
+func TestInputService3ProtocolTestNestedStructureMembersCase1(t *testing.T) {
+ svc := NewInputService3ProtocolTest(nil)
+ svc.Endpoint = "https://test"
+
+ input := &InputService3TestShapeInputShape{
+ StructArg: &InputService3TestShapeStructType{
+ ScalarArg: aws.String("foo"),
+ },
+ }
+ req, _ := svc.InputService3TestCaseOperation1Request(input)
+ r := req.HTTPRequest
+
+ // build request
+ ec2query.Build(req)
+ assert.NoError(t, req.Error)
+
+ // assert body
+ assert.NotNil(t, r.Body)
+ body, _ := ioutil.ReadAll(r.Body)
+ assert.Equal(t, util.Trim(`Action=OperationName&Struct.Scalar=foo&Version=2014-01-01`), util.Trim(string(body)))
+
+ // assert URL
+ assert.Equal(t, "https://test/", r.URL.String())
+
+ // assert headers
+
+}
+
+func TestInputService4ProtocolTestListTypesCase1(t *testing.T) {
+ svc := NewInputService4ProtocolTest(nil)
+ svc.Endpoint = "https://test"
+
+ input := &InputService4TestShapeInputShape{
+ ListArg: []*string{
+ aws.String("foo"),
+ aws.String("bar"),
+ aws.String("baz"),
+ },
+ }
+ req, _ := svc.InputService4TestCaseOperation1Request(input)
+ r := req.HTTPRequest
+
+ // build request
+ ec2query.Build(req)
+ assert.NoError(t, req.Error)
+
+ // assert body
+ assert.NotNil(t, r.Body)
+ body, _ := ioutil.ReadAll(r.Body)
+ assert.Equal(t, util.Trim(`Action=OperationName&ListArg.1=foo&ListArg.2=bar&ListArg.3=baz&Version=2014-01-01`), util.Trim(string(body)))
+
+ // assert URL
+ assert.Equal(t, "https://test/", r.URL.String())
+
+ // assert headers
+
+}
+
+func TestInputService5ProtocolTestListWithLocationNameAppliedToMemberCase1(t *testing.T) {
+ svc := NewInputService5ProtocolTest(nil)
+ svc.Endpoint = "https://test"
+
+ input := &InputService5TestShapeInputShape{
+ ListArg: []*string{
+ aws.String("a"),
+ aws.String("b"),
+ aws.String("c"),
+ },
+ }
+ req, _ := svc.InputService5TestCaseOperation1Request(input)
+ r := req.HTTPRequest
+
+ // build request
+ ec2query.Build(req)
+ assert.NoError(t, req.Error)
+
+ // assert body
+ assert.NotNil(t, r.Body)
+ body, _ := ioutil.ReadAll(r.Body)
+ assert.Equal(t, util.Trim(`Action=OperationName&ListMemberName.1=a&ListMemberName.2=b&ListMemberName.3=c&Version=2014-01-01`), util.Trim(string(body)))
+
+ // assert URL
+ assert.Equal(t, "https://test/", r.URL.String())
+
+ // assert headers
+
+}
+
+func TestInputService6ProtocolTestListWithLocationNameAndQueryNameCase1(t *testing.T) {
+ svc := NewInputService6ProtocolTest(nil)
+ svc.Endpoint = "https://test"
+
+ input := &InputService6TestShapeInputShape{
+ ListArg: []*string{
+ aws.String("a"),
+ aws.String("b"),
+ aws.String("c"),
+ },
+ }
+ req, _ := svc.InputService6TestCaseOperation1Request(input)
+ r := req.HTTPRequest
+
+ // build request
+ ec2query.Build(req)
+ assert.NoError(t, req.Error)
+
+ // assert body
+ assert.NotNil(t, r.Body)
+ body, _ := ioutil.ReadAll(r.Body)
+ assert.Equal(t, util.Trim(`Action=OperationName&ListQueryName.1=a&ListQueryName.2=b&ListQueryName.3=c&Version=2014-01-01`), util.Trim(string(body)))
+
+ // assert URL
+ assert.Equal(t, "https://test/", r.URL.String())
+
+ // assert headers
+
+}
+
+func TestInputService7ProtocolTestBase64EncodedBlobsCase1(t *testing.T) {
+ svc := NewInputService7ProtocolTest(nil)
+ svc.Endpoint = "https://test"
+
+ input := &InputService7TestShapeInputShape{
+ BlobArg: []byte("foo"),
+ }
+ req, _ := svc.InputService7TestCaseOperation1Request(input)
+ r := req.HTTPRequest
+
+ // build request
+ ec2query.Build(req)
+ assert.NoError(t, req.Error)
+
+ // assert body
+ assert.NotNil(t, r.Body)
+ body, _ := ioutil.ReadAll(r.Body)
+ assert.Equal(t, util.Trim(`Action=OperationName&BlobArg=Zm9v&Version=2014-01-01`), util.Trim(string(body)))
+
+ // assert URL
+ assert.Equal(t, "https://test/", r.URL.String())
+
+ // assert headers
+
+}
+
+func TestInputService8ProtocolTestTimestampValuesCase1(t *testing.T) {
+ svc := NewInputService8ProtocolTest(nil)
+ svc.Endpoint = "https://test"
+
+ input := &InputService8TestShapeInputShape{
+ TimeArg: aws.Time(time.Unix(1422172800, 0)),
+ }
+ req, _ := svc.InputService8TestCaseOperation1Request(input)
+ r := req.HTTPRequest
+
+ // build request
+ ec2query.Build(req)
+ assert.NoError(t, req.Error)
+
+ // assert body
+ assert.NotNil(t, r.Body)
+ body, _ := ioutil.ReadAll(r.Body)
+ assert.Equal(t, util.Trim(`Action=OperationName&TimeArg=2015-01-25T08%3A00%3A00Z&Version=2014-01-01`), util.Trim(string(body)))
+
+ // assert URL
+ assert.Equal(t, "https://test/", r.URL.String())
+
+ // assert headers
+
+}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/unmarshal.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/unmarshal.go
new file mode 100644
index 00000000000..e59b2bbac3e
--- /dev/null
+++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/unmarshal.go
@@ -0,0 +1,54 @@
+package ec2query
+
+//go:generate go run ../../fixtures/protocol/generate.go ../../fixtures/protocol/output/ec2.json unmarshal_test.go
+
+import (
+ "encoding/xml"
+ "io"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/awserr"
+ "github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil"
+)
+
+// Unmarshal unmarshals a response body for the EC2 protocol.
+func Unmarshal(r *aws.Request) {
+ defer r.HTTPResponse.Body.Close()
+ if r.DataFilled() {
+ decoder := xml.NewDecoder(r.HTTPResponse.Body)
+ err := xmlutil.UnmarshalXML(r.Data, decoder, "")
+ if err != nil {
+ r.Error = awserr.New("SerializationError", "failed decoding EC2 Query response", err)
+ return
+ }
+ }
+}
+
+// UnmarshalMeta unmarshals response headers for the EC2 protocol.
+func UnmarshalMeta(r *aws.Request) {
+ // TODO implement unmarshaling of request IDs
+}
+
+type xmlErrorResponse struct {
+ XMLName xml.Name `xml:"Response"`
+ Code string `xml:"Errors>Error>Code"`
+ Message string `xml:"Errors>Error>Message"`
+ RequestID string `xml:"RequestId"`
+}
+
+// UnmarshalError unmarshals a response error for the EC2 protocol.
+func UnmarshalError(r *aws.Request) {
+ defer r.HTTPResponse.Body.Close()
+
+ resp := &xmlErrorResponse{}
+ err := xml.NewDecoder(r.HTTPResponse.Body).Decode(resp)
+ if err != nil && err != io.EOF {
+ r.Error = awserr.New("SerializationError", "failed decoding EC2 Query error response", err)
+ } else {
+ r.Error = awserr.NewRequestFailure(
+ awserr.New(resp.Code, resp.Message, nil),
+ r.HTTPResponse.StatusCode,
+ resp.RequestID,
+ )
+ }
+}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/unmarshal_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/unmarshal_test.go
new file mode 100644
index 00000000000..a4527c14e7e
--- /dev/null
+++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/unmarshal_test.go
@@ -0,0 +1,816 @@
+package ec2query_test
+
+import (
+ "bytes"
+ "encoding/json"
+ "encoding/xml"
+ "io"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+ "testing"
+ "time"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/internal/protocol/ec2query"
+ "github.com/aws/aws-sdk-go/internal/protocol/xml/xmlutil"
+ "github.com/aws/aws-sdk-go/internal/signer/v4"
+ "github.com/aws/aws-sdk-go/internal/util"
+ "github.com/stretchr/testify/assert"
+)
+
+var _ bytes.Buffer // always import bytes
+var _ http.Request
+var _ json.Marshaler
+var _ time.Time
+var _ xmlutil.XMLNode
+var _ xml.Attr
+var _ = ioutil.Discard
+var _ = util.Trim("")
+var _ = url.Values{}
+var _ = io.EOF
+
+type OutputService1ProtocolTest struct {
+ *aws.Service
+}
+
+// New returns a new OutputService1ProtocolTest client.
+func NewOutputService1ProtocolTest(config *aws.Config) *OutputService1ProtocolTest {
+ service := &aws.Service{
+ Config: aws.DefaultConfig.Merge(config),
+ ServiceName: "outputservice1protocoltest",
+ APIVersion: "",
+ }
+ service.Initialize()
+
+ // Handlers
+ service.Handlers.Sign.PushBack(v4.Sign)
+ service.Handlers.Build.PushBack(ec2query.Build)
+ service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
+ service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
+ service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
+
+ return &OutputService1ProtocolTest{service}
+}
+
+// newRequest creates a new request for a OutputService1ProtocolTest operation and runs any
+// custom request initialization.
+func (c *OutputService1ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
+ req := aws.NewRequest(c.Service, op, params, data)
+
+ return req
+}
+
+const opOutputService1TestCaseOperation1 = "OperationName"
+
+// OutputService1TestCaseOperation1Request generates a request for the OutputService1TestCaseOperation1 operation.
+func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1Request(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (req *aws.Request, output *OutputService1TestShapeOutputShape) {
+ op := &aws.Operation{
+ Name: opOutputService1TestCaseOperation1,
+ }
+
+ if input == nil {
+ input = &OutputService1TestShapeOutputService1TestCaseOperation1Input{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &OutputService1TestShapeOutputShape{}
+ req.Data = output
+ return
+}
+
+func (c *OutputService1ProtocolTest) OutputService1TestCaseOperation1(input *OutputService1TestShapeOutputService1TestCaseOperation1Input) (*OutputService1TestShapeOutputShape, error) {
+ req, out := c.OutputService1TestCaseOperation1Request(input)
+ err := req.Send()
+ return out, err
+}
+
+type OutputService1TestShapeOutputService1TestCaseOperation1Input struct {
+ metadataOutputService1TestShapeOutputService1TestCaseOperation1Input `json:"-" xml:"-"`
+}
+
+type metadataOutputService1TestShapeOutputService1TestCaseOperation1Input struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type OutputService1TestShapeOutputShape struct {
+ Char *string `type:"character"`
+
+ Double *float64 `type:"double"`
+
+ FalseBool *bool `type:"boolean"`
+
+ Float *float64 `type:"float"`
+
+ Long *int64 `type:"long"`
+
+ Num *int64 `locationName:"FooNum" type:"integer"`
+
+ Str *string `type:"string"`
+
+ TrueBool *bool `type:"boolean"`
+
+ metadataOutputService1TestShapeOutputShape `json:"-" xml:"-"`
+}
+
+type metadataOutputService1TestShapeOutputShape struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type OutputService2ProtocolTest struct {
+ *aws.Service
+}
+
+// New returns a new OutputService2ProtocolTest client.
+func NewOutputService2ProtocolTest(config *aws.Config) *OutputService2ProtocolTest {
+ service := &aws.Service{
+ Config: aws.DefaultConfig.Merge(config),
+ ServiceName: "outputservice2protocoltest",
+ APIVersion: "",
+ }
+ service.Initialize()
+
+ // Handlers
+ service.Handlers.Sign.PushBack(v4.Sign)
+ service.Handlers.Build.PushBack(ec2query.Build)
+ service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
+ service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
+ service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
+
+ return &OutputService2ProtocolTest{service}
+}
+
+// newRequest creates a new request for a OutputService2ProtocolTest operation and runs any
+// custom request initialization.
+func (c *OutputService2ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
+ req := aws.NewRequest(c.Service, op, params, data)
+
+ return req
+}
+
+const opOutputService2TestCaseOperation1 = "OperationName"
+
+// OutputService2TestCaseOperation1Request generates a request for the OutputService2TestCaseOperation1 operation.
+func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1Request(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (req *aws.Request, output *OutputService2TestShapeOutputShape) {
+ op := &aws.Operation{
+ Name: opOutputService2TestCaseOperation1,
+ }
+
+ if input == nil {
+ input = &OutputService2TestShapeOutputService2TestCaseOperation1Input{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &OutputService2TestShapeOutputShape{}
+ req.Data = output
+ return
+}
+
+func (c *OutputService2ProtocolTest) OutputService2TestCaseOperation1(input *OutputService2TestShapeOutputService2TestCaseOperation1Input) (*OutputService2TestShapeOutputShape, error) {
+ req, out := c.OutputService2TestCaseOperation1Request(input)
+ err := req.Send()
+ return out, err
+}
+
+type OutputService2TestShapeOutputService2TestCaseOperation1Input struct {
+ metadataOutputService2TestShapeOutputService2TestCaseOperation1Input `json:"-" xml:"-"`
+}
+
+type metadataOutputService2TestShapeOutputService2TestCaseOperation1Input struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type OutputService2TestShapeOutputShape struct {
+ Blob []byte `type:"blob"`
+
+ metadataOutputService2TestShapeOutputShape `json:"-" xml:"-"`
+}
+
+type metadataOutputService2TestShapeOutputShape struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type OutputService3ProtocolTest struct {
+ *aws.Service
+}
+
+// New returns a new OutputService3ProtocolTest client.
+func NewOutputService3ProtocolTest(config *aws.Config) *OutputService3ProtocolTest {
+ service := &aws.Service{
+ Config: aws.DefaultConfig.Merge(config),
+ ServiceName: "outputservice3protocoltest",
+ APIVersion: "",
+ }
+ service.Initialize()
+
+ // Handlers
+ service.Handlers.Sign.PushBack(v4.Sign)
+ service.Handlers.Build.PushBack(ec2query.Build)
+ service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
+ service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
+ service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
+
+ return &OutputService3ProtocolTest{service}
+}
+
+// newRequest creates a new request for a OutputService3ProtocolTest operation and runs any
+// custom request initialization.
+func (c *OutputService3ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
+ req := aws.NewRequest(c.Service, op, params, data)
+
+ return req
+}
+
+const opOutputService3TestCaseOperation1 = "OperationName"
+
+// OutputService3TestCaseOperation1Request generates a request for the OutputService3TestCaseOperation1 operation.
+func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1Request(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (req *aws.Request, output *OutputService3TestShapeOutputShape) {
+ op := &aws.Operation{
+ Name: opOutputService3TestCaseOperation1,
+ }
+
+ if input == nil {
+ input = &OutputService3TestShapeOutputService3TestCaseOperation1Input{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &OutputService3TestShapeOutputShape{}
+ req.Data = output
+ return
+}
+
+func (c *OutputService3ProtocolTest) OutputService3TestCaseOperation1(input *OutputService3TestShapeOutputService3TestCaseOperation1Input) (*OutputService3TestShapeOutputShape, error) {
+ req, out := c.OutputService3TestCaseOperation1Request(input)
+ err := req.Send()
+ return out, err
+}
+
+type OutputService3TestShapeOutputService3TestCaseOperation1Input struct {
+ metadataOutputService3TestShapeOutputService3TestCaseOperation1Input `json:"-" xml:"-"`
+}
+
+type metadataOutputService3TestShapeOutputService3TestCaseOperation1Input struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type OutputService3TestShapeOutputShape struct {
+ ListMember []*string `type:"list"`
+
+ metadataOutputService3TestShapeOutputShape `json:"-" xml:"-"`
+}
+
+type metadataOutputService3TestShapeOutputShape struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type OutputService4ProtocolTest struct {
+ *aws.Service
+}
+
+// New returns a new OutputService4ProtocolTest client.
+func NewOutputService4ProtocolTest(config *aws.Config) *OutputService4ProtocolTest {
+ service := &aws.Service{
+ Config: aws.DefaultConfig.Merge(config),
+ ServiceName: "outputservice4protocoltest",
+ APIVersion: "",
+ }
+ service.Initialize()
+
+ // Handlers
+ service.Handlers.Sign.PushBack(v4.Sign)
+ service.Handlers.Build.PushBack(ec2query.Build)
+ service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
+ service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
+ service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
+
+ return &OutputService4ProtocolTest{service}
+}
+
+// newRequest creates a new request for a OutputService4ProtocolTest operation and runs any
+// custom request initialization.
+func (c *OutputService4ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
+ req := aws.NewRequest(c.Service, op, params, data)
+
+ return req
+}
+
+const opOutputService4TestCaseOperation1 = "OperationName"
+
+// OutputService4TestCaseOperation1Request generates a request for the OutputService4TestCaseOperation1 operation.
+func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1Request(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (req *aws.Request, output *OutputService4TestShapeOutputShape) {
+ op := &aws.Operation{
+ Name: opOutputService4TestCaseOperation1,
+ }
+
+ if input == nil {
+ input = &OutputService4TestShapeOutputService4TestCaseOperation1Input{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &OutputService4TestShapeOutputShape{}
+ req.Data = output
+ return
+}
+
+func (c *OutputService4ProtocolTest) OutputService4TestCaseOperation1(input *OutputService4TestShapeOutputService4TestCaseOperation1Input) (*OutputService4TestShapeOutputShape, error) {
+ req, out := c.OutputService4TestCaseOperation1Request(input)
+ err := req.Send()
+ return out, err
+}
+
+type OutputService4TestShapeOutputService4TestCaseOperation1Input struct {
+ metadataOutputService4TestShapeOutputService4TestCaseOperation1Input `json:"-" xml:"-"`
+}
+
+type metadataOutputService4TestShapeOutputService4TestCaseOperation1Input struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type OutputService4TestShapeOutputShape struct {
+ ListMember []*string `locationNameList:"item" type:"list"`
+
+ metadataOutputService4TestShapeOutputShape `json:"-" xml:"-"`
+}
+
+type metadataOutputService4TestShapeOutputShape struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type OutputService5ProtocolTest struct {
+ *aws.Service
+}
+
+// New returns a new OutputService5ProtocolTest client.
+func NewOutputService5ProtocolTest(config *aws.Config) *OutputService5ProtocolTest {
+ service := &aws.Service{
+ Config: aws.DefaultConfig.Merge(config),
+ ServiceName: "outputservice5protocoltest",
+ APIVersion: "",
+ }
+ service.Initialize()
+
+ // Handlers
+ service.Handlers.Sign.PushBack(v4.Sign)
+ service.Handlers.Build.PushBack(ec2query.Build)
+ service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
+ service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
+ service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
+
+ return &OutputService5ProtocolTest{service}
+}
+
+// newRequest creates a new request for a OutputService5ProtocolTest operation and runs any
+// custom request initialization.
+func (c *OutputService5ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
+ req := aws.NewRequest(c.Service, op, params, data)
+
+ return req
+}
+
+const opOutputService5TestCaseOperation1 = "OperationName"
+
+// OutputService5TestCaseOperation1Request generates a request for the OutputService5TestCaseOperation1 operation.
+func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1Request(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (req *aws.Request, output *OutputService5TestShapeOutputShape) {
+ op := &aws.Operation{
+ Name: opOutputService5TestCaseOperation1,
+ }
+
+ if input == nil {
+ input = &OutputService5TestShapeOutputService5TestCaseOperation1Input{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &OutputService5TestShapeOutputShape{}
+ req.Data = output
+ return
+}
+
+func (c *OutputService5ProtocolTest) OutputService5TestCaseOperation1(input *OutputService5TestShapeOutputService5TestCaseOperation1Input) (*OutputService5TestShapeOutputShape, error) {
+ req, out := c.OutputService5TestCaseOperation1Request(input)
+ err := req.Send()
+ return out, err
+}
+
+type OutputService5TestShapeOutputService5TestCaseOperation1Input struct {
+ metadataOutputService5TestShapeOutputService5TestCaseOperation1Input `json:"-" xml:"-"`
+}
+
+type metadataOutputService5TestShapeOutputService5TestCaseOperation1Input struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type OutputService5TestShapeOutputShape struct {
+ ListMember []*string `type:"list" flattened:"true"`
+
+ metadataOutputService5TestShapeOutputShape `json:"-" xml:"-"`
+}
+
+type metadataOutputService5TestShapeOutputShape struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type OutputService6ProtocolTest struct {
+ *aws.Service
+}
+
+// New returns a new OutputService6ProtocolTest client.
+func NewOutputService6ProtocolTest(config *aws.Config) *OutputService6ProtocolTest {
+ service := &aws.Service{
+ Config: aws.DefaultConfig.Merge(config),
+ ServiceName: "outputservice6protocoltest",
+ APIVersion: "",
+ }
+ service.Initialize()
+
+ // Handlers
+ service.Handlers.Sign.PushBack(v4.Sign)
+ service.Handlers.Build.PushBack(ec2query.Build)
+ service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
+ service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
+ service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
+
+ return &OutputService6ProtocolTest{service}
+}
+
+// newRequest creates a new request for a OutputService6ProtocolTest operation and runs any
+// custom request initialization.
+func (c *OutputService6ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
+ req := aws.NewRequest(c.Service, op, params, data)
+
+ return req
+}
+
+const opOutputService6TestCaseOperation1 = "OperationName"
+
+// OutputService6TestCaseOperation1Request generates a request for the OutputService6TestCaseOperation1 operation.
+func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1Request(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (req *aws.Request, output *OutputService6TestShapeOutputShape) {
+ op := &aws.Operation{
+ Name: opOutputService6TestCaseOperation1,
+ }
+
+ if input == nil {
+ input = &OutputService6TestShapeOutputService6TestCaseOperation1Input{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &OutputService6TestShapeOutputShape{}
+ req.Data = output
+ return
+}
+
+func (c *OutputService6ProtocolTest) OutputService6TestCaseOperation1(input *OutputService6TestShapeOutputService6TestCaseOperation1Input) (*OutputService6TestShapeOutputShape, error) {
+ req, out := c.OutputService6TestCaseOperation1Request(input)
+ err := req.Send()
+ return out, err
+}
+
+type OutputService6TestShapeOutputService6TestCaseOperation1Input struct {
+ metadataOutputService6TestShapeOutputService6TestCaseOperation1Input `json:"-" xml:"-"`
+}
+
+type metadataOutputService6TestShapeOutputService6TestCaseOperation1Input struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type OutputService6TestShapeOutputShape struct {
+ Map map[string]*OutputService6TestShapeStructureType `type:"map"`
+
+ metadataOutputService6TestShapeOutputShape `json:"-" xml:"-"`
+}
+
+type metadataOutputService6TestShapeOutputShape struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type OutputService6TestShapeStructureType struct {
+ Foo *string `locationName:"foo" type:"string"`
+
+ metadataOutputService6TestShapeStructureType `json:"-" xml:"-"`
+}
+
+type metadataOutputService6TestShapeStructureType struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type OutputService7ProtocolTest struct {
+ *aws.Service
+}
+
+// New returns a new OutputService7ProtocolTest client.
+func NewOutputService7ProtocolTest(config *aws.Config) *OutputService7ProtocolTest {
+ service := &aws.Service{
+ Config: aws.DefaultConfig.Merge(config),
+ ServiceName: "outputservice7protocoltest",
+ APIVersion: "",
+ }
+ service.Initialize()
+
+ // Handlers
+ service.Handlers.Sign.PushBack(v4.Sign)
+ service.Handlers.Build.PushBack(ec2query.Build)
+ service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
+ service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
+ service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
+
+ return &OutputService7ProtocolTest{service}
+}
+
+// newRequest creates a new request for a OutputService7ProtocolTest operation and runs any
+// custom request initialization.
+func (c *OutputService7ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
+ req := aws.NewRequest(c.Service, op, params, data)
+
+ return req
+}
+
+const opOutputService7TestCaseOperation1 = "OperationName"
+
+// OutputService7TestCaseOperation1Request generates a request for the OutputService7TestCaseOperation1 operation.
+func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1Request(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (req *aws.Request, output *OutputService7TestShapeOutputShape) {
+ op := &aws.Operation{
+ Name: opOutputService7TestCaseOperation1,
+ }
+
+ if input == nil {
+ input = &OutputService7TestShapeOutputService7TestCaseOperation1Input{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &OutputService7TestShapeOutputShape{}
+ req.Data = output
+ return
+}
+
+func (c *OutputService7ProtocolTest) OutputService7TestCaseOperation1(input *OutputService7TestShapeOutputService7TestCaseOperation1Input) (*OutputService7TestShapeOutputShape, error) {
+ req, out := c.OutputService7TestCaseOperation1Request(input)
+ err := req.Send()
+ return out, err
+}
+
+type OutputService7TestShapeOutputService7TestCaseOperation1Input struct {
+ metadataOutputService7TestShapeOutputService7TestCaseOperation1Input `json:"-" xml:"-"`
+}
+
+type metadataOutputService7TestShapeOutputService7TestCaseOperation1Input struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type OutputService7TestShapeOutputShape struct {
+ Map map[string]*string `type:"map" flattened:"true"`
+
+ metadataOutputService7TestShapeOutputShape `json:"-" xml:"-"`
+}
+
+type metadataOutputService7TestShapeOutputShape struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type OutputService8ProtocolTest struct {
+ *aws.Service
+}
+
+// New returns a new OutputService8ProtocolTest client.
+func NewOutputService8ProtocolTest(config *aws.Config) *OutputService8ProtocolTest {
+ service := &aws.Service{
+ Config: aws.DefaultConfig.Merge(config),
+ ServiceName: "outputservice8protocoltest",
+ APIVersion: "",
+ }
+ service.Initialize()
+
+ // Handlers
+ service.Handlers.Sign.PushBack(v4.Sign)
+ service.Handlers.Build.PushBack(ec2query.Build)
+ service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
+ service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
+ service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
+
+ return &OutputService8ProtocolTest{service}
+}
+
+// newRequest creates a new request for a OutputService8ProtocolTest operation and runs any
+// custom request initialization.
+func (c *OutputService8ProtocolTest) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
+ req := aws.NewRequest(c.Service, op, params, data)
+
+ return req
+}
+
+const opOutputService8TestCaseOperation1 = "OperationName"
+
+// OutputService8TestCaseOperation1Request generates a request for the OutputService8TestCaseOperation1 operation.
+func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1Request(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (req *aws.Request, output *OutputService8TestShapeOutputShape) {
+ op := &aws.Operation{
+ Name: opOutputService8TestCaseOperation1,
+ }
+
+ if input == nil {
+ input = &OutputService8TestShapeOutputService8TestCaseOperation1Input{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &OutputService8TestShapeOutputShape{}
+ req.Data = output
+ return
+}
+
+func (c *OutputService8ProtocolTest) OutputService8TestCaseOperation1(input *OutputService8TestShapeOutputService8TestCaseOperation1Input) (*OutputService8TestShapeOutputShape, error) {
+ req, out := c.OutputService8TestCaseOperation1Request(input)
+ err := req.Send()
+ return out, err
+}
+
+type OutputService8TestShapeOutputService8TestCaseOperation1Input struct {
+ metadataOutputService8TestShapeOutputService8TestCaseOperation1Input `json:"-" xml:"-"`
+}
+
+type metadataOutputService8TestShapeOutputService8TestCaseOperation1Input struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+type OutputService8TestShapeOutputShape struct {
+ Map map[string]*string `locationNameKey:"foo" locationNameValue:"bar" type:"map" flattened:"true"`
+
+ metadataOutputService8TestShapeOutputShape `json:"-" xml:"-"`
+}
+
+type metadataOutputService8TestShapeOutputShape struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+//
+// Tests begin here
+//
+
+func TestOutputService1ProtocolTestScalarMembersCase1(t *testing.T) {
+ svc := NewOutputService1ProtocolTest(nil)
+
+ buf := bytes.NewReader([]byte("myname123falsetrue1.21.3200arequest-id"))
+ req, out := svc.OutputService1TestCaseOperation1Request(nil)
+ req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
+
+ // set headers
+
+ // unmarshal response
+ ec2query.UnmarshalMeta(req)
+ ec2query.Unmarshal(req)
+ assert.NoError(t, req.Error)
+
+ // assert response
+ assert.NotNil(t, out) // ensure out variable is used
+ assert.Equal(t, "a", *out.Char)
+ assert.Equal(t, 1.3, *out.Double)
+ assert.Equal(t, false, *out.FalseBool)
+ assert.Equal(t, 1.2, *out.Float)
+ assert.Equal(t, int64(200), *out.Long)
+ assert.Equal(t, int64(123), *out.Num)
+ assert.Equal(t, "myname", *out.Str)
+ assert.Equal(t, true, *out.TrueBool)
+
+}
+
+func TestOutputService2ProtocolTestBlobCase1(t *testing.T) {
+ svc := NewOutputService2ProtocolTest(nil)
+
+ buf := bytes.NewReader([]byte("dmFsdWU=requestid"))
+ req, out := svc.OutputService2TestCaseOperation1Request(nil)
+ req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
+
+ // set headers
+
+ // unmarshal response
+ ec2query.UnmarshalMeta(req)
+ ec2query.Unmarshal(req)
+ assert.NoError(t, req.Error)
+
+ // assert response
+ assert.NotNil(t, out) // ensure out variable is used
+ assert.Equal(t, "value", string(out.Blob))
+
+}
+
+func TestOutputService3ProtocolTestListsCase1(t *testing.T) {
+ svc := NewOutputService3ProtocolTest(nil)
+
+ buf := bytes.NewReader([]byte("abc123requestid"))
+ req, out := svc.OutputService3TestCaseOperation1Request(nil)
+ req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
+
+ // set headers
+
+ // unmarshal response
+ ec2query.UnmarshalMeta(req)
+ ec2query.Unmarshal(req)
+ assert.NoError(t, req.Error)
+
+ // assert response
+ assert.NotNil(t, out) // ensure out variable is used
+ assert.Equal(t, "abc", *out.ListMember[0])
+ assert.Equal(t, "123", *out.ListMember[1])
+
+}
+
+func TestOutputService4ProtocolTestListWithCustomMemberNameCase1(t *testing.T) {
+ svc := NewOutputService4ProtocolTest(nil)
+
+ buf := bytes.NewReader([]byte("abc123requestid"))
+ req, out := svc.OutputService4TestCaseOperation1Request(nil)
+ req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
+
+ // set headers
+
+ // unmarshal response
+ ec2query.UnmarshalMeta(req)
+ ec2query.Unmarshal(req)
+ assert.NoError(t, req.Error)
+
+ // assert response
+ assert.NotNil(t, out) // ensure out variable is used
+ assert.Equal(t, "abc", *out.ListMember[0])
+ assert.Equal(t, "123", *out.ListMember[1])
+
+}
+
+func TestOutputService5ProtocolTestFlattenedListCase1(t *testing.T) {
+ svc := NewOutputService5ProtocolTest(nil)
+
+ buf := bytes.NewReader([]byte("abc123requestid"))
+ req, out := svc.OutputService5TestCaseOperation1Request(nil)
+ req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
+
+ // set headers
+
+ // unmarshal response
+ ec2query.UnmarshalMeta(req)
+ ec2query.Unmarshal(req)
+ assert.NoError(t, req.Error)
+
+ // assert response
+ assert.NotNil(t, out) // ensure out variable is used
+ assert.Equal(t, "abc", *out.ListMember[0])
+ assert.Equal(t, "123", *out.ListMember[1])
+
+}
+
+func TestOutputService6ProtocolTestNormalMapCase1(t *testing.T) {
+ svc := NewOutputService6ProtocolTest(nil)
+
+ buf := bytes.NewReader([]byte("requestid"))
+ req, out := svc.OutputService6TestCaseOperation1Request(nil)
+ req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
+
+ // set headers
+
+ // unmarshal response
+ ec2query.UnmarshalMeta(req)
+ ec2query.Unmarshal(req)
+ assert.NoError(t, req.Error)
+
+ // assert response
+ assert.NotNil(t, out) // ensure out variable is used
+ assert.Equal(t, "bam", *out.Map["baz"].Foo)
+ assert.Equal(t, "bar", *out.Map["qux"].Foo)
+
+}
+
+func TestOutputService7ProtocolTestFlattenedMapCase1(t *testing.T) {
+ svc := NewOutputService7ProtocolTest(nil)
+
+ buf := bytes.NewReader([]byte("requestid"))
+ req, out := svc.OutputService7TestCaseOperation1Request(nil)
+ req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
+
+ // set headers
+
+ // unmarshal response
+ ec2query.UnmarshalMeta(req)
+ ec2query.Unmarshal(req)
+ assert.NoError(t, req.Error)
+
+ // assert response
+ assert.NotNil(t, out) // ensure out variable is used
+ assert.Equal(t, "bam", *out.Map["baz"])
+ assert.Equal(t, "bar", *out.Map["qux"])
+
+}
+
+func TestOutputService8ProtocolTestNamedMapCase1(t *testing.T) {
+ svc := NewOutputService8ProtocolTest(nil)
+
+ buf := bytes.NewReader([]byte("requestid"))
+ req, out := svc.OutputService8TestCaseOperation1Request(nil)
+ req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
+
+ // set headers
+
+ // unmarshal response
+ ec2query.UnmarshalMeta(req)
+ ec2query.Unmarshal(req)
+ assert.NoError(t, req.Error)
+
+ // assert response
+ assert.NotNil(t, out) // ensure out variable is used
+ assert.Equal(t, "bam", *out.Map["baz"])
+ assert.Equal(t, "bar", *out.Map["qux"])
+
+}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/api.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/api.go
new file mode 100644
index 00000000000..b6e84b4b43d
--- /dev/null
+++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/api.go
@@ -0,0 +1,24490 @@
+// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+
+// Package ec2 provides a client for Amazon Elastic Compute Cloud.
+package ec2
+
+import (
+ "time"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/awsutil"
+)
+
+const opAcceptVPCPeeringConnection = "AcceptVpcPeeringConnection"
+
+// AcceptVPCPeeringConnectionRequest generates a request for the AcceptVPCPeeringConnection operation.
+func (c *EC2) AcceptVPCPeeringConnectionRequest(input *AcceptVPCPeeringConnectionInput) (req *aws.Request, output *AcceptVPCPeeringConnectionOutput) {
+ op := &aws.Operation{
+ Name: opAcceptVPCPeeringConnection,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &AcceptVPCPeeringConnectionInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &AcceptVPCPeeringConnectionOutput{}
+ req.Data = output
+ return
+}
+
+// Accept a VPC peering connection request. To accept a request, the VPC peering
+// connection must be in the pending-acceptance state, and you must be the owner
+// of the peer VPC. Use the DescribeVpcPeeringConnections request to view your
+// outstanding VPC peering connection requests.
+func (c *EC2) AcceptVPCPeeringConnection(input *AcceptVPCPeeringConnectionInput) (*AcceptVPCPeeringConnectionOutput, error) {
+ req, out := c.AcceptVPCPeeringConnectionRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opAllocateAddress = "AllocateAddress"
+
+// AllocateAddressRequest generates a request for the AllocateAddress operation.
+func (c *EC2) AllocateAddressRequest(input *AllocateAddressInput) (req *aws.Request, output *AllocateAddressOutput) {
+ op := &aws.Operation{
+ Name: opAllocateAddress,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &AllocateAddressInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &AllocateAddressOutput{}
+ req.Data = output
+ return
+}
+
+// Acquires an Elastic IP address.
+//
+// An Elastic IP address is for use either in the EC2-Classic platform or in
+// a VPC. For more information, see Elastic IP Addresses (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) AllocateAddress(input *AllocateAddressInput) (*AllocateAddressOutput, error) {
+ req, out := c.AllocateAddressRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opAssignPrivateIPAddresses = "AssignPrivateIpAddresses"
+
+// AssignPrivateIPAddressesRequest generates a request for the AssignPrivateIPAddresses operation.
+func (c *EC2) AssignPrivateIPAddressesRequest(input *AssignPrivateIPAddressesInput) (req *aws.Request, output *AssignPrivateIPAddressesOutput) {
+ op := &aws.Operation{
+ Name: opAssignPrivateIPAddresses,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &AssignPrivateIPAddressesInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &AssignPrivateIPAddressesOutput{}
+ req.Data = output
+ return
+}
+
+// Assigns one or more secondary private IP addresses to the specified network
+// interface. You can specify one or more specific secondary IP addresses, or
+// you can specify the number of secondary IP addresses to be automatically
+// assigned within the subnet's CIDR block range. The number of secondary IP
+// addresses that you can assign to an instance varies by instance type. For
+// information about instance types, see Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html)
+// in the Amazon Elastic Compute Cloud User Guide. For more information about
+// Elastic IP addresses, see Elastic IP Addresses (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+//
+// AssignPrivateIpAddresses is available only in EC2-VPC.
+func (c *EC2) AssignPrivateIPAddresses(input *AssignPrivateIPAddressesInput) (*AssignPrivateIPAddressesOutput, error) {
+ req, out := c.AssignPrivateIPAddressesRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opAssociateAddress = "AssociateAddress"
+
+// AssociateAddressRequest generates a request for the AssociateAddress operation.
+func (c *EC2) AssociateAddressRequest(input *AssociateAddressInput) (req *aws.Request, output *AssociateAddressOutput) {
+ op := &aws.Operation{
+ Name: opAssociateAddress,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &AssociateAddressInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &AssociateAddressOutput{}
+ req.Data = output
+ return
+}
+
+// Associates an Elastic IP address with an instance or a network interface.
+//
+// An Elastic IP address is for use in either the EC2-Classic platform or in
+// a VPC. For more information, see Elastic IP Addresses (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+//
+// [EC2-Classic, VPC in an EC2-VPC-only account] If the Elastic IP address
+// is already associated with a different instance, it is disassociated from
+// that instance and associated with the specified instance.
+//
+// [VPC in an EC2-Classic account] If you don't specify a private IP address,
+// the Elastic IP address is associated with the primary IP address. If the
+// Elastic IP address is already associated with a different instance or a network
+// interface, you get an error unless you allow reassociation.
+//
+// This is an idempotent operation. If you perform the operation more than
+// once, Amazon EC2 doesn't return an error.
+func (c *EC2) AssociateAddress(input *AssociateAddressInput) (*AssociateAddressOutput, error) {
+ req, out := c.AssociateAddressRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opAssociateDHCPOptions = "AssociateDhcpOptions"
+
+// AssociateDHCPOptionsRequest generates a request for the AssociateDHCPOptions operation.
+func (c *EC2) AssociateDHCPOptionsRequest(input *AssociateDHCPOptionsInput) (req *aws.Request, output *AssociateDHCPOptionsOutput) {
+ op := &aws.Operation{
+ Name: opAssociateDHCPOptions,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &AssociateDHCPOptionsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &AssociateDHCPOptionsOutput{}
+ req.Data = output
+ return
+}
+
+// Associates a set of DHCP options (that you've previously created) with the
+// specified VPC, or associates no DHCP options with the VPC.
+//
+// After you associate the options with the VPC, any existing instances and
+// all new instances that you launch in that VPC use the options. You don't
+// need to restart or relaunch the instances. They automatically pick up the
+// changes within a few hours, depending on how frequently the instance renews
+// its DHCP lease. You can explicitly renew the lease using the operating system
+// on the instance.
+//
+// For more information, see DHCP Options Sets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *EC2) AssociateDHCPOptions(input *AssociateDHCPOptionsInput) (*AssociateDHCPOptionsOutput, error) {
+ req, out := c.AssociateDHCPOptionsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opAssociateRouteTable = "AssociateRouteTable"
+
+// AssociateRouteTableRequest generates a request for the AssociateRouteTable operation.
+func (c *EC2) AssociateRouteTableRequest(input *AssociateRouteTableInput) (req *aws.Request, output *AssociateRouteTableOutput) {
+ op := &aws.Operation{
+ Name: opAssociateRouteTable,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &AssociateRouteTableInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &AssociateRouteTableOutput{}
+ req.Data = output
+ return
+}
+
+// Associates a subnet with a route table. The subnet and route table must be
+// in the same VPC. This association causes traffic originating from the subnet
+// to be routed according to the routes in the route table. The action returns
+// an association ID, which you need in order to disassociate the route table
+// from the subnet later. A route table can be associated with multiple subnets.
+//
+// For more information about route tables, see Route Tables (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *EC2) AssociateRouteTable(input *AssociateRouteTableInput) (*AssociateRouteTableOutput, error) {
+ req, out := c.AssociateRouteTableRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opAttachClassicLinkVPC = "AttachClassicLinkVpc"
+
+// AttachClassicLinkVPCRequest generates a request for the AttachClassicLinkVPC operation.
+func (c *EC2) AttachClassicLinkVPCRequest(input *AttachClassicLinkVPCInput) (req *aws.Request, output *AttachClassicLinkVPCOutput) {
+ op := &aws.Operation{
+ Name: opAttachClassicLinkVPC,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &AttachClassicLinkVPCInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &AttachClassicLinkVPCOutput{}
+ req.Data = output
+ return
+}
+
+// Links an EC2-Classic instance to a ClassicLink-enabled VPC through one or
+// more of the VPC's security groups. You cannot link an EC2-Classic instance
+// to more than one VPC at a time. You can only link an instance that's in the
+// running state. An instance is automatically unlinked from a VPC when it's
+// stopped - you can link it to the VPC again when you restart it.
+//
+// After you've linked an instance, you cannot change the VPC security groups
+// that are associated with it. To change the security groups, you must first
+// unlink the instance, and then link it again.
+//
+// Linking your instance to a VPC is sometimes referred to as attaching your
+// instance.
+func (c *EC2) AttachClassicLinkVPC(input *AttachClassicLinkVPCInput) (*AttachClassicLinkVPCOutput, error) {
+ req, out := c.AttachClassicLinkVPCRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opAttachInternetGateway = "AttachInternetGateway"
+
+// AttachInternetGatewayRequest generates a request for the AttachInternetGateway operation.
+func (c *EC2) AttachInternetGatewayRequest(input *AttachInternetGatewayInput) (req *aws.Request, output *AttachInternetGatewayOutput) {
+ op := &aws.Operation{
+ Name: opAttachInternetGateway,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &AttachInternetGatewayInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &AttachInternetGatewayOutput{}
+ req.Data = output
+ return
+}
+
+// Attaches an Internet gateway to a VPC, enabling connectivity between the
+// Internet and the VPC. For more information about your VPC and Internet gateway,
+// see the Amazon Virtual Private Cloud User Guide (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/).
+func (c *EC2) AttachInternetGateway(input *AttachInternetGatewayInput) (*AttachInternetGatewayOutput, error) {
+ req, out := c.AttachInternetGatewayRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opAttachNetworkInterface = "AttachNetworkInterface"
+
+// AttachNetworkInterfaceRequest generates a request for the AttachNetworkInterface operation.
+func (c *EC2) AttachNetworkInterfaceRequest(input *AttachNetworkInterfaceInput) (req *aws.Request, output *AttachNetworkInterfaceOutput) {
+ op := &aws.Operation{
+ Name: opAttachNetworkInterface,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &AttachNetworkInterfaceInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &AttachNetworkInterfaceOutput{}
+ req.Data = output
+ return
+}
+
+// Attaches a network interface to an instance.
+func (c *EC2) AttachNetworkInterface(input *AttachNetworkInterfaceInput) (*AttachNetworkInterfaceOutput, error) {
+ req, out := c.AttachNetworkInterfaceRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opAttachVPNGateway = "AttachVpnGateway"
+
+// AttachVPNGatewayRequest generates a request for the AttachVPNGateway operation.
+func (c *EC2) AttachVPNGatewayRequest(input *AttachVPNGatewayInput) (req *aws.Request, output *AttachVPNGatewayOutput) {
+ op := &aws.Operation{
+ Name: opAttachVPNGateway,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &AttachVPNGatewayInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &AttachVPNGatewayOutput{}
+ req.Data = output
+ return
+}
+
+// Attaches a virtual private gateway to a VPC. For more information, see Adding
+// a Hardware Virtual Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *EC2) AttachVPNGateway(input *AttachVPNGatewayInput) (*AttachVPNGatewayOutput, error) {
+ req, out := c.AttachVPNGatewayRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opAttachVolume = "AttachVolume"
+
+// AttachVolumeRequest generates a request for the AttachVolume operation.
+func (c *EC2) AttachVolumeRequest(input *AttachVolumeInput) (req *aws.Request, output *VolumeAttachment) {
+ op := &aws.Operation{
+ Name: opAttachVolume,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &AttachVolumeInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &VolumeAttachment{}
+ req.Data = output
+ return
+}
+
+// Attaches an EBS volume to a running or stopped instance and exposes it to
+// the instance with the specified device name.
+//
+// Encrypted EBS volumes may only be attached to instances that support Amazon
+// EBS encryption. For more information, see Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+//
+// For a list of supported device names, see Attaching an EBS Volume to an
+// Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html).
+// Any device names that aren't reserved for instance store volumes can be used
+// for EBS volumes. For more information, see Amazon EC2 Instance Store (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+//
+// If a volume has an AWS Marketplace product code:
+//
+// The volume can be attached only to a stopped instance. AWS Marketplace
+// product codes are copied from the volume to the instance. You must be subscribed
+// to the product. The instance type and operating system of the instance must
+// support the product. For example, you can't detach a volume from a Windows
+// instance and attach it to a Linux instance. For an overview of the AWS Marketplace,
+// see Introducing AWS Marketplace (https://aws.amazon.com/marketplace/help/200900000).
+//
+// For more information about EBS volumes, see Attaching Amazon EBS Volumes
+// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) AttachVolume(input *AttachVolumeInput) (*VolumeAttachment, error) {
+ req, out := c.AttachVolumeRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opAuthorizeSecurityGroupEgress = "AuthorizeSecurityGroupEgress"
+
+// AuthorizeSecurityGroupEgressRequest generates a request for the AuthorizeSecurityGroupEgress operation.
+func (c *EC2) AuthorizeSecurityGroupEgressRequest(input *AuthorizeSecurityGroupEgressInput) (req *aws.Request, output *AuthorizeSecurityGroupEgressOutput) {
+ op := &aws.Operation{
+ Name: opAuthorizeSecurityGroupEgress,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &AuthorizeSecurityGroupEgressInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &AuthorizeSecurityGroupEgressOutput{}
+ req.Data = output
+ return
+}
+
+// Adds one or more egress rules to a security group for use with a VPC. Specifically,
+// this action permits instances to send traffic to one or more destination
+// CIDR IP address ranges, or to one or more destination security groups for
+// the same VPC.
+//
+// You can have up to 50 rules per security group (covering both ingress and
+// egress rules).
+//
+// A security group is for use with instances either in the EC2-Classic platform
+// or in a specific VPC. This action doesn't apply to security groups for use
+// in EC2-Classic. For more information, see Security Groups for Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html)
+// in the Amazon Virtual Private Cloud User Guide.
+//
+// Each rule consists of the protocol (for example, TCP), plus either a CIDR
+// range or a source group. For the TCP and UDP protocols, you must also specify
+// the destination port or port range. For the ICMP protocol, you must also
+// specify the ICMP type and code. You can use -1 for the type or code to mean
+// all types or all codes.
+//
+// Rule changes are propagated to affected instances as quickly as possible.
+// However, a small delay might occur.
+func (c *EC2) AuthorizeSecurityGroupEgress(input *AuthorizeSecurityGroupEgressInput) (*AuthorizeSecurityGroupEgressOutput, error) {
+ req, out := c.AuthorizeSecurityGroupEgressRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opAuthorizeSecurityGroupIngress = "AuthorizeSecurityGroupIngress"
+
+// AuthorizeSecurityGroupIngressRequest generates a request for the AuthorizeSecurityGroupIngress operation.
+func (c *EC2) AuthorizeSecurityGroupIngressRequest(input *AuthorizeSecurityGroupIngressInput) (req *aws.Request, output *AuthorizeSecurityGroupIngressOutput) {
+ op := &aws.Operation{
+ Name: opAuthorizeSecurityGroupIngress,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &AuthorizeSecurityGroupIngressInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &AuthorizeSecurityGroupIngressOutput{}
+ req.Data = output
+ return
+}
+
+// Adds one or more ingress rules to a security group.
+//
+// EC2-Classic: You can have up to 100 rules per group.
+//
+// EC2-VPC: You can have up to 50 rules per group (covering both ingress and
+// egress rules).
+//
+// Rule changes are propagated to instances within the security group as quickly
+// as possible. However, a small delay might occur.
+//
+// [EC2-Classic] This action gives one or more CIDR IP address ranges permission
+// to access a security group in your account, or gives one or more security
+// groups (called the source groups) permission to access a security group for
+// your account. A source group can be for your own AWS account, or another.
+//
+// [EC2-VPC] This action gives one or more CIDR IP address ranges permission
+// to access a security group in your VPC, or gives one or more other security
+// groups (called the source groups) permission to access a security group for
+// your VPC. The security groups must all be for the same VPC.
+func (c *EC2) AuthorizeSecurityGroupIngress(input *AuthorizeSecurityGroupIngressInput) (*AuthorizeSecurityGroupIngressOutput, error) {
+ req, out := c.AuthorizeSecurityGroupIngressRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opBundleInstance = "BundleInstance"
+
+// BundleInstanceRequest generates a request for the BundleInstance operation.
+func (c *EC2) BundleInstanceRequest(input *BundleInstanceInput) (req *aws.Request, output *BundleInstanceOutput) {
+ op := &aws.Operation{
+ Name: opBundleInstance,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &BundleInstanceInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &BundleInstanceOutput{}
+ req.Data = output
+ return
+}
+
+// Bundles an Amazon instance store-backed Windows instance.
+//
+// During bundling, only the root device volume (C:\) is bundled. Data on other
+// instance store volumes is not preserved.
+//
+// This action is not applicable for Linux/Unix instances or Windows instances
+// that are backed by Amazon EBS.
+//
+// For more information, see Creating an Instance Store-Backed Windows AMI
+// (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/Creating_InstanceStoreBacked_WinAMI.html).
+func (c *EC2) BundleInstance(input *BundleInstanceInput) (*BundleInstanceOutput, error) {
+ req, out := c.BundleInstanceRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCancelBundleTask = "CancelBundleTask"
+
+// CancelBundleTaskRequest generates a request for the CancelBundleTask operation.
+func (c *EC2) CancelBundleTaskRequest(input *CancelBundleTaskInput) (req *aws.Request, output *CancelBundleTaskOutput) {
+ op := &aws.Operation{
+ Name: opCancelBundleTask,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CancelBundleTaskInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CancelBundleTaskOutput{}
+ req.Data = output
+ return
+}
+
+// Cancels a bundling operation for an instance store-backed Windows instance.
+func (c *EC2) CancelBundleTask(input *CancelBundleTaskInput) (*CancelBundleTaskOutput, error) {
+ req, out := c.CancelBundleTaskRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCancelConversionTask = "CancelConversionTask"
+
+// CancelConversionTaskRequest generates a request for the CancelConversionTask operation.
+func (c *EC2) CancelConversionTaskRequest(input *CancelConversionTaskInput) (req *aws.Request, output *CancelConversionTaskOutput) {
+ op := &aws.Operation{
+ Name: opCancelConversionTask,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CancelConversionTaskInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CancelConversionTaskOutput{}
+ req.Data = output
+ return
+}
+
+// Cancels an active conversion task. The task can be the import of an instance
+// or volume. The action removes all artifacts of the conversion, including
+// a partially uploaded volume or instance. If the conversion is complete or
+// is in the process of transferring the final disk image, the command fails
+// and returns an exception.
+//
+// For more information, see Using the Command Line Tools to Import Your Virtual
+// Machine to Amazon EC2 (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UploadingYourInstancesandVolumes.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) CancelConversionTask(input *CancelConversionTaskInput) (*CancelConversionTaskOutput, error) {
+ req, out := c.CancelConversionTaskRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCancelExportTask = "CancelExportTask"
+
+// CancelExportTaskRequest generates a request for the CancelExportTask operation.
+func (c *EC2) CancelExportTaskRequest(input *CancelExportTaskInput) (req *aws.Request, output *CancelExportTaskOutput) {
+ op := &aws.Operation{
+ Name: opCancelExportTask,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CancelExportTaskInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CancelExportTaskOutput{}
+ req.Data = output
+ return
+}
+
+// Cancels an active export task. The request removes all artifacts of the export,
+// including any partially-created Amazon S3 objects. If the export task is
+// complete or is in the process of transferring the final disk image, the command
+// fails and returns an error.
+func (c *EC2) CancelExportTask(input *CancelExportTaskInput) (*CancelExportTaskOutput, error) {
+ req, out := c.CancelExportTaskRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCancelImportTask = "CancelImportTask"
+
+// CancelImportTaskRequest generates a request for the CancelImportTask operation.
+func (c *EC2) CancelImportTaskRequest(input *CancelImportTaskInput) (req *aws.Request, output *CancelImportTaskOutput) {
+ op := &aws.Operation{
+ Name: opCancelImportTask,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CancelImportTaskInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CancelImportTaskOutput{}
+ req.Data = output
+ return
+}
+
+// Cancels an in-process import virtual machine or import snapshot task.
+func (c *EC2) CancelImportTask(input *CancelImportTaskInput) (*CancelImportTaskOutput, error) {
+ req, out := c.CancelImportTaskRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCancelReservedInstancesListing = "CancelReservedInstancesListing"
+
+// CancelReservedInstancesListingRequest generates a request for the CancelReservedInstancesListing operation.
+func (c *EC2) CancelReservedInstancesListingRequest(input *CancelReservedInstancesListingInput) (req *aws.Request, output *CancelReservedInstancesListingOutput) {
+ op := &aws.Operation{
+ Name: opCancelReservedInstancesListing,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CancelReservedInstancesListingInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CancelReservedInstancesListingOutput{}
+ req.Data = output
+ return
+}
+
+// Cancels the specified Reserved Instance listing in the Reserved Instance
+// Marketplace.
+//
+// For more information, see Reserved Instance Marketplace (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) CancelReservedInstancesListing(input *CancelReservedInstancesListingInput) (*CancelReservedInstancesListingOutput, error) {
+ req, out := c.CancelReservedInstancesListingRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCancelSpotFleetRequests = "CancelSpotFleetRequests"
+
+// CancelSpotFleetRequestsRequest generates a request for the CancelSpotFleetRequests operation.
+func (c *EC2) CancelSpotFleetRequestsRequest(input *CancelSpotFleetRequestsInput) (req *aws.Request, output *CancelSpotFleetRequestsOutput) {
+ op := &aws.Operation{
+ Name: opCancelSpotFleetRequests,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CancelSpotFleetRequestsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CancelSpotFleetRequestsOutput{}
+ req.Data = output
+ return
+}
+
+// Cancels the specified Spot fleet requests.
+func (c *EC2) CancelSpotFleetRequests(input *CancelSpotFleetRequestsInput) (*CancelSpotFleetRequestsOutput, error) {
+ req, out := c.CancelSpotFleetRequestsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCancelSpotInstanceRequests = "CancelSpotInstanceRequests"
+
+// CancelSpotInstanceRequestsRequest generates a request for the CancelSpotInstanceRequests operation.
+func (c *EC2) CancelSpotInstanceRequestsRequest(input *CancelSpotInstanceRequestsInput) (req *aws.Request, output *CancelSpotInstanceRequestsOutput) {
+ op := &aws.Operation{
+ Name: opCancelSpotInstanceRequests,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CancelSpotInstanceRequestsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CancelSpotInstanceRequestsOutput{}
+ req.Data = output
+ return
+}
+
+// Cancels one or more Spot Instance requests. Spot Instances are instances
+// that Amazon EC2 starts on your behalf when the bid price that you specify
+// exceeds the current Spot Price. Amazon EC2 periodically sets the Spot Price
+// based on available Spot Instance capacity and current Spot Instance requests.
+// For more information, see Spot Instance Requests (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+//
+// Canceling a Spot Instance request does not terminate running Spot Instances
+// associated with the request.
+func (c *EC2) CancelSpotInstanceRequests(input *CancelSpotInstanceRequestsInput) (*CancelSpotInstanceRequestsOutput, error) {
+ req, out := c.CancelSpotInstanceRequestsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opConfirmProductInstance = "ConfirmProductInstance"
+
+// ConfirmProductInstanceRequest generates a request for the ConfirmProductInstance operation.
+func (c *EC2) ConfirmProductInstanceRequest(input *ConfirmProductInstanceInput) (req *aws.Request, output *ConfirmProductInstanceOutput) {
+ op := &aws.Operation{
+ Name: opConfirmProductInstance,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ConfirmProductInstanceInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &ConfirmProductInstanceOutput{}
+ req.Data = output
+ return
+}
+
+// Determines whether a product code is associated with an instance. This action
+// can only be used by the owner of the product code. It is useful when a product
+// code owner needs to verify whether another user's instance is eligible for
+// support.
+func (c *EC2) ConfirmProductInstance(input *ConfirmProductInstanceInput) (*ConfirmProductInstanceOutput, error) {
+ req, out := c.ConfirmProductInstanceRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCopyImage = "CopyImage"
+
+// CopyImageRequest generates a request for the CopyImage operation.
+func (c *EC2) CopyImageRequest(input *CopyImageInput) (req *aws.Request, output *CopyImageOutput) {
+ op := &aws.Operation{
+ Name: opCopyImage,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CopyImageInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CopyImageOutput{}
+ req.Data = output
+ return
+}
+
+// Initiates the copy of an AMI from the specified source region to the current
+// region. You specify the destination region by using its endpoint when making
+// the request. AMIs that use encrypted EBS snapshots cannot be copied with
+// this method.
+//
+// For more information, see Copying AMIs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/CopyingAMIs.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) CopyImage(input *CopyImageInput) (*CopyImageOutput, error) {
+ req, out := c.CopyImageRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCopySnapshot = "CopySnapshot"
+
+// CopySnapshotRequest generates a request for the CopySnapshot operation.
+func (c *EC2) CopySnapshotRequest(input *CopySnapshotInput) (req *aws.Request, output *CopySnapshotOutput) {
+ op := &aws.Operation{
+ Name: opCopySnapshot,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CopySnapshotInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CopySnapshotOutput{}
+ req.Data = output
+ return
+}
+
+// Copies a point-in-time snapshot of an EBS volume and stores it in Amazon
+// S3. You can copy the snapshot within the same region or from one region to
+// another. You can use the snapshot to create EBS volumes or Amazon Machine
+// Images (AMIs). The snapshot is copied to the regional endpoint that you send
+// the HTTP request to.
+//
+// Copies of encrypted EBS snapshots remain encrypted. Copies of unencrypted
+// snapshots remain unencrypted, unless the Encrypted flag is specified during
+// the snapshot copy operation. By default, encrypted snapshot copies use the
+// default AWS Key Management Service (AWS KMS) customer master key (CMK); however,
+// you can specify a non-default CMK with the KmsKeyId parameter.
+//
+// For more information, see Copying an Amazon EBS Snapshot (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-copy-snapshot.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) CopySnapshot(input *CopySnapshotInput) (*CopySnapshotOutput, error) {
+ req, out := c.CopySnapshotRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCreateCustomerGateway = "CreateCustomerGateway"
+
+// CreateCustomerGatewayRequest generates a request for the CreateCustomerGateway operation.
+func (c *EC2) CreateCustomerGatewayRequest(input *CreateCustomerGatewayInput) (req *aws.Request, output *CreateCustomerGatewayOutput) {
+ op := &aws.Operation{
+ Name: opCreateCustomerGateway,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateCustomerGatewayInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CreateCustomerGatewayOutput{}
+ req.Data = output
+ return
+}
+
+// Provides information to AWS about your VPN customer gateway device. The customer
+// gateway is the appliance at your end of the VPN connection. (The device on
+// the AWS side of the VPN connection is the virtual private gateway.) You must
+// provide the Internet-routable IP address of the customer gateway's external
+// interface. The IP address must be static and can't be behind a device performing
+// network address translation (NAT).
+//
+// For devices that use Border Gateway Protocol (BGP), you can also provide
+// the device's BGP Autonomous System Number (ASN). You can use an existing
+// ASN assigned to your network. If you don't have an ASN already, you can use
+// a private ASN (in the 64512 - 65534 range).
+//
+// Amazon EC2 supports all 2-byte ASN numbers in the range of 1 - 65534, with
+// the exception of 7224, which is reserved in the us-east-1 region, and 9059,
+// which is reserved in the eu-west-1 region.
+//
+// For more information about VPN customer gateways, see Adding a Hardware
+// Virtual Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
+// in the Amazon Virtual Private Cloud User Guide.
+//
+// You cannot create more than one customer gateway with the same VPN type,
+// IP address, and BGP ASN parameter values. If you run an identical request
+// more than one time, the first request creates the customer gateway, and subsequent
+// requests return information about the existing customer gateway. The subsequent
+// requests do not create new customer gateway resources.
+func (c *EC2) CreateCustomerGateway(input *CreateCustomerGatewayInput) (*CreateCustomerGatewayOutput, error) {
+ req, out := c.CreateCustomerGatewayRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCreateDHCPOptions = "CreateDhcpOptions"
+
+// CreateDHCPOptionsRequest generates a request for the CreateDHCPOptions operation.
+func (c *EC2) CreateDHCPOptionsRequest(input *CreateDHCPOptionsInput) (req *aws.Request, output *CreateDHCPOptionsOutput) {
+ op := &aws.Operation{
+ Name: opCreateDHCPOptions,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateDHCPOptionsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CreateDHCPOptionsOutput{}
+ req.Data = output
+ return
+}
+
+// Creates a set of DHCP options for your VPC. After creating the set, you must
+// associate it with the VPC, causing all existing and new instances that you
+// launch in the VPC to use this set of DHCP options. The following are the
+// individual DHCP options you can specify. For more information about the options,
+// see RFC 2132 (http://www.ietf.org/rfc/rfc2132.txt).
+//
+// domain-name-servers - The IP addresses of up to four domain name servers,
+// or AmazonProvidedDNS. The default DHCP option set specifies AmazonProvidedDNS.
+// If specifying more than one domain name server, specify the IP addresses
+// in a single parameter, separated by commas. domain-name - If you're using
+// AmazonProvidedDNS in us-east-1, specify ec2.internal. If you're using AmazonProvidedDNS
+// in another region, specify region.compute.internal (for example, ap-northeast-1.compute.internal).
+// Otherwise, specify a domain name (for example, MyCompany.com). Important:
+// Some Linux operating systems accept multiple domain names separated by spaces.
+// However, Windows and other Linux operating systems treat the value as a single
+// domain, which results in unexpected behavior. If your DHCP options set is
+// associated with a VPC that has instances with multiple operating systems,
+// specify only one domain name. ntp-servers - The IP addresses of up to four
+// Network Time Protocol (NTP) servers. netbios-name-servers - The IP addresses
+// of up to four NetBIOS name servers. netbios-node-type - The NetBIOS node
+// type (1, 2, 4, or 8). We recommend that you specify 2 (broadcast and multicast
+// are not currently supported). For more information about these node types,
+// see RFC 2132 (http://www.ietf.org/rfc/rfc2132.txt). Your VPC automatically
+// starts out with a set of DHCP options that includes only a DNS server that
+// we provide (AmazonProvidedDNS). If you create a set of options, and if your
+// VPC has an Internet gateway, make sure to set the domain-name-servers option
+// either to AmazonProvidedDNS or to a domain name server of your choice. For
+// more information about DHCP options, see DHCP Options Sets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *EC2) CreateDHCPOptions(input *CreateDHCPOptionsInput) (*CreateDHCPOptionsOutput, error) {
+ req, out := c.CreateDHCPOptionsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCreateFlowLogs = "CreateFlowLogs"
+
+// CreateFlowLogsRequest generates a request for the CreateFlowLogs operation.
+func (c *EC2) CreateFlowLogsRequest(input *CreateFlowLogsInput) (req *aws.Request, output *CreateFlowLogsOutput) {
+ op := &aws.Operation{
+ Name: opCreateFlowLogs,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateFlowLogsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CreateFlowLogsOutput{}
+ req.Data = output
+ return
+}
+
+// Creates one or more flow logs to capture IP traffic for a specific network
+// interface, subnet, or VPC. Flow logs are delivered to a specified log group
+// in Amazon CloudWatch Logs. If you specify a VPC or subnet in the request,
+// a log stream is created in CloudWatch Logs for each network interface in
+// the subnet or VPC. Log streams can include information about accepted and
+// rejected traffic to a network interface. You can view the data in your log
+// streams using Amazon CloudWatch Logs.
+//
+// In your request, you must also specify an IAM role that has permission to
+// publish logs to CloudWatch Logs.
+func (c *EC2) CreateFlowLogs(input *CreateFlowLogsInput) (*CreateFlowLogsOutput, error) {
+ req, out := c.CreateFlowLogsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCreateImage = "CreateImage"
+
+// CreateImageRequest generates a request for the CreateImage operation.
+func (c *EC2) CreateImageRequest(input *CreateImageInput) (req *aws.Request, output *CreateImageOutput) {
+ op := &aws.Operation{
+ Name: opCreateImage,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateImageInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CreateImageOutput{}
+ req.Data = output
+ return
+}
+
+// Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance that
+// is either running or stopped.
+//
+// If you customized your instance with instance store volumes or EBS volumes
+// in addition to the root device volume, the new AMI contains block device
+// mapping information for those volumes. When you launch an instance from this
+// new AMI, the instance automatically launches with those additional volumes.
+//
+// For more information, see Creating Amazon EBS-Backed Linux AMIs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) CreateImage(input *CreateImageInput) (*CreateImageOutput, error) {
+ req, out := c.CreateImageRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCreateInstanceExportTask = "CreateInstanceExportTask"
+
+// CreateInstanceExportTaskRequest generates a request for the CreateInstanceExportTask operation.
+func (c *EC2) CreateInstanceExportTaskRequest(input *CreateInstanceExportTaskInput) (req *aws.Request, output *CreateInstanceExportTaskOutput) {
+ op := &aws.Operation{
+ Name: opCreateInstanceExportTask,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateInstanceExportTaskInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CreateInstanceExportTaskOutput{}
+ req.Data = output
+ return
+}
+
+// Exports a running or stopped instance to an S3 bucket.
+//
+// For information about the supported operating systems, image formats, and
+// known limitations for the types of instances you can export, see Exporting
+// EC2 Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ExportingEC2Instances.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) CreateInstanceExportTask(input *CreateInstanceExportTaskInput) (*CreateInstanceExportTaskOutput, error) {
+ req, out := c.CreateInstanceExportTaskRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCreateInternetGateway = "CreateInternetGateway"
+
+// CreateInternetGatewayRequest generates a request for the CreateInternetGateway operation.
+func (c *EC2) CreateInternetGatewayRequest(input *CreateInternetGatewayInput) (req *aws.Request, output *CreateInternetGatewayOutput) {
+ op := &aws.Operation{
+ Name: opCreateInternetGateway,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateInternetGatewayInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CreateInternetGatewayOutput{}
+ req.Data = output
+ return
+}
+
+// Creates an Internet gateway for use with a VPC. After creating the Internet
+// gateway, you attach it to a VPC using AttachInternetGateway.
+//
+// For more information about your VPC and Internet gateway, see the Amazon
+// Virtual Private Cloud User Guide (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/).
+func (c *EC2) CreateInternetGateway(input *CreateInternetGatewayInput) (*CreateInternetGatewayOutput, error) {
+ req, out := c.CreateInternetGatewayRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCreateKeyPair = "CreateKeyPair"
+
+// CreateKeyPairRequest generates a request for the CreateKeyPair operation.
+func (c *EC2) CreateKeyPairRequest(input *CreateKeyPairInput) (req *aws.Request, output *CreateKeyPairOutput) {
+ op := &aws.Operation{
+ Name: opCreateKeyPair,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateKeyPairInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CreateKeyPairOutput{}
+ req.Data = output
+ return
+}
+
+// Creates a 2048-bit RSA key pair with the specified name. Amazon EC2 stores
+// the public key and displays the private key for you to save to a file. The
+// private key is returned as an unencrypted PEM encoded PKCS#8 private key.
+// If a key with the specified name already exists, Amazon EC2 returns an error.
+//
+// You can have up to five thousand key pairs per region.
+//
+// The key pair returned to you is available only in the region in which you
+// create it. To create a key pair that is available in all regions, use ImportKeyPair.
+//
+// For more information about key pairs, see Key Pairs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) CreateKeyPair(input *CreateKeyPairInput) (*CreateKeyPairOutput, error) {
+ req, out := c.CreateKeyPairRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCreateNetworkACL = "CreateNetworkAcl"
+
+// CreateNetworkACLRequest generates a request for the CreateNetworkACL operation.
+func (c *EC2) CreateNetworkACLRequest(input *CreateNetworkACLInput) (req *aws.Request, output *CreateNetworkACLOutput) {
+ op := &aws.Operation{
+ Name: opCreateNetworkACL,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateNetworkACLInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CreateNetworkACLOutput{}
+ req.Data = output
+ return
+}
+
+// Creates a network ACL in a VPC. Network ACLs provide an optional layer of
+// security (in addition to security groups) for the instances in your VPC.
+//
+// For more information about network ACLs, see Network ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *EC2) CreateNetworkACL(input *CreateNetworkACLInput) (*CreateNetworkACLOutput, error) {
+ req, out := c.CreateNetworkACLRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCreateNetworkACLEntry = "CreateNetworkAclEntry"
+
+// CreateNetworkACLEntryRequest generates a request for the CreateNetworkACLEntry operation.
+func (c *EC2) CreateNetworkACLEntryRequest(input *CreateNetworkACLEntryInput) (req *aws.Request, output *CreateNetworkACLEntryOutput) {
+ op := &aws.Operation{
+ Name: opCreateNetworkACLEntry,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateNetworkACLEntryInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CreateNetworkACLEntryOutput{}
+ req.Data = output
+ return
+}
+
+// Creates an entry (a rule) in a network ACL with the specified rule number.
+// Each network ACL has a set of numbered ingress rules and a separate set of
+// numbered egress rules. When determining whether a packet should be allowed
+// in or out of a subnet associated with the ACL, we process the entries in
+// the ACL according to the rule numbers, in ascending order. Each network ACL
+// has a set of ingress rules and a separate set of egress rules.
+//
+// We recommend that you leave room between the rule numbers (for example,
+// 100, 110, 120, ...), and not number them one right after the other (for example,
+// 101, 102, 103, ...). This makes it easier to add a rule between existing
+// ones without having to renumber the rules.
+//
+// After you add an entry, you can't modify it; you must either replace it,
+// or create an entry and delete the old one.
+//
+// For more information about network ACLs, see Network ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *EC2) CreateNetworkACLEntry(input *CreateNetworkACLEntryInput) (*CreateNetworkACLEntryOutput, error) {
+ req, out := c.CreateNetworkACLEntryRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCreateNetworkInterface = "CreateNetworkInterface"
+
+// CreateNetworkInterfaceRequest generates a request for the CreateNetworkInterface operation.
+func (c *EC2) CreateNetworkInterfaceRequest(input *CreateNetworkInterfaceInput) (req *aws.Request, output *CreateNetworkInterfaceOutput) {
+ op := &aws.Operation{
+ Name: opCreateNetworkInterface,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateNetworkInterfaceInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CreateNetworkInterfaceOutput{}
+ req.Data = output
+ return
+}
+
+// Creates a network interface in the specified subnet.
+//
+// For more information about network interfaces, see Elastic Network Interfaces
+// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html) in the
+// Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) CreateNetworkInterface(input *CreateNetworkInterfaceInput) (*CreateNetworkInterfaceOutput, error) {
+ req, out := c.CreateNetworkInterfaceRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCreatePlacementGroup = "CreatePlacementGroup"
+
+// CreatePlacementGroupRequest generates a request for the CreatePlacementGroup operation.
+func (c *EC2) CreatePlacementGroupRequest(input *CreatePlacementGroupInput) (req *aws.Request, output *CreatePlacementGroupOutput) {
+ op := &aws.Operation{
+ Name: opCreatePlacementGroup,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreatePlacementGroupInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CreatePlacementGroupOutput{}
+ req.Data = output
+ return
+}
+
+// Creates a placement group that you launch cluster instances into. You must
+// give the group a name that's unique within the scope of your account.
+//
+// For more information about placement groups and cluster instances, see Cluster
+// Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) CreatePlacementGroup(input *CreatePlacementGroupInput) (*CreatePlacementGroupOutput, error) {
+ req, out := c.CreatePlacementGroupRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCreateReservedInstancesListing = "CreateReservedInstancesListing"
+
+// CreateReservedInstancesListingRequest generates a request for the CreateReservedInstancesListing operation.
+func (c *EC2) CreateReservedInstancesListingRequest(input *CreateReservedInstancesListingInput) (req *aws.Request, output *CreateReservedInstancesListingOutput) {
+ op := &aws.Operation{
+ Name: opCreateReservedInstancesListing,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateReservedInstancesListingInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CreateReservedInstancesListingOutput{}
+ req.Data = output
+ return
+}
+
+// Creates a listing for Amazon EC2 Reserved Instances to be sold in the Reserved
+// Instance Marketplace. You can submit one Reserved Instance listing at a time.
+// To get a list of your Reserved Instances, you can use the DescribeReservedInstances
+// operation.
+//
+// The Reserved Instance Marketplace matches sellers who want to resell Reserved
+// Instance capacity that they no longer need with buyers who want to purchase
+// additional capacity. Reserved Instances bought and sold through the Reserved
+// Instance Marketplace work like any other Reserved Instances.
+//
+// To sell your Reserved Instances, you must first register as a seller in
+// the Reserved Instance Marketplace. After completing the registration process,
+// you can create a Reserved Instance Marketplace listing of some or all of
+// your Reserved Instances, and specify the upfront price to receive for them.
+// Your Reserved Instance listings then become available for purchase. To view
+// the details of your Reserved Instance listing, you can use the DescribeReservedInstancesListings
+// operation.
+//
+// For more information, see Reserved Instance Marketplace (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) CreateReservedInstancesListing(input *CreateReservedInstancesListingInput) (*CreateReservedInstancesListingOutput, error) {
+ req, out := c.CreateReservedInstancesListingRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCreateRoute = "CreateRoute"
+
+// CreateRouteRequest generates a request for the CreateRoute operation.
+func (c *EC2) CreateRouteRequest(input *CreateRouteInput) (req *aws.Request, output *CreateRouteOutput) {
+ op := &aws.Operation{
+ Name: opCreateRoute,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateRouteInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CreateRouteOutput{}
+ req.Data = output
+ return
+}
+
+// Creates a route in a route table within a VPC.
+//
+// You must specify one of the following targets: Internet gateway or virtual
+// private gateway, NAT instance, VPC peering connection, or network interface.
+//
+// When determining how to route traffic, we use the route with the most specific
+// match. For example, let's say the traffic is destined for 192.0.2.3, and
+// the route table includes the following two routes:
+//
+// 192.0.2.0/24 (goes to some target A)
+//
+// 192.0.2.0/28 (goes to some target B)
+//
+// Both routes apply to the traffic destined for 192.0.2.3. However, the
+// second route in the list covers a smaller number of IP addresses and is therefore
+// more specific, so we use that route to determine where to target the traffic.
+//
+// For more information about route tables, see Route Tables (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *EC2) CreateRoute(input *CreateRouteInput) (*CreateRouteOutput, error) {
+ req, out := c.CreateRouteRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCreateRouteTable = "CreateRouteTable"
+
+// CreateRouteTableRequest generates a request for the CreateRouteTable operation.
+func (c *EC2) CreateRouteTableRequest(input *CreateRouteTableInput) (req *aws.Request, output *CreateRouteTableOutput) {
+ op := &aws.Operation{
+ Name: opCreateRouteTable,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateRouteTableInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CreateRouteTableOutput{}
+ req.Data = output
+ return
+}
+
+// Creates a route table for the specified VPC. After you create a route table,
+// you can add routes and associate the table with a subnet.
+//
+// For more information about route tables, see Route Tables (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *EC2) CreateRouteTable(input *CreateRouteTableInput) (*CreateRouteTableOutput, error) {
+ req, out := c.CreateRouteTableRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCreateSecurityGroup = "CreateSecurityGroup"
+
+// CreateSecurityGroupRequest generates a request for the CreateSecurityGroup operation.
+func (c *EC2) CreateSecurityGroupRequest(input *CreateSecurityGroupInput) (req *aws.Request, output *CreateSecurityGroupOutput) {
+ op := &aws.Operation{
+ Name: opCreateSecurityGroup,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateSecurityGroupInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CreateSecurityGroupOutput{}
+ req.Data = output
+ return
+}
+
+// Creates a security group.
+//
+// A security group is for use with instances either in the EC2-Classic platform
+// or in a specific VPC. For more information, see Amazon EC2 Security Groups
+// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html)
+// in the Amazon Elastic Compute Cloud User Guide and Security Groups for Your
+// VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html)
+// in the Amazon Virtual Private Cloud User Guide.
+//
+// EC2-Classic: You can have up to 500 security groups.
+//
+// EC2-VPC: You can create up to 100 security groups per VPC.
+//
+// When you create a security group, you specify a friendly name of your choice.
+// You can have a security group for use in EC2-Classic with the same name as
+// a security group for use in a VPC. However, you can't have two security groups
+// for use in EC2-Classic with the same name or two security groups for use
+// in a VPC with the same name.
+//
+// You have a default security group for use in EC2-Classic and a default security
+// group for use in your VPC. If you don't specify a security group when you
+// launch an instance, the instance is launched into the appropriate default
+// security group. A default security group includes a default rule that grants
+// instances unrestricted network access to each other.
+//
+// You can add or remove rules from your security groups using AuthorizeSecurityGroupIngress,
+// AuthorizeSecurityGroupEgress, RevokeSecurityGroupIngress, and RevokeSecurityGroupEgress.
+func (c *EC2) CreateSecurityGroup(input *CreateSecurityGroupInput) (*CreateSecurityGroupOutput, error) {
+ req, out := c.CreateSecurityGroupRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCreateSnapshot = "CreateSnapshot"
+
+// CreateSnapshotRequest generates a request for the CreateSnapshot operation.
+func (c *EC2) CreateSnapshotRequest(input *CreateSnapshotInput) (req *aws.Request, output *Snapshot) {
+ op := &aws.Operation{
+ Name: opCreateSnapshot,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateSnapshotInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &Snapshot{}
+ req.Data = output
+ return
+}
+
+// Creates a snapshot of an EBS volume and stores it in Amazon S3. You can use
+// snapshots for backups, to make copies of EBS volumes, and to save data before
+// shutting down an instance.
+//
+// When a snapshot is created, any AWS Marketplace product codes that are associated
+// with the source volume are propagated to the snapshot.
+//
+// You can take a snapshot of an attached volume that is in use. However, snapshots
+// only capture data that has been written to your EBS volume at the time the
+// snapshot command is issued; this may exclude any data that has been cached
+// by any applications or the operating system. If you can pause any file systems
+// on the volume long enough to take a snapshot, your snapshot should be complete.
+// However, if you cannot pause all file writes to the volume, you should unmount
+// the volume from within the instance, issue the snapshot command, and then
+// remount the volume to ensure a consistent and complete snapshot. You may
+// remount and use your volume while the snapshot status is pending.
+//
+// To create a snapshot for EBS volumes that serve as root devices, you should
+// stop the instance before taking the snapshot.
+//
+// Snapshots that are taken from encrypted volumes are automatically encrypted.
+// Volumes that are created from encrypted snapshots are also automatically
+// encrypted. Your encrypted volumes and any associated snapshots always remain
+// protected.
+//
+// For more information, see Amazon Elastic Block Store (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonEBS.html)
+// and Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) CreateSnapshot(input *CreateSnapshotInput) (*Snapshot, error) {
+ req, out := c.CreateSnapshotRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCreateSpotDatafeedSubscription = "CreateSpotDatafeedSubscription"
+
+// CreateSpotDatafeedSubscriptionRequest generates a request for the CreateSpotDatafeedSubscription operation.
+func (c *EC2) CreateSpotDatafeedSubscriptionRequest(input *CreateSpotDatafeedSubscriptionInput) (req *aws.Request, output *CreateSpotDatafeedSubscriptionOutput) {
+ op := &aws.Operation{
+ Name: opCreateSpotDatafeedSubscription,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateSpotDatafeedSubscriptionInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CreateSpotDatafeedSubscriptionOutput{}
+ req.Data = output
+ return
+}
+
+// Creates a data feed for Spot Instances, enabling you to view Spot Instance
+// usage logs. You can create one data feed per AWS account. For more information,
+// see Spot Instance Data Feed (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) CreateSpotDatafeedSubscription(input *CreateSpotDatafeedSubscriptionInput) (*CreateSpotDatafeedSubscriptionOutput, error) {
+ req, out := c.CreateSpotDatafeedSubscriptionRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCreateSubnet = "CreateSubnet"
+
+// CreateSubnetRequest generates a request for the CreateSubnet operation.
+func (c *EC2) CreateSubnetRequest(input *CreateSubnetInput) (req *aws.Request, output *CreateSubnetOutput) {
+ op := &aws.Operation{
+ Name: opCreateSubnet,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateSubnetInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CreateSubnetOutput{}
+ req.Data = output
+ return
+}
+
+// Creates a subnet in an existing VPC.
+//
+// When you create each subnet, you provide the VPC ID and the CIDR block you
+// want for the subnet. After you create a subnet, you can't change its CIDR
+// block. The subnet's CIDR block can be the same as the VPC's CIDR block (assuming
+// you want only a single subnet in the VPC), or a subset of the VPC's CIDR
+// block. If you create more than one subnet in a VPC, the subnets' CIDR blocks
+// must not overlap. The smallest subnet (and VPC) you can create uses a /28
+// netmask (16 IP addresses), and the largest uses a /16 netmask (65,536 IP
+// addresses).
+//
+// AWS reserves both the first four and the last IP address in each subnet's
+// CIDR block. They're not available for use.
+//
+// If you add more than one subnet to a VPC, they're set up in a star topology
+// with a logical router in the middle.
+//
+// If you launch an instance in a VPC using an Amazon EBS-backed AMI, the IP
+// address doesn't change if you stop and restart the instance (unlike a similar
+// instance launched outside a VPC, which gets a new IP address when restarted).
+// It's therefore possible to have a subnet with no running instances (they're
+// all stopped), but no remaining IP addresses available.
+//
+// For more information about subnets, see Your VPC and Subnets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *EC2) CreateSubnet(input *CreateSubnetInput) (*CreateSubnetOutput, error) {
+ req, out := c.CreateSubnetRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCreateTags = "CreateTags"
+
+// CreateTagsRequest generates a request for the CreateTags operation.
+func (c *EC2) CreateTagsRequest(input *CreateTagsInput) (req *aws.Request, output *CreateTagsOutput) {
+ op := &aws.Operation{
+ Name: opCreateTags,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateTagsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CreateTagsOutput{}
+ req.Data = output
+ return
+}
+
+// Adds or overwrites one or more tags for the specified Amazon EC2 resource
+// or resources. Each resource can have a maximum of 10 tags. Each tag consists
+// of a key and optional value. Tag keys must be unique per resource.
+//
+// For more information about tags, see Tagging Your Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) CreateTags(input *CreateTagsInput) (*CreateTagsOutput, error) {
+ req, out := c.CreateTagsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCreateVPC = "CreateVpc"
+
+// CreateVPCRequest generates a request for the CreateVPC operation.
+func (c *EC2) CreateVPCRequest(input *CreateVPCInput) (req *aws.Request, output *CreateVPCOutput) {
+ op := &aws.Operation{
+ Name: opCreateVPC,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateVPCInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CreateVPCOutput{}
+ req.Data = output
+ return
+}
+
+// Creates a VPC with the specified CIDR block.
+//
+// The smallest VPC you can create uses a /28 netmask (16 IP addresses), and
+// the largest uses a /16 netmask (65,536 IP addresses). To help you decide
+// how big to make your VPC, see Your VPC and Subnets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html)
+// in the Amazon Virtual Private Cloud User Guide.
+//
+// By default, each instance you launch in the VPC has the default DHCP options,
+// which includes only a default DNS server that we provide (AmazonProvidedDNS).
+// For more information about DHCP options, see DHCP Options Sets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *EC2) CreateVPC(input *CreateVPCInput) (*CreateVPCOutput, error) {
+ req, out := c.CreateVPCRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCreateVPCEndpoint = "CreateVpcEndpoint"
+
+// CreateVPCEndpointRequest generates a request for the CreateVPCEndpoint operation.
+func (c *EC2) CreateVPCEndpointRequest(input *CreateVPCEndpointInput) (req *aws.Request, output *CreateVPCEndpointOutput) {
+ op := &aws.Operation{
+ Name: opCreateVPCEndpoint,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateVPCEndpointInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CreateVPCEndpointOutput{}
+ req.Data = output
+ return
+}
+
+// Creates a VPC endpoint for a specified AWS service. An endpoint enables you
+// to create a private connection between your VPC and another AWS service in
+// your account. You can specify an endpoint policy to attach to the endpoint
+// that will control access to the service from your VPC. You can also specify
+// the VPC route tables that use the endpoint.
+//
+// Currently, only endpoints to Amazon S3 are supported.
+func (c *EC2) CreateVPCEndpoint(input *CreateVPCEndpointInput) (*CreateVPCEndpointOutput, error) {
+ req, out := c.CreateVPCEndpointRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCreateVPCPeeringConnection = "CreateVpcPeeringConnection"
+
+// CreateVPCPeeringConnectionRequest generates a request for the CreateVPCPeeringConnection operation.
+func (c *EC2) CreateVPCPeeringConnectionRequest(input *CreateVPCPeeringConnectionInput) (req *aws.Request, output *CreateVPCPeeringConnectionOutput) {
+ op := &aws.Operation{
+ Name: opCreateVPCPeeringConnection,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateVPCPeeringConnectionInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CreateVPCPeeringConnectionOutput{}
+ req.Data = output
+ return
+}
+
+// Requests a VPC peering connection between two VPCs: a requester VPC that
+// you own and a peer VPC with which to create the connection. The peer VPC
+// can belong to another AWS account. The requester VPC and peer VPC cannot
+// have overlapping CIDR blocks.
+//
+// The owner of the peer VPC must accept the peering request to activate the
+// peering connection. The VPC peering connection request expires after 7 days,
+// after which it cannot be accepted or rejected.
+//
+// A CreateVpcPeeringConnection request between VPCs with overlapping CIDR
+// blocks results in the VPC peering connection having a status of failed.
+func (c *EC2) CreateVPCPeeringConnection(input *CreateVPCPeeringConnectionInput) (*CreateVPCPeeringConnectionOutput, error) {
+ req, out := c.CreateVPCPeeringConnectionRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCreateVPNConnection = "CreateVpnConnection"
+
+// CreateVPNConnectionRequest generates a request for the CreateVPNConnection operation.
+func (c *EC2) CreateVPNConnectionRequest(input *CreateVPNConnectionInput) (req *aws.Request, output *CreateVPNConnectionOutput) {
+ op := &aws.Operation{
+ Name: opCreateVPNConnection,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateVPNConnectionInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CreateVPNConnectionOutput{}
+ req.Data = output
+ return
+}
+
+// Creates a VPN connection between an existing virtual private gateway and
+// a VPN customer gateway. The only supported connection type is ipsec.1.
+//
+// The response includes information that you need to give to your network
+// administrator to configure your customer gateway.
+//
+// We strongly recommend that you use HTTPS when calling this operation because
+// the response contains sensitive cryptographic information for configuring
+// your customer gateway.
+//
+// If you decide to shut down your VPN connection for any reason and later
+// create a new VPN connection, you must reconfigure your customer gateway with
+// the new information returned from this call.
+//
+// For more information about VPN connections, see Adding a Hardware Virtual
+// Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *EC2) CreateVPNConnection(input *CreateVPNConnectionInput) (*CreateVPNConnectionOutput, error) {
+ req, out := c.CreateVPNConnectionRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCreateVPNConnectionRoute = "CreateVpnConnectionRoute"
+
+// CreateVPNConnectionRouteRequest generates a request for the CreateVPNConnectionRoute operation.
+func (c *EC2) CreateVPNConnectionRouteRequest(input *CreateVPNConnectionRouteInput) (req *aws.Request, output *CreateVPNConnectionRouteOutput) {
+ op := &aws.Operation{
+ Name: opCreateVPNConnectionRoute,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateVPNConnectionRouteInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CreateVPNConnectionRouteOutput{}
+ req.Data = output
+ return
+}
+
+// Creates a static route associated with a VPN connection between an existing
+// virtual private gateway and a VPN customer gateway. The static route allows
+// traffic to be routed from the virtual private gateway to the VPN customer
+// gateway.
+//
+// For more information about VPN connections, see Adding a Hardware Virtual
+// Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *EC2) CreateVPNConnectionRoute(input *CreateVPNConnectionRouteInput) (*CreateVPNConnectionRouteOutput, error) {
+ req, out := c.CreateVPNConnectionRouteRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCreateVPNGateway = "CreateVpnGateway"
+
+// CreateVPNGatewayRequest generates a request for the CreateVPNGateway operation.
+func (c *EC2) CreateVPNGatewayRequest(input *CreateVPNGatewayInput) (req *aws.Request, output *CreateVPNGatewayOutput) {
+ op := &aws.Operation{
+ Name: opCreateVPNGateway,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateVPNGatewayInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &CreateVPNGatewayOutput{}
+ req.Data = output
+ return
+}
+
+// Creates a virtual private gateway. A virtual private gateway is the endpoint
+// on the VPC side of your VPN connection. You can create a virtual private
+// gateway before creating the VPC itself.
+//
+// For more information about virtual private gateways, see Adding a Hardware
+// Virtual Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *EC2) CreateVPNGateway(input *CreateVPNGatewayInput) (*CreateVPNGatewayOutput, error) {
+ req, out := c.CreateVPNGatewayRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opCreateVolume = "CreateVolume"
+
+// CreateVolumeRequest generates a request for the CreateVolume operation.
+func (c *EC2) CreateVolumeRequest(input *CreateVolumeInput) (req *aws.Request, output *Volume) {
+ op := &aws.Operation{
+ Name: opCreateVolume,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &CreateVolumeInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &Volume{}
+ req.Data = output
+ return
+}
+
+// Creates an EBS volume that can be attached to an instance in the same Availability
+// Zone. The volume is created in the regional endpoint that you send the HTTP
+// request to. For more information see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html).
+//
+// You can create a new empty volume or restore a volume from an EBS snapshot.
+// Any AWS Marketplace product codes from the snapshot are propagated to the
+// volume.
+//
+// You can create encrypted volumes with the Encrypted parameter. Encrypted
+// volumes may only be attached to instances that support Amazon EBS encryption.
+// Volumes that are created from encrypted snapshots are also automatically
+// encrypted. For more information, see Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+//
+// For more information, see Creating or Restoring an Amazon EBS Volume (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-volume.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) CreateVolume(input *CreateVolumeInput) (*Volume, error) {
+ req, out := c.CreateVolumeRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDeleteCustomerGateway = "DeleteCustomerGateway"
+
+// DeleteCustomerGatewayRequest generates a request for the DeleteCustomerGateway operation.
+func (c *EC2) DeleteCustomerGatewayRequest(input *DeleteCustomerGatewayInput) (req *aws.Request, output *DeleteCustomerGatewayOutput) {
+ op := &aws.Operation{
+ Name: opDeleteCustomerGateway,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteCustomerGatewayInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DeleteCustomerGatewayOutput{}
+ req.Data = output
+ return
+}
+
+// Deletes the specified customer gateway. You must delete the VPN connection
+// before you can delete the customer gateway.
+func (c *EC2) DeleteCustomerGateway(input *DeleteCustomerGatewayInput) (*DeleteCustomerGatewayOutput, error) {
+ req, out := c.DeleteCustomerGatewayRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDeleteDHCPOptions = "DeleteDhcpOptions"
+
+// DeleteDHCPOptionsRequest generates a request for the DeleteDHCPOptions operation.
+func (c *EC2) DeleteDHCPOptionsRequest(input *DeleteDHCPOptionsInput) (req *aws.Request, output *DeleteDHCPOptionsOutput) {
+ op := &aws.Operation{
+ Name: opDeleteDHCPOptions,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteDHCPOptionsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DeleteDHCPOptionsOutput{}
+ req.Data = output
+ return
+}
+
+// Deletes the specified set of DHCP options. You must disassociate the set
+// of DHCP options before you can delete it. You can disassociate the set of
+// DHCP options by associating either a new set of options or the default set
+// of options with the VPC.
+func (c *EC2) DeleteDHCPOptions(input *DeleteDHCPOptionsInput) (*DeleteDHCPOptionsOutput, error) {
+ req, out := c.DeleteDHCPOptionsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDeleteFlowLogs = "DeleteFlowLogs"
+
+// DeleteFlowLogsRequest generates a request for the DeleteFlowLogs operation.
+func (c *EC2) DeleteFlowLogsRequest(input *DeleteFlowLogsInput) (req *aws.Request, output *DeleteFlowLogsOutput) {
+ op := &aws.Operation{
+ Name: opDeleteFlowLogs,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteFlowLogsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DeleteFlowLogsOutput{}
+ req.Data = output
+ return
+}
+
+// Deletes one or more flow logs.
+func (c *EC2) DeleteFlowLogs(input *DeleteFlowLogsInput) (*DeleteFlowLogsOutput, error) {
+ req, out := c.DeleteFlowLogsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDeleteInternetGateway = "DeleteInternetGateway"
+
+// DeleteInternetGatewayRequest generates a request for the DeleteInternetGateway operation.
+func (c *EC2) DeleteInternetGatewayRequest(input *DeleteInternetGatewayInput) (req *aws.Request, output *DeleteInternetGatewayOutput) {
+ op := &aws.Operation{
+ Name: opDeleteInternetGateway,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteInternetGatewayInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DeleteInternetGatewayOutput{}
+ req.Data = output
+ return
+}
+
+// Deletes the specified Internet gateway. You must detach the Internet gateway
+// from the VPC before you can delete it.
+func (c *EC2) DeleteInternetGateway(input *DeleteInternetGatewayInput) (*DeleteInternetGatewayOutput, error) {
+ req, out := c.DeleteInternetGatewayRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDeleteKeyPair = "DeleteKeyPair"
+
+// DeleteKeyPairRequest generates a request for the DeleteKeyPair operation.
+func (c *EC2) DeleteKeyPairRequest(input *DeleteKeyPairInput) (req *aws.Request, output *DeleteKeyPairOutput) {
+ op := &aws.Operation{
+ Name: opDeleteKeyPair,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteKeyPairInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DeleteKeyPairOutput{}
+ req.Data = output
+ return
+}
+
+// Deletes the specified key pair, by removing the public key from Amazon EC2.
+func (c *EC2) DeleteKeyPair(input *DeleteKeyPairInput) (*DeleteKeyPairOutput, error) {
+ req, out := c.DeleteKeyPairRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDeleteNetworkACL = "DeleteNetworkAcl"
+
+// DeleteNetworkACLRequest generates a request for the DeleteNetworkACL operation.
+func (c *EC2) DeleteNetworkACLRequest(input *DeleteNetworkACLInput) (req *aws.Request, output *DeleteNetworkACLOutput) {
+ op := &aws.Operation{
+ Name: opDeleteNetworkACL,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteNetworkACLInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DeleteNetworkACLOutput{}
+ req.Data = output
+ return
+}
+
+// Deletes the specified network ACL. You can't delete the ACL if it's associated
+// with any subnets. You can't delete the default network ACL.
+func (c *EC2) DeleteNetworkACL(input *DeleteNetworkACLInput) (*DeleteNetworkACLOutput, error) {
+ req, out := c.DeleteNetworkACLRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDeleteNetworkACLEntry = "DeleteNetworkAclEntry"
+
+// DeleteNetworkACLEntryRequest generates a request for the DeleteNetworkACLEntry operation.
+func (c *EC2) DeleteNetworkACLEntryRequest(input *DeleteNetworkACLEntryInput) (req *aws.Request, output *DeleteNetworkACLEntryOutput) {
+ op := &aws.Operation{
+ Name: opDeleteNetworkACLEntry,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteNetworkACLEntryInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DeleteNetworkACLEntryOutput{}
+ req.Data = output
+ return
+}
+
+// Deletes the specified ingress or egress entry (rule) from the specified network
+// ACL.
+func (c *EC2) DeleteNetworkACLEntry(input *DeleteNetworkACLEntryInput) (*DeleteNetworkACLEntryOutput, error) {
+ req, out := c.DeleteNetworkACLEntryRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDeleteNetworkInterface = "DeleteNetworkInterface"
+
+// DeleteNetworkInterfaceRequest generates a request for the DeleteNetworkInterface operation.
+func (c *EC2) DeleteNetworkInterfaceRequest(input *DeleteNetworkInterfaceInput) (req *aws.Request, output *DeleteNetworkInterfaceOutput) {
+ op := &aws.Operation{
+ Name: opDeleteNetworkInterface,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteNetworkInterfaceInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DeleteNetworkInterfaceOutput{}
+ req.Data = output
+ return
+}
+
+// Deletes the specified network interface. You must detach the network interface
+// before you can delete it.
+func (c *EC2) DeleteNetworkInterface(input *DeleteNetworkInterfaceInput) (*DeleteNetworkInterfaceOutput, error) {
+ req, out := c.DeleteNetworkInterfaceRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDeletePlacementGroup = "DeletePlacementGroup"
+
+// DeletePlacementGroupRequest generates a request for the DeletePlacementGroup operation.
+func (c *EC2) DeletePlacementGroupRequest(input *DeletePlacementGroupInput) (req *aws.Request, output *DeletePlacementGroupOutput) {
+ op := &aws.Operation{
+ Name: opDeletePlacementGroup,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeletePlacementGroupInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DeletePlacementGroupOutput{}
+ req.Data = output
+ return
+}
+
+// Deletes the specified placement group. You must terminate all instances in
+// the placement group before you can delete the placement group. For more information
+// about placement groups and cluster instances, see Cluster Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) DeletePlacementGroup(input *DeletePlacementGroupInput) (*DeletePlacementGroupOutput, error) {
+ req, out := c.DeletePlacementGroupRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDeleteRoute = "DeleteRoute"
+
+// DeleteRouteRequest generates a request for the DeleteRoute operation.
+func (c *EC2) DeleteRouteRequest(input *DeleteRouteInput) (req *aws.Request, output *DeleteRouteOutput) {
+ op := &aws.Operation{
+ Name: opDeleteRoute,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteRouteInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DeleteRouteOutput{}
+ req.Data = output
+ return
+}
+
+// Deletes the specified route from the specified route table.
+func (c *EC2) DeleteRoute(input *DeleteRouteInput) (*DeleteRouteOutput, error) {
+ req, out := c.DeleteRouteRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDeleteRouteTable = "DeleteRouteTable"
+
+// DeleteRouteTableRequest generates a request for the DeleteRouteTable operation.
+func (c *EC2) DeleteRouteTableRequest(input *DeleteRouteTableInput) (req *aws.Request, output *DeleteRouteTableOutput) {
+ op := &aws.Operation{
+ Name: opDeleteRouteTable,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteRouteTableInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DeleteRouteTableOutput{}
+ req.Data = output
+ return
+}
+
+// Deletes the specified route table. You must disassociate the route table
+// from any subnets before you can delete it. You can't delete the main route
+// table.
+func (c *EC2) DeleteRouteTable(input *DeleteRouteTableInput) (*DeleteRouteTableOutput, error) {
+ req, out := c.DeleteRouteTableRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDeleteSecurityGroup = "DeleteSecurityGroup"
+
+// DeleteSecurityGroupRequest generates a request for the DeleteSecurityGroup operation.
+func (c *EC2) DeleteSecurityGroupRequest(input *DeleteSecurityGroupInput) (req *aws.Request, output *DeleteSecurityGroupOutput) {
+ op := &aws.Operation{
+ Name: opDeleteSecurityGroup,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteSecurityGroupInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DeleteSecurityGroupOutput{}
+ req.Data = output
+ return
+}
+
+// Deletes a security group.
+//
+// If you attempt to delete a security group that is associated with an instance,
+// or is referenced by another security group, the operation fails with InvalidGroup.InUse
+// in EC2-Classic or DependencyViolation in EC2-VPC.
+func (c *EC2) DeleteSecurityGroup(input *DeleteSecurityGroupInput) (*DeleteSecurityGroupOutput, error) {
+ req, out := c.DeleteSecurityGroupRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDeleteSnapshot = "DeleteSnapshot"
+
+// DeleteSnapshotRequest generates a request for the DeleteSnapshot operation.
+func (c *EC2) DeleteSnapshotRequest(input *DeleteSnapshotInput) (req *aws.Request, output *DeleteSnapshotOutput) {
+ op := &aws.Operation{
+ Name: opDeleteSnapshot,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteSnapshotInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DeleteSnapshotOutput{}
+ req.Data = output
+ return
+}
+
+// Deletes the specified snapshot.
+//
+// When you make periodic snapshots of a volume, the snapshots are incremental,
+// and only the blocks on the device that have changed since your last snapshot
+// are saved in the new snapshot. When you delete a snapshot, only the data
+// not needed for any other snapshot is removed. So regardless of which prior
+// snapshots have been deleted, all active snapshots will have access to all
+// the information needed to restore the volume.
+//
+// You cannot delete a snapshot of the root device of an EBS volume used by
+// a registered AMI. You must first de-register the AMI before you can delete
+// the snapshot.
+//
+// For more information, see Deleting an Amazon EBS Snapshot (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-snapshot.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) DeleteSnapshot(input *DeleteSnapshotInput) (*DeleteSnapshotOutput, error) {
+ req, out := c.DeleteSnapshotRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDeleteSpotDatafeedSubscription = "DeleteSpotDatafeedSubscription"
+
+// DeleteSpotDatafeedSubscriptionRequest generates a request for the DeleteSpotDatafeedSubscription operation.
+func (c *EC2) DeleteSpotDatafeedSubscriptionRequest(input *DeleteSpotDatafeedSubscriptionInput) (req *aws.Request, output *DeleteSpotDatafeedSubscriptionOutput) {
+ op := &aws.Operation{
+ Name: opDeleteSpotDatafeedSubscription,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteSpotDatafeedSubscriptionInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DeleteSpotDatafeedSubscriptionOutput{}
+ req.Data = output
+ return
+}
+
+// Deletes the data feed for Spot Instances. For more information, see Spot
+// Instance Data Feed (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) DeleteSpotDatafeedSubscription(input *DeleteSpotDatafeedSubscriptionInput) (*DeleteSpotDatafeedSubscriptionOutput, error) {
+ req, out := c.DeleteSpotDatafeedSubscriptionRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDeleteSubnet = "DeleteSubnet"
+
+// DeleteSubnetRequest generates a request for the DeleteSubnet operation.
+func (c *EC2) DeleteSubnetRequest(input *DeleteSubnetInput) (req *aws.Request, output *DeleteSubnetOutput) {
+ op := &aws.Operation{
+ Name: opDeleteSubnet,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteSubnetInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DeleteSubnetOutput{}
+ req.Data = output
+ return
+}
+
+// Deletes the specified subnet. You must terminate all running instances in
+// the subnet before you can delete the subnet.
+func (c *EC2) DeleteSubnet(input *DeleteSubnetInput) (*DeleteSubnetOutput, error) {
+ req, out := c.DeleteSubnetRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDeleteTags = "DeleteTags"
+
+// DeleteTagsRequest generates a request for the DeleteTags operation.
+func (c *EC2) DeleteTagsRequest(input *DeleteTagsInput) (req *aws.Request, output *DeleteTagsOutput) {
+ op := &aws.Operation{
+ Name: opDeleteTags,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteTagsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DeleteTagsOutput{}
+ req.Data = output
+ return
+}
+
+// Deletes the specified set of tags from the specified set of resources. This
+// call is designed to follow a DescribeTags request.
+//
+// For more information about tags, see Tagging Your Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) {
+ req, out := c.DeleteTagsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDeleteVPC = "DeleteVpc"
+
+// DeleteVPCRequest generates a request for the DeleteVPC operation.
+func (c *EC2) DeleteVPCRequest(input *DeleteVPCInput) (req *aws.Request, output *DeleteVPCOutput) {
+ op := &aws.Operation{
+ Name: opDeleteVPC,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteVPCInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DeleteVPCOutput{}
+ req.Data = output
+ return
+}
+
+// Deletes the specified VPC. You must detach or delete all gateways and resources
+// that are associated with the VPC before you can delete it. For example, you
+// must terminate all instances running in the VPC, delete all security groups
+// associated with the VPC (except the default one), delete all route tables
+// associated with the VPC (except the default one), and so on.
+func (c *EC2) DeleteVPC(input *DeleteVPCInput) (*DeleteVPCOutput, error) {
+ req, out := c.DeleteVPCRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDeleteVPCEndpoints = "DeleteVpcEndpoints"
+
+// DeleteVPCEndpointsRequest generates a request for the DeleteVPCEndpoints operation.
+func (c *EC2) DeleteVPCEndpointsRequest(input *DeleteVPCEndpointsInput) (req *aws.Request, output *DeleteVPCEndpointsOutput) {
+ op := &aws.Operation{
+ Name: opDeleteVPCEndpoints,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteVPCEndpointsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DeleteVPCEndpointsOutput{}
+ req.Data = output
+ return
+}
+
+// Deletes one or more specified VPC endpoints. Deleting the endpoint also deletes
+// the endpoint routes in the route tables that were associated with the endpoint.
+func (c *EC2) DeleteVPCEndpoints(input *DeleteVPCEndpointsInput) (*DeleteVPCEndpointsOutput, error) {
+ req, out := c.DeleteVPCEndpointsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDeleteVPCPeeringConnection = "DeleteVpcPeeringConnection"
+
+// DeleteVPCPeeringConnectionRequest generates a request for the DeleteVPCPeeringConnection operation.
+func (c *EC2) DeleteVPCPeeringConnectionRequest(input *DeleteVPCPeeringConnectionInput) (req *aws.Request, output *DeleteVPCPeeringConnectionOutput) {
+ op := &aws.Operation{
+ Name: opDeleteVPCPeeringConnection,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteVPCPeeringConnectionInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DeleteVPCPeeringConnectionOutput{}
+ req.Data = output
+ return
+}
+
+// Deletes a VPC peering connection. Either the owner of the requester VPC or
+// the owner of the peer VPC can delete the VPC peering connection if it's in
+// the active state. The owner of the requester VPC can delete a VPC peering
+// connection in the pending-acceptance state.
+func (c *EC2) DeleteVPCPeeringConnection(input *DeleteVPCPeeringConnectionInput) (*DeleteVPCPeeringConnectionOutput, error) {
+ req, out := c.DeleteVPCPeeringConnectionRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDeleteVPNConnection = "DeleteVpnConnection"
+
+// DeleteVPNConnectionRequest generates a request for the DeleteVPNConnection operation.
+func (c *EC2) DeleteVPNConnectionRequest(input *DeleteVPNConnectionInput) (req *aws.Request, output *DeleteVPNConnectionOutput) {
+ op := &aws.Operation{
+ Name: opDeleteVPNConnection,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteVPNConnectionInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DeleteVPNConnectionOutput{}
+ req.Data = output
+ return
+}
+
+// Deletes the specified VPN connection.
+//
+// If you're deleting the VPC and its associated components, we recommend that
+// you detach the virtual private gateway from the VPC and delete the VPC before
+// deleting the VPN connection. If you believe that the tunnel credentials for
+// your VPN connection have been compromised, you can delete the VPN connection
+// and create a new one that has new keys, without needing to delete the VPC
+// or virtual private gateway. If you create a new VPN connection, you must
+// reconfigure the customer gateway using the new configuration information
+// returned with the new VPN connection ID.
+func (c *EC2) DeleteVPNConnection(input *DeleteVPNConnectionInput) (*DeleteVPNConnectionOutput, error) {
+ req, out := c.DeleteVPNConnectionRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDeleteVPNConnectionRoute = "DeleteVpnConnectionRoute"
+
+// DeleteVPNConnectionRouteRequest generates a request for the DeleteVPNConnectionRoute operation.
+func (c *EC2) DeleteVPNConnectionRouteRequest(input *DeleteVPNConnectionRouteInput) (req *aws.Request, output *DeleteVPNConnectionRouteOutput) {
+ op := &aws.Operation{
+ Name: opDeleteVPNConnectionRoute,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteVPNConnectionRouteInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DeleteVPNConnectionRouteOutput{}
+ req.Data = output
+ return
+}
+
+// Deletes the specified static route associated with a VPN connection between
+// an existing virtual private gateway and a VPN customer gateway. The static
+// route allows traffic to be routed from the virtual private gateway to the
+// VPN customer gateway.
+func (c *EC2) DeleteVPNConnectionRoute(input *DeleteVPNConnectionRouteInput) (*DeleteVPNConnectionRouteOutput, error) {
+ req, out := c.DeleteVPNConnectionRouteRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDeleteVPNGateway = "DeleteVpnGateway"
+
+// DeleteVPNGatewayRequest generates a request for the DeleteVPNGateway operation.
+func (c *EC2) DeleteVPNGatewayRequest(input *DeleteVPNGatewayInput) (req *aws.Request, output *DeleteVPNGatewayOutput) {
+ op := &aws.Operation{
+ Name: opDeleteVPNGateway,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteVPNGatewayInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DeleteVPNGatewayOutput{}
+ req.Data = output
+ return
+}
+
+// Deletes the specified virtual private gateway. We recommend that before you
+// delete a virtual private gateway, you detach it from the VPC and delete the
+// VPN connection. Note that you don't need to delete the virtual private gateway
+// if you plan to delete and recreate the VPN connection between your VPC and
+// your network.
+func (c *EC2) DeleteVPNGateway(input *DeleteVPNGatewayInput) (*DeleteVPNGatewayOutput, error) {
+ req, out := c.DeleteVPNGatewayRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDeleteVolume = "DeleteVolume"
+
+// DeleteVolumeRequest generates a request for the DeleteVolume operation.
+func (c *EC2) DeleteVolumeRequest(input *DeleteVolumeInput) (req *aws.Request, output *DeleteVolumeOutput) {
+ op := &aws.Operation{
+ Name: opDeleteVolume,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeleteVolumeInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DeleteVolumeOutput{}
+ req.Data = output
+ return
+}
+
+// Deletes the specified EBS volume. The volume must be in the available state
+// (not attached to an instance).
+//
+// The volume may remain in the deleting state for several minutes.
+//
+// For more information, see Deleting an Amazon EBS Volume (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-volume.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) DeleteVolume(input *DeleteVolumeInput) (*DeleteVolumeOutput, error) {
+ req, out := c.DeleteVolumeRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDeregisterImage = "DeregisterImage"
+
+// DeregisterImageRequest generates a request for the DeregisterImage operation.
+func (c *EC2) DeregisterImageRequest(input *DeregisterImageInput) (req *aws.Request, output *DeregisterImageOutput) {
+ op := &aws.Operation{
+ Name: opDeregisterImage,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DeregisterImageInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DeregisterImageOutput{}
+ req.Data = output
+ return
+}
+
+// Deregisters the specified AMI. After you deregister an AMI, it can't be used
+// to launch new instances.
+//
+// This command does not delete the AMI.
+func (c *EC2) DeregisterImage(input *DeregisterImageInput) (*DeregisterImageOutput, error) {
+ req, out := c.DeregisterImageRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeAccountAttributes = "DescribeAccountAttributes"
+
+// DescribeAccountAttributesRequest generates a request for the DescribeAccountAttributes operation.
+func (c *EC2) DescribeAccountAttributesRequest(input *DescribeAccountAttributesInput) (req *aws.Request, output *DescribeAccountAttributesOutput) {
+ op := &aws.Operation{
+ Name: opDescribeAccountAttributes,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeAccountAttributesInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeAccountAttributesOutput{}
+ req.Data = output
+ return
+}
+
+// Describes attributes of your AWS account. The following are the supported
+// account attributes:
+//
+// supported-platforms: Indicates whether your account can launch instances
+// into EC2-Classic and EC2-VPC, or only into EC2-VPC.
+//
+// default-vpc: The ID of the default VPC for your account, or none.
+//
+// max-instances: The maximum number of On-Demand instances that you can
+// run.
+//
+// vpc-max-security-groups-per-interface: The maximum number of security
+// groups that you can assign to a network interface.
+//
+// max-elastic-ips: The maximum number of Elastic IP addresses that you can
+// allocate for use with EC2-Classic.
+//
+// vpc-max-elastic-ips: The maximum number of Elastic IP addresses that you
+// can allocate for use with EC2-VPC.
+func (c *EC2) DescribeAccountAttributes(input *DescribeAccountAttributesInput) (*DescribeAccountAttributesOutput, error) {
+ req, out := c.DescribeAccountAttributesRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeAddresses = "DescribeAddresses"
+
+// DescribeAddressesRequest generates a request for the DescribeAddresses operation.
+func (c *EC2) DescribeAddressesRequest(input *DescribeAddressesInput) (req *aws.Request, output *DescribeAddressesOutput) {
+ op := &aws.Operation{
+ Name: opDescribeAddresses,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeAddressesInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeAddressesOutput{}
+ req.Data = output
+ return
+}
+
+// Describes one or more of your Elastic IP addresses.
+//
+// An Elastic IP address is for use in either the EC2-Classic platform or in
+// a VPC. For more information, see Elastic IP Addresses (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) DescribeAddresses(input *DescribeAddressesInput) (*DescribeAddressesOutput, error) {
+ req, out := c.DescribeAddressesRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeAvailabilityZones = "DescribeAvailabilityZones"
+
+// DescribeAvailabilityZonesRequest generates a request for the DescribeAvailabilityZones operation.
+func (c *EC2) DescribeAvailabilityZonesRequest(input *DescribeAvailabilityZonesInput) (req *aws.Request, output *DescribeAvailabilityZonesOutput) {
+ op := &aws.Operation{
+ Name: opDescribeAvailabilityZones,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeAvailabilityZonesInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeAvailabilityZonesOutput{}
+ req.Data = output
+ return
+}
+
+// Describes one or more of the Availability Zones that are available to you.
+// The results include zones only for the region you're currently using. If
+// there is an event impacting an Availability Zone, you can use this request
+// to view the state and any provided message for that Availability Zone.
+//
+// For more information, see Regions and Availability Zones (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) DescribeAvailabilityZones(input *DescribeAvailabilityZonesInput) (*DescribeAvailabilityZonesOutput, error) {
+ req, out := c.DescribeAvailabilityZonesRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeBundleTasks = "DescribeBundleTasks"
+
+// DescribeBundleTasksRequest generates a request for the DescribeBundleTasks operation.
+func (c *EC2) DescribeBundleTasksRequest(input *DescribeBundleTasksInput) (req *aws.Request, output *DescribeBundleTasksOutput) {
+ op := &aws.Operation{
+ Name: opDescribeBundleTasks,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeBundleTasksInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeBundleTasksOutput{}
+ req.Data = output
+ return
+}
+
+// Describes one or more of your bundling tasks.
+//
+// Completed bundle tasks are listed for only a limited time. If your bundle
+// task is no longer in the list, you can still register an AMI from it. Just
+// use RegisterImage with the Amazon S3 bucket name and image manifest name
+// you provided to the bundle task.
+func (c *EC2) DescribeBundleTasks(input *DescribeBundleTasksInput) (*DescribeBundleTasksOutput, error) {
+ req, out := c.DescribeBundleTasksRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeClassicLinkInstances = "DescribeClassicLinkInstances"
+
+// DescribeClassicLinkInstancesRequest generates a request for the DescribeClassicLinkInstances operation.
+func (c *EC2) DescribeClassicLinkInstancesRequest(input *DescribeClassicLinkInstancesInput) (req *aws.Request, output *DescribeClassicLinkInstancesOutput) {
+ op := &aws.Operation{
+ Name: opDescribeClassicLinkInstances,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeClassicLinkInstancesInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeClassicLinkInstancesOutput{}
+ req.Data = output
+ return
+}
+
+// Describes one or more of your linked EC2-Classic instances. This request
+// only returns information about EC2-Classic instances linked to a VPC through
+// ClassicLink; you cannot use this request to return information about other
+// instances.
+func (c *EC2) DescribeClassicLinkInstances(input *DescribeClassicLinkInstancesInput) (*DescribeClassicLinkInstancesOutput, error) {
+ req, out := c.DescribeClassicLinkInstancesRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeConversionTasks = "DescribeConversionTasks"
+
+// DescribeConversionTasksRequest generates a request for the DescribeConversionTasks operation.
+func (c *EC2) DescribeConversionTasksRequest(input *DescribeConversionTasksInput) (req *aws.Request, output *DescribeConversionTasksOutput) {
+ op := &aws.Operation{
+ Name: opDescribeConversionTasks,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeConversionTasksInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeConversionTasksOutput{}
+ req.Data = output
+ return
+}
+
+// Describes one or more of your conversion tasks. For more information, see
+// Using the Command Line Tools to Import Your Virtual Machine to Amazon EC2
+// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UploadingYourInstancesandVolumes.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) DescribeConversionTasks(input *DescribeConversionTasksInput) (*DescribeConversionTasksOutput, error) {
+ req, out := c.DescribeConversionTasksRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeCustomerGateways = "DescribeCustomerGateways"
+
+// DescribeCustomerGatewaysRequest generates a request for the DescribeCustomerGateways operation.
+func (c *EC2) DescribeCustomerGatewaysRequest(input *DescribeCustomerGatewaysInput) (req *aws.Request, output *DescribeCustomerGatewaysOutput) {
+ op := &aws.Operation{
+ Name: opDescribeCustomerGateways,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeCustomerGatewaysInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeCustomerGatewaysOutput{}
+ req.Data = output
+ return
+}
+
+// Describes one or more of your VPN customer gateways.
+//
+// For more information about VPN customer gateways, see Adding a Hardware
+// Virtual Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *EC2) DescribeCustomerGateways(input *DescribeCustomerGatewaysInput) (*DescribeCustomerGatewaysOutput, error) {
+ req, out := c.DescribeCustomerGatewaysRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeDHCPOptions = "DescribeDhcpOptions"
+
+// DescribeDHCPOptionsRequest generates a request for the DescribeDHCPOptions operation.
+func (c *EC2) DescribeDHCPOptionsRequest(input *DescribeDHCPOptionsInput) (req *aws.Request, output *DescribeDHCPOptionsOutput) {
+ op := &aws.Operation{
+ Name: opDescribeDHCPOptions,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeDHCPOptionsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeDHCPOptionsOutput{}
+ req.Data = output
+ return
+}
+
+// Describes one or more of your DHCP options sets.
+//
+// For more information about DHCP options sets, see DHCP Options Sets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *EC2) DescribeDHCPOptions(input *DescribeDHCPOptionsInput) (*DescribeDHCPOptionsOutput, error) {
+ req, out := c.DescribeDHCPOptionsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeExportTasks = "DescribeExportTasks"
+
+// DescribeExportTasksRequest generates a request for the DescribeExportTasks operation.
+func (c *EC2) DescribeExportTasksRequest(input *DescribeExportTasksInput) (req *aws.Request, output *DescribeExportTasksOutput) {
+ op := &aws.Operation{
+ Name: opDescribeExportTasks,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeExportTasksInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeExportTasksOutput{}
+ req.Data = output
+ return
+}
+
+// Describes one or more of your export tasks.
+func (c *EC2) DescribeExportTasks(input *DescribeExportTasksInput) (*DescribeExportTasksOutput, error) {
+ req, out := c.DescribeExportTasksRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeFlowLogs = "DescribeFlowLogs"
+
+// DescribeFlowLogsRequest generates a request for the DescribeFlowLogs operation.
+func (c *EC2) DescribeFlowLogsRequest(input *DescribeFlowLogsInput) (req *aws.Request, output *DescribeFlowLogsOutput) {
+ op := &aws.Operation{
+ Name: opDescribeFlowLogs,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeFlowLogsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeFlowLogsOutput{}
+ req.Data = output
+ return
+}
+
+// Describes one or more flow logs. To view the information in your flow logs
+// (the log streams for the network interfaces), you must use the CloudWatch
+// Logs console or the CloudWatch Logs API.
+func (c *EC2) DescribeFlowLogs(input *DescribeFlowLogsInput) (*DescribeFlowLogsOutput, error) {
+ req, out := c.DescribeFlowLogsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeImageAttribute = "DescribeImageAttribute"
+
+// DescribeImageAttributeRequest generates a request for the DescribeImageAttribute operation.
+func (c *EC2) DescribeImageAttributeRequest(input *DescribeImageAttributeInput) (req *aws.Request, output *DescribeImageAttributeOutput) {
+ op := &aws.Operation{
+ Name: opDescribeImageAttribute,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeImageAttributeInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeImageAttributeOutput{}
+ req.Data = output
+ return
+}
+
+// Describes the specified attribute of the specified AMI. You can specify only
+// one attribute at a time.
+func (c *EC2) DescribeImageAttribute(input *DescribeImageAttributeInput) (*DescribeImageAttributeOutput, error) {
+ req, out := c.DescribeImageAttributeRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeImages = "DescribeImages"
+
+// DescribeImagesRequest generates a request for the DescribeImages operation.
+func (c *EC2) DescribeImagesRequest(input *DescribeImagesInput) (req *aws.Request, output *DescribeImagesOutput) {
+ op := &aws.Operation{
+ Name: opDescribeImages,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeImagesInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeImagesOutput{}
+ req.Data = output
+ return
+}
+
+// Describes one or more of the images (AMIs, AKIs, and ARIs) available to you.
+// Images available to you include public images, private images that you own,
+// and private images owned by other AWS accounts but for which you have explicit
+// launch permissions.
+//
+// Deregistered images are included in the returned results for an unspecified
+// interval after deregistration.
+func (c *EC2) DescribeImages(input *DescribeImagesInput) (*DescribeImagesOutput, error) {
+ req, out := c.DescribeImagesRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeImportImageTasks = "DescribeImportImageTasks"
+
+// DescribeImportImageTasksRequest generates a request for the DescribeImportImageTasks operation.
+func (c *EC2) DescribeImportImageTasksRequest(input *DescribeImportImageTasksInput) (req *aws.Request, output *DescribeImportImageTasksOutput) {
+ op := &aws.Operation{
+ Name: opDescribeImportImageTasks,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeImportImageTasksInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeImportImageTasksOutput{}
+ req.Data = output
+ return
+}
+
+// Displays details about an import virtual machine or import snapshot tasks
+// that are already created.
+func (c *EC2) DescribeImportImageTasks(input *DescribeImportImageTasksInput) (*DescribeImportImageTasksOutput, error) {
+ req, out := c.DescribeImportImageTasksRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeImportSnapshotTasks = "DescribeImportSnapshotTasks"
+
+// DescribeImportSnapshotTasksRequest generates a request for the DescribeImportSnapshotTasks operation.
+func (c *EC2) DescribeImportSnapshotTasksRequest(input *DescribeImportSnapshotTasksInput) (req *aws.Request, output *DescribeImportSnapshotTasksOutput) {
+ op := &aws.Operation{
+ Name: opDescribeImportSnapshotTasks,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeImportSnapshotTasksInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeImportSnapshotTasksOutput{}
+ req.Data = output
+ return
+}
+
+// Describes your import snapshot tasks.
+func (c *EC2) DescribeImportSnapshotTasks(input *DescribeImportSnapshotTasksInput) (*DescribeImportSnapshotTasksOutput, error) {
+ req, out := c.DescribeImportSnapshotTasksRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeInstanceAttribute = "DescribeInstanceAttribute"
+
+// DescribeInstanceAttributeRequest generates a request for the DescribeInstanceAttribute operation.
+func (c *EC2) DescribeInstanceAttributeRequest(input *DescribeInstanceAttributeInput) (req *aws.Request, output *DescribeInstanceAttributeOutput) {
+ op := &aws.Operation{
+ Name: opDescribeInstanceAttribute,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeInstanceAttributeInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeInstanceAttributeOutput{}
+ req.Data = output
+ return
+}
+
+// Describes the specified attribute of the specified instance. You can specify
+// only one attribute at a time. Valid attribute values are: instanceType |
+// kernel | ramdisk | userData | disableApiTermination | instanceInitiatedShutdownBehavior
+// | rootDeviceName | blockDeviceMapping | productCodes | sourceDestCheck |
+// groupSet | ebsOptimized | sriovNetSupport
+func (c *EC2) DescribeInstanceAttribute(input *DescribeInstanceAttributeInput) (*DescribeInstanceAttributeOutput, error) {
+ req, out := c.DescribeInstanceAttributeRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeInstanceStatus = "DescribeInstanceStatus"
+
+// DescribeInstanceStatusRequest generates a request for the DescribeInstanceStatus operation.
+func (c *EC2) DescribeInstanceStatusRequest(input *DescribeInstanceStatusInput) (req *aws.Request, output *DescribeInstanceStatusOutput) {
+ op := &aws.Operation{
+ Name: opDescribeInstanceStatus,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ Paginator: &aws.Paginator{
+ InputTokens: []string{"NextToken"},
+ OutputTokens: []string{"NextToken"},
+ LimitToken: "MaxResults",
+ TruncationToken: "",
+ },
+ }
+
+ if input == nil {
+ input = &DescribeInstanceStatusInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeInstanceStatusOutput{}
+ req.Data = output
+ return
+}
+
+// Describes the status of one or more instances.
+//
+// Instance status includes the following components:
+//
+// Status checks - Amazon EC2 performs status checks on running EC2 instances
+// to identify hardware and software issues. For more information, see Status
+// Checks for Your Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-system-instance-status-check.html)
+// and Troubleshooting Instances with Failed Status Checks (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstances.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+//
+// Scheduled events - Amazon EC2 can schedule events (such as reboot, stop,
+// or terminate) for your instances related to hardware issues, software updates,
+// or system maintenance. For more information, see Scheduled Events for Your
+// Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-instances-status-check_sched.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+//
+// Instance state - You can manage your instances from the moment you launch
+// them through their termination. For more information, see Instance Lifecycle
+// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) DescribeInstanceStatus(input *DescribeInstanceStatusInput) (*DescribeInstanceStatusOutput, error) {
+ req, out := c.DescribeInstanceStatusRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+func (c *EC2) DescribeInstanceStatusPages(input *DescribeInstanceStatusInput, fn func(p *DescribeInstanceStatusOutput, lastPage bool) (shouldContinue bool)) error {
+ page, _ := c.DescribeInstanceStatusRequest(input)
+ return page.EachPage(func(p interface{}, lastPage bool) bool {
+ return fn(p.(*DescribeInstanceStatusOutput), lastPage)
+ })
+}
+
+const opDescribeInstances = "DescribeInstances"
+
+// DescribeInstancesRequest generates a request for the DescribeInstances operation.
+func (c *EC2) DescribeInstancesRequest(input *DescribeInstancesInput) (req *aws.Request, output *DescribeInstancesOutput) {
+ op := &aws.Operation{
+ Name: opDescribeInstances,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ Paginator: &aws.Paginator{
+ InputTokens: []string{"NextToken"},
+ OutputTokens: []string{"NextToken"},
+ LimitToken: "MaxResults",
+ TruncationToken: "",
+ },
+ }
+
+ if input == nil {
+ input = &DescribeInstancesInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeInstancesOutput{}
+ req.Data = output
+ return
+}
+
+// Describes one or more of your instances.
+//
+// If you specify one or more instance IDs, Amazon EC2 returns information
+// for those instances. If you do not specify instance IDs, Amazon EC2 returns
+// information for all relevant instances. If you specify an instance ID that
+// is not valid, an error is returned. If you specify an instance that you do
+// not own, it is not included in the returned results.
+//
+// Recently terminated instances might appear in the returned results. This
+// interval is usually less than one hour.
+func (c *EC2) DescribeInstances(input *DescribeInstancesInput) (*DescribeInstancesOutput, error) {
+ req, out := c.DescribeInstancesRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+func (c *EC2) DescribeInstancesPages(input *DescribeInstancesInput, fn func(p *DescribeInstancesOutput, lastPage bool) (shouldContinue bool)) error {
+ page, _ := c.DescribeInstancesRequest(input)
+ return page.EachPage(func(p interface{}, lastPage bool) bool {
+ return fn(p.(*DescribeInstancesOutput), lastPage)
+ })
+}
+
+const opDescribeInternetGateways = "DescribeInternetGateways"
+
+// DescribeInternetGatewaysRequest generates a request for the DescribeInternetGateways operation.
+func (c *EC2) DescribeInternetGatewaysRequest(input *DescribeInternetGatewaysInput) (req *aws.Request, output *DescribeInternetGatewaysOutput) {
+ op := &aws.Operation{
+ Name: opDescribeInternetGateways,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeInternetGatewaysInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeInternetGatewaysOutput{}
+ req.Data = output
+ return
+}
+
+// Describes one or more of your Internet gateways.
+func (c *EC2) DescribeInternetGateways(input *DescribeInternetGatewaysInput) (*DescribeInternetGatewaysOutput, error) {
+ req, out := c.DescribeInternetGatewaysRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeKeyPairs = "DescribeKeyPairs"
+
+// DescribeKeyPairsRequest generates a request for the DescribeKeyPairs operation.
+func (c *EC2) DescribeKeyPairsRequest(input *DescribeKeyPairsInput) (req *aws.Request, output *DescribeKeyPairsOutput) {
+ op := &aws.Operation{
+ Name: opDescribeKeyPairs,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeKeyPairsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeKeyPairsOutput{}
+ req.Data = output
+ return
+}
+
+// Describes one or more of your key pairs.
+//
+// For more information about key pairs, see Key Pairs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) DescribeKeyPairs(input *DescribeKeyPairsInput) (*DescribeKeyPairsOutput, error) {
+ req, out := c.DescribeKeyPairsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeMovingAddresses = "DescribeMovingAddresses"
+
+// DescribeMovingAddressesRequest generates a request for the DescribeMovingAddresses operation.
+func (c *EC2) DescribeMovingAddressesRequest(input *DescribeMovingAddressesInput) (req *aws.Request, output *DescribeMovingAddressesOutput) {
+ op := &aws.Operation{
+ Name: opDescribeMovingAddresses,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeMovingAddressesInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeMovingAddressesOutput{}
+ req.Data = output
+ return
+}
+
+// Describes your Elastic IP addresses that are being moved to the EC2-VPC platform,
+// or that are being restored to the EC2-Classic platform. This request does
+// not return information about any other Elastic IP addresses in your account.
+func (c *EC2) DescribeMovingAddresses(input *DescribeMovingAddressesInput) (*DescribeMovingAddressesOutput, error) {
+ req, out := c.DescribeMovingAddressesRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeNetworkACLs = "DescribeNetworkAcls"
+
+// DescribeNetworkACLsRequest generates a request for the DescribeNetworkACLs operation.
+func (c *EC2) DescribeNetworkACLsRequest(input *DescribeNetworkACLsInput) (req *aws.Request, output *DescribeNetworkACLsOutput) {
+ op := &aws.Operation{
+ Name: opDescribeNetworkACLs,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeNetworkACLsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeNetworkACLsOutput{}
+ req.Data = output
+ return
+}
+
+// Describes one or more of your network ACLs.
+//
+// For more information about network ACLs, see Network ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *EC2) DescribeNetworkACLs(input *DescribeNetworkACLsInput) (*DescribeNetworkACLsOutput, error) {
+ req, out := c.DescribeNetworkACLsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeNetworkInterfaceAttribute = "DescribeNetworkInterfaceAttribute"
+
+// DescribeNetworkInterfaceAttributeRequest generates a request for the DescribeNetworkInterfaceAttribute operation.
+func (c *EC2) DescribeNetworkInterfaceAttributeRequest(input *DescribeNetworkInterfaceAttributeInput) (req *aws.Request, output *DescribeNetworkInterfaceAttributeOutput) {
+ op := &aws.Operation{
+ Name: opDescribeNetworkInterfaceAttribute,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeNetworkInterfaceAttributeInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeNetworkInterfaceAttributeOutput{}
+ req.Data = output
+ return
+}
+
+// Describes a network interface attribute. You can specify only one attribute
+// at a time.
+func (c *EC2) DescribeNetworkInterfaceAttribute(input *DescribeNetworkInterfaceAttributeInput) (*DescribeNetworkInterfaceAttributeOutput, error) {
+ req, out := c.DescribeNetworkInterfaceAttributeRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeNetworkInterfaces = "DescribeNetworkInterfaces"
+
+// DescribeNetworkInterfacesRequest generates a request for the DescribeNetworkInterfaces operation.
+func (c *EC2) DescribeNetworkInterfacesRequest(input *DescribeNetworkInterfacesInput) (req *aws.Request, output *DescribeNetworkInterfacesOutput) {
+ op := &aws.Operation{
+ Name: opDescribeNetworkInterfaces,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeNetworkInterfacesInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeNetworkInterfacesOutput{}
+ req.Data = output
+ return
+}
+
+// Describes one or more of your network interfaces.
+func (c *EC2) DescribeNetworkInterfaces(input *DescribeNetworkInterfacesInput) (*DescribeNetworkInterfacesOutput, error) {
+ req, out := c.DescribeNetworkInterfacesRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribePlacementGroups = "DescribePlacementGroups"
+
+// DescribePlacementGroupsRequest generates a request for the DescribePlacementGroups operation.
+func (c *EC2) DescribePlacementGroupsRequest(input *DescribePlacementGroupsInput) (req *aws.Request, output *DescribePlacementGroupsOutput) {
+ op := &aws.Operation{
+ Name: opDescribePlacementGroups,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribePlacementGroupsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribePlacementGroupsOutput{}
+ req.Data = output
+ return
+}
+
+// Describes one or more of your placement groups. For more information about
+// placement groups and cluster instances, see Cluster Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) DescribePlacementGroups(input *DescribePlacementGroupsInput) (*DescribePlacementGroupsOutput, error) {
+ req, out := c.DescribePlacementGroupsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribePrefixLists = "DescribePrefixLists"
+
+// DescribePrefixListsRequest generates a request for the DescribePrefixLists operation.
+func (c *EC2) DescribePrefixListsRequest(input *DescribePrefixListsInput) (req *aws.Request, output *DescribePrefixListsOutput) {
+ op := &aws.Operation{
+ Name: opDescribePrefixLists,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribePrefixListsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribePrefixListsOutput{}
+ req.Data = output
+ return
+}
+
+// Describes available AWS services in a prefix list format, which includes
+// the prefix list name and prefix list ID of the service and the IP address
+// range for the service. A prefix list ID is required for creating an outbound
+// security group rule that allows traffic from a VPC to access an AWS service
+// through a VPC endpoint.
+func (c *EC2) DescribePrefixLists(input *DescribePrefixListsInput) (*DescribePrefixListsOutput, error) {
+ req, out := c.DescribePrefixListsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeRegions = "DescribeRegions"
+
+// DescribeRegionsRequest generates a request for the DescribeRegions operation.
+func (c *EC2) DescribeRegionsRequest(input *DescribeRegionsInput) (req *aws.Request, output *DescribeRegionsOutput) {
+ op := &aws.Operation{
+ Name: opDescribeRegions,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeRegionsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeRegionsOutput{}
+ req.Data = output
+ return
+}
+
+// Describes one or more regions that are currently available to you.
+//
+// For a list of the regions supported by Amazon EC2, see Regions and Endpoints
+// (http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region).
+func (c *EC2) DescribeRegions(input *DescribeRegionsInput) (*DescribeRegionsOutput, error) {
+ req, out := c.DescribeRegionsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeReservedInstances = "DescribeReservedInstances"
+
+// DescribeReservedInstancesRequest generates a request for the DescribeReservedInstances operation.
+func (c *EC2) DescribeReservedInstancesRequest(input *DescribeReservedInstancesInput) (req *aws.Request, output *DescribeReservedInstancesOutput) {
+ op := &aws.Operation{
+ Name: opDescribeReservedInstances,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeReservedInstancesInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeReservedInstancesOutput{}
+ req.Data = output
+ return
+}
+
+// Describes one or more of the Reserved Instances that you purchased.
+//
+// For more information about Reserved Instances, see Reserved Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-on-demand-reserved-instances.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) DescribeReservedInstances(input *DescribeReservedInstancesInput) (*DescribeReservedInstancesOutput, error) {
+ req, out := c.DescribeReservedInstancesRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeReservedInstancesListings = "DescribeReservedInstancesListings"
+
+// DescribeReservedInstancesListingsRequest generates a request for the DescribeReservedInstancesListings operation.
+func (c *EC2) DescribeReservedInstancesListingsRequest(input *DescribeReservedInstancesListingsInput) (req *aws.Request, output *DescribeReservedInstancesListingsOutput) {
+ op := &aws.Operation{
+ Name: opDescribeReservedInstancesListings,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeReservedInstancesListingsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeReservedInstancesListingsOutput{}
+ req.Data = output
+ return
+}
+
+// Describes your account's Reserved Instance listings in the Reserved Instance
+// Marketplace.
+//
+// The Reserved Instance Marketplace matches sellers who want to resell Reserved
+// Instance capacity that they no longer need with buyers who want to purchase
+// additional capacity. Reserved Instances bought and sold through the Reserved
+// Instance Marketplace work like any other Reserved Instances.
+//
+// As a seller, you choose to list some or all of your Reserved Instances,
+// and you specify the upfront price to receive for them. Your Reserved Instances
+// are then listed in the Reserved Instance Marketplace and are available for
+// purchase.
+//
+// As a buyer, you specify the configuration of the Reserved Instance to purchase,
+// and the Marketplace matches what you're searching for with what's available.
+// The Marketplace first sells the lowest priced Reserved Instances to you,
+// and continues to sell available Reserved Instance listings to you until your
+// demand is met. You are charged based on the total price of all of the listings
+// that you purchase.
+//
+// For more information, see Reserved Instance Marketplace (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) DescribeReservedInstancesListings(input *DescribeReservedInstancesListingsInput) (*DescribeReservedInstancesListingsOutput, error) {
+ req, out := c.DescribeReservedInstancesListingsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeReservedInstancesModifications = "DescribeReservedInstancesModifications"
+
+// DescribeReservedInstancesModificationsRequest generates a request for the DescribeReservedInstancesModifications operation.
+func (c *EC2) DescribeReservedInstancesModificationsRequest(input *DescribeReservedInstancesModificationsInput) (req *aws.Request, output *DescribeReservedInstancesModificationsOutput) {
+ op := &aws.Operation{
+ Name: opDescribeReservedInstancesModifications,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ Paginator: &aws.Paginator{
+ InputTokens: []string{"NextToken"},
+ OutputTokens: []string{"NextToken"},
+ LimitToken: "",
+ TruncationToken: "",
+ },
+ }
+
+ if input == nil {
+ input = &DescribeReservedInstancesModificationsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeReservedInstancesModificationsOutput{}
+ req.Data = output
+ return
+}
+
+// Describes the modifications made to your Reserved Instances. If no parameter
+// is specified, information about all your Reserved Instances modification
+// requests is returned. If a modification ID is specified, only information
+// about the specific modification is returned.
+//
+// For more information, see Modifying Reserved Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) DescribeReservedInstancesModifications(input *DescribeReservedInstancesModificationsInput) (*DescribeReservedInstancesModificationsOutput, error) {
+ req, out := c.DescribeReservedInstancesModificationsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+func (c *EC2) DescribeReservedInstancesModificationsPages(input *DescribeReservedInstancesModificationsInput, fn func(p *DescribeReservedInstancesModificationsOutput, lastPage bool) (shouldContinue bool)) error {
+ page, _ := c.DescribeReservedInstancesModificationsRequest(input)
+ return page.EachPage(func(p interface{}, lastPage bool) bool {
+ return fn(p.(*DescribeReservedInstancesModificationsOutput), lastPage)
+ })
+}
+
+const opDescribeReservedInstancesOfferings = "DescribeReservedInstancesOfferings"
+
+// DescribeReservedInstancesOfferingsRequest generates a request for the DescribeReservedInstancesOfferings operation.
+func (c *EC2) DescribeReservedInstancesOfferingsRequest(input *DescribeReservedInstancesOfferingsInput) (req *aws.Request, output *DescribeReservedInstancesOfferingsOutput) {
+ op := &aws.Operation{
+ Name: opDescribeReservedInstancesOfferings,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ Paginator: &aws.Paginator{
+ InputTokens: []string{"NextToken"},
+ OutputTokens: []string{"NextToken"},
+ LimitToken: "MaxResults",
+ TruncationToken: "",
+ },
+ }
+
+ if input == nil {
+ input = &DescribeReservedInstancesOfferingsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeReservedInstancesOfferingsOutput{}
+ req.Data = output
+ return
+}
+
+// Describes Reserved Instance offerings that are available for purchase. With
+// Reserved Instances, you purchase the right to launch instances for a period
+// of time. During that time period, you do not receive insufficient capacity
+// errors, and you pay a lower usage rate than the rate charged for On-Demand
+// instances for the actual time used.
+//
+// For more information, see Reserved Instance Marketplace (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) DescribeReservedInstancesOfferings(input *DescribeReservedInstancesOfferingsInput) (*DescribeReservedInstancesOfferingsOutput, error) {
+ req, out := c.DescribeReservedInstancesOfferingsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+func (c *EC2) DescribeReservedInstancesOfferingsPages(input *DescribeReservedInstancesOfferingsInput, fn func(p *DescribeReservedInstancesOfferingsOutput, lastPage bool) (shouldContinue bool)) error {
+ page, _ := c.DescribeReservedInstancesOfferingsRequest(input)
+ return page.EachPage(func(p interface{}, lastPage bool) bool {
+ return fn(p.(*DescribeReservedInstancesOfferingsOutput), lastPage)
+ })
+}
+
+const opDescribeRouteTables = "DescribeRouteTables"
+
+// DescribeRouteTablesRequest generates a request for the DescribeRouteTables operation.
+func (c *EC2) DescribeRouteTablesRequest(input *DescribeRouteTablesInput) (req *aws.Request, output *DescribeRouteTablesOutput) {
+ op := &aws.Operation{
+ Name: opDescribeRouteTables,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeRouteTablesInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeRouteTablesOutput{}
+ req.Data = output
+ return
+}
+
+// Describes one or more of your route tables.
+//
+// Each subnet in your VPC must be associated with a route table. If a subnet
+// is not explicitly associated with any route table, it is implicitly associated
+// with the main route table. This command does not return the subnet ID for
+// implicit associations.
+//
+// For more information about route tables, see Route Tables (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *EC2) DescribeRouteTables(input *DescribeRouteTablesInput) (*DescribeRouteTablesOutput, error) {
+ req, out := c.DescribeRouteTablesRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeSecurityGroups = "DescribeSecurityGroups"
+
+// DescribeSecurityGroupsRequest generates a request for the DescribeSecurityGroups operation.
+func (c *EC2) DescribeSecurityGroupsRequest(input *DescribeSecurityGroupsInput) (req *aws.Request, output *DescribeSecurityGroupsOutput) {
+ op := &aws.Operation{
+ Name: opDescribeSecurityGroups,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeSecurityGroupsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeSecurityGroupsOutput{}
+ req.Data = output
+ return
+}
+
+// Describes one or more of your security groups.
+//
+// A security group is for use with instances either in the EC2-Classic platform
+// or in a specific VPC. For more information, see Amazon EC2 Security Groups
+// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html)
+// in the Amazon Elastic Compute Cloud User Guide and Security Groups for Your
+// VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *EC2) DescribeSecurityGroups(input *DescribeSecurityGroupsInput) (*DescribeSecurityGroupsOutput, error) {
+ req, out := c.DescribeSecurityGroupsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeSnapshotAttribute = "DescribeSnapshotAttribute"
+
+// DescribeSnapshotAttributeRequest generates a request for the DescribeSnapshotAttribute operation.
+func (c *EC2) DescribeSnapshotAttributeRequest(input *DescribeSnapshotAttributeInput) (req *aws.Request, output *DescribeSnapshotAttributeOutput) {
+ op := &aws.Operation{
+ Name: opDescribeSnapshotAttribute,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeSnapshotAttributeInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeSnapshotAttributeOutput{}
+ req.Data = output
+ return
+}
+
+// Describes the specified attribute of the specified snapshot. You can specify
+// only one attribute at a time.
+//
+// For more information about EBS snapshots, see Amazon EBS Snapshots in the
+// Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) DescribeSnapshotAttribute(input *DescribeSnapshotAttributeInput) (*DescribeSnapshotAttributeOutput, error) {
+ req, out := c.DescribeSnapshotAttributeRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeSnapshots = "DescribeSnapshots"
+
+// DescribeSnapshotsRequest generates a request for the DescribeSnapshots operation.
+func (c *EC2) DescribeSnapshotsRequest(input *DescribeSnapshotsInput) (req *aws.Request, output *DescribeSnapshotsOutput) {
+ op := &aws.Operation{
+ Name: opDescribeSnapshots,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ Paginator: &aws.Paginator{
+ InputTokens: []string{"NextToken"},
+ OutputTokens: []string{"NextToken"},
+ LimitToken: "",
+ TruncationToken: "",
+ },
+ }
+
+ if input == nil {
+ input = &DescribeSnapshotsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeSnapshotsOutput{}
+ req.Data = output
+ return
+}
+
+// Describes one or more of the EBS snapshots available to you. Available snapshots
+// include public snapshots available for any AWS account to launch, private
+// snapshots that you own, and private snapshots owned by another AWS account
+// but for which you've been given explicit create volume permissions.
+//
+// The create volume permissions fall into the following categories:
+//
+// public: The owner of the snapshot granted create volume permissions for
+// the snapshot to the all group. All AWS accounts have create volume permissions
+// for these snapshots. explicit: The owner of the snapshot granted create
+// volume permissions to a specific AWS account. implicit: An AWS account has
+// implicit create volume permissions for all snapshots it owns. The list of
+// snapshots returned can be modified by specifying snapshot IDs, snapshot owners,
+// or AWS accounts with create volume permissions. If no options are specified,
+// Amazon EC2 returns all snapshots for which you have create volume permissions.
+//
+// If you specify one or more snapshot IDs, only snapshots that have the specified
+// IDs are returned. If you specify an invalid snapshot ID, an error is returned.
+// If you specify a snapshot ID for which you do not have access, it is not
+// included in the returned results.
+//
+// If you specify one or more snapshot owners, only snapshots from the specified
+// owners and for which you have access are returned. The results can include
+// the AWS account IDs of the specified owners, amazon for snapshots owned by
+// Amazon, or self for snapshots that you own.
+//
+// If you specify a list of restorable users, only snapshots with create snapshot
+// permissions for those users are returned. You can specify AWS account IDs
+// (if you own the snapshots), self for snapshots for which you own or have
+// explicit permissions, or all for public snapshots.
+//
+// If you are describing a long list of snapshots, you can paginate the output
+// to make the list more manageable. The MaxResults parameter sets the maximum
+// number of results returned in a single page. If the list of results exceeds
+// your MaxResults value, then that number of results is returned along with
+// a NextToken value that can be passed to a subsequent DescribeSnapshots request
+// to retrieve the remaining results.
+//
+// For more information about EBS snapshots, see Amazon EBS Snapshots in the
+// Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) DescribeSnapshots(input *DescribeSnapshotsInput) (*DescribeSnapshotsOutput, error) {
+ req, out := c.DescribeSnapshotsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+func (c *EC2) DescribeSnapshotsPages(input *DescribeSnapshotsInput, fn func(p *DescribeSnapshotsOutput, lastPage bool) (shouldContinue bool)) error {
+ page, _ := c.DescribeSnapshotsRequest(input)
+ return page.EachPage(func(p interface{}, lastPage bool) bool {
+ return fn(p.(*DescribeSnapshotsOutput), lastPage)
+ })
+}
+
+const opDescribeSpotDatafeedSubscription = "DescribeSpotDatafeedSubscription"
+
+// DescribeSpotDatafeedSubscriptionRequest generates a request for the DescribeSpotDatafeedSubscription operation.
+func (c *EC2) DescribeSpotDatafeedSubscriptionRequest(input *DescribeSpotDatafeedSubscriptionInput) (req *aws.Request, output *DescribeSpotDatafeedSubscriptionOutput) {
+ op := &aws.Operation{
+ Name: opDescribeSpotDatafeedSubscription,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeSpotDatafeedSubscriptionInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeSpotDatafeedSubscriptionOutput{}
+ req.Data = output
+ return
+}
+
+// Describes the data feed for Spot Instances. For more information, see Spot
+// Instance Data Feed (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) DescribeSpotDatafeedSubscription(input *DescribeSpotDatafeedSubscriptionInput) (*DescribeSpotDatafeedSubscriptionOutput, error) {
+ req, out := c.DescribeSpotDatafeedSubscriptionRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeSpotFleetInstances = "DescribeSpotFleetInstances"
+
+// DescribeSpotFleetInstancesRequest generates a request for the DescribeSpotFleetInstances operation.
+func (c *EC2) DescribeSpotFleetInstancesRequest(input *DescribeSpotFleetInstancesInput) (req *aws.Request, output *DescribeSpotFleetInstancesOutput) {
+ op := &aws.Operation{
+ Name: opDescribeSpotFleetInstances,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeSpotFleetInstancesInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeSpotFleetInstancesOutput{}
+ req.Data = output
+ return
+}
+
+// Describes the running instances for the specified Spot fleet.
+func (c *EC2) DescribeSpotFleetInstances(input *DescribeSpotFleetInstancesInput) (*DescribeSpotFleetInstancesOutput, error) {
+ req, out := c.DescribeSpotFleetInstancesRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeSpotFleetRequestHistory = "DescribeSpotFleetRequestHistory"
+
+// DescribeSpotFleetRequestHistoryRequest generates a request for the DescribeSpotFleetRequestHistory operation.
+func (c *EC2) DescribeSpotFleetRequestHistoryRequest(input *DescribeSpotFleetRequestHistoryInput) (req *aws.Request, output *DescribeSpotFleetRequestHistoryOutput) {
+ op := &aws.Operation{
+ Name: opDescribeSpotFleetRequestHistory,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeSpotFleetRequestHistoryInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeSpotFleetRequestHistoryOutput{}
+ req.Data = output
+ return
+}
+
+// Describes the events for the specified Spot fleet request during the specified
+// time.
+//
+// Spot fleet events are delayed by up to 30 seconds before they can be described.
+// This ensures that you can query by the last evaluated time and not miss a
+// recorded event.
+func (c *EC2) DescribeSpotFleetRequestHistory(input *DescribeSpotFleetRequestHistoryInput) (*DescribeSpotFleetRequestHistoryOutput, error) {
+ req, out := c.DescribeSpotFleetRequestHistoryRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeSpotFleetRequests = "DescribeSpotFleetRequests"
+
+// DescribeSpotFleetRequestsRequest generates a request for the DescribeSpotFleetRequests operation.
+func (c *EC2) DescribeSpotFleetRequestsRequest(input *DescribeSpotFleetRequestsInput) (req *aws.Request, output *DescribeSpotFleetRequestsOutput) {
+ op := &aws.Operation{
+ Name: opDescribeSpotFleetRequests,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeSpotFleetRequestsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeSpotFleetRequestsOutput{}
+ req.Data = output
+ return
+}
+
+// Describes your Spot fleet requests.
+func (c *EC2) DescribeSpotFleetRequests(input *DescribeSpotFleetRequestsInput) (*DescribeSpotFleetRequestsOutput, error) {
+ req, out := c.DescribeSpotFleetRequestsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeSpotInstanceRequests = "DescribeSpotInstanceRequests"
+
+// DescribeSpotInstanceRequestsRequest generates a request for the DescribeSpotInstanceRequests operation.
+func (c *EC2) DescribeSpotInstanceRequestsRequest(input *DescribeSpotInstanceRequestsInput) (req *aws.Request, output *DescribeSpotInstanceRequestsOutput) {
+ op := &aws.Operation{
+ Name: opDescribeSpotInstanceRequests,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeSpotInstanceRequestsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeSpotInstanceRequestsOutput{}
+ req.Data = output
+ return
+}
+
+// Describes the Spot Instance requests that belong to your account. Spot Instances
+// are instances that Amazon EC2 launches when the bid price that you specify
+// exceeds the current Spot Price. Amazon EC2 periodically sets the Spot Price
+// based on available Spot Instance capacity and current Spot Instance requests.
+// For more information, see Spot Instance Requests (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+//
+// You can use DescribeSpotInstanceRequests to find a running Spot Instance
+// by examining the response. If the status of the Spot Instance is fulfilled,
+// the instance ID appears in the response and contains the identifier of the
+// instance. Alternatively, you can use DescribeInstances with a filter to look
+// for instances where the instance lifecycle is spot.
+func (c *EC2) DescribeSpotInstanceRequests(input *DescribeSpotInstanceRequestsInput) (*DescribeSpotInstanceRequestsOutput, error) {
+ req, out := c.DescribeSpotInstanceRequestsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeSpotPriceHistory = "DescribeSpotPriceHistory"
+
+// DescribeSpotPriceHistoryRequest generates a request for the DescribeSpotPriceHistory operation.
+func (c *EC2) DescribeSpotPriceHistoryRequest(input *DescribeSpotPriceHistoryInput) (req *aws.Request, output *DescribeSpotPriceHistoryOutput) {
+ op := &aws.Operation{
+ Name: opDescribeSpotPriceHistory,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ Paginator: &aws.Paginator{
+ InputTokens: []string{"NextToken"},
+ OutputTokens: []string{"NextToken"},
+ LimitToken: "MaxResults",
+ TruncationToken: "",
+ },
+ }
+
+ if input == nil {
+ input = &DescribeSpotPriceHistoryInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeSpotPriceHistoryOutput{}
+ req.Data = output
+ return
+}
+
+// Describes the Spot Price history. The prices returned are listed in chronological
+// order, from the oldest to the most recent, for up to the past 90 days. For
+// more information, see Spot Instance Pricing History (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances-history.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+//
+// When you specify a start and end time, this operation returns the prices
+// of the instance types within the time range that you specified and the time
+// when the price changed. The price is valid within the time period that you
+// specified; the response merely indicates the last time that the price changed.
+func (c *EC2) DescribeSpotPriceHistory(input *DescribeSpotPriceHistoryInput) (*DescribeSpotPriceHistoryOutput, error) {
+ req, out := c.DescribeSpotPriceHistoryRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+func (c *EC2) DescribeSpotPriceHistoryPages(input *DescribeSpotPriceHistoryInput, fn func(p *DescribeSpotPriceHistoryOutput, lastPage bool) (shouldContinue bool)) error {
+ page, _ := c.DescribeSpotPriceHistoryRequest(input)
+ return page.EachPage(func(p interface{}, lastPage bool) bool {
+ return fn(p.(*DescribeSpotPriceHistoryOutput), lastPage)
+ })
+}
+
+const opDescribeSubnets = "DescribeSubnets"
+
+// DescribeSubnetsRequest generates a request for the DescribeSubnets operation.
+func (c *EC2) DescribeSubnetsRequest(input *DescribeSubnetsInput) (req *aws.Request, output *DescribeSubnetsOutput) {
+ op := &aws.Operation{
+ Name: opDescribeSubnets,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeSubnetsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeSubnetsOutput{}
+ req.Data = output
+ return
+}
+
+// Describes one or more of your subnets.
+//
+// For more information about subnets, see Your VPC and Subnets (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *EC2) DescribeSubnets(input *DescribeSubnetsInput) (*DescribeSubnetsOutput, error) {
+ req, out := c.DescribeSubnetsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeTags = "DescribeTags"
+
+// DescribeTagsRequest generates a request for the DescribeTags operation.
+func (c *EC2) DescribeTagsRequest(input *DescribeTagsInput) (req *aws.Request, output *DescribeTagsOutput) {
+ op := &aws.Operation{
+ Name: opDescribeTags,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeTagsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeTagsOutput{}
+ req.Data = output
+ return
+}
+
+// Describes one or more of the tags for your EC2 resources.
+//
+// For more information about tags, see Tagging Your Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) {
+ req, out := c.DescribeTagsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeVPCAttribute = "DescribeVpcAttribute"
+
+// DescribeVPCAttributeRequest generates a request for the DescribeVPCAttribute operation.
+func (c *EC2) DescribeVPCAttributeRequest(input *DescribeVPCAttributeInput) (req *aws.Request, output *DescribeVPCAttributeOutput) {
+ op := &aws.Operation{
+ Name: opDescribeVPCAttribute,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeVPCAttributeInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeVPCAttributeOutput{}
+ req.Data = output
+ return
+}
+
+// Describes the specified attribute of the specified VPC. You can specify only
+// one attribute at a time.
+func (c *EC2) DescribeVPCAttribute(input *DescribeVPCAttributeInput) (*DescribeVPCAttributeOutput, error) {
+ req, out := c.DescribeVPCAttributeRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeVPCClassicLink = "DescribeVpcClassicLink"
+
+// DescribeVPCClassicLinkRequest generates a request for the DescribeVPCClassicLink operation.
+func (c *EC2) DescribeVPCClassicLinkRequest(input *DescribeVPCClassicLinkInput) (req *aws.Request, output *DescribeVPCClassicLinkOutput) {
+ op := &aws.Operation{
+ Name: opDescribeVPCClassicLink,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeVPCClassicLinkInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeVPCClassicLinkOutput{}
+ req.Data = output
+ return
+}
+
+// Describes the ClassicLink status of one or more VPCs.
+func (c *EC2) DescribeVPCClassicLink(input *DescribeVPCClassicLinkInput) (*DescribeVPCClassicLinkOutput, error) {
+ req, out := c.DescribeVPCClassicLinkRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeVPCEndpointServices = "DescribeVpcEndpointServices"
+
+// DescribeVPCEndpointServicesRequest generates a request for the DescribeVPCEndpointServices operation.
+func (c *EC2) DescribeVPCEndpointServicesRequest(input *DescribeVPCEndpointServicesInput) (req *aws.Request, output *DescribeVPCEndpointServicesOutput) {
+ op := &aws.Operation{
+ Name: opDescribeVPCEndpointServices,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeVPCEndpointServicesInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeVPCEndpointServicesOutput{}
+ req.Data = output
+ return
+}
+
+// Describes all supported AWS services that can be specified when creating
+// a VPC endpoint.
+func (c *EC2) DescribeVPCEndpointServices(input *DescribeVPCEndpointServicesInput) (*DescribeVPCEndpointServicesOutput, error) {
+ req, out := c.DescribeVPCEndpointServicesRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeVPCEndpoints = "DescribeVpcEndpoints"
+
+// DescribeVPCEndpointsRequest generates a request for the DescribeVPCEndpoints operation.
+func (c *EC2) DescribeVPCEndpointsRequest(input *DescribeVPCEndpointsInput) (req *aws.Request, output *DescribeVPCEndpointsOutput) {
+ op := &aws.Operation{
+ Name: opDescribeVPCEndpoints,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeVPCEndpointsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeVPCEndpointsOutput{}
+ req.Data = output
+ return
+}
+
+// Describes one or more of your VPC endpoints.
+func (c *EC2) DescribeVPCEndpoints(input *DescribeVPCEndpointsInput) (*DescribeVPCEndpointsOutput, error) {
+ req, out := c.DescribeVPCEndpointsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeVPCPeeringConnections = "DescribeVpcPeeringConnections"
+
+// DescribeVPCPeeringConnectionsRequest generates a request for the DescribeVPCPeeringConnections operation.
+func (c *EC2) DescribeVPCPeeringConnectionsRequest(input *DescribeVPCPeeringConnectionsInput) (req *aws.Request, output *DescribeVPCPeeringConnectionsOutput) {
+ op := &aws.Operation{
+ Name: opDescribeVPCPeeringConnections,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeVPCPeeringConnectionsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeVPCPeeringConnectionsOutput{}
+ req.Data = output
+ return
+}
+
+// Describes one or more of your VPC peering connections.
+func (c *EC2) DescribeVPCPeeringConnections(input *DescribeVPCPeeringConnectionsInput) (*DescribeVPCPeeringConnectionsOutput, error) {
+ req, out := c.DescribeVPCPeeringConnectionsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeVPCs = "DescribeVpcs"
+
+// DescribeVPCsRequest generates a request for the DescribeVPCs operation.
+func (c *EC2) DescribeVPCsRequest(input *DescribeVPCsInput) (req *aws.Request, output *DescribeVPCsOutput) {
+ op := &aws.Operation{
+ Name: opDescribeVPCs,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeVPCsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeVPCsOutput{}
+ req.Data = output
+ return
+}
+
+// Describes one or more of your VPCs.
+func (c *EC2) DescribeVPCs(input *DescribeVPCsInput) (*DescribeVPCsOutput, error) {
+ req, out := c.DescribeVPCsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeVPNConnections = "DescribeVpnConnections"
+
+// DescribeVPNConnectionsRequest generates a request for the DescribeVPNConnections operation.
+func (c *EC2) DescribeVPNConnectionsRequest(input *DescribeVPNConnectionsInput) (req *aws.Request, output *DescribeVPNConnectionsOutput) {
+ op := &aws.Operation{
+ Name: opDescribeVPNConnections,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeVPNConnectionsInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeVPNConnectionsOutput{}
+ req.Data = output
+ return
+}
+
+// Describes one or more of your VPN connections.
+//
+// For more information about VPN connections, see Adding a Hardware Virtual
+// Private Gateway to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *EC2) DescribeVPNConnections(input *DescribeVPNConnectionsInput) (*DescribeVPNConnectionsOutput, error) {
+ req, out := c.DescribeVPNConnectionsRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeVPNGateways = "DescribeVpnGateways"
+
+// DescribeVPNGatewaysRequest generates a request for the DescribeVPNGateways operation.
+func (c *EC2) DescribeVPNGatewaysRequest(input *DescribeVPNGatewaysInput) (req *aws.Request, output *DescribeVPNGatewaysOutput) {
+ op := &aws.Operation{
+ Name: opDescribeVPNGateways,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeVPNGatewaysInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeVPNGatewaysOutput{}
+ req.Data = output
+ return
+}
+
+// Describes one or more of your virtual private gateways.
+//
+// For more information about virtual private gateways, see Adding an IPsec
+// Hardware VPN to Your VPC (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *EC2) DescribeVPNGateways(input *DescribeVPNGatewaysInput) (*DescribeVPNGatewaysOutput, error) {
+ req, out := c.DescribeVPNGatewaysRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeVolumeAttribute = "DescribeVolumeAttribute"
+
+// DescribeVolumeAttributeRequest generates a request for the DescribeVolumeAttribute operation.
+func (c *EC2) DescribeVolumeAttributeRequest(input *DescribeVolumeAttributeInput) (req *aws.Request, output *DescribeVolumeAttributeOutput) {
+ op := &aws.Operation{
+ Name: opDescribeVolumeAttribute,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DescribeVolumeAttributeInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeVolumeAttributeOutput{}
+ req.Data = output
+ return
+}
+
+// Describes the specified attribute of the specified volume. You can specify
+// only one attribute at a time.
+//
+// For more information about EBS volumes, see Amazon EBS Volumes in the Amazon
+// Elastic Compute Cloud User Guide.
+func (c *EC2) DescribeVolumeAttribute(input *DescribeVolumeAttributeInput) (*DescribeVolumeAttributeOutput, error) {
+ req, out := c.DescribeVolumeAttributeRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDescribeVolumeStatus = "DescribeVolumeStatus"
+
+// DescribeVolumeStatusRequest generates a request for the DescribeVolumeStatus operation.
+func (c *EC2) DescribeVolumeStatusRequest(input *DescribeVolumeStatusInput) (req *aws.Request, output *DescribeVolumeStatusOutput) {
+ op := &aws.Operation{
+ Name: opDescribeVolumeStatus,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ Paginator: &aws.Paginator{
+ InputTokens: []string{"NextToken"},
+ OutputTokens: []string{"NextToken"},
+ LimitToken: "MaxResults",
+ TruncationToken: "",
+ },
+ }
+
+ if input == nil {
+ input = &DescribeVolumeStatusInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeVolumeStatusOutput{}
+ req.Data = output
+ return
+}
+
+// Describes the status of the specified volumes. Volume status provides the
+// result of the checks performed on your volumes to determine events that can
+// impair the performance of your volumes. The performance of a volume can be
+// affected if an issue occurs on the volume's underlying host. If the volume's
+// underlying host experiences a power outage or system issue, after the system
+// is restored, there could be data inconsistencies on the volume. Volume events
+// notify you if this occurs. Volume actions notify you if any action needs
+// to be taken in response to the event.
+//
+// The DescribeVolumeStatus operation provides the following information about
+// the specified volumes:
+//
+// Status: Reflects the current status of the volume. The possible values are
+// ok, impaired , warning, or insufficient-data. If all checks pass, the overall
+// status of the volume is ok. If the check fails, the overall status is impaired.
+// If the status is insufficient-data, then the checks may still be taking place
+// on your volume at the time. We recommend that you retry the request. For
+// more information on volume status, see Monitoring the Status of Your Volumes
+// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-volume-status.html).
+//
+// Events: Reflect the cause of a volume status and may require you to take
+// action. For example, if your volume returns an impaired status, then the
+// volume event might be potential-data-inconsistency. This means that your
+// volume has been affected by an issue with the underlying host, has all I/O
+// operations disabled, and may have inconsistent data.
+//
+// Actions: Reflect the actions you may have to take in response to an event.
+// For example, if the status of the volume is impaired and the volume event
+// shows potential-data-inconsistency, then the action shows enable-volume-io.
+// This means that you may want to enable the I/O operations for the volume
+// by calling the EnableVolumeIO action and then check the volume for data consistency.
+//
+// Volume status is based on the volume status checks, and does not reflect
+// the volume state. Therefore, volume status does not indicate volumes in the
+// error state (for example, when a volume is incapable of accepting I/O.)
+func (c *EC2) DescribeVolumeStatus(input *DescribeVolumeStatusInput) (*DescribeVolumeStatusOutput, error) {
+ req, out := c.DescribeVolumeStatusRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+func (c *EC2) DescribeVolumeStatusPages(input *DescribeVolumeStatusInput, fn func(p *DescribeVolumeStatusOutput, lastPage bool) (shouldContinue bool)) error {
+ page, _ := c.DescribeVolumeStatusRequest(input)
+ return page.EachPage(func(p interface{}, lastPage bool) bool {
+ return fn(p.(*DescribeVolumeStatusOutput), lastPage)
+ })
+}
+
+const opDescribeVolumes = "DescribeVolumes"
+
+// DescribeVolumesRequest generates a request for the DescribeVolumes operation.
+func (c *EC2) DescribeVolumesRequest(input *DescribeVolumesInput) (req *aws.Request, output *DescribeVolumesOutput) {
+ op := &aws.Operation{
+ Name: opDescribeVolumes,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ Paginator: &aws.Paginator{
+ InputTokens: []string{"NextToken"},
+ OutputTokens: []string{"NextToken"},
+ LimitToken: "MaxResults",
+ TruncationToken: "",
+ },
+ }
+
+ if input == nil {
+ input = &DescribeVolumesInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DescribeVolumesOutput{}
+ req.Data = output
+ return
+}
+
+// Describes the specified EBS volumes.
+//
+// If you are describing a long list of volumes, you can paginate the output
+// to make the list more manageable. The MaxResults parameter sets the maximum
+// number of results returned in a single page. If the list of results exceeds
+// your MaxResults value, then that number of results is returned along with
+// a NextToken value that can be passed to a subsequent DescribeVolumes request
+// to retrieve the remaining results.
+//
+// For more information about EBS volumes, see Amazon EBS Volumes in the Amazon
+// Elastic Compute Cloud User Guide.
+func (c *EC2) DescribeVolumes(input *DescribeVolumesInput) (*DescribeVolumesOutput, error) {
+ req, out := c.DescribeVolumesRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+func (c *EC2) DescribeVolumesPages(input *DescribeVolumesInput, fn func(p *DescribeVolumesOutput, lastPage bool) (shouldContinue bool)) error {
+ page, _ := c.DescribeVolumesRequest(input)
+ return page.EachPage(func(p interface{}, lastPage bool) bool {
+ return fn(p.(*DescribeVolumesOutput), lastPage)
+ })
+}
+
+const opDetachClassicLinkVPC = "DetachClassicLinkVpc"
+
+// DetachClassicLinkVPCRequest generates a request for the DetachClassicLinkVPC operation.
+func (c *EC2) DetachClassicLinkVPCRequest(input *DetachClassicLinkVPCInput) (req *aws.Request, output *DetachClassicLinkVPCOutput) {
+ op := &aws.Operation{
+ Name: opDetachClassicLinkVPC,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DetachClassicLinkVPCInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DetachClassicLinkVPCOutput{}
+ req.Data = output
+ return
+}
+
+// Unlinks (detaches) a linked EC2-Classic instance from a VPC. After the instance
+// has been unlinked, the VPC security groups are no longer associated with
+// it. An instance is automatically unlinked from a VPC when it's stopped.
+func (c *EC2) DetachClassicLinkVPC(input *DetachClassicLinkVPCInput) (*DetachClassicLinkVPCOutput, error) {
+ req, out := c.DetachClassicLinkVPCRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDetachInternetGateway = "DetachInternetGateway"
+
+// DetachInternetGatewayRequest generates a request for the DetachInternetGateway operation.
+func (c *EC2) DetachInternetGatewayRequest(input *DetachInternetGatewayInput) (req *aws.Request, output *DetachInternetGatewayOutput) {
+ op := &aws.Operation{
+ Name: opDetachInternetGateway,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DetachInternetGatewayInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DetachInternetGatewayOutput{}
+ req.Data = output
+ return
+}
+
+// Detaches an Internet gateway from a VPC, disabling connectivity between the
+// Internet and the VPC. The VPC must not contain any running instances with
+// Elastic IP addresses.
+func (c *EC2) DetachInternetGateway(input *DetachInternetGatewayInput) (*DetachInternetGatewayOutput, error) {
+ req, out := c.DetachInternetGatewayRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDetachNetworkInterface = "DetachNetworkInterface"
+
+// DetachNetworkInterfaceRequest generates a request for the DetachNetworkInterface operation.
+func (c *EC2) DetachNetworkInterfaceRequest(input *DetachNetworkInterfaceInput) (req *aws.Request, output *DetachNetworkInterfaceOutput) {
+ op := &aws.Operation{
+ Name: opDetachNetworkInterface,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DetachNetworkInterfaceInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DetachNetworkInterfaceOutput{}
+ req.Data = output
+ return
+}
+
+// Detaches a network interface from an instance.
+func (c *EC2) DetachNetworkInterface(input *DetachNetworkInterfaceInput) (*DetachNetworkInterfaceOutput, error) {
+ req, out := c.DetachNetworkInterfaceRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDetachVPNGateway = "DetachVpnGateway"
+
+// DetachVPNGatewayRequest generates a request for the DetachVPNGateway operation.
+func (c *EC2) DetachVPNGatewayRequest(input *DetachVPNGatewayInput) (req *aws.Request, output *DetachVPNGatewayOutput) {
+ op := &aws.Operation{
+ Name: opDetachVPNGateway,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DetachVPNGatewayInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DetachVPNGatewayOutput{}
+ req.Data = output
+ return
+}
+
+// Detaches a virtual private gateway from a VPC. You do this if you're planning
+// to turn off the VPC and not use it anymore. You can confirm a virtual private
+// gateway has been completely detached from a VPC by describing the virtual
+// private gateway (any attachments to the virtual private gateway are also
+// described).
+//
+// You must wait for the attachment's state to switch to detached before you
+// can delete the VPC or attach a different VPC to the virtual private gateway.
+func (c *EC2) DetachVPNGateway(input *DetachVPNGatewayInput) (*DetachVPNGatewayOutput, error) {
+ req, out := c.DetachVPNGatewayRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDetachVolume = "DetachVolume"
+
+// DetachVolumeRequest generates a request for the DetachVolume operation.
+func (c *EC2) DetachVolumeRequest(input *DetachVolumeInput) (req *aws.Request, output *VolumeAttachment) {
+ op := &aws.Operation{
+ Name: opDetachVolume,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DetachVolumeInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &VolumeAttachment{}
+ req.Data = output
+ return
+}
+
+// Detaches an EBS volume from an instance. Make sure to unmount any file systems
+// on the device within your operating system before detaching the volume. Failure
+// to do so results in the volume being stuck in a busy state while detaching.
+//
+// If an Amazon EBS volume is the root device of an instance, it can't be detached
+// while the instance is running. To detach the root volume, stop the instance
+// first.
+//
+// When a volume with an AWS Marketplace product code is detached from an instance,
+// the product code is no longer associated with the instance.
+//
+// For more information, see Detaching an Amazon EBS Volume (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-detaching-volume.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) DetachVolume(input *DetachVolumeInput) (*VolumeAttachment, error) {
+ req, out := c.DetachVolumeRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDisableVGWRoutePropagation = "DisableVgwRoutePropagation"
+
+// DisableVGWRoutePropagationRequest generates a request for the DisableVGWRoutePropagation operation.
+func (c *EC2) DisableVGWRoutePropagationRequest(input *DisableVGWRoutePropagationInput) (req *aws.Request, output *DisableVGWRoutePropagationOutput) {
+ op := &aws.Operation{
+ Name: opDisableVGWRoutePropagation,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DisableVGWRoutePropagationInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DisableVGWRoutePropagationOutput{}
+ req.Data = output
+ return
+}
+
+// Disables a virtual private gateway (VGW) from propagating routes to a specified
+// route table of a VPC.
+func (c *EC2) DisableVGWRoutePropagation(input *DisableVGWRoutePropagationInput) (*DisableVGWRoutePropagationOutput, error) {
+ req, out := c.DisableVGWRoutePropagationRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDisableVPCClassicLink = "DisableVpcClassicLink"
+
+// DisableVPCClassicLinkRequest generates a request for the DisableVPCClassicLink operation.
+func (c *EC2) DisableVPCClassicLinkRequest(input *DisableVPCClassicLinkInput) (req *aws.Request, output *DisableVPCClassicLinkOutput) {
+ op := &aws.Operation{
+ Name: opDisableVPCClassicLink,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DisableVPCClassicLinkInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DisableVPCClassicLinkOutput{}
+ req.Data = output
+ return
+}
+
+// Disables ClassicLink for a VPC. You cannot disable ClassicLink for a VPC
+// that has EC2-Classic instances linked to it.
+func (c *EC2) DisableVPCClassicLink(input *DisableVPCClassicLinkInput) (*DisableVPCClassicLinkOutput, error) {
+ req, out := c.DisableVPCClassicLinkRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDisassociateAddress = "DisassociateAddress"
+
+// DisassociateAddressRequest generates a request for the DisassociateAddress operation.
+func (c *EC2) DisassociateAddressRequest(input *DisassociateAddressInput) (req *aws.Request, output *DisassociateAddressOutput) {
+ op := &aws.Operation{
+ Name: opDisassociateAddress,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DisassociateAddressInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DisassociateAddressOutput{}
+ req.Data = output
+ return
+}
+
+// Disassociates an Elastic IP address from the instance or network interface
+// it's associated with.
+//
+// An Elastic IP address is for use in either the EC2-Classic platform or in
+// a VPC. For more information, see Elastic IP Addresses (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+//
+// This is an idempotent operation. If you perform the operation more than
+// once, Amazon EC2 doesn't return an error.
+func (c *EC2) DisassociateAddress(input *DisassociateAddressInput) (*DisassociateAddressOutput, error) {
+ req, out := c.DisassociateAddressRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opDisassociateRouteTable = "DisassociateRouteTable"
+
+// DisassociateRouteTableRequest generates a request for the DisassociateRouteTable operation.
+func (c *EC2) DisassociateRouteTableRequest(input *DisassociateRouteTableInput) (req *aws.Request, output *DisassociateRouteTableOutput) {
+ op := &aws.Operation{
+ Name: opDisassociateRouteTable,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &DisassociateRouteTableInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &DisassociateRouteTableOutput{}
+ req.Data = output
+ return
+}
+
+// Disassociates a subnet from a route table.
+//
+// After you perform this action, the subnet no longer uses the routes in the
+// route table. Instead, it uses the routes in the VPC's main route table. For
+// more information about route tables, see Route Tables (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *EC2) DisassociateRouteTable(input *DisassociateRouteTableInput) (*DisassociateRouteTableOutput, error) {
+ req, out := c.DisassociateRouteTableRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opEnableVGWRoutePropagation = "EnableVgwRoutePropagation"
+
+// EnableVGWRoutePropagationRequest generates a request for the EnableVGWRoutePropagation operation.
+func (c *EC2) EnableVGWRoutePropagationRequest(input *EnableVGWRoutePropagationInput) (req *aws.Request, output *EnableVGWRoutePropagationOutput) {
+ op := &aws.Operation{
+ Name: opEnableVGWRoutePropagation,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &EnableVGWRoutePropagationInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &EnableVGWRoutePropagationOutput{}
+ req.Data = output
+ return
+}
+
+// Enables a virtual private gateway (VGW) to propagate routes to the specified
+// route table of a VPC.
+func (c *EC2) EnableVGWRoutePropagation(input *EnableVGWRoutePropagationInput) (*EnableVGWRoutePropagationOutput, error) {
+ req, out := c.EnableVGWRoutePropagationRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opEnableVPCClassicLink = "EnableVpcClassicLink"
+
+// EnableVPCClassicLinkRequest generates a request for the EnableVPCClassicLink operation.
+func (c *EC2) EnableVPCClassicLinkRequest(input *EnableVPCClassicLinkInput) (req *aws.Request, output *EnableVPCClassicLinkOutput) {
+ op := &aws.Operation{
+ Name: opEnableVPCClassicLink,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &EnableVPCClassicLinkInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &EnableVPCClassicLinkOutput{}
+ req.Data = output
+ return
+}
+
+// Enables a VPC for ClassicLink. You can then link EC2-Classic instances to
+// your ClassicLink-enabled VPC to allow communication over private IP addresses.
+// You cannot enable your VPC for ClassicLink if any of your VPC's route tables
+// have existing routes for address ranges within the 10.0.0.0/8 IP address
+// range, excluding local routes for VPCs in the 10.0.0.0/16 and 10.1.0.0/16
+// IP address ranges. For more information, see ClassicLink (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) EnableVPCClassicLink(input *EnableVPCClassicLinkInput) (*EnableVPCClassicLinkOutput, error) {
+ req, out := c.EnableVPCClassicLinkRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opEnableVolumeIO = "EnableVolumeIO"
+
+// EnableVolumeIORequest generates a request for the EnableVolumeIO operation.
+func (c *EC2) EnableVolumeIORequest(input *EnableVolumeIOInput) (req *aws.Request, output *EnableVolumeIOOutput) {
+ op := &aws.Operation{
+ Name: opEnableVolumeIO,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &EnableVolumeIOInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &EnableVolumeIOOutput{}
+ req.Data = output
+ return
+}
+
+// Enables I/O operations for a volume that had I/O operations disabled because
+// the data on the volume was potentially inconsistent.
+func (c *EC2) EnableVolumeIO(input *EnableVolumeIOInput) (*EnableVolumeIOOutput, error) {
+ req, out := c.EnableVolumeIORequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opGetConsoleOutput = "GetConsoleOutput"
+
+// GetConsoleOutputRequest generates a request for the GetConsoleOutput operation.
+func (c *EC2) GetConsoleOutputRequest(input *GetConsoleOutputInput) (req *aws.Request, output *GetConsoleOutputOutput) {
+ op := &aws.Operation{
+ Name: opGetConsoleOutput,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &GetConsoleOutputInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &GetConsoleOutputOutput{}
+ req.Data = output
+ return
+}
+
+// Gets the console output for the specified instance.
+//
+// Instances do not have a physical monitor through which you can view their
+// console output. They also lack physical controls that allow you to power
+// up, reboot, or shut them down. To allow these actions, we provide them through
+// the Amazon EC2 API and command line interface.
+//
+// Instance console output is buffered and posted shortly after instance boot,
+// reboot, and termination. Amazon EC2 preserves the most recent 64 KB output
+// which is available for at least one hour after the most recent post.
+//
+// For Linux instances, the instance console output displays the exact console
+// output that would normally be displayed on a physical monitor attached to
+// a computer. This output is buffered because the instance produces it and
+// then posts it to a store where the instance's owner can retrieve it.
+//
+// For Windows instances, the instance console output includes output from
+// the EC2Config service.
+func (c *EC2) GetConsoleOutput(input *GetConsoleOutputInput) (*GetConsoleOutputOutput, error) {
+ req, out := c.GetConsoleOutputRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opGetPasswordData = "GetPasswordData"
+
+// GetPasswordDataRequest generates a request for the GetPasswordData operation.
+func (c *EC2) GetPasswordDataRequest(input *GetPasswordDataInput) (req *aws.Request, output *GetPasswordDataOutput) {
+ op := &aws.Operation{
+ Name: opGetPasswordData,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &GetPasswordDataInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &GetPasswordDataOutput{}
+ req.Data = output
+ return
+}
+
+// Retrieves the encrypted administrator password for an instance running Windows.
+//
+// The Windows password is generated at boot if the EC2Config service plugin,
+// Ec2SetPassword, is enabled. This usually only happens the first time an AMI
+// is launched, and then Ec2SetPassword is automatically disabled. The password
+// is not generated for rebundled AMIs unless Ec2SetPassword is enabled before
+// bundling.
+//
+// The password is encrypted using the key pair that you specified when you
+// launched the instance. You must provide the corresponding key pair file.
+//
+// Password generation and encryption takes a few moments. We recommend that
+// you wait up to 15 minutes after launching an instance before trying to retrieve
+// the generated password.
+func (c *EC2) GetPasswordData(input *GetPasswordDataInput) (*GetPasswordDataOutput, error) {
+ req, out := c.GetPasswordDataRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opImportImage = "ImportImage"
+
+// ImportImageRequest generates a request for the ImportImage operation.
+func (c *EC2) ImportImageRequest(input *ImportImageInput) (req *aws.Request, output *ImportImageOutput) {
+ op := &aws.Operation{
+ Name: opImportImage,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ImportImageInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &ImportImageOutput{}
+ req.Data = output
+ return
+}
+
+// Import single or multi-volume disk images or EBS snapshots into an Amazon
+// Machine Image (AMI).
+func (c *EC2) ImportImage(input *ImportImageInput) (*ImportImageOutput, error) {
+ req, out := c.ImportImageRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opImportInstance = "ImportInstance"
+
+// ImportInstanceRequest generates a request for the ImportInstance operation.
+func (c *EC2) ImportInstanceRequest(input *ImportInstanceInput) (req *aws.Request, output *ImportInstanceOutput) {
+ op := &aws.Operation{
+ Name: opImportInstance,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ImportInstanceInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &ImportInstanceOutput{}
+ req.Data = output
+ return
+}
+
+// Creates an import instance task using metadata from the specified disk image.
+// ImportInstance only supports single-volume VMs. To import multi-volume VMs,
+// use ImportImage. After importing the image, you then upload it using the
+// ec2-import-volume command in the EC2 command line tools. For more information,
+// see Using the Command Line Tools to Import Your Virtual Machine to Amazon
+// EC2 (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UploadingYourInstancesandVolumes.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) ImportInstance(input *ImportInstanceInput) (*ImportInstanceOutput, error) {
+ req, out := c.ImportInstanceRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opImportKeyPair = "ImportKeyPair"
+
+// ImportKeyPairRequest generates a request for the ImportKeyPair operation.
+func (c *EC2) ImportKeyPairRequest(input *ImportKeyPairInput) (req *aws.Request, output *ImportKeyPairOutput) {
+ op := &aws.Operation{
+ Name: opImportKeyPair,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ImportKeyPairInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &ImportKeyPairOutput{}
+ req.Data = output
+ return
+}
+
+// Imports the public key from an RSA key pair that you created with a third-party
+// tool. Compare this with CreateKeyPair, in which AWS creates the key pair
+// and gives the keys to you (AWS keeps a copy of the public key). With ImportKeyPair,
+// you create the key pair and give AWS just the public key. The private key
+// is never transferred between you and AWS.
+//
+// For more information about key pairs, see Key Pairs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) ImportKeyPair(input *ImportKeyPairInput) (*ImportKeyPairOutput, error) {
+ req, out := c.ImportKeyPairRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opImportSnapshot = "ImportSnapshot"
+
+// ImportSnapshotRequest generates a request for the ImportSnapshot operation.
+func (c *EC2) ImportSnapshotRequest(input *ImportSnapshotInput) (req *aws.Request, output *ImportSnapshotOutput) {
+ op := &aws.Operation{
+ Name: opImportSnapshot,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ImportSnapshotInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &ImportSnapshotOutput{}
+ req.Data = output
+ return
+}
+
+// Imports a disk into an EBS snapshot.
+func (c *EC2) ImportSnapshot(input *ImportSnapshotInput) (*ImportSnapshotOutput, error) {
+ req, out := c.ImportSnapshotRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opImportVolume = "ImportVolume"
+
+// ImportVolumeRequest generates a request for the ImportVolume operation.
+func (c *EC2) ImportVolumeRequest(input *ImportVolumeInput) (req *aws.Request, output *ImportVolumeOutput) {
+ op := &aws.Operation{
+ Name: opImportVolume,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ImportVolumeInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &ImportVolumeOutput{}
+ req.Data = output
+ return
+}
+
+// Creates an import volume task using metadata from the specified disk image.
+// After importing the image, you then upload it using the ec2-import-volume
+// command in the Amazon EC2 command-line interface (CLI) tools. For more information,
+// see Using the Command Line Tools to Import Your Virtual Machine to Amazon
+// EC2 (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UploadingYourInstancesandVolumes.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) ImportVolume(input *ImportVolumeInput) (*ImportVolumeOutput, error) {
+ req, out := c.ImportVolumeRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opModifyImageAttribute = "ModifyImageAttribute"
+
+// ModifyImageAttributeRequest generates a request for the ModifyImageAttribute operation.
+func (c *EC2) ModifyImageAttributeRequest(input *ModifyImageAttributeInput) (req *aws.Request, output *ModifyImageAttributeOutput) {
+ op := &aws.Operation{
+ Name: opModifyImageAttribute,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ModifyImageAttributeInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &ModifyImageAttributeOutput{}
+ req.Data = output
+ return
+}
+
+// Modifies the specified attribute of the specified AMI. You can specify only
+// one attribute at a time.
+//
+// AWS Marketplace product codes cannot be modified. Images with an AWS Marketplace
+// product code cannot be made public.
+func (c *EC2) ModifyImageAttribute(input *ModifyImageAttributeInput) (*ModifyImageAttributeOutput, error) {
+ req, out := c.ModifyImageAttributeRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opModifyInstanceAttribute = "ModifyInstanceAttribute"
+
+// ModifyInstanceAttributeRequest generates a request for the ModifyInstanceAttribute operation.
+func (c *EC2) ModifyInstanceAttributeRequest(input *ModifyInstanceAttributeInput) (req *aws.Request, output *ModifyInstanceAttributeOutput) {
+ op := &aws.Operation{
+ Name: opModifyInstanceAttribute,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ModifyInstanceAttributeInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &ModifyInstanceAttributeOutput{}
+ req.Data = output
+ return
+}
+
+// Modifies the specified attribute of the specified instance. You can specify
+// only one attribute at a time.
+//
+// To modify some attributes, the instance must be stopped. For more information,
+// see Modifying Attributes of a Stopped Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_ChangingAttributesWhileInstanceStopped.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) ModifyInstanceAttribute(input *ModifyInstanceAttributeInput) (*ModifyInstanceAttributeOutput, error) {
+ req, out := c.ModifyInstanceAttributeRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opModifyNetworkInterfaceAttribute = "ModifyNetworkInterfaceAttribute"
+
+// ModifyNetworkInterfaceAttributeRequest generates a request for the ModifyNetworkInterfaceAttribute operation.
+func (c *EC2) ModifyNetworkInterfaceAttributeRequest(input *ModifyNetworkInterfaceAttributeInput) (req *aws.Request, output *ModifyNetworkInterfaceAttributeOutput) {
+ op := &aws.Operation{
+ Name: opModifyNetworkInterfaceAttribute,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ModifyNetworkInterfaceAttributeInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &ModifyNetworkInterfaceAttributeOutput{}
+ req.Data = output
+ return
+}
+
+// Modifies the specified network interface attribute. You can specify only
+// one attribute at a time.
+func (c *EC2) ModifyNetworkInterfaceAttribute(input *ModifyNetworkInterfaceAttributeInput) (*ModifyNetworkInterfaceAttributeOutput, error) {
+ req, out := c.ModifyNetworkInterfaceAttributeRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opModifyReservedInstances = "ModifyReservedInstances"
+
+// ModifyReservedInstancesRequest generates a request for the ModifyReservedInstances operation.
+func (c *EC2) ModifyReservedInstancesRequest(input *ModifyReservedInstancesInput) (req *aws.Request, output *ModifyReservedInstancesOutput) {
+ op := &aws.Operation{
+ Name: opModifyReservedInstances,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ModifyReservedInstancesInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &ModifyReservedInstancesOutput{}
+ req.Data = output
+ return
+}
+
+// Modifies the Availability Zone, instance count, instance type, or network
+// platform (EC2-Classic or EC2-VPC) of your Reserved Instances. The Reserved
+// Instances to be modified must be identical, except for Availability Zone,
+// network platform, and instance type.
+//
+// For more information, see Modifying Reserved Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) ModifyReservedInstances(input *ModifyReservedInstancesInput) (*ModifyReservedInstancesOutput, error) {
+ req, out := c.ModifyReservedInstancesRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opModifySnapshotAttribute = "ModifySnapshotAttribute"
+
+// ModifySnapshotAttributeRequest generates a request for the ModifySnapshotAttribute operation.
+func (c *EC2) ModifySnapshotAttributeRequest(input *ModifySnapshotAttributeInput) (req *aws.Request, output *ModifySnapshotAttributeOutput) {
+ op := &aws.Operation{
+ Name: opModifySnapshotAttribute,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ModifySnapshotAttributeInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &ModifySnapshotAttributeOutput{}
+ req.Data = output
+ return
+}
+
+// Adds or removes permission settings for the specified snapshot. You may add
+// or remove specified AWS account IDs from a snapshot's list of create volume
+// permissions, but you cannot do both in a single API call. If you need to
+// both add and remove account IDs for a snapshot, you must use multiple API
+// calls.
+//
+// For more information on modifying snapshot permissions, see Sharing Snapshots
+// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+//
+// Snapshots with AWS Marketplace product codes cannot be made public.
+func (c *EC2) ModifySnapshotAttribute(input *ModifySnapshotAttributeInput) (*ModifySnapshotAttributeOutput, error) {
+ req, out := c.ModifySnapshotAttributeRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opModifySubnetAttribute = "ModifySubnetAttribute"
+
+// ModifySubnetAttributeRequest generates a request for the ModifySubnetAttribute operation.
+func (c *EC2) ModifySubnetAttributeRequest(input *ModifySubnetAttributeInput) (req *aws.Request, output *ModifySubnetAttributeOutput) {
+ op := &aws.Operation{
+ Name: opModifySubnetAttribute,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ModifySubnetAttributeInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &ModifySubnetAttributeOutput{}
+ req.Data = output
+ return
+}
+
+// Modifies a subnet attribute.
+func (c *EC2) ModifySubnetAttribute(input *ModifySubnetAttributeInput) (*ModifySubnetAttributeOutput, error) {
+ req, out := c.ModifySubnetAttributeRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opModifyVPCAttribute = "ModifyVpcAttribute"
+
+// ModifyVPCAttributeRequest generates a request for the ModifyVPCAttribute operation.
+func (c *EC2) ModifyVPCAttributeRequest(input *ModifyVPCAttributeInput) (req *aws.Request, output *ModifyVPCAttributeOutput) {
+ op := &aws.Operation{
+ Name: opModifyVPCAttribute,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ModifyVPCAttributeInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &ModifyVPCAttributeOutput{}
+ req.Data = output
+ return
+}
+
+// Modifies the specified attribute of the specified VPC.
+func (c *EC2) ModifyVPCAttribute(input *ModifyVPCAttributeInput) (*ModifyVPCAttributeOutput, error) {
+ req, out := c.ModifyVPCAttributeRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opModifyVPCEndpoint = "ModifyVpcEndpoint"
+
+// ModifyVPCEndpointRequest generates a request for the ModifyVPCEndpoint operation.
+func (c *EC2) ModifyVPCEndpointRequest(input *ModifyVPCEndpointInput) (req *aws.Request, output *ModifyVPCEndpointOutput) {
+ op := &aws.Operation{
+ Name: opModifyVPCEndpoint,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ModifyVPCEndpointInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &ModifyVPCEndpointOutput{}
+ req.Data = output
+ return
+}
+
+// Modifies attributes of a specified VPC endpoint. You can modify the policy
+// associated with the endpoint, and you can add and remove route tables associated
+// with the endpoint.
+func (c *EC2) ModifyVPCEndpoint(input *ModifyVPCEndpointInput) (*ModifyVPCEndpointOutput, error) {
+ req, out := c.ModifyVPCEndpointRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opModifyVolumeAttribute = "ModifyVolumeAttribute"
+
+// ModifyVolumeAttributeRequest generates a request for the ModifyVolumeAttribute operation.
+func (c *EC2) ModifyVolumeAttributeRequest(input *ModifyVolumeAttributeInput) (req *aws.Request, output *ModifyVolumeAttributeOutput) {
+ op := &aws.Operation{
+ Name: opModifyVolumeAttribute,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ModifyVolumeAttributeInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &ModifyVolumeAttributeOutput{}
+ req.Data = output
+ return
+}
+
+// Modifies a volume attribute.
+//
+// By default, all I/O operations for the volume are suspended when the data
+// on the volume is determined to be potentially inconsistent, to prevent undetectable,
+// latent data corruption. The I/O access to the volume can be resumed by first
+// enabling I/O access and then checking the data consistency on your volume.
+//
+// You can change the default behavior to resume I/O operations. We recommend
+// that you change this only for boot volumes or for volumes that are stateless
+// or disposable.
+func (c *EC2) ModifyVolumeAttribute(input *ModifyVolumeAttributeInput) (*ModifyVolumeAttributeOutput, error) {
+ req, out := c.ModifyVolumeAttributeRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opMonitorInstances = "MonitorInstances"
+
+// MonitorInstancesRequest generates a request for the MonitorInstances operation.
+func (c *EC2) MonitorInstancesRequest(input *MonitorInstancesInput) (req *aws.Request, output *MonitorInstancesOutput) {
+ op := &aws.Operation{
+ Name: opMonitorInstances,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &MonitorInstancesInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &MonitorInstancesOutput{}
+ req.Data = output
+ return
+}
+
+// Enables monitoring for a running instance. For more information about monitoring
+// instances, see Monitoring Your Instances and Volumes (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) MonitorInstances(input *MonitorInstancesInput) (*MonitorInstancesOutput, error) {
+ req, out := c.MonitorInstancesRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opMoveAddressToVPC = "MoveAddressToVpc"
+
+// MoveAddressToVPCRequest generates a request for the MoveAddressToVPC operation.
+func (c *EC2) MoveAddressToVPCRequest(input *MoveAddressToVPCInput) (req *aws.Request, output *MoveAddressToVPCOutput) {
+ op := &aws.Operation{
+ Name: opMoveAddressToVPC,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &MoveAddressToVPCInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &MoveAddressToVPCOutput{}
+ req.Data = output
+ return
+}
+
+// Moves an Elastic IP address from the EC2-Classic platform to the EC2-VPC
+// platform. The Elastic IP address must be allocated to your account, and it
+// must not be associated with an instance. After the Elastic IP address is
+// moved, it is no longer available for use in the EC2-Classic platform, unless
+// you move it back using the RestoreAddressToClassic request. You cannot move
+// an Elastic IP address that's allocated for use in the EC2-VPC platform to
+// the EC2-Classic platform.
+func (c *EC2) MoveAddressToVPC(input *MoveAddressToVPCInput) (*MoveAddressToVPCOutput, error) {
+ req, out := c.MoveAddressToVPCRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opPurchaseReservedInstancesOffering = "PurchaseReservedInstancesOffering"
+
+// PurchaseReservedInstancesOfferingRequest generates a request for the PurchaseReservedInstancesOffering operation.
+func (c *EC2) PurchaseReservedInstancesOfferingRequest(input *PurchaseReservedInstancesOfferingInput) (req *aws.Request, output *PurchaseReservedInstancesOfferingOutput) {
+ op := &aws.Operation{
+ Name: opPurchaseReservedInstancesOffering,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &PurchaseReservedInstancesOfferingInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &PurchaseReservedInstancesOfferingOutput{}
+ req.Data = output
+ return
+}
+
+// Purchases a Reserved Instance for use with your account. With Amazon EC2
+// Reserved Instances, you obtain a capacity reservation for a certain instance
+// configuration over a specified period of time and pay a lower hourly rate
+// compared to on-Demand Instance pricing.
+//
+// Use DescribeReservedInstancesOfferings to get a list of Reserved Instance
+// offerings that match your specifications. After you've purchased a Reserved
+// Instance, you can check for your new Reserved Instance with DescribeReservedInstances.
+//
+// For more information, see Reserved Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-on-demand-reserved-instances.html)
+// and Reserved Instance Marketplace (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) PurchaseReservedInstancesOffering(input *PurchaseReservedInstancesOfferingInput) (*PurchaseReservedInstancesOfferingOutput, error) {
+ req, out := c.PurchaseReservedInstancesOfferingRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opRebootInstances = "RebootInstances"
+
+// RebootInstancesRequest generates a request for the RebootInstances operation.
+func (c *EC2) RebootInstancesRequest(input *RebootInstancesInput) (req *aws.Request, output *RebootInstancesOutput) {
+ op := &aws.Operation{
+ Name: opRebootInstances,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &RebootInstancesInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &RebootInstancesOutput{}
+ req.Data = output
+ return
+}
+
+// Requests a reboot of one or more instances. This operation is asynchronous;
+// it only queues a request to reboot the specified instances. The operation
+// succeeds if the instances are valid and belong to you. Requests to reboot
+// terminated instances are ignored.
+//
+// If a Linux/Unix instance does not cleanly shut down within four minutes,
+// Amazon EC2 performs a hard reboot.
+//
+// For more information about troubleshooting, see Getting Console Output and
+// Rebooting Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) RebootInstances(input *RebootInstancesInput) (*RebootInstancesOutput, error) {
+ req, out := c.RebootInstancesRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opRegisterImage = "RegisterImage"
+
+// RegisterImageRequest generates a request for the RegisterImage operation.
+func (c *EC2) RegisterImageRequest(input *RegisterImageInput) (req *aws.Request, output *RegisterImageOutput) {
+ op := &aws.Operation{
+ Name: opRegisterImage,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &RegisterImageInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &RegisterImageOutput{}
+ req.Data = output
+ return
+}
+
+// Registers an AMI. When you're creating an AMI, this is the final step you
+// must complete before you can launch an instance from the AMI. This step is
+// required if you're creating an instance store-backed Linux or Windows AMI.
+// For more information, see Creating an Instance Store-Backed Linux AMI (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-instance-store.html)
+// and Creating an Instance Store-Backed Windows AMI (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/Creating_InstanceStoreBacked_WinAMI.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+//
+// For Amazon EBS-backed instances, CreateImage creates and registers the AMI
+// in a single request, so you don't have to register the AMI yourself.
+//
+// You can also use RegisterImage to create an Amazon EBS-backed AMI from a
+// snapshot of a root device volume. For more information, see Launching an
+// Instance from a Backup (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-launch-snapshot.html)
+// in the Amazon Elastic Compute Cloud User Guide. Note that although you can
+// create a Windows AMI from a snapshot, you can't launch an instance from the
+// AMI - use the CreateImage command instead.
+//
+// If needed, you can deregister an AMI at any time. Any modifications you
+// make to an AMI backed by an instance store volume invalidates its registration.
+// If you make changes to an image, deregister the previous image and register
+// the new image.
+//
+// You can't register an image where a secondary (non-root) snapshot has AWS
+// Marketplace product codes.
+func (c *EC2) RegisterImage(input *RegisterImageInput) (*RegisterImageOutput, error) {
+ req, out := c.RegisterImageRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opRejectVPCPeeringConnection = "RejectVpcPeeringConnection"
+
+// RejectVPCPeeringConnectionRequest generates a request for the RejectVPCPeeringConnection operation.
+func (c *EC2) RejectVPCPeeringConnectionRequest(input *RejectVPCPeeringConnectionInput) (req *aws.Request, output *RejectVPCPeeringConnectionOutput) {
+ op := &aws.Operation{
+ Name: opRejectVPCPeeringConnection,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &RejectVPCPeeringConnectionInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &RejectVPCPeeringConnectionOutput{}
+ req.Data = output
+ return
+}
+
+// Rejects a VPC peering connection request. The VPC peering connection must
+// be in the pending-acceptance state. Use the DescribeVpcPeeringConnections
+// request to view your outstanding VPC peering connection requests. To delete
+// an active VPC peering connection, or to delete a VPC peering connection request
+// that you initiated, use DeleteVpcPeeringConnection.
+func (c *EC2) RejectVPCPeeringConnection(input *RejectVPCPeeringConnectionInput) (*RejectVPCPeeringConnectionOutput, error) {
+ req, out := c.RejectVPCPeeringConnectionRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opReleaseAddress = "ReleaseAddress"
+
+// ReleaseAddressRequest generates a request for the ReleaseAddress operation.
+func (c *EC2) ReleaseAddressRequest(input *ReleaseAddressInput) (req *aws.Request, output *ReleaseAddressOutput) {
+ op := &aws.Operation{
+ Name: opReleaseAddress,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ReleaseAddressInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &ReleaseAddressOutput{}
+ req.Data = output
+ return
+}
+
+// Releases the specified Elastic IP address.
+//
+// After releasing an Elastic IP address, it is released to the IP address
+// pool and might be unavailable to you. Be sure to update your DNS records
+// and any servers or devices that communicate with the address. If you attempt
+// to release an Elastic IP address that you already released, you'll get an
+// AuthFailure error if the address is already allocated to another AWS account.
+//
+// [EC2-Classic, default VPC] Releasing an Elastic IP address automatically
+// disassociates it from any instance that it's associated with. To disassociate
+// an Elastic IP address without releasing it, use DisassociateAddress.
+//
+// [Nondefault VPC] You must use DisassociateAddress to disassociate the Elastic
+// IP address before you try to release it. Otherwise, Amazon EC2 returns an
+// error (InvalidIPAddress.InUse).
+func (c *EC2) ReleaseAddress(input *ReleaseAddressInput) (*ReleaseAddressOutput, error) {
+ req, out := c.ReleaseAddressRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opReplaceNetworkACLAssociation = "ReplaceNetworkAclAssociation"
+
+// ReplaceNetworkACLAssociationRequest generates a request for the ReplaceNetworkACLAssociation operation.
+func (c *EC2) ReplaceNetworkACLAssociationRequest(input *ReplaceNetworkACLAssociationInput) (req *aws.Request, output *ReplaceNetworkACLAssociationOutput) {
+ op := &aws.Operation{
+ Name: opReplaceNetworkACLAssociation,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ReplaceNetworkACLAssociationInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &ReplaceNetworkACLAssociationOutput{}
+ req.Data = output
+ return
+}
+
+// Changes which network ACL a subnet is associated with. By default when you
+// create a subnet, it's automatically associated with the default network ACL.
+// For more information about network ACLs, see Network ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *EC2) ReplaceNetworkACLAssociation(input *ReplaceNetworkACLAssociationInput) (*ReplaceNetworkACLAssociationOutput, error) {
+ req, out := c.ReplaceNetworkACLAssociationRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opReplaceNetworkACLEntry = "ReplaceNetworkAclEntry"
+
+// ReplaceNetworkACLEntryRequest generates a request for the ReplaceNetworkACLEntry operation.
+func (c *EC2) ReplaceNetworkACLEntryRequest(input *ReplaceNetworkACLEntryInput) (req *aws.Request, output *ReplaceNetworkACLEntryOutput) {
+ op := &aws.Operation{
+ Name: opReplaceNetworkACLEntry,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ReplaceNetworkACLEntryInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &ReplaceNetworkACLEntryOutput{}
+ req.Data = output
+ return
+}
+
+// Replaces an entry (rule) in a network ACL. For more information about network
+// ACLs, see Network ACLs (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *EC2) ReplaceNetworkACLEntry(input *ReplaceNetworkACLEntryInput) (*ReplaceNetworkACLEntryOutput, error) {
+ req, out := c.ReplaceNetworkACLEntryRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opReplaceRoute = "ReplaceRoute"
+
+// ReplaceRouteRequest generates a request for the ReplaceRoute operation.
+func (c *EC2) ReplaceRouteRequest(input *ReplaceRouteInput) (req *aws.Request, output *ReplaceRouteOutput) {
+ op := &aws.Operation{
+ Name: opReplaceRoute,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ReplaceRouteInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &ReplaceRouteOutput{}
+ req.Data = output
+ return
+}
+
+// Replaces an existing route within a route table in a VPC. You must provide
+// only one of the following: Internet gateway or virtual private gateway, NAT
+// instance, VPC peering connection, or network interface.
+//
+// For more information about route tables, see Route Tables (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *EC2) ReplaceRoute(input *ReplaceRouteInput) (*ReplaceRouteOutput, error) {
+ req, out := c.ReplaceRouteRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opReplaceRouteTableAssociation = "ReplaceRouteTableAssociation"
+
+// ReplaceRouteTableAssociationRequest generates a request for the ReplaceRouteTableAssociation operation.
+func (c *EC2) ReplaceRouteTableAssociationRequest(input *ReplaceRouteTableAssociationInput) (req *aws.Request, output *ReplaceRouteTableAssociationOutput) {
+ op := &aws.Operation{
+ Name: opReplaceRouteTableAssociation,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ReplaceRouteTableAssociationInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &ReplaceRouteTableAssociationOutput{}
+ req.Data = output
+ return
+}
+
+// Changes the route table associated with a given subnet in a VPC. After the
+// operation completes, the subnet uses the routes in the new route table it's
+// associated with. For more information about route tables, see Route Tables
+// (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Route_Tables.html)
+// in the Amazon Virtual Private Cloud User Guide.
+//
+// You can also use ReplaceRouteTableAssociation to change which table is the
+// main route table in the VPC. You just specify the main route table's association
+// ID and the route table to be the new main route table.
+func (c *EC2) ReplaceRouteTableAssociation(input *ReplaceRouteTableAssociationInput) (*ReplaceRouteTableAssociationOutput, error) {
+ req, out := c.ReplaceRouteTableAssociationRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opReportInstanceStatus = "ReportInstanceStatus"
+
+// ReportInstanceStatusRequest generates a request for the ReportInstanceStatus operation.
+func (c *EC2) ReportInstanceStatusRequest(input *ReportInstanceStatusInput) (req *aws.Request, output *ReportInstanceStatusOutput) {
+ op := &aws.Operation{
+ Name: opReportInstanceStatus,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ReportInstanceStatusInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &ReportInstanceStatusOutput{}
+ req.Data = output
+ return
+}
+
+// Submits feedback about the status of an instance. The instance must be in
+// the running state. If your experience with the instance differs from the
+// instance status returned by DescribeInstanceStatus, use ReportInstanceStatus
+// to report your experience with the instance. Amazon EC2 collects this information
+// to improve the accuracy of status checks.
+//
+// Use of this action does not change the value returned by DescribeInstanceStatus.
+func (c *EC2) ReportInstanceStatus(input *ReportInstanceStatusInput) (*ReportInstanceStatusOutput, error) {
+ req, out := c.ReportInstanceStatusRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opRequestSpotFleet = "RequestSpotFleet"
+
+// RequestSpotFleetRequest generates a request for the RequestSpotFleet operation.
+func (c *EC2) RequestSpotFleetRequest(input *RequestSpotFleetInput) (req *aws.Request, output *RequestSpotFleetOutput) {
+ op := &aws.Operation{
+ Name: opRequestSpotFleet,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &RequestSpotFleetInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &RequestSpotFleetOutput{}
+ req.Data = output
+ return
+}
+
+// Creates a Spot fleet request.
+//
+// For more information, see Spot Fleets (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) RequestSpotFleet(input *RequestSpotFleetInput) (*RequestSpotFleetOutput, error) {
+ req, out := c.RequestSpotFleetRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opRequestSpotInstances = "RequestSpotInstances"
+
+// RequestSpotInstancesRequest generates a request for the RequestSpotInstances operation.
+func (c *EC2) RequestSpotInstancesRequest(input *RequestSpotInstancesInput) (req *aws.Request, output *RequestSpotInstancesOutput) {
+ op := &aws.Operation{
+ Name: opRequestSpotInstances,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &RequestSpotInstancesInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &RequestSpotInstancesOutput{}
+ req.Data = output
+ return
+}
+
+// Creates a Spot Instance request. Spot Instances are instances that Amazon
+// EC2 launches when the bid price that you specify exceeds the current Spot
+// Price. Amazon EC2 periodically sets the Spot Price based on available Spot
+// Instance capacity and current Spot Instance requests. For more information,
+// see Spot Instance Requests (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) RequestSpotInstances(input *RequestSpotInstancesInput) (*RequestSpotInstancesOutput, error) {
+ req, out := c.RequestSpotInstancesRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opResetImageAttribute = "ResetImageAttribute"
+
+// ResetImageAttributeRequest generates a request for the ResetImageAttribute operation.
+func (c *EC2) ResetImageAttributeRequest(input *ResetImageAttributeInput) (req *aws.Request, output *ResetImageAttributeOutput) {
+ op := &aws.Operation{
+ Name: opResetImageAttribute,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ResetImageAttributeInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &ResetImageAttributeOutput{}
+ req.Data = output
+ return
+}
+
+// Resets an attribute of an AMI to its default value.
+//
+// The productCodes attribute can't be reset.
+func (c *EC2) ResetImageAttribute(input *ResetImageAttributeInput) (*ResetImageAttributeOutput, error) {
+ req, out := c.ResetImageAttributeRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opResetInstanceAttribute = "ResetInstanceAttribute"
+
+// ResetInstanceAttributeRequest generates a request for the ResetInstanceAttribute operation.
+func (c *EC2) ResetInstanceAttributeRequest(input *ResetInstanceAttributeInput) (req *aws.Request, output *ResetInstanceAttributeOutput) {
+ op := &aws.Operation{
+ Name: opResetInstanceAttribute,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ResetInstanceAttributeInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &ResetInstanceAttributeOutput{}
+ req.Data = output
+ return
+}
+
+// Resets an attribute of an instance to its default value. To reset the kernel
+// or ramdisk, the instance must be in a stopped state. To reset the SourceDestCheck,
+// the instance can be either running or stopped.
+//
+// The SourceDestCheck attribute controls whether source/destination checking
+// is enabled. The default value is true, which means checking is enabled. This
+// value must be false for a NAT instance to perform NAT. For more information,
+// see NAT Instances (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html)
+// in the Amazon Virtual Private Cloud User Guide.
+func (c *EC2) ResetInstanceAttribute(input *ResetInstanceAttributeInput) (*ResetInstanceAttributeOutput, error) {
+ req, out := c.ResetInstanceAttributeRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opResetNetworkInterfaceAttribute = "ResetNetworkInterfaceAttribute"
+
+// ResetNetworkInterfaceAttributeRequest generates a request for the ResetNetworkInterfaceAttribute operation.
+func (c *EC2) ResetNetworkInterfaceAttributeRequest(input *ResetNetworkInterfaceAttributeInput) (req *aws.Request, output *ResetNetworkInterfaceAttributeOutput) {
+ op := &aws.Operation{
+ Name: opResetNetworkInterfaceAttribute,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ResetNetworkInterfaceAttributeInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &ResetNetworkInterfaceAttributeOutput{}
+ req.Data = output
+ return
+}
+
+// Resets a network interface attribute. You can specify only one attribute
+// at a time.
+func (c *EC2) ResetNetworkInterfaceAttribute(input *ResetNetworkInterfaceAttributeInput) (*ResetNetworkInterfaceAttributeOutput, error) {
+ req, out := c.ResetNetworkInterfaceAttributeRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opResetSnapshotAttribute = "ResetSnapshotAttribute"
+
+// ResetSnapshotAttributeRequest generates a request for the ResetSnapshotAttribute operation.
+func (c *EC2) ResetSnapshotAttributeRequest(input *ResetSnapshotAttributeInput) (req *aws.Request, output *ResetSnapshotAttributeOutput) {
+ op := &aws.Operation{
+ Name: opResetSnapshotAttribute,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &ResetSnapshotAttributeInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &ResetSnapshotAttributeOutput{}
+ req.Data = output
+ return
+}
+
+// Resets permission settings for the specified snapshot.
+//
+// For more information on modifying snapshot permissions, see Sharing Snapshots
+// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) ResetSnapshotAttribute(input *ResetSnapshotAttributeInput) (*ResetSnapshotAttributeOutput, error) {
+ req, out := c.ResetSnapshotAttributeRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opRestoreAddressToClassic = "RestoreAddressToClassic"
+
+// RestoreAddressToClassicRequest generates a request for the RestoreAddressToClassic operation.
+func (c *EC2) RestoreAddressToClassicRequest(input *RestoreAddressToClassicInput) (req *aws.Request, output *RestoreAddressToClassicOutput) {
+ op := &aws.Operation{
+ Name: opRestoreAddressToClassic,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &RestoreAddressToClassicInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &RestoreAddressToClassicOutput{}
+ req.Data = output
+ return
+}
+
+// Restores an Elastic IP address that was previously moved to the EC2-VPC platform
+// back to the EC2-Classic platform. You cannot move an Elastic IP address that
+// was originally allocated for use in EC2-VPC. The Elastic IP address must
+// not be associated with an instance or network interface.
+func (c *EC2) RestoreAddressToClassic(input *RestoreAddressToClassicInput) (*RestoreAddressToClassicOutput, error) {
+ req, out := c.RestoreAddressToClassicRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opRevokeSecurityGroupEgress = "RevokeSecurityGroupEgress"
+
+// RevokeSecurityGroupEgressRequest generates a request for the RevokeSecurityGroupEgress operation.
+func (c *EC2) RevokeSecurityGroupEgressRequest(input *RevokeSecurityGroupEgressInput) (req *aws.Request, output *RevokeSecurityGroupEgressOutput) {
+ op := &aws.Operation{
+ Name: opRevokeSecurityGroupEgress,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &RevokeSecurityGroupEgressInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &RevokeSecurityGroupEgressOutput{}
+ req.Data = output
+ return
+}
+
+// Removes one or more egress rules from a security group for EC2-VPC. The values
+// that you specify in the revoke request (for example, ports) must match the
+// existing rule's values for the rule to be revoked.
+//
+// Each rule consists of the protocol and the CIDR range or source security
+// group. For the TCP and UDP protocols, you must also specify the destination
+// port or range of ports. For the ICMP protocol, you must also specify the
+// ICMP type and code.
+//
+// Rule changes are propagated to instances within the security group as quickly
+// as possible. However, a small delay might occur.
+func (c *EC2) RevokeSecurityGroupEgress(input *RevokeSecurityGroupEgressInput) (*RevokeSecurityGroupEgressOutput, error) {
+ req, out := c.RevokeSecurityGroupEgressRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opRevokeSecurityGroupIngress = "RevokeSecurityGroupIngress"
+
+// RevokeSecurityGroupIngressRequest generates a request for the RevokeSecurityGroupIngress operation.
+func (c *EC2) RevokeSecurityGroupIngressRequest(input *RevokeSecurityGroupIngressInput) (req *aws.Request, output *RevokeSecurityGroupIngressOutput) {
+ op := &aws.Operation{
+ Name: opRevokeSecurityGroupIngress,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &RevokeSecurityGroupIngressInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &RevokeSecurityGroupIngressOutput{}
+ req.Data = output
+ return
+}
+
+// Removes one or more ingress rules from a security group. The values that
+// you specify in the revoke request (for example, ports) must match the existing
+// rule's values for the rule to be removed.
+//
+// Each rule consists of the protocol and the CIDR range or source security
+// group. For the TCP and UDP protocols, you must also specify the destination
+// port or range of ports. For the ICMP protocol, you must also specify the
+// ICMP type and code.
+//
+// Rule changes are propagated to instances within the security group as quickly
+// as possible. However, a small delay might occur.
+func (c *EC2) RevokeSecurityGroupIngress(input *RevokeSecurityGroupIngressInput) (*RevokeSecurityGroupIngressOutput, error) {
+ req, out := c.RevokeSecurityGroupIngressRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opRunInstances = "RunInstances"
+
+// RunInstancesRequest generates a request for the RunInstances operation.
+func (c *EC2) RunInstancesRequest(input *RunInstancesInput) (req *aws.Request, output *Reservation) {
+ op := &aws.Operation{
+ Name: opRunInstances,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &RunInstancesInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &Reservation{}
+ req.Data = output
+ return
+}
+
+// Launches the specified number of instances using an AMI for which you have
+// permissions.
+//
+// When you launch an instance, it enters the pending state. After the instance
+// is ready for you, it enters the running state. To check the state of your
+// instance, call DescribeInstances.
+//
+// If you don't specify a security group when launching an instance, Amazon
+// EC2 uses the default security group. For more information, see Security Groups
+// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+//
+// Linux instances have access to the public key of the key pair at boot. You
+// can use this key to provide secure access to the instance. Amazon EC2 public
+// images use this feature to provide secure access without passwords. For more
+// information, see Key Pairs (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+//
+// You can provide optional user data when launching an instance. For more
+// information, see Instance Metadata (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+//
+// If any of the AMIs have a product code attached for which the user has not
+// subscribed, RunInstances fails.
+//
+// T2 instance types can only be launched into a VPC. If you do not have a
+// default VPC, or if you do not specify a subnet ID in the request, RunInstances
+// fails.
+//
+// For more information about troubleshooting, see What To Do If An Instance
+// Immediately Terminates (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_InstanceStraightToTerminated.html),
+// and Troubleshooting Connecting to Your Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) RunInstances(input *RunInstancesInput) (*Reservation, error) {
+ req, out := c.RunInstancesRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opStartInstances = "StartInstances"
+
+// StartInstancesRequest generates a request for the StartInstances operation.
+func (c *EC2) StartInstancesRequest(input *StartInstancesInput) (req *aws.Request, output *StartInstancesOutput) {
+ op := &aws.Operation{
+ Name: opStartInstances,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &StartInstancesInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &StartInstancesOutput{}
+ req.Data = output
+ return
+}
+
+// Starts an Amazon EBS-backed AMI that you've previously stopped.
+//
+// Instances that use Amazon EBS volumes as their root devices can be quickly
+// stopped and started. When an instance is stopped, the compute resources are
+// released and you are not billed for hourly instance usage. However, your
+// root partition Amazon EBS volume remains, continues to persist your data,
+// and you are charged for Amazon EBS volume usage. You can restart your instance
+// at any time. Each time you transition an instance from stopped to started,
+// Amazon EC2 charges a full instance hour, even if transitions happen multiple
+// times within a single hour.
+//
+// Before stopping an instance, make sure it is in a state from which it can
+// be restarted. Stopping an instance does not preserve data stored in RAM.
+//
+// Performing this operation on an instance that uses an instance store as
+// its root device returns an error.
+//
+// For more information, see Stopping Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) StartInstances(input *StartInstancesInput) (*StartInstancesOutput, error) {
+ req, out := c.StartInstancesRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opStopInstances = "StopInstances"
+
+// StopInstancesRequest generates a request for the StopInstances operation.
+func (c *EC2) StopInstancesRequest(input *StopInstancesInput) (req *aws.Request, output *StopInstancesOutput) {
+ op := &aws.Operation{
+ Name: opStopInstances,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &StopInstancesInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &StopInstancesOutput{}
+ req.Data = output
+ return
+}
+
+// Stops an Amazon EBS-backed instance. Each time you transition an instance
+// from stopped to started, Amazon EC2 charges a full instance hour, even if
+// transitions happen multiple times within a single hour.
+//
+// You can't start or stop Spot Instances.
+//
+// Instances that use Amazon EBS volumes as their root devices can be quickly
+// stopped and started. When an instance is stopped, the compute resources are
+// released and you are not billed for hourly instance usage. However, your
+// root partition Amazon EBS volume remains, continues to persist your data,
+// and you are charged for Amazon EBS volume usage. You can restart your instance
+// at any time.
+//
+// Before stopping an instance, make sure it is in a state from which it can
+// be restarted. Stopping an instance does not preserve data stored in RAM.
+//
+// Performing this operation on an instance that uses an instance store as
+// its root device returns an error.
+//
+// You can stop, start, and terminate EBS-backed instances. You can only terminate
+// instance store-backed instances. What happens to an instance differs if you
+// stop it or terminate it. For example, when you stop an instance, the root
+// device and any other devices attached to the instance persist. When you terminate
+// an instance, the root device and any other devices attached during the instance
+// launch are automatically deleted. For more information about the differences
+// between stopping and terminating instances, see Instance Lifecycle (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+//
+// For more information about troubleshooting, see Troubleshooting Stopping
+// Your Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesStopping.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) StopInstances(input *StopInstancesInput) (*StopInstancesOutput, error) {
+ req, out := c.StopInstancesRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opTerminateInstances = "TerminateInstances"
+
+// TerminateInstancesRequest generates a request for the TerminateInstances operation.
+func (c *EC2) TerminateInstancesRequest(input *TerminateInstancesInput) (req *aws.Request, output *TerminateInstancesOutput) {
+ op := &aws.Operation{
+ Name: opTerminateInstances,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &TerminateInstancesInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &TerminateInstancesOutput{}
+ req.Data = output
+ return
+}
+
+// Shuts down one or more instances. This operation is idempotent; if you terminate
+// an instance more than once, each call succeeds.
+//
+// Terminated instances remain visible after termination (for approximately
+// one hour).
+//
+// By default, Amazon EC2 deletes all EBS volumes that were attached when the
+// instance launched. Volumes attached after instance launch continue running.
+//
+// You can stop, start, and terminate EBS-backed instances. You can only terminate
+// instance store-backed instances. What happens to an instance differs if you
+// stop it or terminate it. For example, when you stop an instance, the root
+// device and any other devices attached to the instance persist. When you terminate
+// an instance, the root device and any other devices attached during the instance
+// launch are automatically deleted. For more information about the differences
+// between stopping and terminating instances, see Instance Lifecycle (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+//
+// For more information about troubleshooting, see Troubleshooting Terminating
+// Your Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesShuttingDown.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) TerminateInstances(input *TerminateInstancesInput) (*TerminateInstancesOutput, error) {
+ req, out := c.TerminateInstancesRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opUnassignPrivateIPAddresses = "UnassignPrivateIpAddresses"
+
+// UnassignPrivateIPAddressesRequest generates a request for the UnassignPrivateIPAddresses operation.
+func (c *EC2) UnassignPrivateIPAddressesRequest(input *UnassignPrivateIPAddressesInput) (req *aws.Request, output *UnassignPrivateIPAddressesOutput) {
+ op := &aws.Operation{
+ Name: opUnassignPrivateIPAddresses,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &UnassignPrivateIPAddressesInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &UnassignPrivateIPAddressesOutput{}
+ req.Data = output
+ return
+}
+
+// Unassigns one or more secondary private IP addresses from a network interface.
+func (c *EC2) UnassignPrivateIPAddresses(input *UnassignPrivateIPAddressesInput) (*UnassignPrivateIPAddressesOutput, error) {
+ req, out := c.UnassignPrivateIPAddressesRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+const opUnmonitorInstances = "UnmonitorInstances"
+
+// UnmonitorInstancesRequest generates a request for the UnmonitorInstances operation.
+func (c *EC2) UnmonitorInstancesRequest(input *UnmonitorInstancesInput) (req *aws.Request, output *UnmonitorInstancesOutput) {
+ op := &aws.Operation{
+ Name: opUnmonitorInstances,
+ HTTPMethod: "POST",
+ HTTPPath: "/",
+ }
+
+ if input == nil {
+ input = &UnmonitorInstancesInput{}
+ }
+
+ req = c.newRequest(op, input, output)
+ output = &UnmonitorInstancesOutput{}
+ req.Data = output
+ return
+}
+
+// Disables monitoring for a running instance. For more information about monitoring
+// instances, see Monitoring Your Instances and Volumes (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html)
+// in the Amazon Elastic Compute Cloud User Guide.
+func (c *EC2) UnmonitorInstances(input *UnmonitorInstancesInput) (*UnmonitorInstancesOutput, error) {
+ req, out := c.UnmonitorInstancesRequest(input)
+ err := req.Send()
+ return out, err
+}
+
+type AcceptVPCPeeringConnectionInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the VPC peering connection.
+ VPCPeeringConnectionID *string `locationName:"vpcPeeringConnectionId" type:"string"`
+
+ metadataAcceptVPCPeeringConnectionInput `json:"-" xml:"-"`
+}
+
+type metadataAcceptVPCPeeringConnectionInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AcceptVPCPeeringConnectionInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AcceptVPCPeeringConnectionInput) GoString() string {
+ return s.String()
+}
+
+type AcceptVPCPeeringConnectionOutput struct {
+ // Information about the VPC peering connection.
+ VPCPeeringConnection *VPCPeeringConnection `locationName:"vpcPeeringConnection" type:"structure"`
+
+ metadataAcceptVPCPeeringConnectionOutput `json:"-" xml:"-"`
+}
+
+type metadataAcceptVPCPeeringConnectionOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AcceptVPCPeeringConnectionOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AcceptVPCPeeringConnectionOutput) GoString() string {
+ return s.String()
+}
+
+// Describes an account attribute.
+type AccountAttribute struct {
+ // The name of the account attribute.
+ AttributeName *string `locationName:"attributeName" type:"string"`
+
+ // One or more values for the account attribute.
+ AttributeValues []*AccountAttributeValue `locationName:"attributeValueSet" locationNameList:"item" type:"list"`
+
+ metadataAccountAttribute `json:"-" xml:"-"`
+}
+
+type metadataAccountAttribute struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AccountAttribute) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AccountAttribute) GoString() string {
+ return s.String()
+}
+
+// Describes a value of an account attribute.
+type AccountAttributeValue struct {
+ // The value of the attribute.
+ AttributeValue *string `locationName:"attributeValue" type:"string"`
+
+ metadataAccountAttributeValue `json:"-" xml:"-"`
+}
+
+type metadataAccountAttributeValue struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AccountAttributeValue) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AccountAttributeValue) GoString() string {
+ return s.String()
+}
+
+// Describes a running instance in a Spot fleet.
+type ActiveInstance struct {
+ // The ID of the instance.
+ InstanceID *string `locationName:"instanceId" type:"string"`
+
+ // The instance type.
+ InstanceType *string `locationName:"instanceType" type:"string"`
+
+ // The ID of the Spot Instance request.
+ SpotInstanceRequestID *string `locationName:"spotInstanceRequestId" type:"string"`
+
+ metadataActiveInstance `json:"-" xml:"-"`
+}
+
+type metadataActiveInstance struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ActiveInstance) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ActiveInstance) GoString() string {
+ return s.String()
+}
+
+// Describes an Elastic IP address.
+type Address struct {
+ // The ID representing the allocation of the address for use with EC2-VPC.
+ AllocationID *string `locationName:"allocationId" type:"string"`
+
+ // The ID representing the association of the address with an instance in a
+ // VPC.
+ AssociationID *string `locationName:"associationId" type:"string"`
+
+ // Indicates whether this Elastic IP address is for use with instances in EC2-Classic
+ // (standard) or instances in a VPC (vpc).
+ Domain *string `locationName:"domain" type:"string" enum:"DomainType"`
+
+ // The ID of the instance that the address is associated with (if any).
+ InstanceID *string `locationName:"instanceId" type:"string"`
+
+ // The ID of the network interface.
+ NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string"`
+
+ // The ID of the AWS account that owns the network interface.
+ NetworkInterfaceOwnerID *string `locationName:"networkInterfaceOwnerId" type:"string"`
+
+ // The private IP address associated with the Elastic IP address.
+ PrivateIPAddress *string `locationName:"privateIpAddress" type:"string"`
+
+ // The Elastic IP address.
+ PublicIP *string `locationName:"publicIp" type:"string"`
+
+ metadataAddress `json:"-" xml:"-"`
+}
+
+type metadataAddress struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s Address) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Address) GoString() string {
+ return s.String()
+}
+
+type AllocateAddressInput struct {
+ // Set to vpc to allocate the address for use with instances in a VPC.
+ //
+ // Default: The address is for use with instances in EC2-Classic.
+ Domain *string `type:"string" enum:"DomainType"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ metadataAllocateAddressInput `json:"-" xml:"-"`
+}
+
+type metadataAllocateAddressInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AllocateAddressInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AllocateAddressInput) GoString() string {
+ return s.String()
+}
+
+type AllocateAddressOutput struct {
+ // [EC2-VPC] The ID that AWS assigns to represent the allocation of the Elastic
+ // IP address for use with instances in a VPC.
+ AllocationID *string `locationName:"allocationId" type:"string"`
+
+ // Indicates whether this Elastic IP address is for use with instances in EC2-Classic
+ // (standard) or instances in a VPC (vpc).
+ Domain *string `locationName:"domain" type:"string" enum:"DomainType"`
+
+ // The Elastic IP address.
+ PublicIP *string `locationName:"publicIp" type:"string"`
+
+ metadataAllocateAddressOutput `json:"-" xml:"-"`
+}
+
+type metadataAllocateAddressOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AllocateAddressOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AllocateAddressOutput) GoString() string {
+ return s.String()
+}
+
+type AssignPrivateIPAddressesInput struct {
+ // Indicates whether to allow an IP address that is already assigned to another
+ // network interface or instance to be reassigned to the specified network interface.
+ AllowReassignment *bool `locationName:"allowReassignment" type:"boolean"`
+
+ // The ID of the network interface.
+ NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string" required:"true"`
+
+ // One or more IP addresses to be assigned as a secondary private IP address
+ // to the network interface. You can't specify this parameter when also specifying
+ // a number of secondary IP addresses.
+ //
+ // If you don't specify an IP address, Amazon EC2 automatically selects an
+ // IP address within the subnet range.
+ PrivateIPAddresses []*string `locationName:"privateIpAddress" locationNameList:"PrivateIpAddress" type:"list"`
+
+ // The number of secondary IP addresses to assign to the network interface.
+ // You can't specify this parameter when also specifying private IP addresses.
+ SecondaryPrivateIPAddressCount *int64 `locationName:"secondaryPrivateIpAddressCount" type:"integer"`
+
+ metadataAssignPrivateIPAddressesInput `json:"-" xml:"-"`
+}
+
+type metadataAssignPrivateIPAddressesInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AssignPrivateIPAddressesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AssignPrivateIPAddressesInput) GoString() string {
+ return s.String()
+}
+
+type AssignPrivateIPAddressesOutput struct {
+ metadataAssignPrivateIPAddressesOutput `json:"-" xml:"-"`
+}
+
+type metadataAssignPrivateIPAddressesOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AssignPrivateIPAddressesOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AssignPrivateIPAddressesOutput) GoString() string {
+ return s.String()
+}
+
+type AssociateAddressInput struct {
+ // [EC2-VPC] The allocation ID. This is required for EC2-VPC.
+ AllocationID *string `locationName:"AllocationId" type:"string"`
+
+ // [EC2-VPC] Allows an Elastic IP address that is already associated with an
+ // instance or network interface to be re-associated with the specified instance
+ // or network interface. Otherwise, the operation fails.
+ //
+ // Default: false
+ AllowReassociation *bool `locationName:"allowReassociation" type:"boolean"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the instance. This is required for EC2-Classic. For EC2-VPC, you
+ // can specify either the instance ID or the network interface ID, but not both.
+ // The operation fails if you specify an instance ID unless exactly one network
+ // interface is attached.
+ InstanceID *string `locationName:"InstanceId" type:"string"`
+
+ // [EC2-VPC] The ID of the network interface. If the instance has more than
+ // one network interface, you must specify a network interface ID.
+ NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string"`
+
+ // [EC2-VPC] The primary or secondary private IP address to associate with the
+ // Elastic IP address. If no private IP address is specified, the Elastic IP
+ // address is associated with the primary private IP address.
+ PrivateIPAddress *string `locationName:"privateIpAddress" type:"string"`
+
+ // The Elastic IP address. This is required for EC2-Classic.
+ PublicIP *string `locationName:"PublicIp" type:"string"`
+
+ metadataAssociateAddressInput `json:"-" xml:"-"`
+}
+
+type metadataAssociateAddressInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AssociateAddressInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AssociateAddressInput) GoString() string {
+ return s.String()
+}
+
+type AssociateAddressOutput struct {
+ // [EC2-VPC] The ID that represents the association of the Elastic IP address
+ // with an instance.
+ AssociationID *string `locationName:"associationId" type:"string"`
+
+ metadataAssociateAddressOutput `json:"-" xml:"-"`
+}
+
+type metadataAssociateAddressOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AssociateAddressOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AssociateAddressOutput) GoString() string {
+ return s.String()
+}
+
+type AssociateDHCPOptionsInput struct {
+ // The ID of the DHCP options set, or default to associate no DHCP options with
+ // the VPC.
+ DHCPOptionsID *string `locationName:"DhcpOptionsId" type:"string" required:"true"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the VPC.
+ VPCID *string `locationName:"VpcId" type:"string" required:"true"`
+
+ metadataAssociateDHCPOptionsInput `json:"-" xml:"-"`
+}
+
+type metadataAssociateDHCPOptionsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AssociateDHCPOptionsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AssociateDHCPOptionsInput) GoString() string {
+ return s.String()
+}
+
+type AssociateDHCPOptionsOutput struct {
+ metadataAssociateDHCPOptionsOutput `json:"-" xml:"-"`
+}
+
+type metadataAssociateDHCPOptionsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AssociateDHCPOptionsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AssociateDHCPOptionsOutput) GoString() string {
+ return s.String()
+}
+
+type AssociateRouteTableInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the route table.
+ RouteTableID *string `locationName:"routeTableId" type:"string" required:"true"`
+
+ // The ID of the subnet.
+ SubnetID *string `locationName:"subnetId" type:"string" required:"true"`
+
+ metadataAssociateRouteTableInput `json:"-" xml:"-"`
+}
+
+type metadataAssociateRouteTableInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AssociateRouteTableInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AssociateRouteTableInput) GoString() string {
+ return s.String()
+}
+
+type AssociateRouteTableOutput struct {
+ // The route table association ID (needed to disassociate the route table).
+ AssociationID *string `locationName:"associationId" type:"string"`
+
+ metadataAssociateRouteTableOutput `json:"-" xml:"-"`
+}
+
+type metadataAssociateRouteTableOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AssociateRouteTableOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AssociateRouteTableOutput) GoString() string {
+ return s.String()
+}
+
+type AttachClassicLinkVPCInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of one or more of the VPC's security groups. You cannot specify security
+ // groups from a different VPC.
+ Groups []*string `locationName:"SecurityGroupId" locationNameList:"groupId" type:"list" required:"true"`
+
+ // The ID of an EC2-Classic instance to link to the ClassicLink-enabled VPC.
+ InstanceID *string `locationName:"instanceId" type:"string" required:"true"`
+
+ // The ID of a ClassicLink-enabled VPC.
+ VPCID *string `locationName:"vpcId" type:"string" required:"true"`
+
+ metadataAttachClassicLinkVPCInput `json:"-" xml:"-"`
+}
+
+type metadataAttachClassicLinkVPCInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AttachClassicLinkVPCInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AttachClassicLinkVPCInput) GoString() string {
+ return s.String()
+}
+
+type AttachClassicLinkVPCOutput struct {
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool `locationName:"return" type:"boolean"`
+
+ metadataAttachClassicLinkVPCOutput `json:"-" xml:"-"`
+}
+
+type metadataAttachClassicLinkVPCOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AttachClassicLinkVPCOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AttachClassicLinkVPCOutput) GoString() string {
+ return s.String()
+}
+
+type AttachInternetGatewayInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the Internet gateway.
+ InternetGatewayID *string `locationName:"internetGatewayId" type:"string" required:"true"`
+
+ // The ID of the VPC.
+ VPCID *string `locationName:"vpcId" type:"string" required:"true"`
+
+ metadataAttachInternetGatewayInput `json:"-" xml:"-"`
+}
+
+type metadataAttachInternetGatewayInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AttachInternetGatewayInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AttachInternetGatewayInput) GoString() string {
+ return s.String()
+}
+
+type AttachInternetGatewayOutput struct {
+ metadataAttachInternetGatewayOutput `json:"-" xml:"-"`
+}
+
+type metadataAttachInternetGatewayOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AttachInternetGatewayOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AttachInternetGatewayOutput) GoString() string {
+ return s.String()
+}
+
+type AttachNetworkInterfaceInput struct {
+ // The index of the device for the network interface attachment.
+ DeviceIndex *int64 `locationName:"deviceIndex" type:"integer" required:"true"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the instance.
+ InstanceID *string `locationName:"instanceId" type:"string" required:"true"`
+
+ // The ID of the network interface.
+ NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string" required:"true"`
+
+ metadataAttachNetworkInterfaceInput `json:"-" xml:"-"`
+}
+
+type metadataAttachNetworkInterfaceInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AttachNetworkInterfaceInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AttachNetworkInterfaceInput) GoString() string {
+ return s.String()
+}
+
+type AttachNetworkInterfaceOutput struct {
+ // The ID of the network interface attachment.
+ AttachmentID *string `locationName:"attachmentId" type:"string"`
+
+ metadataAttachNetworkInterfaceOutput `json:"-" xml:"-"`
+}
+
+type metadataAttachNetworkInterfaceOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AttachNetworkInterfaceOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AttachNetworkInterfaceOutput) GoString() string {
+ return s.String()
+}
+
+type AttachVPNGatewayInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the VPC.
+ VPCID *string `locationName:"VpcId" type:"string" required:"true"`
+
+ // The ID of the virtual private gateway.
+ VPNGatewayID *string `locationName:"VpnGatewayId" type:"string" required:"true"`
+
+ metadataAttachVPNGatewayInput `json:"-" xml:"-"`
+}
+
+type metadataAttachVPNGatewayInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AttachVPNGatewayInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AttachVPNGatewayInput) GoString() string {
+ return s.String()
+}
+
+type AttachVPNGatewayOutput struct {
+ // Information about the attachment.
+ VPCAttachment *VPCAttachment `locationName:"attachment" type:"structure"`
+
+ metadataAttachVPNGatewayOutput `json:"-" xml:"-"`
+}
+
+type metadataAttachVPNGatewayOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AttachVPNGatewayOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AttachVPNGatewayOutput) GoString() string {
+ return s.String()
+}
+
+type AttachVolumeInput struct {
+ // The device name to expose to the instance (for example, /dev/sdh or xvdh).
+ Device *string `type:"string" required:"true"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the instance.
+ InstanceID *string `locationName:"InstanceId" type:"string" required:"true"`
+
+ // The ID of the EBS volume. The volume and instance must be within the same
+ // Availability Zone.
+ VolumeID *string `locationName:"VolumeId" type:"string" required:"true"`
+
+ metadataAttachVolumeInput `json:"-" xml:"-"`
+}
+
+type metadataAttachVolumeInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AttachVolumeInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AttachVolumeInput) GoString() string {
+ return s.String()
+}
+
+// The value to use when a resource attribute accepts a Boolean value.
+type AttributeBooleanValue struct {
+ // Valid values are true or false.
+ Value *bool `locationName:"value" type:"boolean"`
+
+ metadataAttributeBooleanValue `json:"-" xml:"-"`
+}
+
+type metadataAttributeBooleanValue struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AttributeBooleanValue) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AttributeBooleanValue) GoString() string {
+ return s.String()
+}
+
+// The value to use for a resource attribute.
+type AttributeValue struct {
+ // Valid values are case-sensitive and vary by action.
+ Value *string `locationName:"value" type:"string"`
+
+ metadataAttributeValue `json:"-" xml:"-"`
+}
+
+type metadataAttributeValue struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AttributeValue) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AttributeValue) GoString() string {
+ return s.String()
+}
+
+type AuthorizeSecurityGroupEgressInput struct {
+ // The CIDR IP address range. You can't specify this parameter when specifying
+ // a source security group.
+ CIDRIP *string `locationName:"cidrIp" type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The start of port range for the TCP and UDP protocols, or an ICMP type number.
+ // For the ICMP type number, use -1 to specify all ICMP types.
+ FromPort *int64 `locationName:"fromPort" type:"integer"`
+
+ // The ID of the security group.
+ GroupID *string `locationName:"groupId" type:"string" required:"true"`
+
+ // A set of IP permissions. You can't specify a destination security group and
+ // a CIDR IP address range.
+ IPPermissions []*IPPermission `locationName:"ipPermissions" locationNameList:"item" type:"list"`
+
+ // The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)).
+ // Use -1 to specify all.
+ IPProtocol *string `locationName:"ipProtocol" type:"string"`
+
+ // The name of a destination security group. To authorize outbound access to
+ // a destination security group, we recommend that you use a set of IP permissions
+ // instead.
+ SourceSecurityGroupName *string `locationName:"sourceSecurityGroupName" type:"string"`
+
+ // The AWS account number for a destination security group. To authorize outbound
+ // access to a destination security group, we recommend that you use a set of
+ // IP permissions instead.
+ SourceSecurityGroupOwnerID *string `locationName:"sourceSecurityGroupOwnerId" type:"string"`
+
+ // The end of port range for the TCP and UDP protocols, or an ICMP code number.
+ // For the ICMP code number, use -1 to specify all ICMP codes for the ICMP type.
+ ToPort *int64 `locationName:"toPort" type:"integer"`
+
+ metadataAuthorizeSecurityGroupEgressInput `json:"-" xml:"-"`
+}
+
+type metadataAuthorizeSecurityGroupEgressInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AuthorizeSecurityGroupEgressInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AuthorizeSecurityGroupEgressInput) GoString() string {
+ return s.String()
+}
+
+type AuthorizeSecurityGroupEgressOutput struct {
+ metadataAuthorizeSecurityGroupEgressOutput `json:"-" xml:"-"`
+}
+
+type metadataAuthorizeSecurityGroupEgressOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AuthorizeSecurityGroupEgressOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AuthorizeSecurityGroupEgressOutput) GoString() string {
+ return s.String()
+}
+
+type AuthorizeSecurityGroupIngressInput struct {
+ // The CIDR IP address range. You can't specify this parameter when specifying
+ // a source security group.
+ CIDRIP *string `locationName:"CidrIp" type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The start of port range for the TCP and UDP protocols, or an ICMP type number.
+ // For the ICMP type number, use -1 to specify all ICMP types.
+ FromPort *int64 `type:"integer"`
+
+ // The ID of the security group. Required for a nondefault VPC.
+ GroupID *string `locationName:"GroupId" type:"string"`
+
+ // [EC2-Classic, default VPC] The name of the security group.
+ GroupName *string `type:"string"`
+
+ // A set of IP permissions. Can be used to specify multiple rules in a single
+ // command.
+ IPPermissions []*IPPermission `locationName:"IpPermissions" locationNameList:"item" type:"list"`
+
+ // The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)).
+ // (VPC only) Use -1 to specify all.
+ IPProtocol *string `locationName:"IpProtocol" type:"string"`
+
+ // [EC2-Classic, default VPC] The name of the source security group. You can't
+ // specify this parameter in combination with the following parameters: the
+ // CIDR IP address range, the start of the port range, the IP protocol, and
+ // the end of the port range. For EC2-VPC, the source security group must be
+ // in the same VPC.
+ SourceSecurityGroupName *string `type:"string"`
+
+ // [EC2-Classic, default VPC] The AWS account number for the source security
+ // group. For EC2-VPC, the source security group must be in the same VPC. You
+ // can't specify this parameter in combination with the following parameters:
+ // the CIDR IP address range, the IP protocol, the start of the port range,
+ // and the end of the port range. Creates rules that grant full ICMP, UDP, and
+ // TCP access. To create a rule with a specific IP protocol and port range,
+ // use a set of IP permissions instead.
+ SourceSecurityGroupOwnerID *string `locationName:"SourceSecurityGroupOwnerId" type:"string"`
+
+ // The end of port range for the TCP and UDP protocols, or an ICMP code number.
+ // For the ICMP code number, use -1 to specify all ICMP codes for the ICMP type.
+ ToPort *int64 `type:"integer"`
+
+ metadataAuthorizeSecurityGroupIngressInput `json:"-" xml:"-"`
+}
+
+type metadataAuthorizeSecurityGroupIngressInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AuthorizeSecurityGroupIngressInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AuthorizeSecurityGroupIngressInput) GoString() string {
+ return s.String()
+}
+
+type AuthorizeSecurityGroupIngressOutput struct {
+ metadataAuthorizeSecurityGroupIngressOutput `json:"-" xml:"-"`
+}
+
+type metadataAuthorizeSecurityGroupIngressOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AuthorizeSecurityGroupIngressOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AuthorizeSecurityGroupIngressOutput) GoString() string {
+ return s.String()
+}
+
+// Describes an Availability Zone.
+type AvailabilityZone struct {
+ // Any messages about the Availability Zone.
+ Messages []*AvailabilityZoneMessage `locationName:"messageSet" locationNameList:"item" type:"list"`
+
+ // The name of the region.
+ RegionName *string `locationName:"regionName" type:"string"`
+
+ // The state of the Availability Zone (available | impaired | unavailable).
+ State *string `locationName:"zoneState" type:"string" enum:"AvailabilityZoneState"`
+
+ // The name of the Availability Zone.
+ ZoneName *string `locationName:"zoneName" type:"string"`
+
+ metadataAvailabilityZone `json:"-" xml:"-"`
+}
+
+type metadataAvailabilityZone struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AvailabilityZone) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AvailabilityZone) GoString() string {
+ return s.String()
+}
+
+// Describes a message about an Availability Zone.
+type AvailabilityZoneMessage struct {
+ // The message about the Availability Zone.
+ Message *string `locationName:"message" type:"string"`
+
+ metadataAvailabilityZoneMessage `json:"-" xml:"-"`
+}
+
+type metadataAvailabilityZoneMessage struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s AvailabilityZoneMessage) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s AvailabilityZoneMessage) GoString() string {
+ return s.String()
+}
+
+type BlobAttributeValue struct {
+ Value []byte `locationName:"value" type:"blob"`
+
+ metadataBlobAttributeValue `json:"-" xml:"-"`
+}
+
+type metadataBlobAttributeValue struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s BlobAttributeValue) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s BlobAttributeValue) GoString() string {
+ return s.String()
+}
+
+// Describes a block device mapping.
+type BlockDeviceMapping struct {
+ // The device name exposed to the instance (for example, /dev/sdh or xvdh).
+ DeviceName *string `locationName:"deviceName" type:"string"`
+
+ // Parameters used to automatically set up EBS volumes when the instance is
+ // launched.
+ EBS *EBSBlockDevice `locationName:"ebs" type:"structure"`
+
+ // Suppresses the specified device included in the block device mapping of the
+ // AMI.
+ NoDevice *string `locationName:"noDevice" type:"string"`
+
+ // The virtual device name (ephemeralN). Instance store volumes are numbered
+ // starting from 0. An instance type with 2 available instance store volumes
+ // can specify mappings for ephemeral0 and ephemeral1.The number of available
+ // instance store volumes depends on the instance type. After you connect to
+ // the instance, you must mount the volume.
+ //
+ // Constraints: For M3 instances, you must specify instance store volumes in
+ // the block device mapping for the instance. When you launch an M3 instance,
+ // we ignore any instance store volumes specified in the block device mapping
+ // for the AMI.
+ VirtualName *string `locationName:"virtualName" type:"string"`
+
+ metadataBlockDeviceMapping `json:"-" xml:"-"`
+}
+
+type metadataBlockDeviceMapping struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s BlockDeviceMapping) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s BlockDeviceMapping) GoString() string {
+ return s.String()
+}
+
+type BundleInstanceInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the instance to bundle.
+ //
+ // Type: String
+ //
+ // Default: None
+ //
+ // Required: Yes
+ InstanceID *string `locationName:"InstanceId" type:"string" required:"true"`
+
+ // The bucket in which to store the AMI. You can specify a bucket that you already
+ // own or a new bucket that Amazon EC2 creates on your behalf. If you specify
+ // a bucket that belongs to someone else, Amazon EC2 returns an error.
+ Storage *Storage `type:"structure" required:"true"`
+
+ metadataBundleInstanceInput `json:"-" xml:"-"`
+}
+
+type metadataBundleInstanceInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s BundleInstanceInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s BundleInstanceInput) GoString() string {
+ return s.String()
+}
+
+type BundleInstanceOutput struct {
+ // Information about the bundle task.
+ BundleTask *BundleTask `locationName:"bundleInstanceTask" type:"structure"`
+
+ metadataBundleInstanceOutput `json:"-" xml:"-"`
+}
+
+type metadataBundleInstanceOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s BundleInstanceOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s BundleInstanceOutput) GoString() string {
+ return s.String()
+}
+
+// Describes a bundle task.
+type BundleTask struct {
+ // The ID of the bundle task.
+ BundleID *string `locationName:"bundleId" type:"string"`
+
+ // If the task fails, a description of the error.
+ BundleTaskError *BundleTaskError `locationName:"error" type:"structure"`
+
+ // The ID of the instance associated with this bundle task.
+ InstanceID *string `locationName:"instanceId" type:"string"`
+
+ // The level of task completion, as a percent (for example, 20%).
+ Progress *string `locationName:"progress" type:"string"`
+
+ // The time this task started.
+ StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601"`
+
+ // The state of the task.
+ State *string `locationName:"state" type:"string" enum:"BundleTaskState"`
+
+ // The Amazon S3 storage locations.
+ Storage *Storage `locationName:"storage" type:"structure"`
+
+ // The time of the most recent update for the task.
+ UpdateTime *time.Time `locationName:"updateTime" type:"timestamp" timestampFormat:"iso8601"`
+
+ metadataBundleTask `json:"-" xml:"-"`
+}
+
+type metadataBundleTask struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s BundleTask) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s BundleTask) GoString() string {
+ return s.String()
+}
+
+// Describes an error for BundleInstance.
+type BundleTaskError struct {
+ // The error code.
+ Code *string `locationName:"code" type:"string"`
+
+ // The error message.
+ Message *string `locationName:"message" type:"string"`
+
+ metadataBundleTaskError `json:"-" xml:"-"`
+}
+
+type metadataBundleTaskError struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s BundleTaskError) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s BundleTaskError) GoString() string {
+ return s.String()
+}
+
+type CancelBundleTaskInput struct {
+ // The ID of the bundle task.
+ BundleID *string `locationName:"BundleId" type:"string" required:"true"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ metadataCancelBundleTaskInput `json:"-" xml:"-"`
+}
+
+type metadataCancelBundleTaskInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CancelBundleTaskInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CancelBundleTaskInput) GoString() string {
+ return s.String()
+}
+
+type CancelBundleTaskOutput struct {
+ // Information about the bundle task.
+ BundleTask *BundleTask `locationName:"bundleInstanceTask" type:"structure"`
+
+ metadataCancelBundleTaskOutput `json:"-" xml:"-"`
+}
+
+type metadataCancelBundleTaskOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CancelBundleTaskOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CancelBundleTaskOutput) GoString() string {
+ return s.String()
+}
+
+type CancelConversionTaskInput struct {
+ // The ID of the conversion task.
+ ConversionTaskID *string `locationName:"conversionTaskId" type:"string" required:"true"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The reason for canceling the conversion task.
+ ReasonMessage *string `locationName:"reasonMessage" type:"string"`
+
+ metadataCancelConversionTaskInput `json:"-" xml:"-"`
+}
+
+type metadataCancelConversionTaskInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CancelConversionTaskInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CancelConversionTaskInput) GoString() string {
+ return s.String()
+}
+
+type CancelConversionTaskOutput struct {
+ metadataCancelConversionTaskOutput `json:"-" xml:"-"`
+}
+
+type metadataCancelConversionTaskOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CancelConversionTaskOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CancelConversionTaskOutput) GoString() string {
+ return s.String()
+}
+
+type CancelExportTaskInput struct {
+ // The ID of the export task. This is the ID returned by CreateInstanceExportTask.
+ ExportTaskID *string `locationName:"exportTaskId" type:"string" required:"true"`
+
+ metadataCancelExportTaskInput `json:"-" xml:"-"`
+}
+
+type metadataCancelExportTaskInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CancelExportTaskInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CancelExportTaskInput) GoString() string {
+ return s.String()
+}
+
+type CancelExportTaskOutput struct {
+ metadataCancelExportTaskOutput `json:"-" xml:"-"`
+}
+
+type metadataCancelExportTaskOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CancelExportTaskOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CancelExportTaskOutput) GoString() string {
+ return s.String()
+}
+
+type CancelImportTaskInput struct {
+ // The reason for canceling the task.
+ CancelReason *string `type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // The ID of the import image or import snapshot task to be canceled.
+ ImportTaskID *string `locationName:"ImportTaskId" type:"string"`
+
+ metadataCancelImportTaskInput `json:"-" xml:"-"`
+}
+
+type metadataCancelImportTaskInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CancelImportTaskInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CancelImportTaskInput) GoString() string {
+ return s.String()
+}
+
+type CancelImportTaskOutput struct {
+ // The ID of the task being canceled.
+ ImportTaskID *string `locationName:"importTaskId" type:"string"`
+
+ // The current state of the task being canceled.
+ PreviousState *string `locationName:"previousState" type:"string"`
+
+ // The current state of the task being canceled.
+ State *string `locationName:"state" type:"string"`
+
+ metadataCancelImportTaskOutput `json:"-" xml:"-"`
+}
+
+type metadataCancelImportTaskOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CancelImportTaskOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CancelImportTaskOutput) GoString() string {
+ return s.String()
+}
+
+type CancelReservedInstancesListingInput struct {
+ // The ID of the Reserved Instance listing.
+ ReservedInstancesListingID *string `locationName:"reservedInstancesListingId" type:"string" required:"true"`
+
+ metadataCancelReservedInstancesListingInput `json:"-" xml:"-"`
+}
+
+type metadataCancelReservedInstancesListingInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CancelReservedInstancesListingInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CancelReservedInstancesListingInput) GoString() string {
+ return s.String()
+}
+
+type CancelReservedInstancesListingOutput struct {
+ // The Reserved Instance listing.
+ ReservedInstancesListings []*ReservedInstancesListing `locationName:"reservedInstancesListingsSet" locationNameList:"item" type:"list"`
+
+ metadataCancelReservedInstancesListingOutput `json:"-" xml:"-"`
+}
+
+type metadataCancelReservedInstancesListingOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CancelReservedInstancesListingOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CancelReservedInstancesListingOutput) GoString() string {
+ return s.String()
+}
+
+// Describes a Spot fleet error.
+type CancelSpotFleetRequestsError struct {
+ // The error code.
+ Code *string `locationName:"code" type:"string" required:"true" enum:"CancelBatchErrorCode"`
+
+ // The description for the error code.
+ Message *string `locationName:"message" type:"string" required:"true"`
+
+ metadataCancelSpotFleetRequestsError `json:"-" xml:"-"`
+}
+
+type metadataCancelSpotFleetRequestsError struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CancelSpotFleetRequestsError) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CancelSpotFleetRequestsError) GoString() string {
+ return s.String()
+}
+
+// Describes a Spot fleet request that was not successfully canceled.
+type CancelSpotFleetRequestsErrorItem struct {
+ // The error.
+ Error *CancelSpotFleetRequestsError `locationName:"error" type:"structure" required:"true"`
+
+ // The ID of the Spot fleet request.
+ SpotFleetRequestID *string `locationName:"spotFleetRequestId" type:"string" required:"true"`
+
+ metadataCancelSpotFleetRequestsErrorItem `json:"-" xml:"-"`
+}
+
+type metadataCancelSpotFleetRequestsErrorItem struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CancelSpotFleetRequestsErrorItem) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CancelSpotFleetRequestsErrorItem) GoString() string {
+ return s.String()
+}
+
+// Contains the parameters for CancelSpotFleetRequests.
+type CancelSpotFleetRequestsInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The IDs of the Spot fleet requests.
+ SpotFleetRequestIDs []*string `locationName:"spotFleetRequestId" locationNameList:"item" type:"list" required:"true"`
+
+ // Indicates whether to terminate instances for a Spot fleet request if it is
+ // canceled successfully.
+ TerminateInstances *bool `locationName:"terminateInstances" type:"boolean" required:"true"`
+
+ metadataCancelSpotFleetRequestsInput `json:"-" xml:"-"`
+}
+
+type metadataCancelSpotFleetRequestsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CancelSpotFleetRequestsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CancelSpotFleetRequestsInput) GoString() string {
+ return s.String()
+}
+
+// Contains the output of CancelSpotFleetRequests.
+type CancelSpotFleetRequestsOutput struct {
+ // Information about the Spot fleet requests that are successfully canceled.
+ SuccessfulFleetRequests []*CancelSpotFleetRequestsSuccessItem `locationName:"successfulFleetRequestSet" locationNameList:"item" type:"list"`
+
+ // Information about the Spot fleet requests that are not successfully canceled.
+ UnsuccessfulFleetRequests []*CancelSpotFleetRequestsErrorItem `locationName:"unsuccessfulFleetRequestSet" locationNameList:"item" type:"list"`
+
+ metadataCancelSpotFleetRequestsOutput `json:"-" xml:"-"`
+}
+
+type metadataCancelSpotFleetRequestsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CancelSpotFleetRequestsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CancelSpotFleetRequestsOutput) GoString() string {
+ return s.String()
+}
+
+// Describes a Spot fleet request that was successfully canceled.
+type CancelSpotFleetRequestsSuccessItem struct {
+ // The current state of the Spot fleet request.
+ CurrentSpotFleetRequestState *string `locationName:"currentSpotFleetRequestState" type:"string" required:"true" enum:"BatchState"`
+
+ // The previous state of the Spot fleet request.
+ PreviousSpotFleetRequestState *string `locationName:"previousSpotFleetRequestState" type:"string" required:"true" enum:"BatchState"`
+
+ // The ID of the Spot fleet request.
+ SpotFleetRequestID *string `locationName:"spotFleetRequestId" type:"string" required:"true"`
+
+ metadataCancelSpotFleetRequestsSuccessItem `json:"-" xml:"-"`
+}
+
+type metadataCancelSpotFleetRequestsSuccessItem struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CancelSpotFleetRequestsSuccessItem) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CancelSpotFleetRequestsSuccessItem) GoString() string {
+ return s.String()
+}
+
+// Contains the parameters for CancelSpotInstanceRequests.
+type CancelSpotInstanceRequestsInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more Spot Instance request IDs.
+ SpotInstanceRequestIDs []*string `locationName:"SpotInstanceRequestId" locationNameList:"SpotInstanceRequestId" type:"list" required:"true"`
+
+ metadataCancelSpotInstanceRequestsInput `json:"-" xml:"-"`
+}
+
+type metadataCancelSpotInstanceRequestsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CancelSpotInstanceRequestsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CancelSpotInstanceRequestsInput) GoString() string {
+ return s.String()
+}
+
+// Contains the output of CancelSpotInstanceRequests.
+type CancelSpotInstanceRequestsOutput struct {
+ // One or more Spot Instance requests.
+ CancelledSpotInstanceRequests []*CancelledSpotInstanceRequest `locationName:"spotInstanceRequestSet" locationNameList:"item" type:"list"`
+
+ metadataCancelSpotInstanceRequestsOutput `json:"-" xml:"-"`
+}
+
+type metadataCancelSpotInstanceRequestsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CancelSpotInstanceRequestsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CancelSpotInstanceRequestsOutput) GoString() string {
+ return s.String()
+}
+
+// Describes a request to cancel a Spot Instance.
+type CancelledSpotInstanceRequest struct {
+ // The ID of the Spot Instance request.
+ SpotInstanceRequestID *string `locationName:"spotInstanceRequestId" type:"string"`
+
+ // The state of the Spot Instance request.
+ State *string `locationName:"state" type:"string" enum:"CancelSpotInstanceRequestState"`
+
+ metadataCancelledSpotInstanceRequest `json:"-" xml:"-"`
+}
+
+type metadataCancelledSpotInstanceRequest struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CancelledSpotInstanceRequest) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CancelledSpotInstanceRequest) GoString() string {
+ return s.String()
+}
+
+// Describes a linked EC2-Classic instance.
+type ClassicLinkInstance struct {
+ // A list of security groups.
+ Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"`
+
+ // The ID of the instance.
+ InstanceID *string `locationName:"instanceId" type:"string"`
+
+ // Any tags assigned to the instance.
+ Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
+
+ // The ID of the VPC.
+ VPCID *string `locationName:"vpcId" type:"string"`
+
+ metadataClassicLinkInstance `json:"-" xml:"-"`
+}
+
+type metadataClassicLinkInstance struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ClassicLinkInstance) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ClassicLinkInstance) GoString() string {
+ return s.String()
+}
+
+// Describes the client-specific data.
+type ClientData struct {
+ // A user-defined comment about the disk upload.
+ Comment *string `type:"string"`
+
+ // The time that the disk upload ends.
+ UploadEnd *time.Time `type:"timestamp" timestampFormat:"iso8601"`
+
+ // The size of the uploaded disk image, in GiB.
+ UploadSize *float64 `type:"double"`
+
+ // The time that the disk upload starts.
+ UploadStart *time.Time `type:"timestamp" timestampFormat:"iso8601"`
+
+ metadataClientData `json:"-" xml:"-"`
+}
+
+type metadataClientData struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ClientData) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ClientData) GoString() string {
+ return s.String()
+}
+
+type ConfirmProductInstanceInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the instance.
+ InstanceID *string `locationName:"InstanceId" type:"string" required:"true"`
+
+ // The product code. This must be a product code that you own.
+ ProductCode *string `type:"string" required:"true"`
+
+ metadataConfirmProductInstanceInput `json:"-" xml:"-"`
+}
+
+type metadataConfirmProductInstanceInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ConfirmProductInstanceInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ConfirmProductInstanceInput) GoString() string {
+ return s.String()
+}
+
+type ConfirmProductInstanceOutput struct {
+ // The AWS account ID of the instance owner. This is only present if the product
+ // code is attached to the instance.
+ OwnerID *string `locationName:"ownerId" type:"string"`
+
+ // The return value of the request. Returns true if the specified product code
+ // is owned by the requester and associated with the specified instance.
+ Return *bool `locationName:"return" type:"boolean"`
+
+ metadataConfirmProductInstanceOutput `json:"-" xml:"-"`
+}
+
+type metadataConfirmProductInstanceOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ConfirmProductInstanceOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ConfirmProductInstanceOutput) GoString() string {
+ return s.String()
+}
+
+// Describes a conversion task.
+type ConversionTask struct {
+ // The ID of the conversion task.
+ ConversionTaskID *string `locationName:"conversionTaskId" type:"string" required:"true"`
+
+ // The time when the task expires. If the upload isn't complete before the expiration
+ // time, we automatically cancel the task.
+ ExpirationTime *string `locationName:"expirationTime" type:"string"`
+
+ // If the task is for importing an instance, this contains information about
+ // the import instance task.
+ ImportInstance *ImportInstanceTaskDetails `locationName:"importInstance" type:"structure"`
+
+ // If the task is for importing a volume, this contains information about the
+ // import volume task.
+ ImportVolume *ImportVolumeTaskDetails `locationName:"importVolume" type:"structure"`
+
+ // The state of the conversion task.
+ State *string `locationName:"state" type:"string" required:"true" enum:"ConversionTaskState"`
+
+ // The status message related to the conversion task.
+ StatusMessage *string `locationName:"statusMessage" type:"string"`
+
+ // Any tags assigned to the task.
+ Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
+
+ metadataConversionTask `json:"-" xml:"-"`
+}
+
+type metadataConversionTask struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ConversionTask) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ConversionTask) GoString() string {
+ return s.String()
+}
+
+type CopyImageInput struct {
+ // Unique, case-sensitive identifier you provide to ensure idempotency of the
+ // request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html)
+ // in the Amazon Elastic Compute Cloud User Guide.
+ ClientToken *string `type:"string"`
+
+ // A description for the new AMI in the destination region.
+ Description *string `type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The name of the new AMI in the destination region.
+ Name *string `type:"string" required:"true"`
+
+ // The ID of the AMI to copy.
+ SourceImageID *string `locationName:"SourceImageId" type:"string" required:"true"`
+
+ // The name of the region that contains the AMI to copy.
+ SourceRegion *string `type:"string" required:"true"`
+
+ metadataCopyImageInput `json:"-" xml:"-"`
+}
+
+type metadataCopyImageInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CopyImageInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CopyImageInput) GoString() string {
+ return s.String()
+}
+
+type CopyImageOutput struct {
+ // The ID of the new AMI.
+ ImageID *string `locationName:"imageId" type:"string"`
+
+ metadataCopyImageOutput `json:"-" xml:"-"`
+}
+
+type metadataCopyImageOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CopyImageOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CopyImageOutput) GoString() string {
+ return s.String()
+}
+
+type CopySnapshotInput struct {
+ // A description for the EBS snapshot.
+ Description *string `type:"string"`
+
+ // The destination region to use in the PresignedUrl parameter of a snapshot
+ // copy operation. This parameter is only valid for specifying the destination
+ // region in a PresignedUrl parameter, where it is required.
+ //
+ // CopySnapshot sends the snapshot copy to the regional endpoint that you
+ // send the HTTP request to, such as ec2.us-east-1.amazonaws.com (in the AWS
+ // CLI, this is specified with the --region parameter or the default region
+ // in your AWS configuration file).
+ DestinationRegion *string `locationName:"destinationRegion" type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // Specifies whether the destination snapshot should be encrypted. There is
+ // no way to create an unencrypted snapshot copy from an encrypted snapshot;
+ // however, you can encrypt a copy of an unencrypted snapshot with this flag.
+ // The default CMK for EBS is used unless a non-default AWS Key Management Service
+ // (AWS KMS) CMK is specified with KmsKeyId. For more information, see Amazon
+ // EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html)
+ // in the Amazon Elastic Compute Cloud User Guide.
+ Encrypted *bool `locationName:"encrypted" type:"boolean"`
+
+ // The full ARN of the AWS Key Management Service (AWS KMS) CMK to use when
+ // creating the snapshot copy. This parameter is only required if you want to
+ // use a non-default CMK; if this parameter is not specified, the default CMK
+ // for EBS is used. The ARN contains the arn:aws:kms namespace, followed by
+ // the region of the CMK, the AWS account ID of the CMK owner, the key namespace,
+ // and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef.
+ // The specified CMK must exist in the region that the snapshot is being copied
+ // to. If a KmsKeyId is specified, the Encrypted flag must also be set.
+ KMSKeyID *string `locationName:"kmsKeyId" type:"string"`
+
+ // The pre-signed URL that facilitates copying an encrypted snapshot. This parameter
+ // is only required when copying an encrypted snapshot with the Amazon EC2 Query
+ // API; it is available as an optional parameter in all other cases. The PresignedUrl
+ // should use the snapshot source endpoint, the CopySnapshot action, and include
+ // the SourceRegion, SourceSnapshotId, and DestinationRegion parameters. The
+ // PresignedUrl must be signed using AWS Signature Version 4. Because EBS snapshots
+ // are stored in Amazon S3, the signing algorithm for this parameter uses the
+ // same logic that is described in Authenticating Requests by Using Query Parameters
+ // (AWS Signature Version 4) (http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html)
+ // in the Amazon Simple Storage Service API Reference. An invalid or improperly
+ // signed PresignedUrl will cause the copy operation to fail asynchronously,
+ // and the snapshot will move to an error state.
+ PresignedURL *string `locationName:"presignedUrl" type:"string"`
+
+ // The ID of the region that contains the snapshot to be copied.
+ SourceRegion *string `type:"string" required:"true"`
+
+ // The ID of the EBS snapshot to copy.
+ SourceSnapshotID *string `locationName:"SourceSnapshotId" type:"string" required:"true"`
+
+ metadataCopySnapshotInput `json:"-" xml:"-"`
+}
+
+type metadataCopySnapshotInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CopySnapshotInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CopySnapshotInput) GoString() string {
+ return s.String()
+}
+
+type CopySnapshotOutput struct {
+ // The ID of the new snapshot.
+ SnapshotID *string `locationName:"snapshotId" type:"string"`
+
+ metadataCopySnapshotOutput `json:"-" xml:"-"`
+}
+
+type metadataCopySnapshotOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CopySnapshotOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CopySnapshotOutput) GoString() string {
+ return s.String()
+}
+
+type CreateCustomerGatewayInput struct {
+ // For devices that support BGP, the customer gateway's BGP ASN.
+ //
+ // Default: 65000
+ BGPASN *int64 `locationName:"BgpAsn" type:"integer" required:"true"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The Internet-routable IP address for the customer gateway's outside interface.
+ // The address must be static.
+ PublicIP *string `locationName:"IpAddress" type:"string" required:"true"`
+
+ // The type of VPN connection that this customer gateway supports (ipsec.1).
+ Type *string `type:"string" required:"true" enum:"GatewayType"`
+
+ metadataCreateCustomerGatewayInput `json:"-" xml:"-"`
+}
+
+type metadataCreateCustomerGatewayInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateCustomerGatewayInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateCustomerGatewayInput) GoString() string {
+ return s.String()
+}
+
+type CreateCustomerGatewayOutput struct {
+ // Information about the customer gateway.
+ CustomerGateway *CustomerGateway `locationName:"customerGateway" type:"structure"`
+
+ metadataCreateCustomerGatewayOutput `json:"-" xml:"-"`
+}
+
+type metadataCreateCustomerGatewayOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateCustomerGatewayOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateCustomerGatewayOutput) GoString() string {
+ return s.String()
+}
+
+type CreateDHCPOptionsInput struct {
+ // A DHCP configuration option.
+ DHCPConfigurations []*NewDHCPConfiguration `locationName:"dhcpConfiguration" locationNameList:"item" type:"list" required:"true"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ metadataCreateDHCPOptionsInput `json:"-" xml:"-"`
+}
+
+type metadataCreateDHCPOptionsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateDHCPOptionsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateDHCPOptionsInput) GoString() string {
+ return s.String()
+}
+
+type CreateDHCPOptionsOutput struct {
+ // A set of DHCP options.
+ DHCPOptions *DHCPOptions `locationName:"dhcpOptions" type:"structure"`
+
+ metadataCreateDHCPOptionsOutput `json:"-" xml:"-"`
+}
+
+type metadataCreateDHCPOptionsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateDHCPOptionsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateDHCPOptionsOutput) GoString() string {
+ return s.String()
+}
+
+type CreateFlowLogsInput struct {
+ // Unique, case-sensitive identifier you provide to ensure the idempotency of
+ // the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html).
+ ClientToken *string `type:"string"`
+
+ // The ARN for the IAM role that's used to post flow logs to a CloudWatch Logs
+ // log group.
+ DeliverLogsPermissionARN *string `locationName:"DeliverLogsPermissionArn" type:"string" required:"true"`
+
+ // The name of the CloudWatch log group.
+ LogGroupName *string `type:"string" required:"true"`
+
+ // One or more subnet, network interface, or VPC IDs.
+ ResourceIDs []*string `locationName:"ResourceId" locationNameList:"item" type:"list" required:"true"`
+
+ // The type of resource on which to create the flow log.
+ ResourceType *string `type:"string" required:"true" enum:"FlowLogsResourceType"`
+
+ // The type of traffic to log.
+ TrafficType *string `type:"string" required:"true" enum:"TrafficType"`
+
+ metadataCreateFlowLogsInput `json:"-" xml:"-"`
+}
+
+type metadataCreateFlowLogsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateFlowLogsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateFlowLogsInput) GoString() string {
+ return s.String()
+}
+
+type CreateFlowLogsOutput struct {
+ // Unique, case-sensitive identifier you provide to ensure the idempotency of
+ // the request.
+ ClientToken *string `locationName:"clientToken" type:"string"`
+
+ // The IDs of the flow logs.
+ FlowLogIDs []*string `locationName:"flowLogIdSet" locationNameList:"item" type:"list"`
+
+ // Information about the flow logs that could not be created successfully.
+ Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"`
+
+ metadataCreateFlowLogsOutput `json:"-" xml:"-"`
+}
+
+type metadataCreateFlowLogsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateFlowLogsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateFlowLogsOutput) GoString() string {
+ return s.String()
+}
+
+type CreateImageInput struct {
+ // Information about one or more block device mappings.
+ BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"`
+
+ // A description for the new image.
+ Description *string `locationName:"description" type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the instance.
+ InstanceID *string `locationName:"instanceId" type:"string" required:"true"`
+
+ // A name for the new image.
+ //
+ // Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets
+ // ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('),
+ // at-signs (@), or underscores(_)
+ Name *string `locationName:"name" type:"string" required:"true"`
+
+ // By default, this parameter is set to false, which means Amazon EC2 attempts
+ // to shut down the instance cleanly before image creation and then reboots
+ // the instance. When the parameter is set to true, Amazon EC2 doesn't shut
+ // down the instance before creating the image. When this option is used, file
+ // system integrity on the created image can't be guaranteed.
+ NoReboot *bool `locationName:"noReboot" type:"boolean"`
+
+ metadataCreateImageInput `json:"-" xml:"-"`
+}
+
+type metadataCreateImageInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateImageInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateImageInput) GoString() string {
+ return s.String()
+}
+
+type CreateImageOutput struct {
+ // The ID of the new AMI.
+ ImageID *string `locationName:"imageId" type:"string"`
+
+ metadataCreateImageOutput `json:"-" xml:"-"`
+}
+
+type metadataCreateImageOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateImageOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateImageOutput) GoString() string {
+ return s.String()
+}
+
+type CreateInstanceExportTaskInput struct {
+ // A description for the conversion task or the resource being exported. The
+ // maximum length is 255 bytes.
+ Description *string `locationName:"description" type:"string"`
+
+ // The format and location for an instance export task.
+ ExportToS3Task *ExportToS3TaskSpecification `locationName:"exportToS3" type:"structure"`
+
+ // The ID of the instance.
+ InstanceID *string `locationName:"instanceId" type:"string" required:"true"`
+
+ // The target virtualization environment.
+ TargetEnvironment *string `locationName:"targetEnvironment" type:"string" enum:"ExportEnvironment"`
+
+ metadataCreateInstanceExportTaskInput `json:"-" xml:"-"`
+}
+
+type metadataCreateInstanceExportTaskInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateInstanceExportTaskInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateInstanceExportTaskInput) GoString() string {
+ return s.String()
+}
+
+type CreateInstanceExportTaskOutput struct {
+ // Information about the instance export task.
+ ExportTask *ExportTask `locationName:"exportTask" type:"structure"`
+
+ metadataCreateInstanceExportTaskOutput `json:"-" xml:"-"`
+}
+
+type metadataCreateInstanceExportTaskOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateInstanceExportTaskOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateInstanceExportTaskOutput) GoString() string {
+ return s.String()
+}
+
+type CreateInternetGatewayInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ metadataCreateInternetGatewayInput `json:"-" xml:"-"`
+}
+
+type metadataCreateInternetGatewayInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateInternetGatewayInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateInternetGatewayInput) GoString() string {
+ return s.String()
+}
+
+type CreateInternetGatewayOutput struct {
+ // Information about the Internet gateway.
+ InternetGateway *InternetGateway `locationName:"internetGateway" type:"structure"`
+
+ metadataCreateInternetGatewayOutput `json:"-" xml:"-"`
+}
+
+type metadataCreateInternetGatewayOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateInternetGatewayOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateInternetGatewayOutput) GoString() string {
+ return s.String()
+}
+
+type CreateKeyPairInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // A unique name for the key pair.
+ //
+ // Constraints: Up to 255 ASCII characters
+ KeyName *string `type:"string" required:"true"`
+
+ metadataCreateKeyPairInput `json:"-" xml:"-"`
+}
+
+type metadataCreateKeyPairInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateKeyPairInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateKeyPairInput) GoString() string {
+ return s.String()
+}
+
+// Describes a key pair.
+type CreateKeyPairOutput struct {
+ // The SHA-1 digest of the DER encoded private key.
+ KeyFingerprint *string `locationName:"keyFingerprint" type:"string"`
+
+ // An unencrypted PEM encoded RSA private key.
+ KeyMaterial *string `locationName:"keyMaterial" type:"string"`
+
+ // The name of the key pair.
+ KeyName *string `locationName:"keyName" type:"string"`
+
+ metadataCreateKeyPairOutput `json:"-" xml:"-"`
+}
+
+type metadataCreateKeyPairOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateKeyPairOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateKeyPairOutput) GoString() string {
+ return s.String()
+}
+
+type CreateNetworkACLEntryInput struct {
+ // The network range to allow or deny, in CIDR notation (for example 172.16.0.0/24).
+ CIDRBlock *string `locationName:"cidrBlock" type:"string" required:"true"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // Indicates whether this is an egress rule (rule is applied to traffic leaving
+ // the subnet).
+ Egress *bool `locationName:"egress" type:"boolean" required:"true"`
+
+ // ICMP protocol: The ICMP type and code. Required if specifying ICMP for the
+ // protocol.
+ ICMPTypeCode *ICMPTypeCode `locationName:"Icmp" type:"structure"`
+
+ // The ID of the network ACL.
+ NetworkACLID *string `locationName:"networkAclId" type:"string" required:"true"`
+
+ // TCP or UDP protocols: The range of ports the rule applies to.
+ PortRange *PortRange `locationName:"portRange" type:"structure"`
+
+ // The protocol. A value of -1 means all protocols.
+ Protocol *string `locationName:"protocol" type:"string" required:"true"`
+
+ // Indicates whether to allow or deny the traffic that matches the rule.
+ RuleAction *string `locationName:"ruleAction" type:"string" required:"true" enum:"RuleAction"`
+
+ // The rule number for the entry (for example, 100). ACL entries are processed
+ // in ascending order by rule number.
+ //
+ // Constraints: Positive integer from 1 to 32766
+ RuleNumber *int64 `locationName:"ruleNumber" type:"integer" required:"true"`
+
+ metadataCreateNetworkACLEntryInput `json:"-" xml:"-"`
+}
+
+type metadataCreateNetworkACLEntryInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateNetworkACLEntryInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateNetworkACLEntryInput) GoString() string {
+ return s.String()
+}
+
+type CreateNetworkACLEntryOutput struct {
+ metadataCreateNetworkACLEntryOutput `json:"-" xml:"-"`
+}
+
+type metadataCreateNetworkACLEntryOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateNetworkACLEntryOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateNetworkACLEntryOutput) GoString() string {
+ return s.String()
+}
+
+type CreateNetworkACLInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the VPC.
+ VPCID *string `locationName:"vpcId" type:"string" required:"true"`
+
+ metadataCreateNetworkACLInput `json:"-" xml:"-"`
+}
+
+type metadataCreateNetworkACLInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateNetworkACLInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateNetworkACLInput) GoString() string {
+ return s.String()
+}
+
+type CreateNetworkACLOutput struct {
+ // Information about the network ACL.
+ NetworkACL *NetworkACL `locationName:"networkAcl" type:"structure"`
+
+ metadataCreateNetworkACLOutput `json:"-" xml:"-"`
+}
+
+type metadataCreateNetworkACLOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateNetworkACLOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateNetworkACLOutput) GoString() string {
+ return s.String()
+}
+
+type CreateNetworkInterfaceInput struct {
+ // A description for the network interface.
+ Description *string `locationName:"description" type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The IDs of one or more security groups.
+ Groups []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"`
+
+ // The primary private IP address of the network interface. If you don't specify
+ // an IP address, Amazon EC2 selects one for you from the subnet range. If you
+ // specify an IP address, you cannot indicate any IP addresses specified in
+ // privateIpAddresses as primary (only one IP address can be designated as primary).
+ PrivateIPAddress *string `locationName:"privateIpAddress" type:"string"`
+
+ // One or more private IP addresses.
+ PrivateIPAddresses []*PrivateIPAddressSpecification `locationName:"privateIpAddresses" locationNameList:"item" type:"list"`
+
+ // The number of secondary private IP addresses to assign to a network interface.
+ // When you specify a number of secondary IP addresses, Amazon EC2 selects these
+ // IP addresses within the subnet range. You can't specify this option and specify
+ // more than one private IP address using privateIpAddresses.
+ //
+ // The number of IP addresses you can assign to a network interface varies
+ // by instance type. For more information, see Private IP Addresses Per ENI
+ // Per Instance Type (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI)
+ // in the Amazon Elastic Compute Cloud User Guide.
+ SecondaryPrivateIPAddressCount *int64 `locationName:"secondaryPrivateIpAddressCount" type:"integer"`
+
+ // The ID of the subnet to associate with the network interface.
+ SubnetID *string `locationName:"subnetId" type:"string" required:"true"`
+
+ metadataCreateNetworkInterfaceInput `json:"-" xml:"-"`
+}
+
+type metadataCreateNetworkInterfaceInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateNetworkInterfaceInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateNetworkInterfaceInput) GoString() string {
+ return s.String()
+}
+
+type CreateNetworkInterfaceOutput struct {
+ // Information about the network interface.
+ NetworkInterface *NetworkInterface `locationName:"networkInterface" type:"structure"`
+
+ metadataCreateNetworkInterfaceOutput `json:"-" xml:"-"`
+}
+
+type metadataCreateNetworkInterfaceOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateNetworkInterfaceOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateNetworkInterfaceOutput) GoString() string {
+ return s.String()
+}
+
+type CreatePlacementGroupInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // A name for the placement group.
+ //
+ // Constraints: Up to 255 ASCII characters
+ GroupName *string `locationName:"groupName" type:"string" required:"true"`
+
+ // The placement strategy.
+ Strategy *string `locationName:"strategy" type:"string" required:"true" enum:"PlacementStrategy"`
+
+ metadataCreatePlacementGroupInput `json:"-" xml:"-"`
+}
+
+type metadataCreatePlacementGroupInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreatePlacementGroupInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreatePlacementGroupInput) GoString() string {
+ return s.String()
+}
+
+type CreatePlacementGroupOutput struct {
+ metadataCreatePlacementGroupOutput `json:"-" xml:"-"`
+}
+
+type metadataCreatePlacementGroupOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreatePlacementGroupOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreatePlacementGroupOutput) GoString() string {
+ return s.String()
+}
+
+type CreateReservedInstancesListingInput struct {
+ // Unique, case-sensitive identifier you provide to ensure idempotency of your
+ // listings. This helps avoid duplicate listings. For more information, see
+ // Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string `locationName:"clientToken" type:"string" required:"true"`
+
+ // The number of instances that are a part of a Reserved Instance account to
+ // be listed in the Reserved Instance Marketplace. This number should be less
+ // than or equal to the instance count associated with the Reserved Instance
+ // ID specified in this call.
+ InstanceCount *int64 `locationName:"instanceCount" type:"integer" required:"true"`
+
+ // A list specifying the price of the Reserved Instance for each month remaining
+ // in the Reserved Instance term.
+ PriceSchedules []*PriceScheduleSpecification `locationName:"priceSchedules" locationNameList:"item" type:"list" required:"true"`
+
+ // The ID of the active Reserved Instance.
+ ReservedInstancesID *string `locationName:"reservedInstancesId" type:"string" required:"true"`
+
+ metadataCreateReservedInstancesListingInput `json:"-" xml:"-"`
+}
+
+type metadataCreateReservedInstancesListingInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateReservedInstancesListingInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateReservedInstancesListingInput) GoString() string {
+ return s.String()
+}
+
+type CreateReservedInstancesListingOutput struct {
+ // Information about the Reserved Instances listing.
+ ReservedInstancesListings []*ReservedInstancesListing `locationName:"reservedInstancesListingsSet" locationNameList:"item" type:"list"`
+
+ metadataCreateReservedInstancesListingOutput `json:"-" xml:"-"`
+}
+
+type metadataCreateReservedInstancesListingOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateReservedInstancesListingOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateReservedInstancesListingOutput) GoString() string {
+ return s.String()
+}
+
+type CreateRouteInput struct {
+ // The CIDR address block used for the destination match. Routing decisions
+ // are based on the most specific match.
+ DestinationCIDRBlock *string `locationName:"destinationCidrBlock" type:"string" required:"true"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of an Internet gateway or virtual private gateway attached to your
+ // VPC.
+ GatewayID *string `locationName:"gatewayId" type:"string"`
+
+ // The ID of a NAT instance in your VPC. The operation fails if you specify
+ // an instance ID unless exactly one network interface is attached.
+ InstanceID *string `locationName:"instanceId" type:"string"`
+
+ // The ID of a network interface.
+ NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string"`
+
+ // The ID of the route table for the route.
+ RouteTableID *string `locationName:"routeTableId" type:"string" required:"true"`
+
+ // The ID of a VPC peering connection.
+ VPCPeeringConnectionID *string `locationName:"vpcPeeringConnectionId" type:"string"`
+
+ metadataCreateRouteInput `json:"-" xml:"-"`
+}
+
+type metadataCreateRouteInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateRouteInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateRouteInput) GoString() string {
+ return s.String()
+}
+
+type CreateRouteOutput struct {
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool `locationName:"return" type:"boolean"`
+
+ metadataCreateRouteOutput `json:"-" xml:"-"`
+}
+
+type metadataCreateRouteOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateRouteOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateRouteOutput) GoString() string {
+ return s.String()
+}
+
+type CreateRouteTableInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the VPC.
+ VPCID *string `locationName:"vpcId" type:"string" required:"true"`
+
+ metadataCreateRouteTableInput `json:"-" xml:"-"`
+}
+
+type metadataCreateRouteTableInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateRouteTableInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateRouteTableInput) GoString() string {
+ return s.String()
+}
+
+type CreateRouteTableOutput struct {
+ // Information about the route table.
+ RouteTable *RouteTable `locationName:"routeTable" type:"structure"`
+
+ metadataCreateRouteTableOutput `json:"-" xml:"-"`
+}
+
+type metadataCreateRouteTableOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateRouteTableOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateRouteTableOutput) GoString() string {
+ return s.String()
+}
+
+type CreateSecurityGroupInput struct {
+ // A description for the security group. This is informational only.
+ //
+ // Constraints: Up to 255 characters in length
+ //
+ // Constraints for EC2-Classic: ASCII characters
+ //
+ // Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*
+ Description *string `locationName:"GroupDescription" type:"string" required:"true"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The name of the security group.
+ //
+ // Constraints: Up to 255 characters in length
+ //
+ // Constraints for EC2-Classic: ASCII characters
+ //
+ // Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*
+ GroupName *string `type:"string" required:"true"`
+
+ // [EC2-VPC] The ID of the VPC. Required for EC2-VPC.
+ VPCID *string `locationName:"VpcId" type:"string"`
+
+ metadataCreateSecurityGroupInput `json:"-" xml:"-"`
+}
+
+type metadataCreateSecurityGroupInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateSecurityGroupInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateSecurityGroupInput) GoString() string {
+ return s.String()
+}
+
+type CreateSecurityGroupOutput struct {
+ // The ID of the security group.
+ GroupID *string `locationName:"groupId" type:"string"`
+
+ metadataCreateSecurityGroupOutput `json:"-" xml:"-"`
+}
+
+type metadataCreateSecurityGroupOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateSecurityGroupOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateSecurityGroupOutput) GoString() string {
+ return s.String()
+}
+
+type CreateSnapshotInput struct {
+ // A description for the snapshot.
+ Description *string `type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the EBS volume.
+ VolumeID *string `locationName:"VolumeId" type:"string" required:"true"`
+
+ metadataCreateSnapshotInput `json:"-" xml:"-"`
+}
+
+type metadataCreateSnapshotInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateSnapshotInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateSnapshotInput) GoString() string {
+ return s.String()
+}
+
+// Contains the parameters for CreateSpotDatafeedSubscription.
+type CreateSpotDatafeedSubscriptionInput struct {
+ // The Amazon S3 bucket in which to store the Spot Instance data feed.
+ Bucket *string `locationName:"bucket" type:"string" required:"true"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // A prefix for the data feed file names.
+ Prefix *string `locationName:"prefix" type:"string"`
+
+ metadataCreateSpotDatafeedSubscriptionInput `json:"-" xml:"-"`
+}
+
+type metadataCreateSpotDatafeedSubscriptionInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateSpotDatafeedSubscriptionInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateSpotDatafeedSubscriptionInput) GoString() string {
+ return s.String()
+}
+
+// Contains the output of CreateSpotDatafeedSubscription.
+type CreateSpotDatafeedSubscriptionOutput struct {
+ // The Spot Instance data feed subscription.
+ SpotDatafeedSubscription *SpotDatafeedSubscription `locationName:"spotDatafeedSubscription" type:"structure"`
+
+ metadataCreateSpotDatafeedSubscriptionOutput `json:"-" xml:"-"`
+}
+
+type metadataCreateSpotDatafeedSubscriptionOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateSpotDatafeedSubscriptionOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateSpotDatafeedSubscriptionOutput) GoString() string {
+ return s.String()
+}
+
+type CreateSubnetInput struct {
+ // The Availability Zone for the subnet.
+ //
+ // Default: Amazon EC2 selects one for you (recommended).
+ AvailabilityZone *string `type:"string"`
+
+ // The network range for the subnet, in CIDR notation. For example, 10.0.0.0/24.
+ CIDRBlock *string `locationName:"CidrBlock" type:"string" required:"true"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the VPC.
+ VPCID *string `locationName:"VpcId" type:"string" required:"true"`
+
+ metadataCreateSubnetInput `json:"-" xml:"-"`
+}
+
+type metadataCreateSubnetInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateSubnetInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateSubnetInput) GoString() string {
+ return s.String()
+}
+
+type CreateSubnetOutput struct {
+ // Information about the subnet.
+ Subnet *Subnet `locationName:"subnet" type:"structure"`
+
+ metadataCreateSubnetOutput `json:"-" xml:"-"`
+}
+
+type metadataCreateSubnetOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateSubnetOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateSubnetOutput) GoString() string {
+ return s.String()
+}
+
+type CreateTagsInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The IDs of one or more resources to tag. For example, ami-1a2b3c4d.
+ Resources []*string `locationName:"ResourceId" type:"list" required:"true"`
+
+ // One or more tags. The value parameter is required, but if you don't want
+ // the tag to have a value, specify the parameter with no value, and we set
+ // the value to an empty string.
+ Tags []*Tag `locationName:"Tag" locationNameList:"item" type:"list" required:"true"`
+
+ metadataCreateTagsInput `json:"-" xml:"-"`
+}
+
+type metadataCreateTagsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateTagsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateTagsInput) GoString() string {
+ return s.String()
+}
+
+type CreateTagsOutput struct {
+ metadataCreateTagsOutput `json:"-" xml:"-"`
+}
+
+type metadataCreateTagsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateTagsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateTagsOutput) GoString() string {
+ return s.String()
+}
+
+type CreateVPCEndpointInput struct {
+ // Unique, case-sensitive identifier you provide to ensure the idempotency of
+ // the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string `type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // A policy to attach to the endpoint that controls access to the service. The
+ // policy must be in valid JSON format. If this parameter is not specified,
+ // we attach a default policy that allows full access to the service.
+ PolicyDocument *string `type:"string"`
+
+ // One or more route table IDs.
+ RouteTableIDs []*string `locationName:"RouteTableId" locationNameList:"item" type:"list"`
+
+ // The AWS service name, in the form com.amazonaws.region.service. To get a
+ // list of available services, use the DescribeVpcEndpointServices request.
+ ServiceName *string `type:"string" required:"true"`
+
+ // The ID of the VPC in which the endpoint will be used.
+ VPCID *string `locationName:"VpcId" type:"string" required:"true"`
+
+ metadataCreateVPCEndpointInput `json:"-" xml:"-"`
+}
+
+type metadataCreateVPCEndpointInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateVPCEndpointInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateVPCEndpointInput) GoString() string {
+ return s.String()
+}
+
+type CreateVPCEndpointOutput struct {
+ // Unique, case-sensitive identifier you provide to ensure the idempotency of
+ // the request.
+ ClientToken *string `locationName:"clientToken" type:"string"`
+
+ // Information about the endpoint.
+ VPCEndpoint *VPCEndpoint `locationName:"vpcEndpoint" type:"structure"`
+
+ metadataCreateVPCEndpointOutput `json:"-" xml:"-"`
+}
+
+type metadataCreateVPCEndpointOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateVPCEndpointOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateVPCEndpointOutput) GoString() string {
+ return s.String()
+}
+
+type CreateVPCInput struct {
+ // The network range for the VPC, in CIDR notation. For example, 10.0.0.0/16.
+ CIDRBlock *string `locationName:"CidrBlock" type:"string" required:"true"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The supported tenancy options for instances launched into the VPC. A value
+ // of default means that instances can be launched with any tenancy; a value
+ // of dedicated means all instances launched into the VPC are launched as dedicated
+ // tenancy instances regardless of the tenancy assigned to the instance at launch.
+ // Dedicated tenancy instances run on single-tenant hardware.
+ //
+ // Default: default
+ InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"`
+
+ metadataCreateVPCInput `json:"-" xml:"-"`
+}
+
+type metadataCreateVPCInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateVPCInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateVPCInput) GoString() string {
+ return s.String()
+}
+
+type CreateVPCOutput struct {
+ // Information about the VPC.
+ VPC *VPC `locationName:"vpc" type:"structure"`
+
+ metadataCreateVPCOutput `json:"-" xml:"-"`
+}
+
+type metadataCreateVPCOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateVPCOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateVPCOutput) GoString() string {
+ return s.String()
+}
+
+type CreateVPCPeeringConnectionInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The AWS account ID of the owner of the peer VPC.
+ //
+ // Default: Your AWS account ID
+ PeerOwnerID *string `locationName:"peerOwnerId" type:"string"`
+
+ // The ID of the VPC with which you are creating the VPC peering connection.
+ PeerVPCID *string `locationName:"peerVpcId" type:"string"`
+
+ // The ID of the requester VPC.
+ VPCID *string `locationName:"vpcId" type:"string"`
+
+ metadataCreateVPCPeeringConnectionInput `json:"-" xml:"-"`
+}
+
+type metadataCreateVPCPeeringConnectionInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateVPCPeeringConnectionInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateVPCPeeringConnectionInput) GoString() string {
+ return s.String()
+}
+
+type CreateVPCPeeringConnectionOutput struct {
+ // Information about the VPC peering connection.
+ VPCPeeringConnection *VPCPeeringConnection `locationName:"vpcPeeringConnection" type:"structure"`
+
+ metadataCreateVPCPeeringConnectionOutput `json:"-" xml:"-"`
+}
+
+type metadataCreateVPCPeeringConnectionOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateVPCPeeringConnectionOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateVPCPeeringConnectionOutput) GoString() string {
+ return s.String()
+}
+
+type CreateVPNConnectionInput struct {
+ // The ID of the customer gateway.
+ CustomerGatewayID *string `locationName:"CustomerGatewayId" type:"string" required:"true"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // Indicates whether the VPN connection requires static routes. If you are creating
+ // a VPN connection for a device that does not support BGP, you must specify
+ // true.
+ //
+ // Default: false
+ Options *VPNConnectionOptionsSpecification `locationName:"options" type:"structure"`
+
+ // The type of VPN connection (ipsec.1).
+ Type *string `type:"string" required:"true"`
+
+ // The ID of the virtual private gateway.
+ VPNGatewayID *string `locationName:"VpnGatewayId" type:"string" required:"true"`
+
+ metadataCreateVPNConnectionInput `json:"-" xml:"-"`
+}
+
+type metadataCreateVPNConnectionInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateVPNConnectionInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateVPNConnectionInput) GoString() string {
+ return s.String()
+}
+
+type CreateVPNConnectionOutput struct {
+ // Information about the VPN connection.
+ VPNConnection *VPNConnection `locationName:"vpnConnection" type:"structure"`
+
+ metadataCreateVPNConnectionOutput `json:"-" xml:"-"`
+}
+
+type metadataCreateVPNConnectionOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateVPNConnectionOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateVPNConnectionOutput) GoString() string {
+ return s.String()
+}
+
+type CreateVPNConnectionRouteInput struct {
+ // The CIDR block associated with the local subnet of the customer network.
+ DestinationCIDRBlock *string `locationName:"DestinationCidrBlock" type:"string" required:"true"`
+
+ // The ID of the VPN connection.
+ VPNConnectionID *string `locationName:"VpnConnectionId" type:"string" required:"true"`
+
+ metadataCreateVPNConnectionRouteInput `json:"-" xml:"-"`
+}
+
+type metadataCreateVPNConnectionRouteInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateVPNConnectionRouteInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateVPNConnectionRouteInput) GoString() string {
+ return s.String()
+}
+
+type CreateVPNConnectionRouteOutput struct {
+ metadataCreateVPNConnectionRouteOutput `json:"-" xml:"-"`
+}
+
+type metadataCreateVPNConnectionRouteOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateVPNConnectionRouteOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateVPNConnectionRouteOutput) GoString() string {
+ return s.String()
+}
+
+type CreateVPNGatewayInput struct {
+ // The Availability Zone for the virtual private gateway.
+ AvailabilityZone *string `type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The type of VPN connection this virtual private gateway supports.
+ Type *string `type:"string" required:"true" enum:"GatewayType"`
+
+ metadataCreateVPNGatewayInput `json:"-" xml:"-"`
+}
+
+type metadataCreateVPNGatewayInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateVPNGatewayInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateVPNGatewayInput) GoString() string {
+ return s.String()
+}
+
+type CreateVPNGatewayOutput struct {
+ // Information about the virtual private gateway.
+ VPNGateway *VPNGateway `locationName:"vpnGateway" type:"structure"`
+
+ metadataCreateVPNGatewayOutput `json:"-" xml:"-"`
+}
+
+type metadataCreateVPNGatewayOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateVPNGatewayOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateVPNGatewayOutput) GoString() string {
+ return s.String()
+}
+
+type CreateVolumeInput struct {
+ // The Availability Zone in which to create the volume. Use DescribeAvailabilityZones
+ // to list the Availability Zones that are currently available to you.
+ AvailabilityZone *string `type:"string" required:"true"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // Specifies whether the volume should be encrypted. Encrypted Amazon EBS volumes
+ // may only be attached to instances that support Amazon EBS encryption. Volumes
+ // that are created from encrypted snapshots are automatically encrypted. There
+ // is no way to create an encrypted volume from an unencrypted snapshot or vice
+ // versa. If your AMI uses encrypted volumes, you can only launch it on supported
+ // instance types. For more information, see Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html)
+ // in the Amazon Elastic Compute Cloud User Guide.
+ Encrypted *bool `locationName:"encrypted" type:"boolean"`
+
+ // Only valid for Provisioned IOPS (SSD) volumes. The number of I/O operations
+ // per second (IOPS) to provision for the volume, with a maximum ratio of 30
+ // IOPS/GiB.
+ //
+ // Constraint: Range is 100 to 20000 for Provisioned IOPS (SSD) volumes
+ IOPS *int64 `locationName:"Iops" type:"integer"`
+
+ // The full ARN of the AWS Key Management Service (AWS KMS) customer master
+ // key (CMK) to use when creating the encrypted volume. This parameter is only
+ // required if you want to use a non-default CMK; if this parameter is not specified,
+ // the default CMK for EBS is used. The ARN contains the arn:aws:kms namespace,
+ // followed by the region of the CMK, the AWS account ID of the CMK owner, the
+ // key namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef.
+ // If a KmsKeyId is specified, the Encrypted flag must also be set.
+ KMSKeyID *string `locationName:"KmsKeyId" type:"string"`
+
+ // The size of the volume, in GiBs.
+ //
+ // Constraints: 1-1024 for standard volumes, 1-16384 for gp2 volumes, and 4-16384
+ // for io1 volumes. If you specify a snapshot, the volume size must be equal
+ // to or larger than the snapshot size.
+ //
+ // Default: If you're creating the volume from a snapshot and don't specify
+ // a volume size, the default is the snapshot size.
+ Size *int64 `type:"integer"`
+
+ // The snapshot from which to create the volume.
+ SnapshotID *string `locationName:"SnapshotId" type:"string"`
+
+ // The volume type. This can be gp2 for General Purpose (SSD) volumes, io1 for
+ // Provisioned IOPS (SSD) volumes, or standard for Magnetic volumes.
+ //
+ // Default: standard
+ VolumeType *string `type:"string" enum:"VolumeType"`
+
+ metadataCreateVolumeInput `json:"-" xml:"-"`
+}
+
+type metadataCreateVolumeInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateVolumeInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateVolumeInput) GoString() string {
+ return s.String()
+}
+
+// Describes the user or group to be added or removed from the permissions for
+// a volume.
+type CreateVolumePermission struct {
+ // The specific group that is to be added or removed from a volume's list of
+ // create volume permissions.
+ Group *string `locationName:"group" type:"string" enum:"PermissionGroup"`
+
+ // The specific AWS account ID that is to be added or removed from a volume's
+ // list of create volume permissions.
+ UserID *string `locationName:"userId" type:"string"`
+
+ metadataCreateVolumePermission `json:"-" xml:"-"`
+}
+
+type metadataCreateVolumePermission struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateVolumePermission) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateVolumePermission) GoString() string {
+ return s.String()
+}
+
+// Describes modifications to the permissions for a volume.
+type CreateVolumePermissionModifications struct {
+ // Adds a specific AWS account ID or group to a volume's list of create volume
+ // permissions.
+ Add []*CreateVolumePermission `locationNameList:"item" type:"list"`
+
+ // Removes a specific AWS account ID or group from a volume's list of create
+ // volume permissions.
+ Remove []*CreateVolumePermission `locationNameList:"item" type:"list"`
+
+ metadataCreateVolumePermissionModifications `json:"-" xml:"-"`
+}
+
+type metadataCreateVolumePermissionModifications struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CreateVolumePermissionModifications) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CreateVolumePermissionModifications) GoString() string {
+ return s.String()
+}
+
+// Describes a customer gateway.
+type CustomerGateway struct {
+ // The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number
+ // (ASN).
+ BGPASN *string `locationName:"bgpAsn" type:"string"`
+
+ // The ID of the customer gateway.
+ CustomerGatewayID *string `locationName:"customerGatewayId" type:"string"`
+
+ // The Internet-routable IP address of the customer gateway's outside interface.
+ IPAddress *string `locationName:"ipAddress" type:"string"`
+
+ // The current state of the customer gateway (pending | available | deleting
+ // | deleted).
+ State *string `locationName:"state" type:"string"`
+
+ // Any tags assigned to the customer gateway.
+ Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
+
+ // The type of VPN connection the customer gateway supports (ipsec.1).
+ Type *string `locationName:"type" type:"string"`
+
+ metadataCustomerGateway `json:"-" xml:"-"`
+}
+
+type metadataCustomerGateway struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s CustomerGateway) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s CustomerGateway) GoString() string {
+ return s.String()
+}
+
+// Describes a DHCP configuration option.
+type DHCPConfiguration struct {
+ // The name of a DHCP option.
+ Key *string `locationName:"key" type:"string"`
+
+ // One or more values for the DHCP option.
+ Values []*AttributeValue `locationName:"valueSet" locationNameList:"item" type:"list"`
+
+ metadataDHCPConfiguration `json:"-" xml:"-"`
+}
+
+type metadataDHCPConfiguration struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DHCPConfiguration) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DHCPConfiguration) GoString() string {
+ return s.String()
+}
+
+// Describes a set of DHCP options.
+type DHCPOptions struct {
+ // One or more DHCP options in the set.
+ DHCPConfigurations []*DHCPConfiguration `locationName:"dhcpConfigurationSet" locationNameList:"item" type:"list"`
+
+ // The ID of the set of DHCP options.
+ DHCPOptionsID *string `locationName:"dhcpOptionsId" type:"string"`
+
+ // Any tags assigned to the DHCP options set.
+ Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
+
+ metadataDHCPOptions `json:"-" xml:"-"`
+}
+
+type metadataDHCPOptions struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DHCPOptions) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DHCPOptions) GoString() string {
+ return s.String()
+}
+
+type DeleteCustomerGatewayInput struct {
+ // The ID of the customer gateway.
+ CustomerGatewayID *string `locationName:"CustomerGatewayId" type:"string" required:"true"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ metadataDeleteCustomerGatewayInput `json:"-" xml:"-"`
+}
+
+type metadataDeleteCustomerGatewayInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteCustomerGatewayInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteCustomerGatewayInput) GoString() string {
+ return s.String()
+}
+
+type DeleteCustomerGatewayOutput struct {
+ metadataDeleteCustomerGatewayOutput `json:"-" xml:"-"`
+}
+
+type metadataDeleteCustomerGatewayOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteCustomerGatewayOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteCustomerGatewayOutput) GoString() string {
+ return s.String()
+}
+
+type DeleteDHCPOptionsInput struct {
+ // The ID of the DHCP options set.
+ DHCPOptionsID *string `locationName:"DhcpOptionsId" type:"string" required:"true"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ metadataDeleteDHCPOptionsInput `json:"-" xml:"-"`
+}
+
+type metadataDeleteDHCPOptionsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteDHCPOptionsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteDHCPOptionsInput) GoString() string {
+ return s.String()
+}
+
+type DeleteDHCPOptionsOutput struct {
+ metadataDeleteDHCPOptionsOutput `json:"-" xml:"-"`
+}
+
+type metadataDeleteDHCPOptionsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteDHCPOptionsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteDHCPOptionsOutput) GoString() string {
+ return s.String()
+}
+
+type DeleteFlowLogsInput struct {
+ // One or more flow log IDs.
+ FlowLogIDs []*string `locationName:"FlowLogId" locationNameList:"item" type:"list" required:"true"`
+
+ metadataDeleteFlowLogsInput `json:"-" xml:"-"`
+}
+
+type metadataDeleteFlowLogsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteFlowLogsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteFlowLogsInput) GoString() string {
+ return s.String()
+}
+
+type DeleteFlowLogsOutput struct {
+ // Information about the flow logs that could not be deleted successfully.
+ Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"`
+
+ metadataDeleteFlowLogsOutput `json:"-" xml:"-"`
+}
+
+type metadataDeleteFlowLogsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteFlowLogsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteFlowLogsOutput) GoString() string {
+ return s.String()
+}
+
+type DeleteInternetGatewayInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the Internet gateway.
+ InternetGatewayID *string `locationName:"internetGatewayId" type:"string" required:"true"`
+
+ metadataDeleteInternetGatewayInput `json:"-" xml:"-"`
+}
+
+type metadataDeleteInternetGatewayInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteInternetGatewayInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteInternetGatewayInput) GoString() string {
+ return s.String()
+}
+
+type DeleteInternetGatewayOutput struct {
+ metadataDeleteInternetGatewayOutput `json:"-" xml:"-"`
+}
+
+type metadataDeleteInternetGatewayOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteInternetGatewayOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteInternetGatewayOutput) GoString() string {
+ return s.String()
+}
+
+type DeleteKeyPairInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The name of the key pair.
+ KeyName *string `type:"string" required:"true"`
+
+ metadataDeleteKeyPairInput `json:"-" xml:"-"`
+}
+
+type metadataDeleteKeyPairInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteKeyPairInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteKeyPairInput) GoString() string {
+ return s.String()
+}
+
+type DeleteKeyPairOutput struct {
+ metadataDeleteKeyPairOutput `json:"-" xml:"-"`
+}
+
+type metadataDeleteKeyPairOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteKeyPairOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteKeyPairOutput) GoString() string {
+ return s.String()
+}
+
+type DeleteNetworkACLEntryInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // Indicates whether the rule is an egress rule.
+ Egress *bool `locationName:"egress" type:"boolean" required:"true"`
+
+ // The ID of the network ACL.
+ NetworkACLID *string `locationName:"networkAclId" type:"string" required:"true"`
+
+ // The rule number of the entry to delete.
+ RuleNumber *int64 `locationName:"ruleNumber" type:"integer" required:"true"`
+
+ metadataDeleteNetworkACLEntryInput `json:"-" xml:"-"`
+}
+
+type metadataDeleteNetworkACLEntryInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteNetworkACLEntryInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteNetworkACLEntryInput) GoString() string {
+ return s.String()
+}
+
+type DeleteNetworkACLEntryOutput struct {
+ metadataDeleteNetworkACLEntryOutput `json:"-" xml:"-"`
+}
+
+type metadataDeleteNetworkACLEntryOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteNetworkACLEntryOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteNetworkACLEntryOutput) GoString() string {
+ return s.String()
+}
+
+type DeleteNetworkACLInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the network ACL.
+ NetworkACLID *string `locationName:"networkAclId" type:"string" required:"true"`
+
+ metadataDeleteNetworkACLInput `json:"-" xml:"-"`
+}
+
+type metadataDeleteNetworkACLInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteNetworkACLInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteNetworkACLInput) GoString() string {
+ return s.String()
+}
+
+type DeleteNetworkACLOutput struct {
+ metadataDeleteNetworkACLOutput `json:"-" xml:"-"`
+}
+
+type metadataDeleteNetworkACLOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteNetworkACLOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteNetworkACLOutput) GoString() string {
+ return s.String()
+}
+
+type DeleteNetworkInterfaceInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the network interface.
+ NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string" required:"true"`
+
+ metadataDeleteNetworkInterfaceInput `json:"-" xml:"-"`
+}
+
+type metadataDeleteNetworkInterfaceInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteNetworkInterfaceInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteNetworkInterfaceInput) GoString() string {
+ return s.String()
+}
+
+type DeleteNetworkInterfaceOutput struct {
+ metadataDeleteNetworkInterfaceOutput `json:"-" xml:"-"`
+}
+
+type metadataDeleteNetworkInterfaceOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteNetworkInterfaceOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteNetworkInterfaceOutput) GoString() string {
+ return s.String()
+}
+
+type DeletePlacementGroupInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The name of the placement group.
+ GroupName *string `locationName:"groupName" type:"string" required:"true"`
+
+ metadataDeletePlacementGroupInput `json:"-" xml:"-"`
+}
+
+type metadataDeletePlacementGroupInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeletePlacementGroupInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeletePlacementGroupInput) GoString() string {
+ return s.String()
+}
+
+type DeletePlacementGroupOutput struct {
+ metadataDeletePlacementGroupOutput `json:"-" xml:"-"`
+}
+
+type metadataDeletePlacementGroupOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeletePlacementGroupOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeletePlacementGroupOutput) GoString() string {
+ return s.String()
+}
+
+type DeleteRouteInput struct {
+ // The CIDR range for the route. The value you specify must match the CIDR for
+ // the route exactly.
+ DestinationCIDRBlock *string `locationName:"destinationCidrBlock" type:"string" required:"true"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the route table.
+ RouteTableID *string `locationName:"routeTableId" type:"string" required:"true"`
+
+ metadataDeleteRouteInput `json:"-" xml:"-"`
+}
+
+type metadataDeleteRouteInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteRouteInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteRouteInput) GoString() string {
+ return s.String()
+}
+
+type DeleteRouteOutput struct {
+ metadataDeleteRouteOutput `json:"-" xml:"-"`
+}
+
+type metadataDeleteRouteOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteRouteOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteRouteOutput) GoString() string {
+ return s.String()
+}
+
+type DeleteRouteTableInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the route table.
+ RouteTableID *string `locationName:"routeTableId" type:"string" required:"true"`
+
+ metadataDeleteRouteTableInput `json:"-" xml:"-"`
+}
+
+type metadataDeleteRouteTableInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteRouteTableInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteRouteTableInput) GoString() string {
+ return s.String()
+}
+
+type DeleteRouteTableOutput struct {
+ metadataDeleteRouteTableOutput `json:"-" xml:"-"`
+}
+
+type metadataDeleteRouteTableOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteRouteTableOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteRouteTableOutput) GoString() string {
+ return s.String()
+}
+
+type DeleteSecurityGroupInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the security group. Required for a nondefault VPC.
+ GroupID *string `locationName:"GroupId" type:"string"`
+
+ // [EC2-Classic, default VPC] The name of the security group. You can specify
+ // either the security group name or the security group ID.
+ GroupName *string `type:"string"`
+
+ metadataDeleteSecurityGroupInput `json:"-" xml:"-"`
+}
+
+type metadataDeleteSecurityGroupInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteSecurityGroupInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteSecurityGroupInput) GoString() string {
+ return s.String()
+}
+
+type DeleteSecurityGroupOutput struct {
+ metadataDeleteSecurityGroupOutput `json:"-" xml:"-"`
+}
+
+type metadataDeleteSecurityGroupOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteSecurityGroupOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteSecurityGroupOutput) GoString() string {
+ return s.String()
+}
+
+type DeleteSnapshotInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the EBS snapshot.
+ SnapshotID *string `locationName:"SnapshotId" type:"string" required:"true"`
+
+ metadataDeleteSnapshotInput `json:"-" xml:"-"`
+}
+
+type metadataDeleteSnapshotInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteSnapshotInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteSnapshotInput) GoString() string {
+ return s.String()
+}
+
+type DeleteSnapshotOutput struct {
+ metadataDeleteSnapshotOutput `json:"-" xml:"-"`
+}
+
+type metadataDeleteSnapshotOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteSnapshotOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteSnapshotOutput) GoString() string {
+ return s.String()
+}
+
+// Contains the parameters for DeleteSpotDatafeedSubscription.
+type DeleteSpotDatafeedSubscriptionInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ metadataDeleteSpotDatafeedSubscriptionInput `json:"-" xml:"-"`
+}
+
+type metadataDeleteSpotDatafeedSubscriptionInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteSpotDatafeedSubscriptionInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteSpotDatafeedSubscriptionInput) GoString() string {
+ return s.String()
+}
+
+type DeleteSpotDatafeedSubscriptionOutput struct {
+ metadataDeleteSpotDatafeedSubscriptionOutput `json:"-" xml:"-"`
+}
+
+type metadataDeleteSpotDatafeedSubscriptionOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteSpotDatafeedSubscriptionOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteSpotDatafeedSubscriptionOutput) GoString() string {
+ return s.String()
+}
+
+type DeleteSubnetInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the subnet.
+ SubnetID *string `locationName:"SubnetId" type:"string" required:"true"`
+
+ metadataDeleteSubnetInput `json:"-" xml:"-"`
+}
+
+type metadataDeleteSubnetInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteSubnetInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteSubnetInput) GoString() string {
+ return s.String()
+}
+
+type DeleteSubnetOutput struct {
+ metadataDeleteSubnetOutput `json:"-" xml:"-"`
+}
+
+type metadataDeleteSubnetOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteSubnetOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteSubnetOutput) GoString() string {
+ return s.String()
+}
+
+type DeleteTagsInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the resource. For example, ami-1a2b3c4d. You can specify more than
+ // one resource ID.
+ Resources []*string `locationName:"resourceId" type:"list" required:"true"`
+
+ // One or more tags to delete. If you omit the value parameter, we delete the
+ // tag regardless of its value. If you specify this parameter with an empty
+ // string as the value, we delete the key only if its value is an empty string.
+ Tags []*Tag `locationName:"tag" locationNameList:"item" type:"list"`
+
+ metadataDeleteTagsInput `json:"-" xml:"-"`
+}
+
+type metadataDeleteTagsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteTagsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteTagsInput) GoString() string {
+ return s.String()
+}
+
+type DeleteTagsOutput struct {
+ metadataDeleteTagsOutput `json:"-" xml:"-"`
+}
+
+type metadataDeleteTagsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteTagsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteTagsOutput) GoString() string {
+ return s.String()
+}
+
+type DeleteVPCEndpointsInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // One or more endpoint IDs.
+ VPCEndpointIDs []*string `locationName:"VpcEndpointId" locationNameList:"item" type:"list" required:"true"`
+
+ metadataDeleteVPCEndpointsInput `json:"-" xml:"-"`
+}
+
+type metadataDeleteVPCEndpointsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteVPCEndpointsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteVPCEndpointsInput) GoString() string {
+ return s.String()
+}
+
+type DeleteVPCEndpointsOutput struct {
+ // Information about the endpoints that were not successfully deleted.
+ Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"`
+
+ metadataDeleteVPCEndpointsOutput `json:"-" xml:"-"`
+}
+
+type metadataDeleteVPCEndpointsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteVPCEndpointsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteVPCEndpointsOutput) GoString() string {
+ return s.String()
+}
+
+type DeleteVPCInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the VPC.
+ VPCID *string `locationName:"VpcId" type:"string" required:"true"`
+
+ metadataDeleteVPCInput `json:"-" xml:"-"`
+}
+
+type metadataDeleteVPCInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteVPCInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteVPCInput) GoString() string {
+ return s.String()
+}
+
+type DeleteVPCOutput struct {
+ metadataDeleteVPCOutput `json:"-" xml:"-"`
+}
+
+type metadataDeleteVPCOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteVPCOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteVPCOutput) GoString() string {
+ return s.String()
+}
+
+type DeleteVPCPeeringConnectionInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the VPC peering connection.
+ VPCPeeringConnectionID *string `locationName:"vpcPeeringConnectionId" type:"string" required:"true"`
+
+ metadataDeleteVPCPeeringConnectionInput `json:"-" xml:"-"`
+}
+
+type metadataDeleteVPCPeeringConnectionInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteVPCPeeringConnectionInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteVPCPeeringConnectionInput) GoString() string {
+ return s.String()
+}
+
+type DeleteVPCPeeringConnectionOutput struct {
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool `locationName:"return" type:"boolean"`
+
+ metadataDeleteVPCPeeringConnectionOutput `json:"-" xml:"-"`
+}
+
+type metadataDeleteVPCPeeringConnectionOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteVPCPeeringConnectionOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteVPCPeeringConnectionOutput) GoString() string {
+ return s.String()
+}
+
+type DeleteVPNConnectionInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the VPN connection.
+ VPNConnectionID *string `locationName:"VpnConnectionId" type:"string" required:"true"`
+
+ metadataDeleteVPNConnectionInput `json:"-" xml:"-"`
+}
+
+type metadataDeleteVPNConnectionInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteVPNConnectionInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteVPNConnectionInput) GoString() string {
+ return s.String()
+}
+
+type DeleteVPNConnectionOutput struct {
+ metadataDeleteVPNConnectionOutput `json:"-" xml:"-"`
+}
+
+type metadataDeleteVPNConnectionOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteVPNConnectionOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteVPNConnectionOutput) GoString() string {
+ return s.String()
+}
+
+type DeleteVPNConnectionRouteInput struct {
+ // The CIDR block associated with the local subnet of the customer network.
+ DestinationCIDRBlock *string `locationName:"DestinationCidrBlock" type:"string" required:"true"`
+
+ // The ID of the VPN connection.
+ VPNConnectionID *string `locationName:"VpnConnectionId" type:"string" required:"true"`
+
+ metadataDeleteVPNConnectionRouteInput `json:"-" xml:"-"`
+}
+
+type metadataDeleteVPNConnectionRouteInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteVPNConnectionRouteInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteVPNConnectionRouteInput) GoString() string {
+ return s.String()
+}
+
+type DeleteVPNConnectionRouteOutput struct {
+ metadataDeleteVPNConnectionRouteOutput `json:"-" xml:"-"`
+}
+
+type metadataDeleteVPNConnectionRouteOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteVPNConnectionRouteOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteVPNConnectionRouteOutput) GoString() string {
+ return s.String()
+}
+
+type DeleteVPNGatewayInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the virtual private gateway.
+ VPNGatewayID *string `locationName:"VpnGatewayId" type:"string" required:"true"`
+
+ metadataDeleteVPNGatewayInput `json:"-" xml:"-"`
+}
+
+type metadataDeleteVPNGatewayInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteVPNGatewayInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteVPNGatewayInput) GoString() string {
+ return s.String()
+}
+
+type DeleteVPNGatewayOutput struct {
+ metadataDeleteVPNGatewayOutput `json:"-" xml:"-"`
+}
+
+type metadataDeleteVPNGatewayOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteVPNGatewayOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteVPNGatewayOutput) GoString() string {
+ return s.String()
+}
+
+type DeleteVolumeInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the volume.
+ VolumeID *string `locationName:"VolumeId" type:"string" required:"true"`
+
+ metadataDeleteVolumeInput `json:"-" xml:"-"`
+}
+
+type metadataDeleteVolumeInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteVolumeInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteVolumeInput) GoString() string {
+ return s.String()
+}
+
+type DeleteVolumeOutput struct {
+ metadataDeleteVolumeOutput `json:"-" xml:"-"`
+}
+
+type metadataDeleteVolumeOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeleteVolumeOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeleteVolumeOutput) GoString() string {
+ return s.String()
+}
+
+type DeregisterImageInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the AMI.
+ ImageID *string `locationName:"ImageId" type:"string" required:"true"`
+
+ metadataDeregisterImageInput `json:"-" xml:"-"`
+}
+
+type metadataDeregisterImageInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeregisterImageInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeregisterImageInput) GoString() string {
+ return s.String()
+}
+
+type DeregisterImageOutput struct {
+ metadataDeregisterImageOutput `json:"-" xml:"-"`
+}
+
+type metadataDeregisterImageOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DeregisterImageOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DeregisterImageOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeAccountAttributesInput struct {
+ // One or more account attribute names.
+ AttributeNames []*string `locationName:"attributeName" locationNameList:"attributeName" type:"list"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ metadataDescribeAccountAttributesInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeAccountAttributesInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeAccountAttributesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeAccountAttributesInput) GoString() string {
+ return s.String()
+}
+
+type DescribeAccountAttributesOutput struct {
+ // Information about one or more account attributes.
+ AccountAttributes []*AccountAttribute `locationName:"accountAttributeSet" locationNameList:"item" type:"list"`
+
+ metadataDescribeAccountAttributesOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeAccountAttributesOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeAccountAttributesOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeAccountAttributesOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeAddressesInput struct {
+ // [EC2-VPC] One or more allocation IDs.
+ //
+ // Default: Describes all your Elastic IP addresses.
+ AllocationIDs []*string `locationName:"AllocationId" locationNameList:"AllocationId" type:"list"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters. Filter names and values are case-sensitive.
+ //
+ // allocation-id - [EC2-VPC] The allocation ID for the address.
+ //
+ // association-id - [EC2-VPC] The association ID for the address.
+ //
+ // domain - Indicates whether the address is for use in EC2-Classic (standard)
+ // or in a VPC (vpc).
+ //
+ // instance-id - The ID of the instance the address is associated with, if
+ // any.
+ //
+ // network-interface-id - [EC2-VPC] The ID of the network interface that
+ // the address is associated with, if any.
+ //
+ // network-interface-owner-id - The AWS account ID of the owner.
+ //
+ // private-ip-address - [EC2-VPC] The private IP address associated with
+ // the Elastic IP address.
+ //
+ // public-ip - The Elastic IP address.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // [EC2-Classic] One or more Elastic IP addresses.
+ //
+ // Default: Describes all your Elastic IP addresses.
+ PublicIPs []*string `locationName:"PublicIp" locationNameList:"PublicIp" type:"list"`
+
+ metadataDescribeAddressesInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeAddressesInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeAddressesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeAddressesInput) GoString() string {
+ return s.String()
+}
+
+type DescribeAddressesOutput struct {
+ // Information about one or more Elastic IP addresses.
+ Addresses []*Address `locationName:"addressesSet" locationNameList:"item" type:"list"`
+
+ metadataDescribeAddressesOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeAddressesOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeAddressesOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeAddressesOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeAvailabilityZonesInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // message - Information about the Availability Zone.
+ //
+ // region-name - The name of the region for the Availability Zone (for example,
+ // us-east-1).
+ //
+ // state - The state of the Availability Zone (available | impaired | unavailable).
+ //
+ // zone-name - The name of the Availability Zone (for example, us-east-1a).
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // The names of one or more Availability Zones.
+ ZoneNames []*string `locationName:"ZoneName" locationNameList:"ZoneName" type:"list"`
+
+ metadataDescribeAvailabilityZonesInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeAvailabilityZonesInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeAvailabilityZonesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeAvailabilityZonesInput) GoString() string {
+ return s.String()
+}
+
+type DescribeAvailabilityZonesOutput struct {
+ // Information about one or more Availability Zones.
+ AvailabilityZones []*AvailabilityZone `locationName:"availabilityZoneInfo" locationNameList:"item" type:"list"`
+
+ metadataDescribeAvailabilityZonesOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeAvailabilityZonesOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeAvailabilityZonesOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeAvailabilityZonesOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeBundleTasksInput struct {
+ // One or more bundle task IDs.
+ //
+ // Default: Describes all your bundle tasks.
+ BundleIDs []*string `locationName:"BundleId" locationNameList:"BundleId" type:"list"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // bundle-id - The ID of the bundle task.
+ //
+ // error-code - If the task failed, the error code returned.
+ //
+ // error-message - If the task failed, the error message returned.
+ //
+ // instance-id - The ID of the instance.
+ //
+ // progress - The level of task completion, as a percentage (for example,
+ // 20%).
+ //
+ // s3-bucket - The Amazon S3 bucket to store the AMI.
+ //
+ // s3-prefix - The beginning of the AMI name.
+ //
+ // start-time - The time the task started (for example, 2013-09-15T17:15:20.000Z).
+ //
+ // state - The state of the task (pending | waiting-for-shutdown | bundling
+ // | storing | cancelling | complete | failed).
+ //
+ // update-time - The time of the most recent update for the task.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ metadataDescribeBundleTasksInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeBundleTasksInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeBundleTasksInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeBundleTasksInput) GoString() string {
+ return s.String()
+}
+
+type DescribeBundleTasksOutput struct {
+ // Information about one or more bundle tasks.
+ BundleTasks []*BundleTask `locationName:"bundleInstanceTasksSet" locationNameList:"item" type:"list"`
+
+ metadataDescribeBundleTasksOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeBundleTasksOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeBundleTasksOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeBundleTasksOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeClassicLinkInstancesInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // group-id - The ID of a VPC security group that's associated with the instance.
+ //
+ // instance-id - The ID of the instance.
+ //
+ // tag:key=value - The key/value combination of a tag assigned to the resource.
+ //
+ // tag-key - The key of a tag assigned to the resource. This filter is independent
+ // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
+ // and the filter "tag-value=X", you get any resources assigned both the tag
+ // key Purpose (regardless of what the tag's value is), and the tag value X
+ // (regardless of what the tag's key is). If you want to list only resources
+ // where Purpose is X, see the tag:key=value filter.
+ //
+ // tag-value - The value of a tag assigned to the resource. This filter is
+ // independent of the tag-key filter.
+ //
+ // vpc-id - The ID of the VPC that the instance is linked to.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // One or more instance IDs. Must be instances linked to a VPC through ClassicLink.
+ InstanceIDs []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list"`
+
+ // The maximum number of results to return for the request in a single page.
+ // The remaining results of the initial request can be seen by sending another
+ // request with the returned NextToken value. This value can be between 5 and
+ // 1000; if MaxResults is given a value larger than 1000, only 1000 results
+ // are returned. You cannot specify this parameter and the instance IDs parameter
+ // in the same request.
+ //
+ // Constraint: If the value is greater than 1000, we return only 1000 items.
+ MaxResults *int64 `locationName:"maxResults" type:"integer"`
+
+ // The token to retrieve the next page of results.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ metadataDescribeClassicLinkInstancesInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeClassicLinkInstancesInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeClassicLinkInstancesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeClassicLinkInstancesInput) GoString() string {
+ return s.String()
+}
+
+type DescribeClassicLinkInstancesOutput struct {
+ // Information about one or more linked EC2-Classic instances.
+ Instances []*ClassicLinkInstance `locationName:"instancesSet" locationNameList:"item" type:"list"`
+
+ // The token to use to retrieve the next page of results. This value is null
+ // when there are no more results to return.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ metadataDescribeClassicLinkInstancesOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeClassicLinkInstancesOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeClassicLinkInstancesOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeClassicLinkInstancesOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeConversionTasksInput struct {
+ // One or more conversion task IDs.
+ ConversionTaskIDs []*string `locationName:"conversionTaskId" locationNameList:"item" type:"list"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ Filters []*Filter `locationName:"filter" locationNameList:"Filter" type:"list"`
+
+ metadataDescribeConversionTasksInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeConversionTasksInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeConversionTasksInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeConversionTasksInput) GoString() string {
+ return s.String()
+}
+
+type DescribeConversionTasksOutput struct {
+ // Information about the conversion tasks.
+ ConversionTasks []*ConversionTask `locationName:"conversionTasks" locationNameList:"item" type:"list"`
+
+ metadataDescribeConversionTasksOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeConversionTasksOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeConversionTasksOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeConversionTasksOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeCustomerGatewaysInput struct {
+ // One or more customer gateway IDs.
+ //
+ // Default: Describes all your customer gateways.
+ CustomerGatewayIDs []*string `locationName:"CustomerGatewayId" locationNameList:"CustomerGatewayId" type:"list"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // bgp-asn - The customer gateway's Border Gateway Protocol (BGP) Autonomous
+ // System Number (ASN).
+ //
+ // customer-gateway-id - The ID of the customer gateway.
+ //
+ // ip-address - The IP address of the customer gateway's Internet-routable
+ // external interface.
+ //
+ // state - The state of the customer gateway (pending | available | deleting
+ // | deleted).
+ //
+ // type - The type of customer gateway. Currently, the only supported type
+ // is ipsec.1.
+ //
+ // tag:key=value - The key/value combination of a tag assigned to the resource.
+ //
+ // tag-key - The key of a tag assigned to the resource. This filter is independent
+ // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
+ // and the filter "tag-value=X", you get any resources assigned both the tag
+ // key Purpose (regardless of what the tag's value is), and the tag value X
+ // (regardless of what the tag's key is). If you want to list only resources
+ // where Purpose is X, see the tag:key=value filter.
+ //
+ // tag-value - The value of a tag assigned to the resource. This filter is
+ // independent of the tag-key filter.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ metadataDescribeCustomerGatewaysInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeCustomerGatewaysInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeCustomerGatewaysInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeCustomerGatewaysInput) GoString() string {
+ return s.String()
+}
+
+type DescribeCustomerGatewaysOutput struct {
+ // Information about one or more customer gateways.
+ CustomerGateways []*CustomerGateway `locationName:"customerGatewaySet" locationNameList:"item" type:"list"`
+
+ metadataDescribeCustomerGatewaysOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeCustomerGatewaysOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeCustomerGatewaysOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeCustomerGatewaysOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeDHCPOptionsInput struct {
+ // The IDs of one or more DHCP options sets.
+ //
+ // Default: Describes all your DHCP options sets.
+ DHCPOptionsIDs []*string `locationName:"DhcpOptionsId" locationNameList:"DhcpOptionsId" type:"list"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // dhcp-options-id - The ID of a set of DHCP options.
+ //
+ // key - The key for one of the options (for example, domain-name).
+ //
+ // value - The value for one of the options.
+ //
+ // tag:key=value - The key/value combination of a tag assigned to the resource.
+ //
+ // tag-key - The key of a tag assigned to the resource. This filter is independent
+ // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
+ // and the filter "tag-value=X", you get any resources assigned both the tag
+ // key Purpose (regardless of what the tag's value is), and the tag value X
+ // (regardless of what the tag's key is). If you want to list only resources
+ // where Purpose is X, see the tag:key=value filter.
+ //
+ // tag-value - The value of a tag assigned to the resource. This filter is
+ // independent of the tag-key filter.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ metadataDescribeDHCPOptionsInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeDHCPOptionsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeDHCPOptionsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeDHCPOptionsInput) GoString() string {
+ return s.String()
+}
+
+type DescribeDHCPOptionsOutput struct {
+ // Information about one or more DHCP options sets.
+ DHCPOptions []*DHCPOptions `locationName:"dhcpOptionsSet" locationNameList:"item" type:"list"`
+
+ metadataDescribeDHCPOptionsOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeDHCPOptionsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeDHCPOptionsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeDHCPOptionsOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeExportTasksInput struct {
+ // One or more export task IDs.
+ ExportTaskIDs []*string `locationName:"exportTaskId" locationNameList:"ExportTaskId" type:"list"`
+
+ metadataDescribeExportTasksInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeExportTasksInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeExportTasksInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeExportTasksInput) GoString() string {
+ return s.String()
+}
+
+type DescribeExportTasksOutput struct {
+ // Information about the export tasks.
+ ExportTasks []*ExportTask `locationName:"exportTaskSet" locationNameList:"item" type:"list"`
+
+ metadataDescribeExportTasksOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeExportTasksOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeExportTasksOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeExportTasksOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeFlowLogsInput struct {
+ // One or more filters.
+ //
+ // deliver-log-status - The status of the logs delivery (SUCCESS | FAILED).
+ //
+ // flow-log-id - The ID of the flow log.
+ //
+ // log-group-name - The name of the log group.
+ //
+ // resource-id - The ID of the VPC, subnet, or network interface.
+ //
+ // traffic-type - The type of traffic (ACCEPT | REJECT | ALL)
+ Filter []*Filter `locationNameList:"Filter" type:"list"`
+
+ // One or more flow log IDs.
+ FlowLogIDs []*string `locationName:"FlowLogId" locationNameList:"item" type:"list"`
+
+ // The maximum number of results to return for the request in a single page.
+ // The remaining results can be seen by sending another request with the returned
+ // NextToken value. This value can be between 5 and 1000; if MaxResults is given
+ // a value larger than 1000, only 1000 results are returned. You cannot specify
+ // this parameter and the flow log IDs parameter in the same request.
+ MaxResults *int64 `type:"integer"`
+
+ // The token to retrieve the next page of results.
+ NextToken *string `type:"string"`
+
+ metadataDescribeFlowLogsInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeFlowLogsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeFlowLogsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeFlowLogsInput) GoString() string {
+ return s.String()
+}
+
+type DescribeFlowLogsOutput struct {
+ // Information about the flow logs.
+ FlowLogs []*FlowLog `locationName:"flowLogSet" locationNameList:"item" type:"list"`
+
+ // The token to use to retrieve the next page of results. This value is null
+ // when there are no more results to return.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ metadataDescribeFlowLogsOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeFlowLogsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeFlowLogsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeFlowLogsOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeImageAttributeInput struct {
+ // The AMI attribute.
+ //
+ // Note: Depending on your account privileges, the blockDeviceMapping attribute
+ // may return a Client.AuthFailure error. If this happens, use DescribeImages
+ // to get information about the block device mapping for the AMI.
+ Attribute *string `type:"string" required:"true" enum:"ImageAttributeName"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the AMI.
+ ImageID *string `locationName:"ImageId" type:"string" required:"true"`
+
+ metadataDescribeImageAttributeInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeImageAttributeInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeImageAttributeInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeImageAttributeInput) GoString() string {
+ return s.String()
+}
+
+// Describes an image attribute.
+type DescribeImageAttributeOutput struct {
+ // One or more block device mapping entries.
+ BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"`
+
+ // A description for the AMI.
+ Description *AttributeValue `locationName:"description" type:"structure"`
+
+ // The ID of the AMI.
+ ImageID *string `locationName:"imageId" type:"string"`
+
+ // The kernel ID.
+ KernelID *AttributeValue `locationName:"kernel" type:"structure"`
+
+ // One or more launch permissions.
+ LaunchPermissions []*LaunchPermission `locationName:"launchPermission" locationNameList:"item" type:"list"`
+
+ // One or more product codes.
+ ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"`
+
+ // The RAM disk ID.
+ RAMDiskID *AttributeValue `locationName:"ramdisk" type:"structure"`
+
+ // The value to use for a resource attribute.
+ SRIOVNetSupport *AttributeValue `locationName:"sriovNetSupport" type:"structure"`
+
+ metadataDescribeImageAttributeOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeImageAttributeOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeImageAttributeOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeImageAttributeOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeImagesInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // Scopes the images by users with explicit launch permissions. Specify an AWS
+ // account ID, self (the sender of the request), or all (public AMIs).
+ ExecutableUsers []*string `locationName:"ExecutableBy" locationNameList:"ExecutableBy" type:"list"`
+
+ // One or more filters.
+ //
+ // architecture - The image architecture (i386 | x86_64).
+ //
+ // block-device-mapping.delete-on-termination - A Boolean value that indicates
+ // whether the Amazon EBS volume is deleted on instance termination.
+ //
+ // block-device-mapping.device-name - The device name for the EBS volume
+ // (for example, /dev/sdh).
+ //
+ // block-device-mapping.snapshot-id - The ID of the snapshot used for the
+ // EBS volume.
+ //
+ // block-device-mapping.volume-size - The volume size of the EBS volume,
+ // in GiB.
+ //
+ // block-device-mapping.volume-type - The volume type of the EBS volume (gp2
+ // | standard | io1).
+ //
+ // description - The description of the image (provided during image creation).
+ //
+ // hypervisor - The hypervisor type (ovm | xen).
+ //
+ // image-id - The ID of the image.
+ //
+ // image-type - The image type (machine | kernel | ramdisk).
+ //
+ // is-public - A Boolean that indicates whether the image is public.
+ //
+ // kernel-id - The kernel ID.
+ //
+ // manifest-location - The location of the image manifest.
+ //
+ // name - The name of the AMI (provided during image creation).
+ //
+ // owner-alias - The AWS account alias (for example, amazon).
+ //
+ // owner-id - The AWS account ID of the image owner.
+ //
+ // platform - The platform. To only list Windows-based AMIs, use windows.
+ //
+ // product-code - The product code.
+ //
+ // product-code.type - The type of the product code (devpay | marketplace).
+ //
+ // ramdisk-id - The RAM disk ID.
+ //
+ // root-device-name - The name of the root device volume (for example, /dev/sda1).
+ //
+ // root-device-type - The type of the root device volume (ebs | instance-store).
+ //
+ // state - The state of the image (available | pending | failed).
+ //
+ // state-reason-code - The reason code for the state change.
+ //
+ // state-reason-message - The message for the state change.
+ //
+ // tag:key=value - The key/value combination of a tag assigned to the resource.
+ //
+ // tag-key - The key of a tag assigned to the resource. This filter is independent
+ // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
+ // and the filter "tag-value=X", you get any resources assigned both the tag
+ // key Purpose (regardless of what the tag's value is), and the tag value X
+ // (regardless of what the tag's key is). If you want to list only resources
+ // where Purpose is X, see the tag:key=value filter.
+ //
+ // tag-value - The value of a tag assigned to the resource. This filter is
+ // independent of the tag-key filter.
+ //
+ // virtualization-type - The virtualization type (paravirtual | hvm).
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // One or more image IDs.
+ //
+ // Default: Describes all images available to you.
+ ImageIDs []*string `locationName:"ImageId" locationNameList:"ImageId" type:"list"`
+
+ // Filters the images by the owner. Specify an AWS account ID, amazon (owner
+ // is Amazon), aws-marketplace (owner is AWS Marketplace), self (owner is the
+ // sender of the request). Omitting this option returns all images for which
+ // you have launch permissions, regardless of ownership.
+ Owners []*string `locationName:"Owner" locationNameList:"Owner" type:"list"`
+
+ metadataDescribeImagesInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeImagesInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeImagesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeImagesInput) GoString() string {
+ return s.String()
+}
+
+type DescribeImagesOutput struct {
+ // Information about one or more images.
+ Images []*Image `locationName:"imagesSet" locationNameList:"item" type:"list"`
+
+ metadataDescribeImagesOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeImagesOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeImagesOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeImagesOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeImportImageTasksInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // One or more filters.
+ Filters []*Filter `locationNameList:"Filter" type:"list"`
+
+ // A list of import image task IDs.
+ ImportTaskIDs []*string `locationName:"ImportTaskId" locationNameList:"ImportTaskId" type:"list"`
+
+ // The maximum number of results to return in a single request.
+ MaxResults *int64 `type:"integer"`
+
+ // A token that indicates the next page of results.
+ NextToken *string `type:"string"`
+
+ metadataDescribeImportImageTasksInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeImportImageTasksInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeImportImageTasksInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeImportImageTasksInput) GoString() string {
+ return s.String()
+}
+
+type DescribeImportImageTasksOutput struct {
+ // A list of zero or more import image tasks that are currently active or were
+ // completed or canceled in the previous 7 days.
+ ImportImageTasks []*ImportImageTask `locationName:"importImageTaskSet" locationNameList:"item" type:"list"`
+
+ // The token to use to get the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ metadataDescribeImportImageTasksOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeImportImageTasksOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeImportImageTasksOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeImportImageTasksOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeImportSnapshotTasksInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // One or more filters.
+ Filters []*Filter `locationNameList:"Filter" type:"list"`
+
+ // A list of import snapshot task IDs.
+ ImportTaskIDs []*string `locationName:"ImportTaskId" locationNameList:"ImportTaskId" type:"list"`
+
+ // The maximum number of results to return in a single request.
+ MaxResults *int64 `type:"integer"`
+
+ // A token that indicates the next page of results.
+ NextToken *string `type:"string"`
+
+ metadataDescribeImportSnapshotTasksInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeImportSnapshotTasksInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeImportSnapshotTasksInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeImportSnapshotTasksInput) GoString() string {
+ return s.String()
+}
+
+type DescribeImportSnapshotTasksOutput struct {
+ // A list of zero or more import snapshot tasks that are currently active or
+ // were completed or canceled in the previous 7 days.
+ ImportSnapshotTasks []*ImportSnapshotTask `locationName:"importSnapshotTaskSet" locationNameList:"item" type:"list"`
+
+ // The token to use to get the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ metadataDescribeImportSnapshotTasksOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeImportSnapshotTasksOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeImportSnapshotTasksOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeImportSnapshotTasksOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeInstanceAttributeInput struct {
+ // The instance attribute.
+ Attribute *string `locationName:"attribute" type:"string" required:"true" enum:"InstanceAttributeName"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the instance.
+ InstanceID *string `locationName:"instanceId" type:"string" required:"true"`
+
+ metadataDescribeInstanceAttributeInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeInstanceAttributeInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeInstanceAttributeInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeInstanceAttributeInput) GoString() string {
+ return s.String()
+}
+
+// Describes an instance attribute.
+type DescribeInstanceAttributeOutput struct {
+ // The block device mapping of the instance.
+ BlockDeviceMappings []*InstanceBlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"`
+
+ // If the value is true, you can't terminate the instance through the Amazon
+ // EC2 console, CLI, or API; otherwise, you can.
+ DisableAPITermination *AttributeBooleanValue `locationName:"disableApiTermination" type:"structure"`
+
+ // Indicates whether the instance is optimized for EBS I/O.
+ EBSOptimized *AttributeBooleanValue `locationName:"ebsOptimized" type:"structure"`
+
+ // The security groups associated with the instance.
+ Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"`
+
+ // The ID of the instance.
+ InstanceID *string `locationName:"instanceId" type:"string"`
+
+ // Indicates whether an instance stops or terminates when you initiate shutdown
+ // from the instance (using the operating system command for system shutdown).
+ InstanceInitiatedShutdownBehavior *AttributeValue `locationName:"instanceInitiatedShutdownBehavior" type:"structure"`
+
+ // The instance type.
+ InstanceType *AttributeValue `locationName:"instanceType" type:"structure"`
+
+ // The kernel ID.
+ KernelID *AttributeValue `locationName:"kernel" type:"structure"`
+
+ // A list of product codes.
+ ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"`
+
+ // The RAM disk ID.
+ RAMDiskID *AttributeValue `locationName:"ramdisk" type:"structure"`
+
+ // The name of the root device (for example, /dev/sda1 or /dev/xvda).
+ RootDeviceName *AttributeValue `locationName:"rootDeviceName" type:"structure"`
+
+ // The value to use for a resource attribute.
+ SRIOVNetSupport *AttributeValue `locationName:"sriovNetSupport" type:"structure"`
+
+ // Indicates whether source/destination checking is enabled. A value of true
+ // means checking is enabled, and false means checking is disabled. This value
+ // must be false for a NAT instance to perform NAT.
+ SourceDestCheck *AttributeBooleanValue `locationName:"sourceDestCheck" type:"structure"`
+
+ // The Base64-encoded MIME user data.
+ UserData *AttributeValue `locationName:"userData" type:"structure"`
+
+ metadataDescribeInstanceAttributeOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeInstanceAttributeOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeInstanceAttributeOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeInstanceAttributeOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeInstanceStatusInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // availability-zone - The Availability Zone of the instance.
+ //
+ // event.code - The code for the scheduled event (instance-reboot | system-reboot
+ // | system-maintenance | instance-retirement | instance-stop).
+ //
+ // event.description - A description of the event.
+ //
+ // event.not-after - The latest end time for the scheduled event (for example,
+ // 2014-09-15T17:15:20.000Z).
+ //
+ // event.not-before - The earliest start time for the scheduled event (for
+ // example, 2014-09-15T17:15:20.000Z).
+ //
+ // instance-state-code - The code for the instance state, as a 16-bit unsigned
+ // integer. The high byte is an opaque internal value and should be ignored.
+ // The low byte is set based on the state represented. The valid values are
+ // 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping),
+ // and 80 (stopped).
+ //
+ // instance-state-name - The state of the instance (pending | running | shutting-down
+ // | terminated | stopping | stopped).
+ //
+ // instance-status.reachability - Filters on instance status where the name
+ // is reachability (passed | failed | initializing | insufficient-data).
+ //
+ // instance-status.status - The status of the instance (ok | impaired | initializing
+ // | insufficient-data | not-applicable).
+ //
+ // system-status.reachability - Filters on system status where the name is
+ // reachability (passed | failed | initializing | insufficient-data).
+ //
+ // system-status.status - The system status of the instance (ok | impaired
+ // | initializing | insufficient-data | not-applicable).
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // When true, includes the health status for all instances. When false, includes
+ // the health status for running instances only.
+ //
+ // Default: false
+ IncludeAllInstances *bool `locationName:"includeAllInstances" type:"boolean"`
+
+ // One or more instance IDs.
+ //
+ // Default: Describes all your instances.
+ //
+ // Constraints: Maximum 100 explicitly specified instance IDs.
+ InstanceIDs []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list"`
+
+ // The maximum number of results to return for the request in a single page.
+ // The remaining results of the initial request can be seen by sending another
+ // request with the returned NextToken value. This value can be between 5 and
+ // 1000; if MaxResults is given a value larger than 1000, only 1000 results
+ // are returned. You cannot specify this parameter and the instance IDs parameter
+ // in the same request.
+ MaxResults *int64 `type:"integer"`
+
+ // The token to retrieve the next page of results.
+ NextToken *string `type:"string"`
+
+ metadataDescribeInstanceStatusInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeInstanceStatusInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeInstanceStatusInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeInstanceStatusInput) GoString() string {
+ return s.String()
+}
+
+type DescribeInstanceStatusOutput struct {
+ // One or more instance status descriptions.
+ InstanceStatuses []*InstanceStatus `locationName:"instanceStatusSet" locationNameList:"item" type:"list"`
+
+ // The token to use to retrieve the next page of results. This value is null
+ // when there are no more results to return.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ metadataDescribeInstanceStatusOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeInstanceStatusOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeInstanceStatusOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeInstanceStatusOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeInstancesInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // architecture - The instance architecture (i386 | x86_64).
+ //
+ // availability-zone - The Availability Zone of the instance.
+ //
+ // block-device-mapping.attach-time - The attach time for an EBS volume mapped
+ // to the instance, for example, 2010-09-15T17:15:20.000Z.
+ //
+ // block-device-mapping.delete-on-termination - A Boolean that indicates
+ // whether the EBS volume is deleted on instance termination.
+ //
+ // block-device-mapping.device-name - The device name for the EBS volume
+ // (for example, /dev/sdh or xvdh).
+ //
+ // block-device-mapping.status - The status for the EBS volume (attaching
+ // | attached | detaching | detached).
+ //
+ // block-device-mapping.volume-id - The volume ID of the EBS volume.
+ //
+ // client-token - The idempotency token you provided when you launched the
+ // instance.
+ //
+ // dns-name - The public DNS name of the instance.
+ //
+ // group-id - The ID of the security group for the instance. EC2-Classic
+ // only.
+ //
+ // group-name - The name of the security group for the instance. EC2-Classic
+ // only.
+ //
+ // hypervisor - The hypervisor type of the instance (ovm | xen).
+ //
+ // iam-instance-profile.arn - The instance profile associated with the instance.
+ // Specified as an ARN.
+ //
+ // image-id - The ID of the image used to launch the instance.
+ //
+ // instance-id - The ID of the instance.
+ //
+ // instance-lifecycle - Indicates whether this is a Spot Instance (spot).
+ //
+ // instance-state-code - The state of the instance, as a 16-bit unsigned
+ // integer. The high byte is an opaque internal value and should be ignored.
+ // The low byte is set based on the state represented. The valid values are:
+ // 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping),
+ // and 80 (stopped).
+ //
+ // instance-state-name - The state of the instance (pending | running | shutting-down
+ // | terminated | stopping | stopped).
+ //
+ // instance-type - The type of instance (for example, t2.micro).
+ //
+ // instance.group-id - The ID of the security group for the instance.
+ //
+ // instance.group-name - The name of the security group for the instance.
+ //
+ // ip-address - The public IP address of the instance.
+ //
+ // kernel-id - The kernel ID.
+ //
+ // key-name - The name of the key pair used when the instance was launched.
+ //
+ // launch-index - When launching multiple instances, this is the index for
+ // the instance in the launch group (for example, 0, 1, 2, and so on).
+ //
+ // launch-time - The time when the instance was launched.
+ //
+ // monitoring-state - Indicates whether monitoring is enabled for the instance
+ // (disabled | enabled).
+ //
+ // owner-id - The AWS account ID of the instance owner.
+ //
+ // placement-group-name - The name of the placement group for the instance.
+ //
+ // platform - The platform. Use windows if you have Windows instances; otherwise,
+ // leave blank.
+ //
+ // private-dns-name - The private DNS name of the instance.
+ //
+ // private-ip-address - The private IP address of the instance.
+ //
+ // product-code - The product code associated with the AMI used to launch
+ // the instance.
+ //
+ // product-code.type - The type of product code (devpay | marketplace).
+ //
+ // ramdisk-id - The RAM disk ID.
+ //
+ // reason - The reason for the current state of the instance (for example,
+ // shows "User Initiated [date]" when you stop or terminate the instance). Similar
+ // to the state-reason-code filter.
+ //
+ // requester-id - The ID of the entity that launched the instance on your
+ // behalf (for example, AWS Management Console, Auto Scaling, and so on).
+ //
+ // reservation-id - The ID of the instance's reservation. A reservation ID
+ // is created any time you launch an instance. A reservation ID has a one-to-one
+ // relationship with an instance launch request, but can be associated with
+ // more than one instance if you launch multiple instances using the same launch
+ // request. For example, if you launch one instance, you'll get one reservation
+ // ID. If you launch ten instances using the same launch request, you'll also
+ // get one reservation ID.
+ //
+ // root-device-name - The name of the root device for the instance (for example,
+ // /dev/sda1 or /dev/xvda).
+ //
+ // root-device-type - The type of root device that the instance uses (ebs
+ // | instance-store).
+ //
+ // source-dest-check - Indicates whether the instance performs source/destination
+ // checking. A value of true means that checking is enabled, and false means
+ // checking is disabled. The value must be false for the instance to perform
+ // network address translation (NAT) in your VPC.
+ //
+ // spot-instance-request-id - The ID of the Spot Instance request.
+ //
+ // state-reason-code - The reason code for the state change.
+ //
+ // state-reason-message - A message that describes the state change.
+ //
+ // subnet-id - The ID of the subnet for the instance.
+ //
+ // tag:key=value - The key/value combination of a tag assigned to the resource,
+ // where tag:key is the tag's key.
+ //
+ // tag-key - The key of a tag assigned to the resource. This filter is independent
+ // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
+ // and the filter "tag-value=X", you get any resources assigned both the tag
+ // key Purpose (regardless of what the tag's value is), and the tag value X
+ // (regardless of what the tag's key is). If you want to list only resources
+ // where Purpose is X, see the tag:key=value filter.
+ //
+ // tag-value - The value of a tag assigned to the resource. This filter is
+ // independent of the tag-key filter.
+ //
+ // tenancy - The tenancy of an instance (dedicated | default).
+ //
+ // virtualization-type - The virtualization type of the instance (paravirtual
+ // | hvm).
+ //
+ // vpc-id - The ID of the VPC that the instance is running in.
+ //
+ // network-interface.description - The description of the network interface.
+ //
+ // network-interface.subnet-id - The ID of the subnet for the network interface.
+ //
+ // network-interface.vpc-id - The ID of the VPC for the network interface.
+ //
+ // network-interface.network-interface.id - The ID of the network interface.
+ //
+ // network-interface.owner-id - The ID of the owner of the network interface.
+ //
+ // network-interface.availability-zone - The Availability Zone for the network
+ // interface.
+ //
+ // network-interface.requester-id - The requester ID for the network interface.
+ //
+ // network-interface.requester-managed - Indicates whether the network interface
+ // is being managed by AWS.
+ //
+ // network-interface.status - The status of the network interface (available)
+ // | in-use).
+ //
+ // network-interface.mac-address - The MAC address of the network interface.
+ //
+ // network-interface-private-dns-name - The private DNS name of the network
+ // interface.
+ //
+ // network-interface.source-dest-check - Whether the network interface performs
+ // source/destination checking. A value of true means checking is enabled, and
+ // false means checking is disabled. The value must be false for the network
+ // interface to perform network address translation (NAT) in your VPC.
+ //
+ // network-interface.group-id - The ID of a security group associated with
+ // the network interface.
+ //
+ // network-interface.group-name - The name of a security group associated
+ // with the network interface.
+ //
+ // network-interface.attachment.attachment-id - The ID of the interface attachment.
+ //
+ // network-interface.attachment.instance-id - The ID of the instance to which
+ // the network interface is attached.
+ //
+ // network-interface.attachment.instance-owner-id - The owner ID of the instance
+ // to which the network interface is attached.
+ //
+ // network-interface.addresses.private-ip-address - The private IP address
+ // associated with the network interface.
+ //
+ // network-interface.attachment.device-index - The device index to which
+ // the network interface is attached.
+ //
+ // network-interface.attachment.status - The status of the attachment (attaching
+ // | attached | detaching | detached).
+ //
+ // network-interface.attachment.attach-time - The time that the network interface
+ // was attached to an instance.
+ //
+ // network-interface.attachment.delete-on-termination - Specifies whether
+ // the attachment is deleted when an instance is terminated.
+ //
+ // network-interface.addresses.primary - Specifies whether the IP address
+ // of the network interface is the primary private IP address.
+ //
+ // network-interface.addresses.association.public-ip - The ID of the association
+ // of an Elastic IP address with a network interface.
+ //
+ // network-interface.addresses.association.ip-owner-id - The owner ID of
+ // the private IP address associated with the network interface.
+ //
+ // association.public-ip - The address of the Elastic IP address bound to
+ // the network interface.
+ //
+ // association.ip-owner-id - The owner of the Elastic IP address associated
+ // with the network interface.
+ //
+ // association.allocation-id - The allocation ID returned when you allocated
+ // the Elastic IP address for your network interface.
+ //
+ // association.association-id - The association ID returned when the network
+ // interface was associated with an IP address.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // One or more instance IDs.
+ //
+ // Default: Describes all your instances.
+ InstanceIDs []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list"`
+
+ // The maximum number of results to return for the request in a single page.
+ // The remaining results of the initial request can be seen by sending another
+ // request with the returned NextToken value. This value can be between 5 and
+ // 1000; if MaxResults is given a value larger than 1000, only 1000 results
+ // are returned. You cannot specify this parameter and the instance IDs parameter
+ // in the same request.
+ MaxResults *int64 `locationName:"maxResults" type:"integer"`
+
+ // The token to request the next page of results.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ metadataDescribeInstancesInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeInstancesInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeInstancesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeInstancesInput) GoString() string {
+ return s.String()
+}
+
+type DescribeInstancesOutput struct {
+ // The token to use to retrieve the next page of results. This value is null
+ // when there are no more results to return.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ // One or more reservations.
+ Reservations []*Reservation `locationName:"reservationSet" locationNameList:"item" type:"list"`
+
+ metadataDescribeInstancesOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeInstancesOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeInstancesOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeInstancesOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeInternetGatewaysInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // attachment.state - The current state of the attachment between the gateway
+ // and the VPC (available). Present only if a VPC is attached.
+ //
+ // attachment.vpc-id - The ID of an attached VPC.
+ //
+ // internet-gateway-id - The ID of the Internet gateway.
+ //
+ // tag:key=value - The key/value combination of a tag assigned to the resource.
+ //
+ // tag-key - The key of a tag assigned to the resource. This filter is independent
+ // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
+ // and the filter "tag-value=X", you get any resources assigned both the tag
+ // key Purpose (regardless of what the tag's value is), and the tag value X
+ // (regardless of what the tag's key is). If you want to list only resources
+ // where Purpose is X, see the tag:key=value filter.
+ //
+ // tag-value - The value of a tag assigned to the resource. This filter is
+ // independent of the tag-key filter.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // One or more Internet gateway IDs.
+ //
+ // Default: Describes all your Internet gateways.
+ InternetGatewayIDs []*string `locationName:"internetGatewayId" locationNameList:"item" type:"list"`
+
+ metadataDescribeInternetGatewaysInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeInternetGatewaysInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeInternetGatewaysInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeInternetGatewaysInput) GoString() string {
+ return s.String()
+}
+
+type DescribeInternetGatewaysOutput struct {
+ // Information about one or more Internet gateways.
+ InternetGateways []*InternetGateway `locationName:"internetGatewaySet" locationNameList:"item" type:"list"`
+
+ metadataDescribeInternetGatewaysOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeInternetGatewaysOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeInternetGatewaysOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeInternetGatewaysOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeKeyPairsInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // fingerprint - The fingerprint of the key pair.
+ //
+ // key-name - The name of the key pair.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // One or more key pair names.
+ //
+ // Default: Describes all your key pairs.
+ KeyNames []*string `locationName:"KeyName" locationNameList:"KeyName" type:"list"`
+
+ metadataDescribeKeyPairsInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeKeyPairsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeKeyPairsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeKeyPairsInput) GoString() string {
+ return s.String()
+}
+
+type DescribeKeyPairsOutput struct {
+ // Information about one or more key pairs.
+ KeyPairs []*KeyPairInfo `locationName:"keySet" locationNameList:"item" type:"list"`
+
+ metadataDescribeKeyPairsOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeKeyPairsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeKeyPairsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeKeyPairsOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeMovingAddressesInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // moving-status - The status of the Elastic IP address (MovingToVpc | RestoringToClassic).
+ Filters []*Filter `locationName:"filter" locationNameList:"Filter" type:"list"`
+
+ // The maximum number of results to return for the request in a single page.
+ // The remaining results of the initial request can be seen by sending another
+ // request with the returned NextToken value. This value can be between 5 and
+ // 1000; if MaxResults is given a value outside of this range, an error is returned.
+ //
+ // Default: If no value is provided, the default is 1000.
+ MaxResults *int64 `locationName:"maxResults" type:"integer"`
+
+ // The token to use to retrieve the next page of results.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ // One or more Elastic IP addresses.
+ PublicIPs []*string `locationName:"publicIp" locationNameList:"item" type:"list"`
+
+ metadataDescribeMovingAddressesInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeMovingAddressesInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeMovingAddressesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeMovingAddressesInput) GoString() string {
+ return s.String()
+}
+
+type DescribeMovingAddressesOutput struct {
+ // The status for each Elastic IP address.
+ MovingAddressStatuses []*MovingAddressStatus `locationName:"movingAddressStatusSet" locationNameList:"item" type:"list"`
+
+ // The token to use to retrieve the next page of results. This value is null
+ // when there are no more results to return.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ metadataDescribeMovingAddressesOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeMovingAddressesOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeMovingAddressesOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeMovingAddressesOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeNetworkACLsInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // association.association-id - The ID of an association ID for the ACL.
+ //
+ // association.network-acl-id - The ID of the network ACL involved in the
+ // association.
+ //
+ // association.subnet-id - The ID of the subnet involved in the association.
+ //
+ // default - Indicates whether the ACL is the default network ACL for the
+ // VPC.
+ //
+ // entry.cidr - The CIDR range specified in the entry.
+ //
+ // entry.egress - Indicates whether the entry applies to egress traffic.
+ //
+ // entry.icmp.code - The ICMP code specified in the entry, if any.
+ //
+ // entry.icmp.type - The ICMP type specified in the entry, if any.
+ //
+ // entry.port-range.from - The start of the port range specified in the entry.
+ //
+ // entry.port-range.to - The end of the port range specified in the entry.
+ //
+ // entry.protocol - The protocol specified in the entry (tcp | udp | icmp
+ // or a protocol number).
+ //
+ // entry.rule-action - Allows or denies the matching traffic (allow | deny).
+ //
+ // entry.rule-number - The number of an entry (in other words, rule) in the
+ // ACL's set of entries.
+ //
+ // network-acl-id - The ID of the network ACL.
+ //
+ // tag:key=value - The key/value combination of a tag assigned to the resource.
+ //
+ // tag-key - The key of a tag assigned to the resource. This filter is independent
+ // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
+ // and the filter "tag-value=X", you get any resources assigned both the tag
+ // key Purpose (regardless of what the tag's value is), and the tag value X
+ // (regardless of what the tag's key is). If you want to list only resources
+ // where Purpose is X, see the tag:key=value filter.
+ //
+ // tag-value - The value of a tag assigned to the resource. This filter is
+ // independent of the tag-key filter.
+ //
+ // vpc-id - The ID of the VPC for the network ACL.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // One or more network ACL IDs.
+ //
+ // Default: Describes all your network ACLs.
+ NetworkACLIDs []*string `locationName:"NetworkAclId" locationNameList:"item" type:"list"`
+
+ metadataDescribeNetworkACLsInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeNetworkACLsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeNetworkACLsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeNetworkACLsInput) GoString() string {
+ return s.String()
+}
+
+type DescribeNetworkACLsOutput struct {
+ // Information about one or more network ACLs.
+ NetworkACLs []*NetworkACL `locationName:"networkAclSet" locationNameList:"item" type:"list"`
+
+ metadataDescribeNetworkACLsOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeNetworkACLsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeNetworkACLsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeNetworkACLsOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeNetworkInterfaceAttributeInput struct {
+ // The attribute of the network interface.
+ Attribute *string `locationName:"attribute" type:"string" enum:"NetworkInterfaceAttribute"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the network interface.
+ NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string" required:"true"`
+
+ metadataDescribeNetworkInterfaceAttributeInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeNetworkInterfaceAttributeInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeNetworkInterfaceAttributeInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeNetworkInterfaceAttributeInput) GoString() string {
+ return s.String()
+}
+
+type DescribeNetworkInterfaceAttributeOutput struct {
+ // The attachment (if any) of the network interface.
+ Attachment *NetworkInterfaceAttachment `locationName:"attachment" type:"structure"`
+
+ // The description of the network interface.
+ Description *AttributeValue `locationName:"description" type:"structure"`
+
+ // The security groups associated with the network interface.
+ Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"`
+
+ // The ID of the network interface.
+ NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string"`
+
+ // Indicates whether source/destination checking is enabled.
+ SourceDestCheck *AttributeBooleanValue `locationName:"sourceDestCheck" type:"structure"`
+
+ metadataDescribeNetworkInterfaceAttributeOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeNetworkInterfaceAttributeOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeNetworkInterfaceAttributeOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeNetworkInterfaceAttributeOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeNetworkInterfacesInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // addresses.private-ip-address - The private IP addresses associated with
+ // the network interface.
+ //
+ // addresses.primary - Whether the private IP address is the primary IP address
+ // associated with the network interface.
+ //
+ // addresses.association.public-ip - The association ID returned when the
+ // network interface was associated with the Elastic IP address.
+ //
+ // addresses.association.owner-id - The owner ID of the addresses associated
+ // with the network interface.
+ //
+ // association.association-id - The association ID returned when the network
+ // interface was associated with an IP address.
+ //
+ // association.allocation-id - The allocation ID returned when you allocated
+ // the Elastic IP address for your network interface.
+ //
+ // association.ip-owner-id - The owner of the Elastic IP address associated
+ // with the network interface.
+ //
+ // association.public-ip - The address of the Elastic IP address bound to
+ // the network interface.
+ //
+ // association.public-dns-name - The public DNS name for the network interface.
+ //
+ // attachment.attachment-id - The ID of the interface attachment.
+ //
+ // attachment.instance-id - The ID of the instance to which the network interface
+ // is attached.
+ //
+ // attachment.instance-owner-id - The owner ID of the instance to which the
+ // network interface is attached.
+ //
+ // attachment.device-index - The device index to which the network interface
+ // is attached.
+ //
+ // attachment.status - The status of the attachment (attaching | attached
+ // | detaching | detached).
+ //
+ // attachment.attach.time - The time that the network interface was attached
+ // to an instance.
+ //
+ // attachment.delete-on-termination - Indicates whether the attachment is
+ // deleted when an instance is terminated.
+ //
+ // availability-zone - The Availability Zone of the network interface.
+ //
+ // description - The description of the network interface.
+ //
+ // group-id - The ID of a security group associated with the network interface.
+ //
+ // group-name - The name of a security group associated with the network
+ // interface.
+ //
+ // mac-address - The MAC address of the network interface.
+ //
+ // network-interface-id - The ID of the network interface.
+ //
+ // owner-id - The AWS account ID of the network interface owner.
+ //
+ // private-ip-address - The private IP address or addresses of the network
+ // interface.
+ //
+ // private-dns-name - The private DNS name of the network interface.
+ //
+ // requester-id - The ID of the entity that launched the instance on your
+ // behalf (for example, AWS Management Console, Auto Scaling, and so on).
+ //
+ // requester-managed - Indicates whether the network interface is being managed
+ // by an AWS service (for example, AWS Management Console, Auto Scaling, and
+ // so on).
+ //
+ // source-desk-check - Indicates whether the network interface performs source/destination
+ // checking. A value of true means checking is enabled, and false means checking
+ // is disabled. The value must be false for the network interface to perform
+ // Network Address Translation (NAT) in your VPC.
+ //
+ // status - The status of the network interface. If the network interface
+ // is not attached to an instance, the status is available; if a network interface
+ // is attached to an instance the status is in-use.
+ //
+ // subnet-id - The ID of the subnet for the network interface.
+ //
+ // tag:key=value - The key/value combination of a tag assigned to the resource.
+ //
+ // tag-key - The key of a tag assigned to the resource. This filter is independent
+ // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
+ // and the filter "tag-value=X", you get any resources assigned both the tag
+ // key Purpose (regardless of what the tag's value is), and the tag value X
+ // (regardless of what the tag's key is). If you want to list only resources
+ // where Purpose is X, see the tag:key=value filter.
+ //
+ // tag-value - The value of a tag assigned to the resource. This filter is
+ // independent of the tag-key filter.
+ //
+ // vpc-id - The ID of the VPC for the network interface.
+ Filters []*Filter `locationName:"filter" locationNameList:"Filter" type:"list"`
+
+ // One or more network interface IDs.
+ //
+ // Default: Describes all your network interfaces.
+ NetworkInterfaceIDs []*string `locationName:"NetworkInterfaceId" locationNameList:"item" type:"list"`
+
+ metadataDescribeNetworkInterfacesInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeNetworkInterfacesInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeNetworkInterfacesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeNetworkInterfacesInput) GoString() string {
+ return s.String()
+}
+
+type DescribeNetworkInterfacesOutput struct {
+ // Information about one or more network interfaces.
+ NetworkInterfaces []*NetworkInterface `locationName:"networkInterfaceSet" locationNameList:"item" type:"list"`
+
+ metadataDescribeNetworkInterfacesOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeNetworkInterfacesOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeNetworkInterfacesOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeNetworkInterfacesOutput) GoString() string {
+ return s.String()
+}
+
+type DescribePlacementGroupsInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // group-name - The name of the placement group.
+ //
+ // state - The state of the placement group (pending | available | deleting
+ // | deleted).
+ //
+ // strategy - The strategy of the placement group (cluster).
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // One or more placement group names.
+ //
+ // Default: Describes all your placement groups, or only those otherwise specified.
+ GroupNames []*string `locationName:"groupName" type:"list"`
+
+ metadataDescribePlacementGroupsInput `json:"-" xml:"-"`
+}
+
+type metadataDescribePlacementGroupsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribePlacementGroupsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribePlacementGroupsInput) GoString() string {
+ return s.String()
+}
+
+type DescribePlacementGroupsOutput struct {
+ // One or more placement groups.
+ PlacementGroups []*PlacementGroup `locationName:"placementGroupSet" locationNameList:"item" type:"list"`
+
+ metadataDescribePlacementGroupsOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribePlacementGroupsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribePlacementGroupsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribePlacementGroupsOutput) GoString() string {
+ return s.String()
+}
+
+type DescribePrefixListsInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // One or more filters.
+ //
+ // prefix-list-id: The ID of a prefix list.
+ //
+ // prefix-list-name: The name of a prefix list.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // The maximum number of items to return for this request. The request returns
+ // a token that you can specify in a subsequent call to get the next set of
+ // results.
+ //
+ // Constraint: If the value specified is greater than 1000, we return only
+ // 1000 items.
+ MaxResults *int64 `type:"integer"`
+
+ // The token for the next set of items to return. (You received this token from
+ // a prior call.)
+ NextToken *string `type:"string"`
+
+ // One or more prefix list IDs.
+ PrefixListIDs []*string `locationName:"PrefixListId" locationNameList:"item" type:"list"`
+
+ metadataDescribePrefixListsInput `json:"-" xml:"-"`
+}
+
+type metadataDescribePrefixListsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribePrefixListsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribePrefixListsInput) GoString() string {
+ return s.String()
+}
+
+type DescribePrefixListsOutput struct {
+ // The token to use when requesting the next set of items. If there are no additional
+ // items to return, the string is empty.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ // All available prefix lists.
+ PrefixLists []*PrefixList `locationName:"prefixListSet" locationNameList:"item" type:"list"`
+
+ metadataDescribePrefixListsOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribePrefixListsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribePrefixListsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribePrefixListsOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeRegionsInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // endpoint - The endpoint of the region (for example, ec2.us-east-1.amazonaws.com).
+ //
+ // region-name - The name of the region (for example, us-east-1).
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // The names of one or more regions.
+ RegionNames []*string `locationName:"RegionName" locationNameList:"RegionName" type:"list"`
+
+ metadataDescribeRegionsInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeRegionsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeRegionsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeRegionsInput) GoString() string {
+ return s.String()
+}
+
+type DescribeRegionsOutput struct {
+ // Information about one or more regions.
+ Regions []*Region `locationName:"regionInfo" locationNameList:"item" type:"list"`
+
+ metadataDescribeRegionsOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeRegionsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeRegionsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeRegionsOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeReservedInstancesInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // availability-zone - The Availability Zone where the Reserved Instance
+ // can be used.
+ //
+ // duration - The duration of the Reserved Instance (one year or three years),
+ // in seconds (31536000 | 94608000).
+ //
+ // end - The time when the Reserved Instance expires (for example, 2015-08-07T11:54:42.000Z).
+ //
+ // fixed-price - The purchase price of the Reserved Instance (for example,
+ // 9800.0).
+ //
+ // instance-type - The instance type on which the Reserved Instance can be
+ // used.
+ //
+ // product-description - The Reserved Instance product platform description.
+ // Instances that include (Amazon VPC) in the product platform description will
+ // only be displayed to EC2-Classic account holders and are for use with Amazon
+ // VPC. (Linux/UNIX | Linux/UNIX (Amazon VPC) | SUSE Linux | SUSE Linux (Amazon
+ // VPC) | Red Hat Enterprise Linux | Red Hat Enterprise Linux (Amazon VPC) |
+ // Windows | Windows (Amazon VPC) | Windows with SQL Server Standard | Windows
+ // with SQL Server Standard (Amazon VPC) | Windows with SQL Server Web | Windows
+ // with SQL Server Web (Amazon VPC) | Windows with SQL Server Enterprise | Windows
+ // with SQL Server Enterprise (Amazon VPC)).
+ //
+ // reserved-instances-id - The ID of the Reserved Instance.
+ //
+ // start - The time at which the Reserved Instance purchase request was placed
+ // (for example, 2014-08-07T11:54:42.000Z).
+ //
+ // state - The state of the Reserved Instance (payment-pending | active |
+ // payment-failed | retired).
+ //
+ // tag:key=value - The key/value combination of a tag assigned to the resource.
+ //
+ // tag-key - The key of a tag assigned to the resource. This filter is independent
+ // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
+ // and the filter "tag-value=X", you get any resources assigned both the tag
+ // key Purpose (regardless of what the tag's value is), and the tag value X
+ // (regardless of what the tag's key is). If you want to list only resources
+ // where Purpose is X, see the tag:key=value filter.
+ //
+ // tag-value - The value of a tag assigned to the resource. This filter is
+ // independent of the tag-key filter.
+ //
+ // usage-price - The usage price of the Reserved Instance, per hour (for
+ // example, 0.84).
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // The Reserved Instance offering type. If you are using tools that predate
+ // the 2011-11-01 API version, you only have access to the Medium Utilization
+ // Reserved Instance offering type.
+ OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingTypeValues"`
+
+ // One or more Reserved Instance IDs.
+ //
+ // Default: Describes all your Reserved Instances, or only those otherwise
+ // specified.
+ ReservedInstancesIDs []*string `locationName:"ReservedInstancesId" locationNameList:"ReservedInstancesId" type:"list"`
+
+ metadataDescribeReservedInstancesInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeReservedInstancesInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeReservedInstancesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeReservedInstancesInput) GoString() string {
+ return s.String()
+}
+
+type DescribeReservedInstancesListingsInput struct {
+ // One or more filters.
+ //
+ // reserved-instances-id - The ID of the Reserved Instances.
+ //
+ // reserved-instances-listing-id - The ID of the Reserved Instances listing.
+ //
+ // status - The status of the Reserved Instance listing (pending | active
+ // | cancelled | closed).
+ //
+ // status-message - The reason for the status.
+ Filters []*Filter `locationName:"filters" locationNameList:"Filter" type:"list"`
+
+ // One or more Reserved Instance IDs.
+ ReservedInstancesID *string `locationName:"reservedInstancesId" type:"string"`
+
+ // One or more Reserved Instance Listing IDs.
+ ReservedInstancesListingID *string `locationName:"reservedInstancesListingId" type:"string"`
+
+ metadataDescribeReservedInstancesListingsInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeReservedInstancesListingsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeReservedInstancesListingsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeReservedInstancesListingsInput) GoString() string {
+ return s.String()
+}
+
+type DescribeReservedInstancesListingsOutput struct {
+ // Information about the Reserved Instance listing.
+ ReservedInstancesListings []*ReservedInstancesListing `locationName:"reservedInstancesListingsSet" locationNameList:"item" type:"list"`
+
+ metadataDescribeReservedInstancesListingsOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeReservedInstancesListingsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeReservedInstancesListingsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeReservedInstancesListingsOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeReservedInstancesModificationsInput struct {
+ // One or more filters.
+ //
+ // client-token - The idempotency token for the modification request.
+ //
+ // create-date - The time when the modification request was created.
+ //
+ // effective-date - The time when the modification becomes effective.
+ //
+ // modification-result.reserved-instances-id - The ID for the Reserved Instances
+ // created as part of the modification request. This ID is only available when
+ // the status of the modification is fulfilled.
+ //
+ // modification-result.target-configuration.availability-zone - The Availability
+ // Zone for the new Reserved Instances.
+ //
+ // modification-result.target-configuration.instance-count - The number
+ // of new Reserved Instances.
+ //
+ // modification-result.target-configuration.instance-type - The instance
+ // type of the new Reserved Instances.
+ //
+ // modification-result.target-configuration.platform - The network platform
+ // of the new Reserved Instances (EC2-Classic | EC2-VPC).
+ //
+ // reserved-instances-id - The ID of the Reserved Instances modified.
+ //
+ // reserved-instances-modification-id - The ID of the modification request.
+ //
+ // status - The status of the Reserved Instances modification request (processing
+ // | fulfilled | failed).
+ //
+ // status-message - The reason for the status.
+ //
+ // update-date - The time when the modification request was last updated.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // The token to retrieve the next page of results.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ // IDs for the submitted modification request.
+ ReservedInstancesModificationIDs []*string `locationName:"ReservedInstancesModificationId" locationNameList:"ReservedInstancesModificationId" type:"list"`
+
+ metadataDescribeReservedInstancesModificationsInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeReservedInstancesModificationsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeReservedInstancesModificationsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeReservedInstancesModificationsInput) GoString() string {
+ return s.String()
+}
+
+type DescribeReservedInstancesModificationsOutput struct {
+ // The token to use to retrieve the next page of results. This value is null
+ // when there are no more results to return.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ // The Reserved Instance modification information.
+ ReservedInstancesModifications []*ReservedInstancesModification `locationName:"reservedInstancesModificationsSet" locationNameList:"item" type:"list"`
+
+ metadataDescribeReservedInstancesModificationsOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeReservedInstancesModificationsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeReservedInstancesModificationsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeReservedInstancesModificationsOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeReservedInstancesOfferingsInput struct {
+ // The Availability Zone in which the Reserved Instance can be used.
+ AvailabilityZone *string `type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // availability-zone - The Availability Zone where the Reserved Instance
+ // can be used.
+ //
+ // duration - The duration of the Reserved Instance (for example, one year
+ // or three years), in seconds (31536000 | 94608000).
+ //
+ // fixed-price - The purchase price of the Reserved Instance (for example,
+ // 9800.0).
+ //
+ // instance-type - The instance type on which the Reserved Instance can be
+ // used.
+ //
+ // marketplace - Set to true to show only Reserved Instance Marketplace offerings.
+ // When this filter is not used, which is the default behavior, all offerings
+ // from AWS and Reserved Instance Marketplace are listed.
+ //
+ // product-description - The Reserved Instance product platform description.
+ // Instances that include (Amazon VPC) in the product platform description will
+ // only be displayed to EC2-Classic account holders and are for use with Amazon
+ // VPC. (Linux/UNIX | Linux/UNIX (Amazon VPC) | SUSE Linux | SUSE Linux (Amazon
+ // VPC) | Red Hat Enterprise Linux | Red Hat Enterprise Linux (Amazon VPC) |
+ // Windows | Windows (Amazon VPC) | Windows with SQL Server Standard | Windows
+ // with SQL Server Standard (Amazon VPC) | Windows with SQL Server Web | Windows
+ // with SQL Server Web (Amazon VPC) | Windows with SQL Server Enterprise | Windows
+ // with SQL Server Enterprise (Amazon VPC))
+ //
+ // reserved-instances-offering-id - The Reserved Instances offering ID.
+ //
+ // usage-price - The usage price of the Reserved Instance, per hour (for
+ // example, 0.84).
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // Include Marketplace offerings in the response.
+ IncludeMarketplace *bool `type:"boolean"`
+
+ // The tenancy of the Reserved Instance offering. A Reserved Instance with dedicated
+ // tenancy runs on single-tenant hardware and can only be launched within a
+ // VPC.
+ //
+ // Default: default
+ InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"`
+
+ // The instance type on which the Reserved Instance can be used. For more information,
+ // see Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html)
+ // in the Amazon Elastic Compute Cloud User Guide.
+ InstanceType *string `type:"string" enum:"InstanceType"`
+
+ // The maximum duration (in seconds) to filter when searching for offerings.
+ //
+ // Default: 94608000 (3 years)
+ MaxDuration *int64 `type:"long"`
+
+ // The maximum number of instances to filter when searching for offerings.
+ //
+ // Default: 20
+ MaxInstanceCount *int64 `type:"integer"`
+
+ // The maximum number of results to return for the request in a single page.
+ // The remaining results of the initial request can be seen by sending another
+ // request with the returned NextToken value. The maximum is 100.
+ //
+ // Default: 100
+ MaxResults *int64 `locationName:"maxResults" type:"integer"`
+
+ // The minimum duration (in seconds) to filter when searching for offerings.
+ //
+ // Default: 2592000 (1 month)
+ MinDuration *int64 `type:"long"`
+
+ // The token to retrieve the next page of results.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ // The Reserved Instance offering type. If you are using tools that predate
+ // the 2011-11-01 API version, you only have access to the Medium Utilization
+ // Reserved Instance offering type.
+ OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingTypeValues"`
+
+ // The Reserved Instance product platform description. Instances that include
+ // (Amazon VPC) in the description are for use with Amazon VPC.
+ ProductDescription *string `type:"string" enum:"RIProductDescription"`
+
+ // One or more Reserved Instances offering IDs.
+ ReservedInstancesOfferingIDs []*string `locationName:"ReservedInstancesOfferingId" type:"list"`
+
+ metadataDescribeReservedInstancesOfferingsInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeReservedInstancesOfferingsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeReservedInstancesOfferingsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeReservedInstancesOfferingsInput) GoString() string {
+ return s.String()
+}
+
+type DescribeReservedInstancesOfferingsOutput struct {
+ // The token to use to retrieve the next page of results. This value is null
+ // when there are no more results to return.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ // A list of Reserved Instances offerings.
+ ReservedInstancesOfferings []*ReservedInstancesOffering `locationName:"reservedInstancesOfferingsSet" locationNameList:"item" type:"list"`
+
+ metadataDescribeReservedInstancesOfferingsOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeReservedInstancesOfferingsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeReservedInstancesOfferingsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeReservedInstancesOfferingsOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeReservedInstancesOutput struct {
+ // A list of Reserved Instances.
+ ReservedInstances []*ReservedInstances `locationName:"reservedInstancesSet" locationNameList:"item" type:"list"`
+
+ metadataDescribeReservedInstancesOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeReservedInstancesOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeReservedInstancesOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeReservedInstancesOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeRouteTablesInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // association.route-table-association-id - The ID of an association ID for
+ // the route table.
+ //
+ // association.route-table-id - The ID of the route table involved in the
+ // association.
+ //
+ // association.subnet-id - The ID of the subnet involved in the association.
+ //
+ // association.main - Indicates whether the route table is the main route
+ // table for the VPC.
+ //
+ // route-table-id - The ID of the route table.
+ //
+ // route.destination-cidr-block - The CIDR range specified in a route in
+ // the table.
+ //
+ // route.destination-prefix-list-id - The ID (prefix) of the AWS service
+ // specified in a route in the table.
+ //
+ // route.gateway-id - The ID of a gateway specified in a route in the table.
+ //
+ // route.instance-id - The ID of an instance specified in a route in the
+ // table.
+ //
+ // route.origin - Describes how the route was created. CreateRouteTable indicates
+ // that the route was automatically created when the route table was created;
+ // CreateRoute indicates that the route was manually added to the route table;
+ // EnableVgwRoutePropagation indicates that the route was propagated by route
+ // propagation.
+ //
+ // route.state - The state of a route in the route table (active | blackhole).
+ // The blackhole state indicates that the route's target isn't available (for
+ // example, the specified gateway isn't attached to the VPC, the specified NAT
+ // instance has been terminated, and so on).
+ //
+ // route.vpc-peering-connection-id - The ID of a VPC peering connection specified
+ // in a route in the table.
+ //
+ // tag:key=value - The key/value combination of a tag assigned to the resource.
+ //
+ // tag-key - The key of a tag assigned to the resource. This filter is independent
+ // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
+ // and the filter "tag-value=X", you get any resources assigned both the tag
+ // key Purpose (regardless of what the tag's value is), and the tag value X
+ // (regardless of what the tag's key is). If you want to list only resources
+ // where Purpose is X, see the tag:key=value filter.
+ //
+ // tag-value - The value of a tag assigned to the resource. This filter is
+ // independent of the tag-key filter.
+ //
+ // vpc-id - The ID of the VPC for the route table.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // One or more route table IDs.
+ //
+ // Default: Describes all your route tables.
+ RouteTableIDs []*string `locationName:"RouteTableId" locationNameList:"item" type:"list"`
+
+ metadataDescribeRouteTablesInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeRouteTablesInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeRouteTablesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeRouteTablesInput) GoString() string {
+ return s.String()
+}
+
+type DescribeRouteTablesOutput struct {
+ // Information about one or more route tables.
+ RouteTables []*RouteTable `locationName:"routeTableSet" locationNameList:"item" type:"list"`
+
+ metadataDescribeRouteTablesOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeRouteTablesOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeRouteTablesOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeRouteTablesOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeSecurityGroupsInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // description - The description of the security group.
+ //
+ // egress.ip-permission.prefix-list-id - The ID (prefix) of the AWS service
+ // to which the security group allows access.
+ //
+ // group-id - The ID of the security group.
+ //
+ // group-name - The name of the security group.
+ //
+ // ip-permission.cidr - A CIDR range that has been granted permission.
+ //
+ // ip-permission.from-port - The start of port range for the TCP and UDP
+ // protocols, or an ICMP type number.
+ //
+ // ip-permission.group-id - The ID of a security group that has been granted
+ // permission.
+ //
+ // ip-permission.group-name - The name of a security group that has been
+ // granted permission.
+ //
+ // ip-permission.protocol - The IP protocol for the permission (tcp | udp
+ // | icmp or a protocol number).
+ //
+ // ip-permission.to-port - The end of port range for the TCP and UDP protocols,
+ // or an ICMP code.
+ //
+ // ip-permission.user-id - The ID of an AWS account that has been granted
+ // permission.
+ //
+ // owner-id - The AWS account ID of the owner of the security group.
+ //
+ // tag-key - The key of a tag assigned to the security group.
+ //
+ // tag-value - The value of a tag assigned to the security group.
+ //
+ // vpc-id - The ID of the VPC specified when the security group was created.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // One or more security group IDs. Required for security groups in a nondefault
+ // VPC.
+ //
+ // Default: Describes all your security groups.
+ GroupIDs []*string `locationName:"GroupId" locationNameList:"groupId" type:"list"`
+
+ // [EC2-Classic and default VPC only] One or more security group names. You
+ // can specify either the security group name or the security group ID. For
+ // security groups in a nondefault VPC, use the group-name filter to describe
+ // security groups by name.
+ //
+ // Default: Describes all your security groups.
+ GroupNames []*string `locationName:"GroupName" locationNameList:"GroupName" type:"list"`
+
+ metadataDescribeSecurityGroupsInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeSecurityGroupsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeSecurityGroupsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeSecurityGroupsInput) GoString() string {
+ return s.String()
+}
+
+type DescribeSecurityGroupsOutput struct {
+ // Information about one or more security groups.
+ SecurityGroups []*SecurityGroup `locationName:"securityGroupInfo" locationNameList:"item" type:"list"`
+
+ metadataDescribeSecurityGroupsOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeSecurityGroupsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeSecurityGroupsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeSecurityGroupsOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeSnapshotAttributeInput struct {
+ // The snapshot attribute you would like to view.
+ Attribute *string `type:"string" required:"true" enum:"SnapshotAttributeName"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the EBS snapshot.
+ SnapshotID *string `locationName:"SnapshotId" type:"string" required:"true"`
+
+ metadataDescribeSnapshotAttributeInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeSnapshotAttributeInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeSnapshotAttributeInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeSnapshotAttributeInput) GoString() string {
+ return s.String()
+}
+
+type DescribeSnapshotAttributeOutput struct {
+ // A list of permissions for creating volumes from the snapshot.
+ CreateVolumePermissions []*CreateVolumePermission `locationName:"createVolumePermission" locationNameList:"item" type:"list"`
+
+ // A list of product codes.
+ ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"`
+
+ // The ID of the EBS snapshot.
+ SnapshotID *string `locationName:"snapshotId" type:"string"`
+
+ metadataDescribeSnapshotAttributeOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeSnapshotAttributeOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeSnapshotAttributeOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeSnapshotAttributeOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeSnapshotsInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // description - A description of the snapshot.
+ //
+ // owner-alias - The AWS account alias (for example, amazon) that owns the
+ // snapshot.
+ //
+ // owner-id - The ID of the AWS account that owns the snapshot.
+ //
+ // progress - The progress of the snapshot, as a percentage (for example,
+ // 80%).
+ //
+ // snapshot-id - The snapshot ID.
+ //
+ // start-time - The time stamp when the snapshot was initiated.
+ //
+ // status - The status of the snapshot (pending | completed | error).
+ //
+ // tag:key=value - The key/value combination of a tag assigned to the resource.
+ //
+ // tag-key - The key of a tag assigned to the resource. This filter is independent
+ // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
+ // and the filter "tag-value=X", you get any resources assigned both the tag
+ // key Purpose (regardless of what the tag's value is), and the tag value X
+ // (regardless of what the tag's key is). If you want to list only resources
+ // where Purpose is X, see the tag:key=value filter.
+ //
+ // tag-value - The value of a tag assigned to the resource. This filter is
+ // independent of the tag-key filter.
+ //
+ // volume-id - The ID of the volume the snapshot is for.
+ //
+ // volume-size - The size of the volume, in GiB.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // The maximum number of snapshot results returned by DescribeSnapshots in paginated
+ // output. When this parameter is used, DescribeSnapshots only returns MaxResults
+ // results in a single page along with a NextToken response element. The remaining
+ // results of the initial request can be seen by sending another DescribeSnapshots
+ // request with the returned NextToken value. This value can be between 5 and
+ // 1000; if MaxResults is given a value larger than 1000, only 1000 results
+ // are returned. If this parameter is not used, then DescribeSnapshots returns
+ // all results. You cannot specify this parameter and the snapshot IDs parameter
+ // in the same request.
+ MaxResults *int64 `type:"integer"`
+
+ // The NextToken value returned from a previous paginated DescribeSnapshots
+ // request where MaxResults was used and the results exceeded the value of that
+ // parameter. Pagination continues from the end of the previous results that
+ // returned the NextToken value. This value is null when there are no more results
+ // to return.
+ NextToken *string `type:"string"`
+
+ // Returns the snapshots owned by the specified owner. Multiple owners can be
+ // specified.
+ OwnerIDs []*string `locationName:"Owner" locationNameList:"Owner" type:"list"`
+
+ // One or more AWS accounts IDs that can create volumes from the snapshot.
+ RestorableByUserIDs []*string `locationName:"RestorableBy" type:"list"`
+
+ // One or more snapshot IDs.
+ //
+ // Default: Describes snapshots for which you have launch permissions.
+ SnapshotIDs []*string `locationName:"SnapshotId" locationNameList:"SnapshotId" type:"list"`
+
+ metadataDescribeSnapshotsInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeSnapshotsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeSnapshotsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeSnapshotsInput) GoString() string {
+ return s.String()
+}
+
+type DescribeSnapshotsOutput struct {
+ // The NextToken value to include in a future DescribeSnapshots request. When
+ // the results of a DescribeSnapshots request exceed MaxResults, this value
+ // can be used to retrieve the next page of results. This value is null when
+ // there are no more results to return.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ // Information about the snapshots.
+ Snapshots []*Snapshot `locationName:"snapshotSet" locationNameList:"item" type:"list"`
+
+ metadataDescribeSnapshotsOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeSnapshotsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeSnapshotsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeSnapshotsOutput) GoString() string {
+ return s.String()
+}
+
+// Contains the parameters for DescribeSpotDatafeedSubscription.
+type DescribeSpotDatafeedSubscriptionInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ metadataDescribeSpotDatafeedSubscriptionInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeSpotDatafeedSubscriptionInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeSpotDatafeedSubscriptionInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeSpotDatafeedSubscriptionInput) GoString() string {
+ return s.String()
+}
+
+// Contains the output of DescribeSpotDatafeedSubscription.
+type DescribeSpotDatafeedSubscriptionOutput struct {
+ // The Spot Instance data feed subscription.
+ SpotDatafeedSubscription *SpotDatafeedSubscription `locationName:"spotDatafeedSubscription" type:"structure"`
+
+ metadataDescribeSpotDatafeedSubscriptionOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeSpotDatafeedSubscriptionOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeSpotDatafeedSubscriptionOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeSpotDatafeedSubscriptionOutput) GoString() string {
+ return s.String()
+}
+
+// Contains the parameters for DescribeSpotFleetInstances.
+type DescribeSpotFleetInstancesInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The maximum number of results to return in a single call. Specify a value
+ // between 1 and 1000. The default value is 1000. To retrieve the remaining
+ // results, make another call with the returned NextToken value.
+ MaxResults *int64 `locationName:"maxResults" type:"integer"`
+
+ // The token for the next set of results.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ // The ID of the Spot fleet request.
+ SpotFleetRequestID *string `locationName:"spotFleetRequestId" type:"string" required:"true"`
+
+ metadataDescribeSpotFleetInstancesInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeSpotFleetInstancesInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeSpotFleetInstancesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeSpotFleetInstancesInput) GoString() string {
+ return s.String()
+}
+
+// Contains the output of DescribeSpotFleetInstances.
+type DescribeSpotFleetInstancesOutput struct {
+ // The running instances. Note that this list is refreshed periodically and
+ // might be out of date.
+ ActiveInstances []*ActiveInstance `locationName:"activeInstanceSet" locationNameList:"item" type:"list" required:"true"`
+
+ // The token required to retrieve the next set of results. This value is null
+ // when there are no more results to return.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ // The ID of the Spot fleet request.
+ SpotFleetRequestID *string `locationName:"spotFleetRequestId" type:"string" required:"true"`
+
+ metadataDescribeSpotFleetInstancesOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeSpotFleetInstancesOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeSpotFleetInstancesOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeSpotFleetInstancesOutput) GoString() string {
+ return s.String()
+}
+
+// Contains the parameters for DescribeSpotFleetRequestHistory.
+type DescribeSpotFleetRequestHistoryInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The type of events to describe. By default, all events are described.
+ EventType *string `locationName:"eventType" type:"string" enum:"EventType"`
+
+ // The maximum number of results to return in a single call. Specify a value
+ // between 1 and 1000. The default value is 1000. To retrieve the remaining
+ // results, make another call with the returned NextToken value.
+ MaxResults *int64 `locationName:"maxResults" type:"integer"`
+
+ // The token for the next set of results.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ // The ID of the Spot fleet request.
+ SpotFleetRequestID *string `locationName:"spotFleetRequestId" type:"string" required:"true"`
+
+ // The starting date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
+ StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601" required:"true"`
+
+ metadataDescribeSpotFleetRequestHistoryInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeSpotFleetRequestHistoryInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeSpotFleetRequestHistoryInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeSpotFleetRequestHistoryInput) GoString() string {
+ return s.String()
+}
+
+// Contains the output of DescribeSpotFleetRequestHistory.
+type DescribeSpotFleetRequestHistoryOutput struct {
+ // Information about the events in the history of the Spot fleet request.
+ HistoryRecords []*HistoryRecord `locationName:"historyRecordSet" locationNameList:"item" type:"list" required:"true"`
+
+ // The last date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
+ // All records up to this time were retrieved.
+ //
+ // If nextToken indicates that there are more results, this value is not present.
+ LastEvaluatedTime *time.Time `locationName:"lastEvaluatedTime" type:"timestamp" timestampFormat:"iso8601" required:"true"`
+
+ // The token required to retrieve the next set of results. This value is null
+ // when there are no more results to return.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ // The ID of the Spot fleet request.
+ SpotFleetRequestID *string `locationName:"spotFleetRequestId" type:"string" required:"true"`
+
+ // The starting date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
+ StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601" required:"true"`
+
+ metadataDescribeSpotFleetRequestHistoryOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeSpotFleetRequestHistoryOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeSpotFleetRequestHistoryOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeSpotFleetRequestHistoryOutput) GoString() string {
+ return s.String()
+}
+
+// Contains the parameters for DescribeSpotFleetRequests.
+type DescribeSpotFleetRequestsInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The maximum number of results to return in a single call. Specify a value
+ // between 1 and 1000. The default value is 1000. To retrieve the remaining
+ // results, make another call with the returned NextToken value.
+ MaxResults *int64 `locationName:"maxResults" type:"integer"`
+
+ // The token for the next set of results.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ // The IDs of the Spot fleet requests.
+ SpotFleetRequestIDs []*string `locationName:"spotFleetRequestId" locationNameList:"item" type:"list"`
+
+ metadataDescribeSpotFleetRequestsInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeSpotFleetRequestsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeSpotFleetRequestsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeSpotFleetRequestsInput) GoString() string {
+ return s.String()
+}
+
+// Contains the output of DescribeSpotFleetRequests.
+type DescribeSpotFleetRequestsOutput struct {
+ // The token required to retrieve the next set of results. This value is null
+ // when there are no more results to return.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ // Information about the configuration of your Spot fleet.
+ SpotFleetRequestConfigs []*SpotFleetRequestConfig `locationName:"spotFleetRequestConfigSet" locationNameList:"item" type:"list" required:"true"`
+
+ metadataDescribeSpotFleetRequestsOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeSpotFleetRequestsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeSpotFleetRequestsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeSpotFleetRequestsOutput) GoString() string {
+ return s.String()
+}
+
+// Contains the parameters for DescribeSpotInstanceRequests.
+type DescribeSpotInstanceRequestsInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // availability-zone-group - The Availability Zone group.
+ //
+ // create-time - The time stamp when the Spot Instance request was created.
+ //
+ // fault-code - The fault code related to the request.
+ //
+ // fault-message - The fault message related to the request.
+ //
+ // instance-id - The ID of the instance that fulfilled the request.
+ //
+ // launch-group - The Spot Instance launch group.
+ //
+ // launch.block-device-mapping.delete-on-termination - Indicates whether
+ // the Amazon EBS volume is deleted on instance termination.
+ //
+ // launch.block-device-mapping.device-name - The device name for the Amazon
+ // EBS volume (for example, /dev/sdh).
+ //
+ // launch.block-device-mapping.snapshot-id - The ID of the snapshot used
+ // for the Amazon EBS volume.
+ //
+ // launch.block-device-mapping.volume-size - The size of the Amazon EBS volume,
+ // in GiB.
+ //
+ // launch.block-device-mapping.volume-type - The type of the Amazon EBS volume
+ // (gp2 | standard | io1).
+ //
+ // launch.group-id - The security group for the instance.
+ //
+ // launch.image-id - The ID of the AMI.
+ //
+ // launch.instance-type - The type of instance (for example, m1.small).
+ //
+ // launch.kernel-id - The kernel ID.
+ //
+ // launch.key-name - The name of the key pair the instance launched with.
+ //
+ // launch.monitoring-enabled - Whether monitoring is enabled for the Spot
+ // Instance.
+ //
+ // launch.ramdisk-id - The RAM disk ID.
+ //
+ // network-interface.network-interface-id - The ID of the network interface.
+ //
+ // network-interface.device-index - The index of the device for the network
+ // interface attachment on the instance.
+ //
+ // network-interface.subnet-id - The ID of the subnet for the instance.
+ //
+ // network-interface.description - A description of the network interface.
+ //
+ // network-interface.private-ip-address - The primary private IP address
+ // of the network interface.
+ //
+ // network-interface.delete-on-termination - Indicates whether the network
+ // interface is deleted when the instance is terminated.
+ //
+ // network-interface.group-id - The ID of the security group associated with
+ // the network interface.
+ //
+ // network-interface.group-name - The name of the security group associated
+ // with the network interface.
+ //
+ // network-interface.addresses.primary - Indicates whether the IP address
+ // is the primary private IP address.
+ //
+ // product-description - The product description associated with the instance
+ // (Linux/UNIX | Windows).
+ //
+ // spot-instance-request-id - The Spot Instance request ID.
+ //
+ // spot-price - The maximum hourly price for any Spot Instance launched to
+ // fulfill the request.
+ //
+ // state - The state of the Spot Instance request (open | active | closed
+ // | cancelled | failed). Spot bid status information can help you track your
+ // Amazon EC2 Spot Instance requests. For more information, see Spot Bid Status
+ // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html)
+ // in the Amazon Elastic Compute Cloud User Guide.
+ //
+ // status-code - The short code describing the most recent evaluation of
+ // your Spot Instance request.
+ //
+ // status-message - The message explaining the status of the Spot Instance
+ // request.
+ //
+ // tag:key=value - The key/value combination of a tag assigned to the resource.
+ //
+ // tag-key - The key of a tag assigned to the resource. This filter is independent
+ // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
+ // and the filter "tag-value=X", you get any resources assigned both the tag
+ // key Purpose (regardless of what the tag's value is), and the tag value X
+ // (regardless of what the tag's key is). If you want to list only resources
+ // where Purpose is X, see the tag:key=value filter.
+ //
+ // tag-value - The value of a tag assigned to the resource. This filter is
+ // independent of the tag-key filter.
+ //
+ // type - The type of Spot Instance request (one-time | persistent).
+ //
+ // launched-availability-zone - The Availability Zone in which the bid is
+ // launched.
+ //
+ // valid-from - The start date of the request.
+ //
+ // valid-until - The end date of the request.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // One or more Spot Instance request IDs.
+ SpotInstanceRequestIDs []*string `locationName:"SpotInstanceRequestId" locationNameList:"SpotInstanceRequestId" type:"list"`
+
+ metadataDescribeSpotInstanceRequestsInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeSpotInstanceRequestsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeSpotInstanceRequestsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeSpotInstanceRequestsInput) GoString() string {
+ return s.String()
+}
+
+// Contains the output of DescribeSpotInstanceRequests.
+type DescribeSpotInstanceRequestsOutput struct {
+ // One or more Spot Instance requests.
+ SpotInstanceRequests []*SpotInstanceRequest `locationName:"spotInstanceRequestSet" locationNameList:"item" type:"list"`
+
+ metadataDescribeSpotInstanceRequestsOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeSpotInstanceRequestsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeSpotInstanceRequestsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeSpotInstanceRequestsOutput) GoString() string {
+ return s.String()
+}
+
+// Contains the parameters for DescribeSpotPriceHistory.
+type DescribeSpotPriceHistoryInput struct {
+ // Filters the results by the specified Availability Zone.
+ AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The date and time, up to the current date, from which to stop retrieving
+ // the price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
+ EndTime *time.Time `locationName:"endTime" type:"timestamp" timestampFormat:"iso8601"`
+
+ // One or more filters.
+ //
+ // availability-zone - The Availability Zone for which prices should be returned.
+ //
+ // instance-type - The type of instance (for example, m1.small).
+ //
+ // product-description - The product description for the Spot Price (Linux/UNIX
+ // | SUSE Linux | Windows | Linux/UNIX (Amazon VPC) | SUSE Linux (Amazon VPC)
+ // | Windows (Amazon VPC)).
+ //
+ // spot-price - The Spot Price. The value must match exactly (or use wildcards;
+ // greater than or less than comparison is not supported).
+ //
+ // timestamp - The timestamp of the Spot Price history, in UTC format (for
+ // example, YYYY-MM-DDTHH:MM:SSZ). You can use wildcards (* and ?). Greater
+ // than or less than comparison is not supported.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // Filters the results by the specified instance types.
+ InstanceTypes []*string `locationName:"InstanceType" type:"list"`
+
+ // The maximum number of results to return in a single call. Specify a value
+ // between 1 and 1000. The default value is 1000. To retrieve the remaining
+ // results, make another call with the returned NextToken value.
+ MaxResults *int64 `locationName:"maxResults" type:"integer"`
+
+ // The token for the next set of results.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ // Filters the results by the specified basic product descriptions.
+ ProductDescriptions []*string `locationName:"ProductDescription" type:"list"`
+
+ // The date and time, up to the past 90 days, from which to start retrieving
+ // the price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
+ StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601"`
+
+ metadataDescribeSpotPriceHistoryInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeSpotPriceHistoryInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeSpotPriceHistoryInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeSpotPriceHistoryInput) GoString() string {
+ return s.String()
+}
+
+// Contains the output of DescribeSpotPriceHistory.
+type DescribeSpotPriceHistoryOutput struct {
+ // The token required to retrieve the next set of results. This value is null
+ // when there are no more results to return.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ // The historical Spot Prices.
+ SpotPriceHistory []*SpotPrice `locationName:"spotPriceHistorySet" locationNameList:"item" type:"list"`
+
+ metadataDescribeSpotPriceHistoryOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeSpotPriceHistoryOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeSpotPriceHistoryOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeSpotPriceHistoryOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeSubnetsInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // availabilityZone - The Availability Zone for the subnet. You can also
+ // use availability-zone as the filter name.
+ //
+ // available-ip-address-count - The number of IP addresses in the subnet
+ // that are available.
+ //
+ // cidrBlock - The CIDR block of the subnet. The CIDR block you specify must
+ // exactly match the subnet's CIDR block for information to be returned for
+ // the subnet. You can also use cidr or cidr-block as the filter names.
+ //
+ // defaultForAz - Indicates whether this is the default subnet for the Availability
+ // Zone. You can also use default-for-az as the filter name.
+ //
+ // state - The state of the subnet (pending | available).
+ //
+ // subnet-id - The ID of the subnet.
+ //
+ // tag:key=value - The key/value combination of a tag assigned to the resource.
+ //
+ // tag-key - The key of a tag assigned to the resource. This filter is independent
+ // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
+ // and the filter "tag-value=X", you get any resources assigned both the tag
+ // key Purpose (regardless of what the tag's value is), and the tag value X
+ // (regardless of what the tag's key is). If you want to list only resources
+ // where Purpose is X, see the tag:key=value filter.
+ //
+ // tag-value - The value of a tag assigned to the resource. This filter is
+ // independent of the tag-key filter.
+ //
+ // vpc-id - The ID of the VPC for the subnet.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // One or more subnet IDs.
+ //
+ // Default: Describes all your subnets.
+ SubnetIDs []*string `locationName:"SubnetId" locationNameList:"SubnetId" type:"list"`
+
+ metadataDescribeSubnetsInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeSubnetsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeSubnetsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeSubnetsInput) GoString() string {
+ return s.String()
+}
+
+type DescribeSubnetsOutput struct {
+ // Information about one or more subnets.
+ Subnets []*Subnet `locationName:"subnetSet" locationNameList:"item" type:"list"`
+
+ metadataDescribeSubnetsOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeSubnetsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeSubnetsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeSubnetsOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeTagsInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // key - The tag key.
+ //
+ // resource-id - The resource ID.
+ //
+ // resource-type - The resource type (customer-gateway | dhcp-options | image
+ // | instance | internet-gateway | network-acl | network-interface | reserved-instances
+ // | route-table | security-group | snapshot | spot-instances-request | subnet
+ // | volume | vpc | vpn-connection | vpn-gateway).
+ //
+ // value - The tag value.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // The maximum number of results to return for the request in a single page.
+ // The remaining results of the initial request can be seen by sending another
+ // request with the returned NextToken value. This value can be between 5 and
+ // 1000; if MaxResults is given a value larger than 1000, only 1000 results
+ // are returned.
+ MaxResults *int64 `locationName:"maxResults" type:"integer"`
+
+ // The token to retrieve the next page of results.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ metadataDescribeTagsInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeTagsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeTagsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeTagsInput) GoString() string {
+ return s.String()
+}
+
+type DescribeTagsOutput struct {
+ // The token to use to retrieve the next page of results. This value is null
+ // when there are no more results to return..
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ // A list of tags.
+ Tags []*TagDescription `locationName:"tagSet" locationNameList:"item" type:"list"`
+
+ metadataDescribeTagsOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeTagsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeTagsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeTagsOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeVPCAttributeInput struct {
+ // The VPC attribute.
+ Attribute *string `type:"string" enum:"VpcAttributeName"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the VPC.
+ VPCID *string `locationName:"VpcId" type:"string" required:"true"`
+
+ metadataDescribeVPCAttributeInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeVPCAttributeInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeVPCAttributeInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVPCAttributeInput) GoString() string {
+ return s.String()
+}
+
+type DescribeVPCAttributeOutput struct {
+ // Indicates whether the instances launched in the VPC get DNS hostnames. If
+ // this attribute is true, instances in the VPC get DNS hostnames; otherwise,
+ // they do not.
+ EnableDNSHostnames *AttributeBooleanValue `locationName:"enableDnsHostnames" type:"structure"`
+
+ // Indicates whether DNS resolution is enabled for the VPC. If this attribute
+ // is true, the Amazon DNS server resolves DNS hostnames for your instances
+ // to their corresponding IP addresses; otherwise, it does not.
+ EnableDNSSupport *AttributeBooleanValue `locationName:"enableDnsSupport" type:"structure"`
+
+ // The ID of the VPC.
+ VPCID *string `locationName:"vpcId" type:"string"`
+
+ metadataDescribeVPCAttributeOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeVPCAttributeOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeVPCAttributeOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVPCAttributeOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeVPCClassicLinkInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // is-classic-link-enabled - Whether the VPC is enabled for ClassicLink (true
+ // | false).
+ //
+ // tag:key=value - The key/value combination of a tag assigned to the resource.
+ //
+ // tag-key - The key of a tag assigned to the resource. This filter is independent
+ // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
+ // and the filter "tag-value=X", you get any resources assigned both the tag
+ // key Purpose (regardless of what the tag's value is), and the tag value X
+ // (regardless of what the tag's key is). If you want to list only resources
+ // where Purpose is X, see the tag:key=value filter.
+ //
+ // tag-value - The value of a tag assigned to the resource. This filter is
+ // independent of the tag-key filter.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // One or more VPCs for which you want to describe the ClassicLink status.
+ VPCIDs []*string `locationName:"VpcId" locationNameList:"VpcId" type:"list"`
+
+ metadataDescribeVPCClassicLinkInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeVPCClassicLinkInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeVPCClassicLinkInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVPCClassicLinkInput) GoString() string {
+ return s.String()
+}
+
+type DescribeVPCClassicLinkOutput struct {
+ // The ClassicLink status of one or more VPCs.
+ VPCs []*VPCClassicLink `locationName:"vpcSet" locationNameList:"item" type:"list"`
+
+ metadataDescribeVPCClassicLinkOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeVPCClassicLinkOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeVPCClassicLinkOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVPCClassicLinkOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeVPCEndpointServicesInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // The maximum number of items to return for this request. The request returns
+ // a token that you can specify in a subsequent call to get the next set of
+ // results.
+ //
+ // Constraint: If the value is greater than 1000, we return only 1000 items.
+ MaxResults *int64 `type:"integer"`
+
+ // The token for the next set of items to return. (You received this token from
+ // a prior call.)
+ NextToken *string `type:"string"`
+
+ metadataDescribeVPCEndpointServicesInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeVPCEndpointServicesInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeVPCEndpointServicesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVPCEndpointServicesInput) GoString() string {
+ return s.String()
+}
+
+type DescribeVPCEndpointServicesOutput struct {
+ // The token to use when requesting the next set of items. If there are no additional
+ // items to return, the string is empty.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ // A list of supported AWS services.
+ ServiceNames []*string `locationName:"serviceNameSet" locationNameList:"item" type:"list"`
+
+ metadataDescribeVPCEndpointServicesOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeVPCEndpointServicesOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeVPCEndpointServicesOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVPCEndpointServicesOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeVPCEndpointsInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // One or more filters.
+ //
+ // service-name: The name of the AWS service.
+ //
+ // vpc-id: The ID of the VPC in which the endpoint resides.
+ //
+ // vpc-endpoint-id: The ID of the endpoint.
+ //
+ // vpc-endpoint-state: The state of the endpoint. (pending | available |
+ // deleting | deleted)
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // The maximum number of items to return for this request. The request returns
+ // a token that you can specify in a subsequent call to get the next set of
+ // results.
+ //
+ // Constraint: If the value is greater than 1000, we return only 1000 items.
+ MaxResults *int64 `type:"integer"`
+
+ // The token for the next set of items to return. (You received this token from
+ // a prior call.)
+ NextToken *string `type:"string"`
+
+ // One or more endpoint IDs.
+ VPCEndpointIDs []*string `locationName:"VpcEndpointId" locationNameList:"item" type:"list"`
+
+ metadataDescribeVPCEndpointsInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeVPCEndpointsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeVPCEndpointsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVPCEndpointsInput) GoString() string {
+ return s.String()
+}
+
+type DescribeVPCEndpointsOutput struct {
+ // The token to use when requesting the next set of items. If there are no additional
+ // items to return, the string is empty.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ // Information about the endpoints.
+ VPCEndpoints []*VPCEndpoint `locationName:"vpcEndpointSet" locationNameList:"item" type:"list"`
+
+ metadataDescribeVPCEndpointsOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeVPCEndpointsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeVPCEndpointsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVPCEndpointsOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeVPCPeeringConnectionsInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // accepter-vpc-info.cidr-block - The CIDR block of the peer VPC.
+ //
+ // accepter-vpc-info.owner-id - The AWS account ID of the owner of the peer
+ // VPC.
+ //
+ // accepter-vpc-info.vpc-id - The ID of the peer VPC.
+ //
+ // expiration-time - The expiration date and time for the VPC peering connection.
+ //
+ // requester-vpc-info.cidr-block - The CIDR block of the requester's VPC.
+ //
+ // requester-vpc-info.owner-id - The AWS account ID of the owner of the requester
+ // VPC.
+ //
+ // requester-vpc-info.vpc-id - The ID of the requester VPC.
+ //
+ // status-code - The status of the VPC peering connection (pending-acceptance
+ // | failed | expired | provisioning | active | deleted | rejected).
+ //
+ // status-message - A message that provides more information about the status
+ // of the VPC peering connection, if applicable.
+ //
+ // tag:key=value - The key/value combination of a tag assigned to the resource.
+ //
+ // tag-key - The key of a tag assigned to the resource. This filter is independent
+ // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
+ // and the filter "tag-value=X", you get any resources assigned both the tag
+ // key Purpose (regardless of what the tag's value is), and the tag value X
+ // (regardless of what the tag's key is). If you want to list only resources
+ // where Purpose is X, see the tag:key=value filter.
+ //
+ // tag-value - The value of a tag assigned to the resource. This filter is
+ // independent of the tag-key filter.
+ //
+ // vpc-peering-connection-id - The ID of the VPC peering connection.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // One or more VPC peering connection IDs.
+ //
+ // Default: Describes all your VPC peering connections.
+ VPCPeeringConnectionIDs []*string `locationName:"VpcPeeringConnectionId" locationNameList:"item" type:"list"`
+
+ metadataDescribeVPCPeeringConnectionsInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeVPCPeeringConnectionsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeVPCPeeringConnectionsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVPCPeeringConnectionsInput) GoString() string {
+ return s.String()
+}
+
+type DescribeVPCPeeringConnectionsOutput struct {
+ // Information about the VPC peering connections.
+ VPCPeeringConnections []*VPCPeeringConnection `locationName:"vpcPeeringConnectionSet" locationNameList:"item" type:"list"`
+
+ metadataDescribeVPCPeeringConnectionsOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeVPCPeeringConnectionsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeVPCPeeringConnectionsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVPCPeeringConnectionsOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeVPCsInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // cidr - The CIDR block of the VPC. The CIDR block you specify must exactly
+ // match the VPC's CIDR block for information to be returned for the VPC. Must
+ // contain the slash followed by one or two digits (for example, /28).
+ //
+ // dhcp-options-id - The ID of a set of DHCP options.
+ //
+ // isDefault - Indicates whether the VPC is the default VPC.
+ //
+ // state - The state of the VPC (pending | available).
+ //
+ // tag:key=value - The key/value combination of a tag assigned to the resource.
+ //
+ // tag-key - The key of a tag assigned to the resource. This filter is independent
+ // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
+ // and the filter "tag-value=X", you get any resources assigned both the tag
+ // key Purpose (regardless of what the tag's value is), and the tag value X
+ // (regardless of what the tag's key is). If you want to list only resources
+ // where Purpose is X, see the tag:key=value filter.
+ //
+ // tag-value - The value of a tag assigned to the resource. This filter is
+ // independent of the tag-key filter.
+ //
+ // vpc-id - The ID of the VPC.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // One or more VPC IDs.
+ //
+ // Default: Describes all your VPCs.
+ VPCIDs []*string `locationName:"VpcId" locationNameList:"VpcId" type:"list"`
+
+ metadataDescribeVPCsInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeVPCsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeVPCsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVPCsInput) GoString() string {
+ return s.String()
+}
+
+type DescribeVPCsOutput struct {
+ // Information about one or more VPCs.
+ VPCs []*VPC `locationName:"vpcSet" locationNameList:"item" type:"list"`
+
+ metadataDescribeVPCsOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeVPCsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeVPCsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVPCsOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeVPNConnectionsInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // customer-gateway-configuration - The configuration information for the
+ // customer gateway.
+ //
+ // customer-gateway-id - The ID of a customer gateway associated with the
+ // VPN connection.
+ //
+ // state - The state of the VPN connection (pending | available | deleting
+ // | deleted).
+ //
+ // option.static-routes-only - Indicates whether the connection has static
+ // routes only. Used for devices that do not support Border Gateway Protocol
+ // (BGP).
+ //
+ // route.destination-cidr-block - The destination CIDR block. This corresponds
+ // to the subnet used in a customer data center.
+ //
+ // bgp-asn - The BGP Autonomous System Number (ASN) associated with a BGP
+ // device.
+ //
+ // tag:key=value - The key/value combination of a tag assigned to the resource.
+ //
+ // tag-key - The key of a tag assigned to the resource. This filter is independent
+ // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
+ // and the filter "tag-value=X", you get any resources assigned both the tag
+ // key Purpose (regardless of what the tag's value is), and the tag value X
+ // (regardless of what the tag's key is). If you want to list only resources
+ // where Purpose is X, see the tag:key=value filter.
+ //
+ // tag-value - The value of a tag assigned to the resource. This filter is
+ // independent of the tag-key filter.
+ //
+ // type - The type of VPN connection. Currently the only supported type is
+ // ipsec.1.
+ //
+ // vpn-connection-id - The ID of the VPN connection.
+ //
+ // vpn-gateway-id - The ID of a virtual private gateway associated with the
+ // VPN connection.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // One or more VPN connection IDs.
+ //
+ // Default: Describes your VPN connections.
+ VPNConnectionIDs []*string `locationName:"VpnConnectionId" locationNameList:"VpnConnectionId" type:"list"`
+
+ metadataDescribeVPNConnectionsInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeVPNConnectionsInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeVPNConnectionsInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVPNConnectionsInput) GoString() string {
+ return s.String()
+}
+
+type DescribeVPNConnectionsOutput struct {
+ // Information about one or more VPN connections.
+ VPNConnections []*VPNConnection `locationName:"vpnConnectionSet" locationNameList:"item" type:"list"`
+
+ metadataDescribeVPNConnectionsOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeVPNConnectionsOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeVPNConnectionsOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVPNConnectionsOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeVPNGatewaysInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // attachment.state - The current state of the attachment between the gateway
+ // and the VPC (attaching | attached | detaching | detached).
+ //
+ // attachment.vpc-id - The ID of an attached VPC.
+ //
+ // availability-zone - The Availability Zone for the virtual private gateway.
+ //
+ // state - The state of the virtual private gateway (pending | available
+ // | deleting | deleted).
+ //
+ // tag:key=value - The key/value combination of a tag assigned to the resource.
+ //
+ // tag-key - The key of a tag assigned to the resource. This filter is independent
+ // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
+ // and the filter "tag-value=X", you get any resources assigned both the tag
+ // key Purpose (regardless of what the tag's value is), and the tag value X
+ // (regardless of what the tag's key is). If you want to list only resources
+ // where Purpose is X, see the tag:key=value filter.
+ //
+ // tag-value - The value of a tag assigned to the resource. This filter is
+ // independent of the tag-key filter.
+ //
+ // type - The type of virtual private gateway. Currently the only supported
+ // type is ipsec.1.
+ //
+ // vpn-gateway-id - The ID of the virtual private gateway.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // One or more virtual private gateway IDs.
+ //
+ // Default: Describes all your virtual private gateways.
+ VPNGatewayIDs []*string `locationName:"VpnGatewayId" locationNameList:"VpnGatewayId" type:"list"`
+
+ metadataDescribeVPNGatewaysInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeVPNGatewaysInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeVPNGatewaysInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVPNGatewaysInput) GoString() string {
+ return s.String()
+}
+
+type DescribeVPNGatewaysOutput struct {
+ // Information about one or more virtual private gateways.
+ VPNGateways []*VPNGateway `locationName:"vpnGatewaySet" locationNameList:"item" type:"list"`
+
+ metadataDescribeVPNGatewaysOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeVPNGatewaysOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeVPNGatewaysOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVPNGatewaysOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeVolumeAttributeInput struct {
+ // The instance attribute.
+ Attribute *string `type:"string" enum:"VolumeAttributeName"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the volume.
+ VolumeID *string `locationName:"VolumeId" type:"string" required:"true"`
+
+ metadataDescribeVolumeAttributeInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeVolumeAttributeInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeVolumeAttributeInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVolumeAttributeInput) GoString() string {
+ return s.String()
+}
+
+type DescribeVolumeAttributeOutput struct {
+ // The state of autoEnableIO attribute.
+ AutoEnableIO *AttributeBooleanValue `locationName:"autoEnableIO" type:"structure"`
+
+ // A list of product codes.
+ ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"`
+
+ // The ID of the volume.
+ VolumeID *string `locationName:"volumeId" type:"string"`
+
+ metadataDescribeVolumeAttributeOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeVolumeAttributeOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeVolumeAttributeOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVolumeAttributeOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeVolumeStatusInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // action.code - The action code for the event (for example, enable-volume-io).
+ //
+ // action.description - A description of the action.
+ //
+ // action.event-id - The event ID associated with the action.
+ //
+ // availability-zone - The Availability Zone of the instance.
+ //
+ // event.description - A description of the event.
+ //
+ // event.event-id - The event ID.
+ //
+ // event.event-type - The event type (for io-enabled: passed | failed; for
+ // io-performance: io-performance:degraded | io-performance:severely-degraded
+ // | io-performance:stalled).
+ //
+ // event.not-after - The latest end time for the event.
+ //
+ // event.not-before - The earliest start time for the event.
+ //
+ // volume-status.details-name - The cause for volume-status.status (io-enabled
+ // | io-performance).
+ //
+ // volume-status.details-status - The status of volume-status.details-name
+ // (for io-enabled: passed | failed; for io-performance: normal | degraded |
+ // severely-degraded | stalled).
+ //
+ // volume-status.status - The status of the volume (ok | impaired | warning
+ // | insufficient-data).
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // The maximum number of volume results returned by DescribeVolumeStatus in
+ // paginated output. When this parameter is used, the request only returns MaxResults
+ // results in a single page along with a NextToken response element. The remaining
+ // results of the initial request can be seen by sending another request with
+ // the returned NextToken value. This value can be between 5 and 1000; if MaxResults
+ // is given a value larger than 1000, only 1000 results are returned. If this
+ // parameter is not used, then DescribeVolumeStatus returns all results. You
+ // cannot specify this parameter and the volume IDs parameter in the same request.
+ MaxResults *int64 `type:"integer"`
+
+ // The NextToken value to include in a future DescribeVolumeStatus request.
+ // When the results of the request exceed MaxResults, this value can be used
+ // to retrieve the next page of results. This value is null when there are no
+ // more results to return.
+ NextToken *string `type:"string"`
+
+ // One or more volume IDs.
+ //
+ // Default: Describes all your volumes.
+ VolumeIDs []*string `locationName:"VolumeId" locationNameList:"VolumeId" type:"list"`
+
+ metadataDescribeVolumeStatusInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeVolumeStatusInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeVolumeStatusInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVolumeStatusInput) GoString() string {
+ return s.String()
+}
+
+type DescribeVolumeStatusOutput struct {
+ // The token to use to retrieve the next page of results. This value is null
+ // when there are no more results to return.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ // A list of volumes.
+ VolumeStatuses []*VolumeStatusItem `locationName:"volumeStatusSet" locationNameList:"item" type:"list"`
+
+ metadataDescribeVolumeStatusOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeVolumeStatusOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeVolumeStatusOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVolumeStatusOutput) GoString() string {
+ return s.String()
+}
+
+type DescribeVolumesInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more filters.
+ //
+ // attachment.attach-time - The time stamp when the attachment initiated.
+ //
+ // attachment.delete-on-termination - Whether the volume is deleted on instance
+ // termination.
+ //
+ // attachment.device - The device name that is exposed to the instance (for
+ // example, /dev/sda1).
+ //
+ // attachment.instance-id - The ID of the instance the volume is attached
+ // to.
+ //
+ // attachment.status - The attachment state (attaching | attached | detaching
+ // | detached).
+ //
+ // availability-zone - The Availability Zone in which the volume was created.
+ //
+ // create-time - The time stamp when the volume was created.
+ //
+ // encrypted - The encryption status of the volume.
+ //
+ // size - The size of the volume, in GiB.
+ //
+ // snapshot-id - The snapshot from which the volume was created.
+ //
+ // status - The status of the volume (creating | available | in-use | deleting
+ // | deleted | error).
+ //
+ // tag:key=value - The key/value combination of a tag assigned to the resource.
+ //
+ // tag-key - The key of a tag assigned to the resource. This filter is independent
+ // of the tag-value filter. For example, if you use both the filter "tag-key=Purpose"
+ // and the filter "tag-value=X", you get any resources assigned both the tag
+ // key Purpose (regardless of what the tag's value is), and the tag value X
+ // (regardless of what the tag's key is). If you want to list only resources
+ // where Purpose is X, see the tag:key=value filter.
+ //
+ // tag-value - The value of a tag assigned to the resource. This filter is
+ // independent of the tag-key filter.
+ //
+ // volume-id - The volume ID.
+ //
+ // volume-type - The Amazon EBS volume type. This can be gp2 for General
+ // Purpose (SSD) volumes, io1 for Provisioned IOPS (SSD) volumes, or standard
+ // for Magnetic volumes.
+ Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"`
+
+ // The maximum number of volume results returned by DescribeVolumes in paginated
+ // output. When this parameter is used, DescribeVolumes only returns MaxResults
+ // results in a single page along with a NextToken response element. The remaining
+ // results of the initial request can be seen by sending another DescribeVolumes
+ // request with the returned NextToken value. This value can be between 5 and
+ // 1000; if MaxResults is given a value larger than 1000, only 1000 results
+ // are returned. If this parameter is not used, then DescribeVolumes returns
+ // all results. You cannot specify this parameter and the volume IDs parameter
+ // in the same request.
+ MaxResults *int64 `locationName:"maxResults" type:"integer"`
+
+ // The NextToken value returned from a previous paginated DescribeVolumes request
+ // where MaxResults was used and the results exceeded the value of that parameter.
+ // Pagination continues from the end of the previous results that returned the
+ // NextToken value. This value is null when there are no more results to return.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ // One or more volume IDs.
+ VolumeIDs []*string `locationName:"VolumeId" locationNameList:"VolumeId" type:"list"`
+
+ metadataDescribeVolumesInput `json:"-" xml:"-"`
+}
+
+type metadataDescribeVolumesInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeVolumesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVolumesInput) GoString() string {
+ return s.String()
+}
+
+type DescribeVolumesOutput struct {
+ // The NextToken value to include in a future DescribeVolumes request. When
+ // the results of a DescribeVolumes request exceed MaxResults, this value can
+ // be used to retrieve the next page of results. This value is null when there
+ // are no more results to return.
+ NextToken *string `locationName:"nextToken" type:"string"`
+
+ // Information about the volumes.
+ Volumes []*Volume `locationName:"volumeSet" locationNameList:"item" type:"list"`
+
+ metadataDescribeVolumesOutput `json:"-" xml:"-"`
+}
+
+type metadataDescribeVolumesOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DescribeVolumesOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DescribeVolumesOutput) GoString() string {
+ return s.String()
+}
+
+type DetachClassicLinkVPCInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the instance to unlink from the VPC.
+ InstanceID *string `locationName:"instanceId" type:"string" required:"true"`
+
+ // The ID of the VPC to which the instance is linked.
+ VPCID *string `locationName:"vpcId" type:"string" required:"true"`
+
+ metadataDetachClassicLinkVPCInput `json:"-" xml:"-"`
+}
+
+type metadataDetachClassicLinkVPCInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DetachClassicLinkVPCInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DetachClassicLinkVPCInput) GoString() string {
+ return s.String()
+}
+
+type DetachClassicLinkVPCOutput struct {
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool `locationName:"return" type:"boolean"`
+
+ metadataDetachClassicLinkVPCOutput `json:"-" xml:"-"`
+}
+
+type metadataDetachClassicLinkVPCOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DetachClassicLinkVPCOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DetachClassicLinkVPCOutput) GoString() string {
+ return s.String()
+}
+
+type DetachInternetGatewayInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the Internet gateway.
+ InternetGatewayID *string `locationName:"internetGatewayId" type:"string" required:"true"`
+
+ // The ID of the VPC.
+ VPCID *string `locationName:"vpcId" type:"string" required:"true"`
+
+ metadataDetachInternetGatewayInput `json:"-" xml:"-"`
+}
+
+type metadataDetachInternetGatewayInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DetachInternetGatewayInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DetachInternetGatewayInput) GoString() string {
+ return s.String()
+}
+
+type DetachInternetGatewayOutput struct {
+ metadataDetachInternetGatewayOutput `json:"-" xml:"-"`
+}
+
+type metadataDetachInternetGatewayOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DetachInternetGatewayOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DetachInternetGatewayOutput) GoString() string {
+ return s.String()
+}
+
+type DetachNetworkInterfaceInput struct {
+ // The ID of the attachment.
+ AttachmentID *string `locationName:"attachmentId" type:"string" required:"true"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // Specifies whether to force a detachment.
+ Force *bool `locationName:"force" type:"boolean"`
+
+ metadataDetachNetworkInterfaceInput `json:"-" xml:"-"`
+}
+
+type metadataDetachNetworkInterfaceInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DetachNetworkInterfaceInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DetachNetworkInterfaceInput) GoString() string {
+ return s.String()
+}
+
+type DetachNetworkInterfaceOutput struct {
+ metadataDetachNetworkInterfaceOutput `json:"-" xml:"-"`
+}
+
+type metadataDetachNetworkInterfaceOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DetachNetworkInterfaceOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DetachNetworkInterfaceOutput) GoString() string {
+ return s.String()
+}
+
+type DetachVPNGatewayInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the VPC.
+ VPCID *string `locationName:"VpcId" type:"string" required:"true"`
+
+ // The ID of the virtual private gateway.
+ VPNGatewayID *string `locationName:"VpnGatewayId" type:"string" required:"true"`
+
+ metadataDetachVPNGatewayInput `json:"-" xml:"-"`
+}
+
+type metadataDetachVPNGatewayInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DetachVPNGatewayInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DetachVPNGatewayInput) GoString() string {
+ return s.String()
+}
+
+type DetachVPNGatewayOutput struct {
+ metadataDetachVPNGatewayOutput `json:"-" xml:"-"`
+}
+
+type metadataDetachVPNGatewayOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DetachVPNGatewayOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DetachVPNGatewayOutput) GoString() string {
+ return s.String()
+}
+
+type DetachVolumeInput struct {
+ // The device name.
+ Device *string `type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // Forces detachment if the previous detachment attempt did not occur cleanly
+ // (for example, logging into an instance, unmounting the volume, and detaching
+ // normally). This option can lead to data loss or a corrupted file system.
+ // Use this option only as a last resort to detach a volume from a failed instance.
+ // The instance won't have an opportunity to flush file system caches or file
+ // system metadata. If you use this option, you must perform file system check
+ // and repair procedures.
+ Force *bool `type:"boolean"`
+
+ // The ID of the instance.
+ InstanceID *string `locationName:"InstanceId" type:"string"`
+
+ // The ID of the volume.
+ VolumeID *string `locationName:"VolumeId" type:"string" required:"true"`
+
+ metadataDetachVolumeInput `json:"-" xml:"-"`
+}
+
+type metadataDetachVolumeInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DetachVolumeInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DetachVolumeInput) GoString() string {
+ return s.String()
+}
+
+type DisableVGWRoutePropagationInput struct {
+ // The ID of the virtual private gateway.
+ GatewayID *string `locationName:"GatewayId" type:"string" required:"true"`
+
+ // The ID of the route table.
+ RouteTableID *string `locationName:"RouteTableId" type:"string" required:"true"`
+
+ metadataDisableVGWRoutePropagationInput `json:"-" xml:"-"`
+}
+
+type metadataDisableVGWRoutePropagationInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DisableVGWRoutePropagationInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DisableVGWRoutePropagationInput) GoString() string {
+ return s.String()
+}
+
+type DisableVGWRoutePropagationOutput struct {
+ metadataDisableVGWRoutePropagationOutput `json:"-" xml:"-"`
+}
+
+type metadataDisableVGWRoutePropagationOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DisableVGWRoutePropagationOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DisableVGWRoutePropagationOutput) GoString() string {
+ return s.String()
+}
+
+type DisableVPCClassicLinkInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the VPC.
+ VPCID *string `locationName:"vpcId" type:"string" required:"true"`
+
+ metadataDisableVPCClassicLinkInput `json:"-" xml:"-"`
+}
+
+type metadataDisableVPCClassicLinkInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DisableVPCClassicLinkInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DisableVPCClassicLinkInput) GoString() string {
+ return s.String()
+}
+
+type DisableVPCClassicLinkOutput struct {
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool `locationName:"return" type:"boolean"`
+
+ metadataDisableVPCClassicLinkOutput `json:"-" xml:"-"`
+}
+
+type metadataDisableVPCClassicLinkOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DisableVPCClassicLinkOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DisableVPCClassicLinkOutput) GoString() string {
+ return s.String()
+}
+
+type DisassociateAddressInput struct {
+ // [EC2-VPC] The association ID. Required for EC2-VPC.
+ AssociationID *string `locationName:"AssociationId" type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // [EC2-Classic] The Elastic IP address. Required for EC2-Classic.
+ PublicIP *string `locationName:"PublicIp" type:"string"`
+
+ metadataDisassociateAddressInput `json:"-" xml:"-"`
+}
+
+type metadataDisassociateAddressInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DisassociateAddressInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DisassociateAddressInput) GoString() string {
+ return s.String()
+}
+
+type DisassociateAddressOutput struct {
+ metadataDisassociateAddressOutput `json:"-" xml:"-"`
+}
+
+type metadataDisassociateAddressOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DisassociateAddressOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DisassociateAddressOutput) GoString() string {
+ return s.String()
+}
+
+type DisassociateRouteTableInput struct {
+ // The association ID representing the current association between the route
+ // table and subnet.
+ AssociationID *string `locationName:"associationId" type:"string" required:"true"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ metadataDisassociateRouteTableInput `json:"-" xml:"-"`
+}
+
+type metadataDisassociateRouteTableInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DisassociateRouteTableInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DisassociateRouteTableInput) GoString() string {
+ return s.String()
+}
+
+type DisassociateRouteTableOutput struct {
+ metadataDisassociateRouteTableOutput `json:"-" xml:"-"`
+}
+
+type metadataDisassociateRouteTableOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DisassociateRouteTableOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DisassociateRouteTableOutput) GoString() string {
+ return s.String()
+}
+
+// Describes a disk image.
+type DiskImage struct {
+ // A description of the disk image.
+ Description *string `type:"string"`
+
+ // Information about the disk image.
+ Image *DiskImageDetail `type:"structure"`
+
+ // Information about the volume.
+ Volume *VolumeDetail `type:"structure"`
+
+ metadataDiskImage `json:"-" xml:"-"`
+}
+
+type metadataDiskImage struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DiskImage) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DiskImage) GoString() string {
+ return s.String()
+}
+
+// Describes a disk image.
+type DiskImageDescription struct {
+ // The checksum computed for the disk image.
+ Checksum *string `locationName:"checksum" type:"string"`
+
+ // The disk image format.
+ Format *string `locationName:"format" type:"string" required:"true" enum:"DiskImageFormat"`
+
+ // A presigned URL for the import manifest stored in Amazon S3. For information
+ // about creating a presigned URL for an Amazon S3 object, read the "Query String
+ // Request Authentication Alternative" section of the Authenticating REST Requests
+ // (http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html)
+ // topic in the Amazon Simple Storage Service Developer Guide.
+ ImportManifestURL *string `locationName:"importManifestUrl" type:"string" required:"true"`
+
+ // The size of the disk image, in GiB.
+ Size *int64 `locationName:"size" type:"long" required:"true"`
+
+ metadataDiskImageDescription `json:"-" xml:"-"`
+}
+
+type metadataDiskImageDescription struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DiskImageDescription) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DiskImageDescription) GoString() string {
+ return s.String()
+}
+
+// Describes a disk image.
+type DiskImageDetail struct {
+ // The size of the disk image, in GiB.
+ Bytes *int64 `locationName:"bytes" type:"long" required:"true"`
+
+ // The disk image format.
+ Format *string `locationName:"format" type:"string" required:"true" enum:"DiskImageFormat"`
+
+ // A presigned URL for the import manifest stored in Amazon S3 and presented
+ // here as an Amazon S3 presigned URL. For information about creating a presigned
+ // URL for an Amazon S3 object, read the "Query String Request Authentication
+ // Alternative" section of the Authenticating REST Requests (http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html)
+ // topic in the Amazon Simple Storage Service Developer Guide.
+ ImportManifestURL *string `locationName:"importManifestUrl" type:"string" required:"true"`
+
+ metadataDiskImageDetail `json:"-" xml:"-"`
+}
+
+type metadataDiskImageDetail struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DiskImageDetail) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DiskImageDetail) GoString() string {
+ return s.String()
+}
+
+// Describes a disk image volume.
+type DiskImageVolumeDescription struct {
+ // The volume identifier.
+ ID *string `locationName:"id" type:"string" required:"true"`
+
+ // The size of the volume, in GiB.
+ Size *int64 `locationName:"size" type:"long"`
+
+ metadataDiskImageVolumeDescription `json:"-" xml:"-"`
+}
+
+type metadataDiskImageVolumeDescription struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s DiskImageVolumeDescription) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s DiskImageVolumeDescription) GoString() string {
+ return s.String()
+}
+
+// Describes a block device for an EBS volume.
+type EBSBlockDevice struct {
+ // Indicates whether the EBS volume is deleted on instance termination.
+ DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"`
+
+ // Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes
+ // may only be attached to instances that support Amazon EBS encryption.
+ Encrypted *bool `locationName:"encrypted" type:"boolean"`
+
+ // The number of I/O operations per second (IOPS) that the volume supports.
+ // For Provisioned IOPS (SSD) volumes, this represents the number of IOPS that
+ // are provisioned for the volume. For General Purpose (SSD) volumes, this represents
+ // the baseline performance of the volume and the rate at which the volume accumulates
+ // I/O credits for bursting. For more information on General Purpose (SSD) baseline
+ // performance, I/O credits, and bursting, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html)
+ // in the Amazon Elastic Compute Cloud User Guide.
+ //
+ // Constraint: Range is 100 to 20000 for Provisioned IOPS (SSD) volumes and
+ // 3 to 10000 for General Purpose (SSD) volumes.
+ //
+ // Condition: This parameter is required for requests to create io1 volumes;
+ // it is not used in requests to create standard or gp2 volumes.
+ IOPS *int64 `locationName:"iops" type:"integer"`
+
+ // The ID of the snapshot.
+ SnapshotID *string `locationName:"snapshotId" type:"string"`
+
+ // The size of the volume, in GiB.
+ //
+ // Constraints: 1-1024 for standard volumes, 1-16384 for gp2 volumes, and 4-16384
+ // for io1 volumes. If you specify a snapshot, the volume size must be equal
+ // to or larger than the snapshot size.
+ //
+ // Default: If you're creating the volume from a snapshot and don't specify
+ // a volume size, the default is the snapshot size.
+ VolumeSize *int64 `locationName:"volumeSize" type:"integer"`
+
+ // The volume type. gp2 for General Purpose (SSD) volumes, io1 for Provisioned
+ // IOPS (SSD) volumes, and standard for Magnetic volumes.
+ //
+ // Default: standard
+ VolumeType *string `locationName:"volumeType" type:"string" enum:"VolumeType"`
+
+ metadataEBSBlockDevice `json:"-" xml:"-"`
+}
+
+type metadataEBSBlockDevice struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s EBSBlockDevice) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s EBSBlockDevice) GoString() string {
+ return s.String()
+}
+
+// Describes a parameter used to set up an EBS volume in a block device mapping.
+type EBSInstanceBlockDevice struct {
+ // The time stamp when the attachment initiated.
+ AttachTime *time.Time `locationName:"attachTime" type:"timestamp" timestampFormat:"iso8601"`
+
+ // Indicates whether the volume is deleted on instance termination.
+ DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"`
+
+ // The attachment state.
+ Status *string `locationName:"status" type:"string" enum:"AttachmentStatus"`
+
+ // The ID of the EBS volume.
+ VolumeID *string `locationName:"volumeId" type:"string"`
+
+ metadataEBSInstanceBlockDevice `json:"-" xml:"-"`
+}
+
+type metadataEBSInstanceBlockDevice struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s EBSInstanceBlockDevice) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s EBSInstanceBlockDevice) GoString() string {
+ return s.String()
+}
+
+type EBSInstanceBlockDeviceSpecification struct {
+ // Indicates whether the volume is deleted on instance termination.
+ DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"`
+
+ // The ID of the EBS volume.
+ VolumeID *string `locationName:"volumeId" type:"string"`
+
+ metadataEBSInstanceBlockDeviceSpecification `json:"-" xml:"-"`
+}
+
+type metadataEBSInstanceBlockDeviceSpecification struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s EBSInstanceBlockDeviceSpecification) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s EBSInstanceBlockDeviceSpecification) GoString() string {
+ return s.String()
+}
+
+type EnableVGWRoutePropagationInput struct {
+ // The ID of the virtual private gateway.
+ GatewayID *string `locationName:"GatewayId" type:"string" required:"true"`
+
+ // The ID of the route table.
+ RouteTableID *string `locationName:"RouteTableId" type:"string" required:"true"`
+
+ metadataEnableVGWRoutePropagationInput `json:"-" xml:"-"`
+}
+
+type metadataEnableVGWRoutePropagationInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s EnableVGWRoutePropagationInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s EnableVGWRoutePropagationInput) GoString() string {
+ return s.String()
+}
+
+type EnableVGWRoutePropagationOutput struct {
+ metadataEnableVGWRoutePropagationOutput `json:"-" xml:"-"`
+}
+
+type metadataEnableVGWRoutePropagationOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s EnableVGWRoutePropagationOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s EnableVGWRoutePropagationOutput) GoString() string {
+ return s.String()
+}
+
+type EnableVPCClassicLinkInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the VPC.
+ VPCID *string `locationName:"vpcId" type:"string" required:"true"`
+
+ metadataEnableVPCClassicLinkInput `json:"-" xml:"-"`
+}
+
+type metadataEnableVPCClassicLinkInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s EnableVPCClassicLinkInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s EnableVPCClassicLinkInput) GoString() string {
+ return s.String()
+}
+
+type EnableVPCClassicLinkOutput struct {
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool `locationName:"return" type:"boolean"`
+
+ metadataEnableVPCClassicLinkOutput `json:"-" xml:"-"`
+}
+
+type metadataEnableVPCClassicLinkOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s EnableVPCClassicLinkOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s EnableVPCClassicLinkOutput) GoString() string {
+ return s.String()
+}
+
+type EnableVolumeIOInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the volume.
+ VolumeID *string `locationName:"volumeId" type:"string" required:"true"`
+
+ metadataEnableVolumeIOInput `json:"-" xml:"-"`
+}
+
+type metadataEnableVolumeIOInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s EnableVolumeIOInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s EnableVolumeIOInput) GoString() string {
+ return s.String()
+}
+
+type EnableVolumeIOOutput struct {
+ metadataEnableVolumeIOOutput `json:"-" xml:"-"`
+}
+
+type metadataEnableVolumeIOOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s EnableVolumeIOOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s EnableVolumeIOOutput) GoString() string {
+ return s.String()
+}
+
+// Describes a Spot fleet event.
+type EventInformation struct {
+ // The description of the event.
+ EventDescription *string `locationName:"eventDescription" type:"string"`
+
+ // The event.
+ //
+ // The following are the error events.
+ //
+ // iamFleetRoleInvalid - Spot fleet did not have the required permissions
+ // either to launch or terminate an instance.
+ //
+ // spotFleetRequestConfigurationInvalid - The configuration is not valid.
+ // For more information, see the description.
+ //
+ // spotInstanceCountLimitExceeded - You've reached the limit on the number
+ // of Spot Instances that you can launch.
+ //
+ // The following are the fleetRequestChange events.
+ //
+ // active - The Spot fleet has been validated and Amazon EC2 is attempting
+ // to maintain the target number of running Spot Instances.
+ //
+ // cancelled - The Spot fleet is canceled and has no running Spot Instances.
+ // The Spot fleet will be deleted two days after its instances were terminated.
+ //
+ // cancelled_running - The Spot fleet is canceled and will not launch additional
+ // Spot Instances, but its existing Spot Instances will continue to run until
+ // they are interrupted or terminated.
+ //
+ // cancelled_terminating - The Spot fleet is canceled and its Spot Instances
+ // are terminating.
+ //
+ // expired - The Spot fleet request has expired. A subsequent event indicates
+ // that the instances were terminated, if the request was created with terminateInstancesWithExpiration
+ // set.
+ //
+ // price_update - The bid price for a launch configuration was adjusted because
+ // it was too high. This change is permanent.
+ //
+ // submitted - The Spot fleet request is being evaluated and Amazon EC2 is
+ // preparing to launch the target number of Spot Instances.
+ //
+ // The following are the instanceChange events.
+ //
+ // launched - A bid was fulfilled and a new instance was launched.
+ //
+ // terminated - An instance was terminated by the user.
+ EventSubType *string `locationName:"eventSubType" type:"string"`
+
+ // The ID of the instance. This information is available only for instanceChange
+ // events.
+ InstanceID *string `locationName:"instanceId" type:"string"`
+
+ metadataEventInformation `json:"-" xml:"-"`
+}
+
+type metadataEventInformation struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s EventInformation) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s EventInformation) GoString() string {
+ return s.String()
+}
+
+// Describes an instance export task.
+type ExportTask struct {
+ // A description of the resource being exported.
+ Description *string `locationName:"description" type:"string"`
+
+ // The ID of the export task.
+ ExportTaskID *string `locationName:"exportTaskId" type:"string"`
+
+ // Information about the export task.
+ ExportToS3Task *ExportToS3Task `locationName:"exportToS3" type:"structure"`
+
+ // Information about the instance to export.
+ InstanceExportDetails *InstanceExportDetails `locationName:"instanceExport" type:"structure"`
+
+ // The state of the export task.
+ State *string `locationName:"state" type:"string" enum:"ExportTaskState"`
+
+ // The status message related to the export task.
+ StatusMessage *string `locationName:"statusMessage" type:"string"`
+
+ metadataExportTask `json:"-" xml:"-"`
+}
+
+type metadataExportTask struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ExportTask) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ExportTask) GoString() string {
+ return s.String()
+}
+
+// Describes the format and location for an instance export task.
+type ExportToS3Task struct {
+ // The container format used to combine disk images with metadata (such as OVF).
+ // If absent, only the disk image is exported.
+ ContainerFormat *string `locationName:"containerFormat" type:"string" enum:"ContainerFormat"`
+
+ // The format for the exported image.
+ DiskImageFormat *string `locationName:"diskImageFormat" type:"string" enum:"DiskImageFormat"`
+
+ // The S3 bucket for the destination image. The destination bucket must exist
+ // and grant WRITE and READ_ACP permissions to the AWS account vm-import-export@amazon.com.
+ S3Bucket *string `locationName:"s3Bucket" type:"string"`
+
+ // The encryption key for your S3 bucket.
+ S3Key *string `locationName:"s3Key" type:"string"`
+
+ metadataExportToS3Task `json:"-" xml:"-"`
+}
+
+type metadataExportToS3Task struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ExportToS3Task) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ExportToS3Task) GoString() string {
+ return s.String()
+}
+
+// Describes an instance export task.
+type ExportToS3TaskSpecification struct {
+ // The container format used to combine disk images with metadata (such as OVF).
+ // If absent, only the disk image is exported.
+ ContainerFormat *string `locationName:"containerFormat" type:"string" enum:"ContainerFormat"`
+
+ // The format for the exported image.
+ DiskImageFormat *string `locationName:"diskImageFormat" type:"string" enum:"DiskImageFormat"`
+
+ // The S3 bucket for the destination image. The destination bucket must exist
+ // and grant WRITE and READ_ACP permissions to the AWS account vm-import-export@amazon.com.
+ S3Bucket *string `locationName:"s3Bucket" type:"string"`
+
+ // The image is written to a single object in the S3 bucket at the S3 key s3prefix
+ // + exportTaskId + '.' + diskImageFormat.
+ S3Prefix *string `locationName:"s3Prefix" type:"string"`
+
+ metadataExportToS3TaskSpecification `json:"-" xml:"-"`
+}
+
+type metadataExportToS3TaskSpecification struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ExportToS3TaskSpecification) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ExportToS3TaskSpecification) GoString() string {
+ return s.String()
+}
+
+// A filter name and value pair that is used to return a more specific list
+// of results. Filters can be used to match a set of resources by various criteria,
+// such as tags, attributes, or IDs.
+type Filter struct {
+ // The name of the filter. Filter names are case-sensitive.
+ Name *string `type:"string"`
+
+ // One or more filter values. Filter values are case-sensitive.
+ Values []*string `locationName:"Value" locationNameList:"item" type:"list"`
+
+ metadataFilter `json:"-" xml:"-"`
+}
+
+type metadataFilter struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s Filter) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Filter) GoString() string {
+ return s.String()
+}
+
+// Describes a flow log.
+type FlowLog struct {
+ // The date and time the flow log was created.
+ CreationTime *time.Time `locationName:"creationTime" type:"timestamp" timestampFormat:"iso8601"`
+
+ // Information about the error that occurred. Rate limited indicates that CloudWatch
+ // logs throttling has been applied for one or more network interfaces. Access
+ // error indicates that the IAM role associated with the flow log does not have
+ // sufficient permissions to publish to CloudWatch Logs. Unknown error indicates
+ // an internal error.
+ DeliverLogsErrorMessage *string `locationName:"deliverLogsErrorMessage" type:"string"`
+
+ // The ARN of the IAM role that posts logs to CloudWatch Logs.
+ DeliverLogsPermissionARN *string `locationName:"deliverLogsPermissionArn" type:"string"`
+
+ // The status of the logs delivery (SUCCESS | FAILED).
+ DeliverLogsStatus *string `locationName:"deliverLogsStatus" type:"string"`
+
+ // The flow log ID.
+ FlowLogID *string `locationName:"flowLogId" type:"string"`
+
+ // The status of the flow log (ACTIVE).
+ FlowLogStatus *string `locationName:"flowLogStatus" type:"string"`
+
+ // The name of the flow log group.
+ LogGroupName *string `locationName:"logGroupName" type:"string"`
+
+ // The ID of the resource on which the flow log was created.
+ ResourceID *string `locationName:"resourceId" type:"string"`
+
+ // The type of traffic captured for the flow log.
+ TrafficType *string `locationName:"trafficType" type:"string" enum:"TrafficType"`
+
+ metadataFlowLog `json:"-" xml:"-"`
+}
+
+type metadataFlowLog struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s FlowLog) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s FlowLog) GoString() string {
+ return s.String()
+}
+
+type GetConsoleOutputInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the instance.
+ InstanceID *string `locationName:"InstanceId" type:"string" required:"true"`
+
+ metadataGetConsoleOutputInput `json:"-" xml:"-"`
+}
+
+type metadataGetConsoleOutputInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s GetConsoleOutputInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetConsoleOutputInput) GoString() string {
+ return s.String()
+}
+
+type GetConsoleOutputOutput struct {
+ // The ID of the instance.
+ InstanceID *string `locationName:"instanceId" type:"string"`
+
+ // The console output, Base64 encoded.
+ Output *string `locationName:"output" type:"string"`
+
+ // The time the output was last updated.
+ Timestamp *time.Time `locationName:"timestamp" type:"timestamp" timestampFormat:"iso8601"`
+
+ metadataGetConsoleOutputOutput `json:"-" xml:"-"`
+}
+
+type metadataGetConsoleOutputOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s GetConsoleOutputOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetConsoleOutputOutput) GoString() string {
+ return s.String()
+}
+
+type GetPasswordDataInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the Windows instance.
+ InstanceID *string `locationName:"InstanceId" type:"string" required:"true"`
+
+ metadataGetPasswordDataInput `json:"-" xml:"-"`
+}
+
+type metadataGetPasswordDataInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s GetPasswordDataInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetPasswordDataInput) GoString() string {
+ return s.String()
+}
+
+type GetPasswordDataOutput struct {
+ // The ID of the Windows instance.
+ InstanceID *string `locationName:"instanceId" type:"string"`
+
+ // The password of the instance.
+ PasswordData *string `locationName:"passwordData" type:"string"`
+
+ // The time the data was last updated.
+ Timestamp *time.Time `locationName:"timestamp" type:"timestamp" timestampFormat:"iso8601"`
+
+ metadataGetPasswordDataOutput `json:"-" xml:"-"`
+}
+
+type metadataGetPasswordDataOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s GetPasswordDataOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GetPasswordDataOutput) GoString() string {
+ return s.String()
+}
+
+// Describes a security group.
+type GroupIdentifier struct {
+ // The ID of the security group.
+ GroupID *string `locationName:"groupId" type:"string"`
+
+ // The name of the security group.
+ GroupName *string `locationName:"groupName" type:"string"`
+
+ metadataGroupIdentifier `json:"-" xml:"-"`
+}
+
+type metadataGroupIdentifier struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s GroupIdentifier) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s GroupIdentifier) GoString() string {
+ return s.String()
+}
+
+// Describes an event in the history of the Spot fleet request.
+type HistoryRecord struct {
+ // Information about the event.
+ EventInformation *EventInformation `locationName:"eventInformation" type:"structure" required:"true"`
+
+ // The event type.
+ //
+ // error - Indicates an error with the Spot fleet request.
+ //
+ // fleetRequestChange - Indicates a change in the status or configuration
+ // of the Spot fleet request.
+ //
+ // instanceChange - Indicates that an instance was launched or terminated.
+ EventType *string `locationName:"eventType" type:"string" required:"true" enum:"EventType"`
+
+ // The date and time of the event, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
+ Timestamp *time.Time `locationName:"timestamp" type:"timestamp" timestampFormat:"iso8601" required:"true"`
+
+ metadataHistoryRecord `json:"-" xml:"-"`
+}
+
+type metadataHistoryRecord struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s HistoryRecord) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s HistoryRecord) GoString() string {
+ return s.String()
+}
+
+// Describes an IAM instance profile.
+type IAMInstanceProfile struct {
+ // The Amazon Resource Name (ARN) of the instance profile.
+ ARN *string `locationName:"arn" type:"string"`
+
+ // The ID of the instance profile.
+ ID *string `locationName:"id" type:"string"`
+
+ metadataIAMInstanceProfile `json:"-" xml:"-"`
+}
+
+type metadataIAMInstanceProfile struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s IAMInstanceProfile) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s IAMInstanceProfile) GoString() string {
+ return s.String()
+}
+
+// Describes an IAM instance profile.
+type IAMInstanceProfileSpecification struct {
+ // The Amazon Resource Name (ARN) of the instance profile.
+ ARN *string `locationName:"arn" type:"string"`
+
+ // The name of the instance profile.
+ Name *string `locationName:"name" type:"string"`
+
+ metadataIAMInstanceProfileSpecification `json:"-" xml:"-"`
+}
+
+type metadataIAMInstanceProfileSpecification struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s IAMInstanceProfileSpecification) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s IAMInstanceProfileSpecification) GoString() string {
+ return s.String()
+}
+
+// Describes the ICMP type and code.
+type ICMPTypeCode struct {
+ // The ICMP type. A value of -1 means all types.
+ Code *int64 `locationName:"code" type:"integer"`
+
+ // The ICMP code. A value of -1 means all codes for the specified ICMP type.
+ Type *int64 `locationName:"type" type:"integer"`
+
+ metadataICMPTypeCode `json:"-" xml:"-"`
+}
+
+type metadataICMPTypeCode struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ICMPTypeCode) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ICMPTypeCode) GoString() string {
+ return s.String()
+}
+
+// Describes a security group rule.
+type IPPermission struct {
+ // The start of port range for the TCP and UDP protocols, or an ICMP type number.
+ // A value of -1 indicates all ICMP types.
+ FromPort *int64 `locationName:"fromPort" type:"integer"`
+
+ // The protocol.
+ //
+ // When you call DescribeSecurityGroups, the protocol value returned is the
+ // number. Exception: For TCP, UDP, and ICMP, the value returned is the name
+ // (for example, tcp, udp, or icmp). For a list of protocol numbers, see Protocol
+ // Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml).
+ // (VPC only) When you call AuthorizeSecurityGroupIngress, you can use -1 to
+ // specify all.
+ IPProtocol *string `locationName:"ipProtocol" type:"string"`
+
+ // One or more IP ranges.
+ IPRanges []*IPRange `locationName:"ipRanges" locationNameList:"item" type:"list"`
+
+ // (Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups
+ // only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress
+ // request, this is the AWS service that you want to access through a VPC endpoint
+ // from instances associated with the security group.
+ PrefixListIDs []*PrefixListID `locationName:"prefixListIds" locationNameList:"item" type:"list"`
+
+ // The end of port range for the TCP and UDP protocols, or an ICMP code. A value
+ // of -1 indicates all ICMP codes for the specified ICMP type.
+ ToPort *int64 `locationName:"toPort" type:"integer"`
+
+ // One or more security group and AWS account ID pairs.
+ UserIDGroupPairs []*UserIDGroupPair `locationName:"groups" locationNameList:"item" type:"list"`
+
+ metadataIPPermission `json:"-" xml:"-"`
+}
+
+type metadataIPPermission struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s IPPermission) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s IPPermission) GoString() string {
+ return s.String()
+}
+
+// Describes an IP range.
+type IPRange struct {
+ // The CIDR range. You can either specify a CIDR range or a source security
+ // group, not both.
+ CIDRIP *string `locationName:"cidrIp" type:"string"`
+
+ metadataIPRange `json:"-" xml:"-"`
+}
+
+type metadataIPRange struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s IPRange) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s IPRange) GoString() string {
+ return s.String()
+}
+
+// Describes an image.
+type Image struct {
+ // The architecture of the image.
+ Architecture *string `locationName:"architecture" type:"string" enum:"ArchitectureValues"`
+
+ // Any block device mapping entries.
+ BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"`
+
+ // The date and time the image was created.
+ CreationDate *string `locationName:"creationDate" type:"string"`
+
+ // The description of the AMI that was provided during image creation.
+ Description *string `locationName:"description" type:"string"`
+
+ // The hypervisor type of the image.
+ Hypervisor *string `locationName:"hypervisor" type:"string" enum:"HypervisorType"`
+
+ // The ID of the AMI.
+ ImageID *string `locationName:"imageId" type:"string"`
+
+ // The location of the AMI.
+ ImageLocation *string `locationName:"imageLocation" type:"string"`
+
+ // The AWS account alias (for example, amazon, self) or the AWS account ID of
+ // the AMI owner.
+ ImageOwnerAlias *string `locationName:"imageOwnerAlias" type:"string"`
+
+ // The type of image.
+ ImageType *string `locationName:"imageType" type:"string" enum:"ImageTypeValues"`
+
+ // The kernel associated with the image, if any. Only applicable for machine
+ // images.
+ KernelID *string `locationName:"kernelId" type:"string"`
+
+ // The name of the AMI that was provided during image creation.
+ Name *string `locationName:"name" type:"string"`
+
+ // The AWS account ID of the image owner.
+ OwnerID *string `locationName:"imageOwnerId" type:"string"`
+
+ // The value is Windows for Windows AMIs; otherwise blank.
+ Platform *string `locationName:"platform" type:"string" enum:"PlatformValues"`
+
+ // Any product codes associated with the AMI.
+ ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"`
+
+ // Indicates whether the image has public launch permissions. The value is true
+ // if this image has public launch permissions or false if it has only implicit
+ // and explicit launch permissions.
+ Public *bool `locationName:"isPublic" type:"boolean"`
+
+ // The RAM disk associated with the image, if any. Only applicable for machine
+ // images.
+ RAMDiskID *string `locationName:"ramdiskId" type:"string"`
+
+ // The device name of the root device (for example, /dev/sda1 or /dev/xvda).
+ RootDeviceName *string `locationName:"rootDeviceName" type:"string"`
+
+ // The type of root device used by the AMI. The AMI can use an EBS volume or
+ // an instance store volume.
+ RootDeviceType *string `locationName:"rootDeviceType" type:"string" enum:"DeviceType"`
+
+ // Specifies whether enhanced networking is enabled.
+ SRIOVNetSupport *string `locationName:"sriovNetSupport" type:"string"`
+
+ // The current state of the AMI. If the state is available, the image is successfully
+ // registered and can be used to launch an instance.
+ State *string `locationName:"imageState" type:"string" enum:"ImageState"`
+
+ // The reason for the state change.
+ StateReason *StateReason `locationName:"stateReason" type:"structure"`
+
+ // Any tags assigned to the image.
+ Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
+
+ // The type of virtualization of the AMI.
+ VirtualizationType *string `locationName:"virtualizationType" type:"string" enum:"VirtualizationType"`
+
+ metadataImage `json:"-" xml:"-"`
+}
+
+type metadataImage struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s Image) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Image) GoString() string {
+ return s.String()
+}
+
+// Describes the disk container object for an import image task.
+type ImageDiskContainer struct {
+ // The description of the disk image.
+ Description *string `type:"string"`
+
+ // The block device mapping for the disk.
+ DeviceName *string `type:"string"`
+
+ // The format of the disk image being imported.
+ //
+ // Valid values: RAW | VHD | VMDK | OVA
+ Format *string `type:"string"`
+
+ // The ID of the EBS snapshot to be used for importing the snapshot.
+ SnapshotID *string `locationName:"SnapshotId" type:"string"`
+
+ // The URL to the Amazon S3-based disk image being imported. The URL can either
+ // be a https URL (https://..) or an Amazon S3 URL (s3://..)
+ URL *string `locationName:"Url" type:"string"`
+
+ // The S3 bucket for the disk image.
+ UserBucket *UserBucket `type:"structure"`
+
+ metadataImageDiskContainer `json:"-" xml:"-"`
+}
+
+type metadataImageDiskContainer struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ImageDiskContainer) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ImageDiskContainer) GoString() string {
+ return s.String()
+}
+
+type ImportImageInput struct {
+ // The architecture of the virtual machine.
+ //
+ // Valid values: i386 | x86_64
+ Architecture *string `type:"string"`
+
+ // The client-specific data.
+ ClientData *ClientData `type:"structure"`
+
+ // The token to enable idempotency for VM import requests.
+ ClientToken *string `type:"string"`
+
+ // A description string for the import image task.
+ Description *string `type:"string"`
+
+ // Information about the disk containers.
+ DiskContainers []*ImageDiskContainer `locationName:"DiskContainer" locationNameList:"item" type:"list"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // The target hypervisor platform.
+ //
+ // Valid values: xen
+ Hypervisor *string `type:"string"`
+
+ // The license type to be used for the Amazon Machine Image (AMI) after importing.
+ //
+ // Note: You may only use BYOL if you have existing licenses with rights to
+ // use these licenses in a third party cloud like AWS. For more information,
+ // see VM Import/Export Prerequisites (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/VMImportPrerequisites.html)
+ // in the Amazon Elastic Compute Cloud User Guide.
+ //
+ // Valid values: AWS | BYOL
+ LicenseType *string `type:"string"`
+
+ // The operating system of the virtual machine.
+ //
+ // Valid values: Windows | Linux
+ Platform *string `type:"string"`
+
+ // The name of the role to use when not using the default role, 'vmimport'.
+ RoleName *string `type:"string"`
+
+ metadataImportImageInput `json:"-" xml:"-"`
+}
+
+type metadataImportImageInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ImportImageInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ImportImageInput) GoString() string {
+ return s.String()
+}
+
+type ImportImageOutput struct {
+ // The architecture of the virtual machine.
+ Architecture *string `locationName:"architecture" type:"string"`
+
+ // A description of the import task.
+ Description *string `locationName:"description" type:"string"`
+
+ // The target hypervisor of the import task.
+ Hypervisor *string `locationName:"hypervisor" type:"string"`
+
+ // The ID of the Amazon Machine Image (AMI) created by the import task.
+ ImageID *string `locationName:"imageId" type:"string"`
+
+ // The task ID of the import image task.
+ ImportTaskID *string `locationName:"importTaskId" type:"string"`
+
+ // The license type of the virtual machine.
+ LicenseType *string `locationName:"licenseType" type:"string"`
+
+ // The operating system of the virtual machine.
+ Platform *string `locationName:"platform" type:"string"`
+
+ // The progress of the task.
+ Progress *string `locationName:"progress" type:"string"`
+
+ // Information about the snapshots.
+ SnapshotDetails []*SnapshotDetail `locationName:"snapshotDetailSet" locationNameList:"item" type:"list"`
+
+ // A brief status of the task.
+ Status *string `locationName:"status" type:"string"`
+
+ // A detailed status message of the import task.
+ StatusMessage *string `locationName:"statusMessage" type:"string"`
+
+ metadataImportImageOutput `json:"-" xml:"-"`
+}
+
+type metadataImportImageOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ImportImageOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ImportImageOutput) GoString() string {
+ return s.String()
+}
+
+// Describes an import image task.
+type ImportImageTask struct {
+ // The architecture of the virtual machine.
+ //
+ // Valid values: i386 | x86_64
+ Architecture *string `locationName:"architecture" type:"string"`
+
+ // A description of the import task.
+ Description *string `locationName:"description" type:"string"`
+
+ // The target hypervisor for the import task.
+ //
+ // Valid values: xen
+ Hypervisor *string `locationName:"hypervisor" type:"string"`
+
+ // The ID of the Amazon Machine Image (AMI) of the imported virtual machine.
+ ImageID *string `locationName:"imageId" type:"string"`
+
+ // The ID of the import image task.
+ ImportTaskID *string `locationName:"importTaskId" type:"string"`
+
+ // The license type of the virtual machine.
+ LicenseType *string `locationName:"licenseType" type:"string"`
+
+ // The description string for the import image task.
+ Platform *string `locationName:"platform" type:"string"`
+
+ // The percentage of progress of the import image task.
+ Progress *string `locationName:"progress" type:"string"`
+
+ // Information about the snapshots.
+ SnapshotDetails []*SnapshotDetail `locationName:"snapshotDetailSet" locationNameList:"item" type:"list"`
+
+ // A brief status for the import image task.
+ Status *string `locationName:"status" type:"string"`
+
+ // A descriptive status message for the import image task.
+ StatusMessage *string `locationName:"statusMessage" type:"string"`
+
+ metadataImportImageTask `json:"-" xml:"-"`
+}
+
+type metadataImportImageTask struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ImportImageTask) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ImportImageTask) GoString() string {
+ return s.String()
+}
+
+type ImportInstanceInput struct {
+ // A description for the instance being imported.
+ Description *string `locationName:"description" type:"string"`
+
+ // The disk image.
+ DiskImages []*DiskImage `locationName:"diskImage" type:"list"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The launch specification.
+ LaunchSpecification *ImportInstanceLaunchSpecification `locationName:"launchSpecification" type:"structure"`
+
+ // The instance operating system.
+ Platform *string `locationName:"platform" type:"string" required:"true" enum:"PlatformValues"`
+
+ metadataImportInstanceInput `json:"-" xml:"-"`
+}
+
+type metadataImportInstanceInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ImportInstanceInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ImportInstanceInput) GoString() string {
+ return s.String()
+}
+
+// Describes the launch specification for VM import.
+type ImportInstanceLaunchSpecification struct {
+ // Reserved.
+ AdditionalInfo *string `locationName:"additionalInfo" type:"string"`
+
+ // The architecture of the instance.
+ Architecture *string `locationName:"architecture" type:"string" enum:"ArchitectureValues"`
+
+ // One or more security group IDs.
+ GroupIDs []*string `locationName:"GroupId" locationNameList:"SecurityGroupId" type:"list"`
+
+ // One or more security group names.
+ GroupNames []*string `locationName:"GroupName" locationNameList:"SecurityGroup" type:"list"`
+
+ // Indicates whether an instance stops or terminates when you initiate shutdown
+ // from the instance (using the operating system command for system shutdown).
+ InstanceInitiatedShutdownBehavior *string `locationName:"instanceInitiatedShutdownBehavior" type:"string" enum:"ShutdownBehavior"`
+
+ // The instance type. For more information about the instance types that you
+ // can import, see Before You Get Started (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/VMImportPrerequisites.html)
+ // in the Amazon Elastic Compute Cloud User Guide.
+ InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"`
+
+ // Indicates whether monitoring is enabled.
+ Monitoring *bool `locationName:"monitoring" type:"boolean"`
+
+ // The placement information for the instance.
+ Placement *Placement `locationName:"placement" type:"structure"`
+
+ // [EC2-VPC] An available IP address from the IP address range of the subnet.
+ PrivateIPAddress *string `locationName:"privateIpAddress" type:"string"`
+
+ // [EC2-VPC] The ID of the subnet in which to launch the instance.
+ SubnetID *string `locationName:"subnetId" type:"string"`
+
+ // The Base64-encoded MIME user data to be made available to the instance.
+ UserData *UserData `locationName:"userData" type:"structure"`
+
+ metadataImportInstanceLaunchSpecification `json:"-" xml:"-"`
+}
+
+type metadataImportInstanceLaunchSpecification struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ImportInstanceLaunchSpecification) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ImportInstanceLaunchSpecification) GoString() string {
+ return s.String()
+}
+
+type ImportInstanceOutput struct {
+ // Information about the conversion task.
+ ConversionTask *ConversionTask `locationName:"conversionTask" type:"structure"`
+
+ metadataImportInstanceOutput `json:"-" xml:"-"`
+}
+
+type metadataImportInstanceOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ImportInstanceOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ImportInstanceOutput) GoString() string {
+ return s.String()
+}
+
+// Describes an import instance task.
+type ImportInstanceTaskDetails struct {
+ // A description of the task.
+ Description *string `locationName:"description" type:"string"`
+
+ // The ID of the instance.
+ InstanceID *string `locationName:"instanceId" type:"string"`
+
+ // The instance operating system.
+ Platform *string `locationName:"platform" type:"string" enum:"PlatformValues"`
+
+ // One or more volumes.
+ Volumes []*ImportInstanceVolumeDetailItem `locationName:"volumes" locationNameList:"item" type:"list" required:"true"`
+
+ metadataImportInstanceTaskDetails `json:"-" xml:"-"`
+}
+
+type metadataImportInstanceTaskDetails struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ImportInstanceTaskDetails) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ImportInstanceTaskDetails) GoString() string {
+ return s.String()
+}
+
+// Describes an import volume task.
+type ImportInstanceVolumeDetailItem struct {
+ // The Availability Zone where the resulting instance will reside.
+ AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"`
+
+ // The number of bytes converted so far.
+ BytesConverted *int64 `locationName:"bytesConverted" type:"long" required:"true"`
+
+ // A description of the task.
+ Description *string `locationName:"description" type:"string"`
+
+ // The image.
+ Image *DiskImageDescription `locationName:"image" type:"structure" required:"true"`
+
+ // The status of the import of this particular disk image.
+ Status *string `locationName:"status" type:"string" required:"true"`
+
+ // The status information or errors related to the disk image.
+ StatusMessage *string `locationName:"statusMessage" type:"string"`
+
+ // The volume.
+ Volume *DiskImageVolumeDescription `locationName:"volume" type:"structure" required:"true"`
+
+ metadataImportInstanceVolumeDetailItem `json:"-" xml:"-"`
+}
+
+type metadataImportInstanceVolumeDetailItem struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ImportInstanceVolumeDetailItem) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ImportInstanceVolumeDetailItem) GoString() string {
+ return s.String()
+}
+
+type ImportKeyPairInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // A unique name for the key pair.
+ KeyName *string `locationName:"keyName" type:"string" required:"true"`
+
+ // The public key. You must base64 encode the public key material before sending
+ // it to AWS.
+ PublicKeyMaterial []byte `locationName:"publicKeyMaterial" type:"blob" required:"true"`
+
+ metadataImportKeyPairInput `json:"-" xml:"-"`
+}
+
+type metadataImportKeyPairInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ImportKeyPairInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ImportKeyPairInput) GoString() string {
+ return s.String()
+}
+
+type ImportKeyPairOutput struct {
+ // The MD5 public key fingerprint as specified in section 4 of RFC 4716.
+ KeyFingerprint *string `locationName:"keyFingerprint" type:"string"`
+
+ // The key pair name you provided.
+ KeyName *string `locationName:"keyName" type:"string"`
+
+ metadataImportKeyPairOutput `json:"-" xml:"-"`
+}
+
+type metadataImportKeyPairOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ImportKeyPairOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ImportKeyPairOutput) GoString() string {
+ return s.String()
+}
+
+type ImportSnapshotInput struct {
+ // The client-specific data.
+ ClientData *ClientData `type:"structure"`
+
+ // Token to enable idempotency for VM import requests.
+ ClientToken *string `type:"string"`
+
+ // The description string for the import snapshot task.
+ Description *string `type:"string"`
+
+ // Information about the disk container.
+ DiskContainer *SnapshotDiskContainer `type:"structure"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // The name of the role to use when not using the default role, 'vmimport'.
+ RoleName *string `type:"string"`
+
+ metadataImportSnapshotInput `json:"-" xml:"-"`
+}
+
+type metadataImportSnapshotInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ImportSnapshotInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ImportSnapshotInput) GoString() string {
+ return s.String()
+}
+
+type ImportSnapshotOutput struct {
+ // A description of the import snapshot task.
+ Description *string `locationName:"description" type:"string"`
+
+ // The ID of the import snapshot task.
+ ImportTaskID *string `locationName:"importTaskId" type:"string"`
+
+ // Information about the import snapshot task.
+ SnapshotTaskDetail *SnapshotTaskDetail `locationName:"snapshotTaskDetail" type:"structure"`
+
+ metadataImportSnapshotOutput `json:"-" xml:"-"`
+}
+
+type metadataImportSnapshotOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ImportSnapshotOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ImportSnapshotOutput) GoString() string {
+ return s.String()
+}
+
+// Describes an import snapshot task.
+type ImportSnapshotTask struct {
+ // A description of the import snapshot task.
+ Description *string `locationName:"description" type:"string"`
+
+ // The ID of the import snapshot task.
+ ImportTaskID *string `locationName:"importTaskId" type:"string"`
+
+ // Describes an import snapshot task.
+ SnapshotTaskDetail *SnapshotTaskDetail `locationName:"snapshotTaskDetail" type:"structure"`
+
+ metadataImportSnapshotTask `json:"-" xml:"-"`
+}
+
+type metadataImportSnapshotTask struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ImportSnapshotTask) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ImportSnapshotTask) GoString() string {
+ return s.String()
+}
+
+type ImportVolumeInput struct {
+ // The Availability Zone for the resulting EBS volume.
+ AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"`
+
+ // A description of the volume.
+ Description *string `locationName:"description" type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The disk image.
+ Image *DiskImageDetail `locationName:"image" type:"structure" required:"true"`
+
+ // The volume size.
+ Volume *VolumeDetail `locationName:"volume" type:"structure" required:"true"`
+
+ metadataImportVolumeInput `json:"-" xml:"-"`
+}
+
+type metadataImportVolumeInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ImportVolumeInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ImportVolumeInput) GoString() string {
+ return s.String()
+}
+
+type ImportVolumeOutput struct {
+ // Information about the conversion task.
+ ConversionTask *ConversionTask `locationName:"conversionTask" type:"structure"`
+
+ metadataImportVolumeOutput `json:"-" xml:"-"`
+}
+
+type metadataImportVolumeOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ImportVolumeOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ImportVolumeOutput) GoString() string {
+ return s.String()
+}
+
+// Describes an import volume task.
+type ImportVolumeTaskDetails struct {
+ // The Availability Zone where the resulting volume will reside.
+ AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"`
+
+ // The number of bytes converted so far.
+ BytesConverted *int64 `locationName:"bytesConverted" type:"long" required:"true"`
+
+ // The description you provided when starting the import volume task.
+ Description *string `locationName:"description" type:"string"`
+
+ // The image.
+ Image *DiskImageDescription `locationName:"image" type:"structure" required:"true"`
+
+ // The volume.
+ Volume *DiskImageVolumeDescription `locationName:"volume" type:"structure" required:"true"`
+
+ metadataImportVolumeTaskDetails `json:"-" xml:"-"`
+}
+
+type metadataImportVolumeTaskDetails struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ImportVolumeTaskDetails) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ImportVolumeTaskDetails) GoString() string {
+ return s.String()
+}
+
+// Describes an instance.
+type Instance struct {
+ // The AMI launch index, which can be used to find this instance in the launch
+ // group.
+ AMILaunchIndex *int64 `locationName:"amiLaunchIndex" type:"integer"`
+
+ // The architecture of the image.
+ Architecture *string `locationName:"architecture" type:"string" enum:"ArchitectureValues"`
+
+ // Any block device mapping entries for the instance.
+ BlockDeviceMappings []*InstanceBlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"`
+
+ // The idempotency token you provided when you launched the instance.
+ ClientToken *string `locationName:"clientToken" type:"string"`
+
+ // Indicates whether the instance is optimized for EBS I/O. This optimization
+ // provides dedicated throughput to Amazon EBS and an optimized configuration
+ // stack to provide optimal I/O performance. This optimization isn't available
+ // with all instance types. Additional usage charges apply when using an EBS
+ // Optimized instance.
+ EBSOptimized *bool `locationName:"ebsOptimized" type:"boolean"`
+
+ // The hypervisor type of the instance.
+ Hypervisor *string `locationName:"hypervisor" type:"string" enum:"HypervisorType"`
+
+ // The IAM instance profile associated with the instance.
+ IAMInstanceProfile *IAMInstanceProfile `locationName:"iamInstanceProfile" type:"structure"`
+
+ // The ID of the AMI used to launch the instance.
+ ImageID *string `locationName:"imageId" type:"string"`
+
+ // The ID of the instance.
+ InstanceID *string `locationName:"instanceId" type:"string"`
+
+ // Indicates whether this is a Spot Instance.
+ InstanceLifecycle *string `locationName:"instanceLifecycle" type:"string" enum:"InstanceLifecycleType"`
+
+ // The instance type.
+ InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"`
+
+ // The kernel associated with this instance.
+ KernelID *string `locationName:"kernelId" type:"string"`
+
+ // The name of the key pair, if this instance was launched with an associated
+ // key pair.
+ KeyName *string `locationName:"keyName" type:"string"`
+
+ // The time the instance was launched.
+ LaunchTime *time.Time `locationName:"launchTime" type:"timestamp" timestampFormat:"iso8601"`
+
+ // The monitoring information for the instance.
+ Monitoring *Monitoring `locationName:"monitoring" type:"structure"`
+
+ // [EC2-VPC] One or more network interfaces for the instance.
+ NetworkInterfaces []*InstanceNetworkInterface `locationName:"networkInterfaceSet" locationNameList:"item" type:"list"`
+
+ // The location where the instance launched.
+ Placement *Placement `locationName:"placement" type:"structure"`
+
+ // The value is Windows for Windows instances; otherwise blank.
+ Platform *string `locationName:"platform" type:"string" enum:"PlatformValues"`
+
+ // The private DNS name assigned to the instance. This DNS name can only be
+ // used inside the Amazon EC2 network. This name is not available until the
+ // instance enters the running state.
+ PrivateDNSName *string `locationName:"privateDnsName" type:"string"`
+
+ // The private IP address assigned to the instance.
+ PrivateIPAddress *string `locationName:"privateIpAddress" type:"string"`
+
+ // The product codes attached to this instance.
+ ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"`
+
+ // The public DNS name assigned to the instance. This name is not available
+ // until the instance enters the running state.
+ PublicDNSName *string `locationName:"dnsName" type:"string"`
+
+ // The public IP address assigned to the instance.
+ PublicIPAddress *string `locationName:"ipAddress" type:"string"`
+
+ // The RAM disk associated with this instance.
+ RAMDiskID *string `locationName:"ramdiskId" type:"string"`
+
+ // The root device name (for example, /dev/sda1 or /dev/xvda).
+ RootDeviceName *string `locationName:"rootDeviceName" type:"string"`
+
+ // The root device type used by the AMI. The AMI can use an EBS volume or an
+ // instance store volume.
+ RootDeviceType *string `locationName:"rootDeviceType" type:"string" enum:"DeviceType"`
+
+ // Specifies whether enhanced networking is enabled.
+ SRIOVNetSupport *string `locationName:"sriovNetSupport" type:"string"`
+
+ // One or more security groups for the instance.
+ SecurityGroups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"`
+
+ // Specifies whether to enable an instance launched in a VPC to perform NAT.
+ // This controls whether source/destination checking is enabled on the instance.
+ // A value of true means checking is enabled, and false means checking is disabled.
+ // The value must be false for the instance to perform NAT. For more information,
+ // see NAT Instances (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html)
+ // in the Amazon Virtual Private Cloud User Guide.
+ SourceDestCheck *bool `locationName:"sourceDestCheck" type:"boolean"`
+
+ // The ID of the Spot Instance request.
+ SpotInstanceRequestID *string `locationName:"spotInstanceRequestId" type:"string"`
+
+ // The current state of the instance.
+ State *InstanceState `locationName:"instanceState" type:"structure"`
+
+ // The reason for the most recent state transition.
+ StateReason *StateReason `locationName:"stateReason" type:"structure"`
+
+ // The reason for the most recent state transition. This might be an empty string.
+ StateTransitionReason *string `locationName:"reason" type:"string"`
+
+ // The ID of the subnet in which the instance is running.
+ SubnetID *string `locationName:"subnetId" type:"string"`
+
+ // Any tags assigned to the instance.
+ Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
+
+ // The ID of the VPC in which the instance is running.
+ VPCID *string `locationName:"vpcId" type:"string"`
+
+ // The virtualization type of the instance.
+ VirtualizationType *string `locationName:"virtualizationType" type:"string" enum:"VirtualizationType"`
+
+ metadataInstance `json:"-" xml:"-"`
+}
+
+type metadataInstance struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s Instance) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Instance) GoString() string {
+ return s.String()
+}
+
+// Describes a block device mapping.
+type InstanceBlockDeviceMapping struct {
+ // The device name exposed to the instance (for example, /dev/sdh or xvdh).
+ DeviceName *string `locationName:"deviceName" type:"string"`
+
+ // Parameters used to automatically set up EBS volumes when the instance is
+ // launched.
+ EBS *EBSInstanceBlockDevice `locationName:"ebs" type:"structure"`
+
+ metadataInstanceBlockDeviceMapping `json:"-" xml:"-"`
+}
+
+type metadataInstanceBlockDeviceMapping struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s InstanceBlockDeviceMapping) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InstanceBlockDeviceMapping) GoString() string {
+ return s.String()
+}
+
+// Describes a block device mapping entry.
+type InstanceBlockDeviceMappingSpecification struct {
+ // The device name exposed to the instance (for example, /dev/sdh or xvdh).
+ DeviceName *string `locationName:"deviceName" type:"string"`
+
+ // Parameters used to automatically set up EBS volumes when the instance is
+ // launched.
+ EBS *EBSInstanceBlockDeviceSpecification `locationName:"ebs" type:"structure"`
+
+ // suppress the specified device included in the block device mapping.
+ NoDevice *string `locationName:"noDevice" type:"string"`
+
+ // The virtual device name.
+ VirtualName *string `locationName:"virtualName" type:"string"`
+
+ metadataInstanceBlockDeviceMappingSpecification `json:"-" xml:"-"`
+}
+
+type metadataInstanceBlockDeviceMappingSpecification struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s InstanceBlockDeviceMappingSpecification) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InstanceBlockDeviceMappingSpecification) GoString() string {
+ return s.String()
+}
+
+// Describes a Reserved Instance listing state.
+type InstanceCount struct {
+ // The number of listed Reserved Instances in the state specified by the state.
+ InstanceCount *int64 `locationName:"instanceCount" type:"integer"`
+
+ // The states of the listed Reserved Instances.
+ State *string `locationName:"state" type:"string" enum:"ListingState"`
+
+ metadataInstanceCount `json:"-" xml:"-"`
+}
+
+type metadataInstanceCount struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s InstanceCount) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InstanceCount) GoString() string {
+ return s.String()
+}
+
+// Describes an instance to export.
+type InstanceExportDetails struct {
+ // The ID of the resource being exported.
+ InstanceID *string `locationName:"instanceId" type:"string"`
+
+ // The target virtualization environment.
+ TargetEnvironment *string `locationName:"targetEnvironment" type:"string" enum:"ExportEnvironment"`
+
+ metadataInstanceExportDetails `json:"-" xml:"-"`
+}
+
+type metadataInstanceExportDetails struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s InstanceExportDetails) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InstanceExportDetails) GoString() string {
+ return s.String()
+}
+
+// Describes the monitoring information of the instance.
+type InstanceMonitoring struct {
+ // The ID of the instance.
+ InstanceID *string `locationName:"instanceId" type:"string"`
+
+ // The monitoring information.
+ Monitoring *Monitoring `locationName:"monitoring" type:"structure"`
+
+ metadataInstanceMonitoring `json:"-" xml:"-"`
+}
+
+type metadataInstanceMonitoring struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s InstanceMonitoring) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InstanceMonitoring) GoString() string {
+ return s.String()
+}
+
+// Describes a network interface.
+type InstanceNetworkInterface struct {
+ // The association information for an Elastic IP associated with the network
+ // interface.
+ Association *InstanceNetworkInterfaceAssociation `locationName:"association" type:"structure"`
+
+ // The network interface attachment.
+ Attachment *InstanceNetworkInterfaceAttachment `locationName:"attachment" type:"structure"`
+
+ // The description.
+ Description *string `locationName:"description" type:"string"`
+
+ // One or more security groups.
+ Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"`
+
+ // The MAC address.
+ MACAddress *string `locationName:"macAddress" type:"string"`
+
+ // The ID of the network interface.
+ NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string"`
+
+ // The ID of the AWS account that created the network interface.
+ OwnerID *string `locationName:"ownerId" type:"string"`
+
+ // The private DNS name.
+ PrivateDNSName *string `locationName:"privateDnsName" type:"string"`
+
+ // The IP address of the network interface within the subnet.
+ PrivateIPAddress *string `locationName:"privateIpAddress" type:"string"`
+
+ // The private IP addresses associated with the network interface.
+ PrivateIPAddresses []*InstancePrivateIPAddress `locationName:"privateIpAddressesSet" locationNameList:"item" type:"list"`
+
+ // Indicates whether to validate network traffic to or from this network interface.
+ SourceDestCheck *bool `locationName:"sourceDestCheck" type:"boolean"`
+
+ // The status of the network interface.
+ Status *string `locationName:"status" type:"string" enum:"NetworkInterfaceStatus"`
+
+ // The ID of the subnet.
+ SubnetID *string `locationName:"subnetId" type:"string"`
+
+ // The ID of the VPC.
+ VPCID *string `locationName:"vpcId" type:"string"`
+
+ metadataInstanceNetworkInterface `json:"-" xml:"-"`
+}
+
+type metadataInstanceNetworkInterface struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s InstanceNetworkInterface) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InstanceNetworkInterface) GoString() string {
+ return s.String()
+}
+
+// Describes association information for an Elastic IP address.
+type InstanceNetworkInterfaceAssociation struct {
+ // The ID of the owner of the Elastic IP address.
+ IPOwnerID *string `locationName:"ipOwnerId" type:"string"`
+
+ // The public DNS name.
+ PublicDNSName *string `locationName:"publicDnsName" type:"string"`
+
+ // The public IP address or Elastic IP address bound to the network interface.
+ PublicIP *string `locationName:"publicIp" type:"string"`
+
+ metadataInstanceNetworkInterfaceAssociation `json:"-" xml:"-"`
+}
+
+type metadataInstanceNetworkInterfaceAssociation struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s InstanceNetworkInterfaceAssociation) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InstanceNetworkInterfaceAssociation) GoString() string {
+ return s.String()
+}
+
+// Describes a network interface attachment.
+type InstanceNetworkInterfaceAttachment struct {
+ // The time stamp when the attachment initiated.
+ AttachTime *time.Time `locationName:"attachTime" type:"timestamp" timestampFormat:"iso8601"`
+
+ // The ID of the network interface attachment.
+ AttachmentID *string `locationName:"attachmentId" type:"string"`
+
+ // Indicates whether the network interface is deleted when the instance is terminated.
+ DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"`
+
+ // The index of the device on the instance for the network interface attachment.
+ DeviceIndex *int64 `locationName:"deviceIndex" type:"integer"`
+
+ // The attachment state.
+ Status *string `locationName:"status" type:"string" enum:"AttachmentStatus"`
+
+ metadataInstanceNetworkInterfaceAttachment `json:"-" xml:"-"`
+}
+
+type metadataInstanceNetworkInterfaceAttachment struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s InstanceNetworkInterfaceAttachment) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InstanceNetworkInterfaceAttachment) GoString() string {
+ return s.String()
+}
+
+// Describes a network interface.
+type InstanceNetworkInterfaceSpecification struct {
+ // Indicates whether to assign a public IP address to an instance you launch
+ // in a VPC. The public IP address can only be assigned to a network interface
+ // for eth0, and can only be assigned to a new network interface, not an existing
+ // one. You cannot specify more than one network interface in the request. If
+ // launching into a default subnet, the default value is true.
+ AssociatePublicIPAddress *bool `locationName:"associatePublicIpAddress" type:"boolean"`
+
+ // If set to true, the interface is deleted when the instance is terminated.
+ // You can specify true only if creating a new network interface when launching
+ // an instance.
+ DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"`
+
+ // The description of the network interface. Applies only if creating a network
+ // interface when launching an instance.
+ Description *string `locationName:"description" type:"string"`
+
+ // The index of the device on the instance for the network interface attachment.
+ // If you are specifying a network interface in a RunInstances request, you
+ // must provide the device index.
+ DeviceIndex *int64 `locationName:"deviceIndex" type:"integer"`
+
+ // The IDs of the security groups for the network interface. Applies only if
+ // creating a network interface when launching an instance.
+ Groups []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"`
+
+ // The ID of the network interface.
+ NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string"`
+
+ // The private IP address of the network interface. Applies only if creating
+ // a network interface when launching an instance.
+ PrivateIPAddress *string `locationName:"privateIpAddress" type:"string"`
+
+ // One or more private IP addresses to assign to the network interface. Only
+ // one private IP address can be designated as primary.
+ PrivateIPAddresses []*PrivateIPAddressSpecification `locationName:"privateIpAddressesSet" queryName:"PrivateIpAddresses" locationNameList:"item" type:"list"`
+
+ // The number of secondary private IP addresses. You can't specify this option
+ // and specify more than one private IP address using the private IP addresses
+ // option.
+ SecondaryPrivateIPAddressCount *int64 `locationName:"secondaryPrivateIpAddressCount" type:"integer"`
+
+ // The ID of the subnet associated with the network string. Applies only if
+ // creating a network interface when launching an instance.
+ SubnetID *string `locationName:"subnetId" type:"string"`
+
+ metadataInstanceNetworkInterfaceSpecification `json:"-" xml:"-"`
+}
+
+type metadataInstanceNetworkInterfaceSpecification struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s InstanceNetworkInterfaceSpecification) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InstanceNetworkInterfaceSpecification) GoString() string {
+ return s.String()
+}
+
+// Describes a private IP address.
+type InstancePrivateIPAddress struct {
+ // The association information for an Elastic IP address for the network interface.
+ Association *InstanceNetworkInterfaceAssociation `locationName:"association" type:"structure"`
+
+ // Indicates whether this IP address is the primary private IP address of the
+ // network interface.
+ Primary *bool `locationName:"primary" type:"boolean"`
+
+ // The private DNS name.
+ PrivateDNSName *string `locationName:"privateDnsName" type:"string"`
+
+ // The private IP address of the network interface.
+ PrivateIPAddress *string `locationName:"privateIpAddress" type:"string"`
+
+ metadataInstancePrivateIPAddress `json:"-" xml:"-"`
+}
+
+type metadataInstancePrivateIPAddress struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s InstancePrivateIPAddress) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InstancePrivateIPAddress) GoString() string {
+ return s.String()
+}
+
+// Describes the current state of the instance.
+type InstanceState struct {
+ // The low byte represents the state. The high byte is an opaque internal value
+ // and should be ignored.
+ //
+ // 0 : pending
+ //
+ // 16 : running
+ //
+ // 32 : shutting-down
+ //
+ // 48 : terminated
+ //
+ // 64 : stopping
+ //
+ // 80 : stopped
+ Code *int64 `locationName:"code" type:"integer"`
+
+ // The current state of the instance.
+ Name *string `locationName:"name" type:"string" enum:"InstanceStateName"`
+
+ metadataInstanceState `json:"-" xml:"-"`
+}
+
+type metadataInstanceState struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s InstanceState) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InstanceState) GoString() string {
+ return s.String()
+}
+
+// Describes an instance state change.
+type InstanceStateChange struct {
+ // The current state of the instance.
+ CurrentState *InstanceState `locationName:"currentState" type:"structure"`
+
+ // The ID of the instance.
+ InstanceID *string `locationName:"instanceId" type:"string"`
+
+ // The previous state of the instance.
+ PreviousState *InstanceState `locationName:"previousState" type:"structure"`
+
+ metadataInstanceStateChange `json:"-" xml:"-"`
+}
+
+type metadataInstanceStateChange struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s InstanceStateChange) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InstanceStateChange) GoString() string {
+ return s.String()
+}
+
+// Describes the status of an instance.
+type InstanceStatus struct {
+ // The Availability Zone of the instance.
+ AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
+
+ // Any scheduled events associated with the instance.
+ Events []*InstanceStatusEvent `locationName:"eventsSet" locationNameList:"item" type:"list"`
+
+ // The ID of the instance.
+ InstanceID *string `locationName:"instanceId" type:"string"`
+
+ // The intended state of the instance. DescribeInstanceStatus requires that
+ // an instance be in the running state.
+ InstanceState *InstanceState `locationName:"instanceState" type:"structure"`
+
+ // Reports impaired functionality that stems from issues internal to the instance,
+ // such as impaired reachability.
+ InstanceStatus *InstanceStatusSummary `locationName:"instanceStatus" type:"structure"`
+
+ // Reports impaired functionality that stems from issues related to the systems
+ // that support an instance, such as hardware failures and network connectivity
+ // problems.
+ SystemStatus *InstanceStatusSummary `locationName:"systemStatus" type:"structure"`
+
+ metadataInstanceStatus `json:"-" xml:"-"`
+}
+
+type metadataInstanceStatus struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s InstanceStatus) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InstanceStatus) GoString() string {
+ return s.String()
+}
+
+// Describes the instance status.
+type InstanceStatusDetails struct {
+ // The time when a status check failed. For an instance that was launched and
+ // impaired, this is the time when the instance was launched.
+ ImpairedSince *time.Time `locationName:"impairedSince" type:"timestamp" timestampFormat:"iso8601"`
+
+ // The type of instance status.
+ Name *string `locationName:"name" type:"string" enum:"StatusName"`
+
+ // The status.
+ Status *string `locationName:"status" type:"string" enum:"StatusType"`
+
+ metadataInstanceStatusDetails `json:"-" xml:"-"`
+}
+
+type metadataInstanceStatusDetails struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s InstanceStatusDetails) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InstanceStatusDetails) GoString() string {
+ return s.String()
+}
+
+// Describes a scheduled event for an instance.
+type InstanceStatusEvent struct {
+ // The event code.
+ Code *string `locationName:"code" type:"string" enum:"EventCode"`
+
+ // A description of the event.
+ //
+ // After a scheduled event is completed, it can still be described for up to
+ // a week. If the event has been completed, this description starts with the
+ // following text: [Completed].
+ Description *string `locationName:"description" type:"string"`
+
+ // The latest scheduled end time for the event.
+ NotAfter *time.Time `locationName:"notAfter" type:"timestamp" timestampFormat:"iso8601"`
+
+ // The earliest scheduled start time for the event.
+ NotBefore *time.Time `locationName:"notBefore" type:"timestamp" timestampFormat:"iso8601"`
+
+ metadataInstanceStatusEvent `json:"-" xml:"-"`
+}
+
+type metadataInstanceStatusEvent struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s InstanceStatusEvent) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InstanceStatusEvent) GoString() string {
+ return s.String()
+}
+
+// Describes the status of an instance.
+type InstanceStatusSummary struct {
+ // The system instance health or application instance health.
+ Details []*InstanceStatusDetails `locationName:"details" locationNameList:"item" type:"list"`
+
+ // The status.
+ Status *string `locationName:"status" type:"string" enum:"SummaryStatus"`
+
+ metadataInstanceStatusSummary `json:"-" xml:"-"`
+}
+
+type metadataInstanceStatusSummary struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s InstanceStatusSummary) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InstanceStatusSummary) GoString() string {
+ return s.String()
+}
+
+// Describes an Internet gateway.
+type InternetGateway struct {
+ // Any VPCs attached to the Internet gateway.
+ Attachments []*InternetGatewayAttachment `locationName:"attachmentSet" locationNameList:"item" type:"list"`
+
+ // The ID of the Internet gateway.
+ InternetGatewayID *string `locationName:"internetGatewayId" type:"string"`
+
+ // Any tags assigned to the Internet gateway.
+ Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
+
+ metadataInternetGateway `json:"-" xml:"-"`
+}
+
+type metadataInternetGateway struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s InternetGateway) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InternetGateway) GoString() string {
+ return s.String()
+}
+
+// Describes the attachment of a VPC to an Internet gateway.
+type InternetGatewayAttachment struct {
+ // The current state of the attachment.
+ State *string `locationName:"state" type:"string" enum:"AttachmentStatus"`
+
+ // The ID of the VPC.
+ VPCID *string `locationName:"vpcId" type:"string"`
+
+ metadataInternetGatewayAttachment `json:"-" xml:"-"`
+}
+
+type metadataInternetGatewayAttachment struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s InternetGatewayAttachment) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s InternetGatewayAttachment) GoString() string {
+ return s.String()
+}
+
+// Describes a key pair.
+type KeyPairInfo struct {
+ // If you used CreateKeyPair to create the key pair, this is the SHA-1 digest
+ // of the DER encoded private key. If you used ImportKeyPair to provide AWS
+ // the public key, this is the MD5 public key fingerprint as specified in section
+ // 4 of RFC4716.
+ KeyFingerprint *string `locationName:"keyFingerprint" type:"string"`
+
+ // The name of the key pair.
+ KeyName *string `locationName:"keyName" type:"string"`
+
+ metadataKeyPairInfo `json:"-" xml:"-"`
+}
+
+type metadataKeyPairInfo struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s KeyPairInfo) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s KeyPairInfo) GoString() string {
+ return s.String()
+}
+
+// Describes a launch permission.
+type LaunchPermission struct {
+ // The name of the group.
+ Group *string `locationName:"group" type:"string" enum:"PermissionGroup"`
+
+ // The AWS account ID.
+ UserID *string `locationName:"userId" type:"string"`
+
+ metadataLaunchPermission `json:"-" xml:"-"`
+}
+
+type metadataLaunchPermission struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s LaunchPermission) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LaunchPermission) GoString() string {
+ return s.String()
+}
+
+// Describes a launch permission modification.
+type LaunchPermissionModifications struct {
+ // The AWS account ID to add to the list of launch permissions for the AMI.
+ Add []*LaunchPermission `locationNameList:"item" type:"list"`
+
+ // The AWS account ID to remove from the list of launch permissions for the
+ // AMI.
+ Remove []*LaunchPermission `locationNameList:"item" type:"list"`
+
+ metadataLaunchPermissionModifications `json:"-" xml:"-"`
+}
+
+type metadataLaunchPermissionModifications struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s LaunchPermissionModifications) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LaunchPermissionModifications) GoString() string {
+ return s.String()
+}
+
+// Describes the launch specification for an instance.
+type LaunchSpecification struct {
+ // Deprecated.
+ AddressingType *string `locationName:"addressingType" type:"string"`
+
+ // One or more block device mapping entries.
+ BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"`
+
+ // Indicates whether the instance is optimized for EBS I/O. This optimization
+ // provides dedicated throughput to Amazon EBS and an optimized configuration
+ // stack to provide optimal EBS I/O performance. This optimization isn't available
+ // with all instance types. Additional usage charges apply when using an EBS
+ // Optimized instance.
+ //
+ // Default: false
+ EBSOptimized *bool `locationName:"ebsOptimized" type:"boolean"`
+
+ // The IAM instance profile.
+ IAMInstanceProfile *IAMInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"`
+
+ // The ID of the AMI.
+ ImageID *string `locationName:"imageId" type:"string"`
+
+ // The instance type.
+ InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"`
+
+ // The ID of the kernel.
+ KernelID *string `locationName:"kernelId" type:"string"`
+
+ // The name of the key pair.
+ KeyName *string `locationName:"keyName" type:"string"`
+
+ // Describes the monitoring for the instance.
+ Monitoring *RunInstancesMonitoringEnabled `locationName:"monitoring" type:"structure"`
+
+ // One or more network interfaces.
+ NetworkInterfaces []*InstanceNetworkInterfaceSpecification `locationName:"networkInterfaceSet" locationNameList:"item" type:"list"`
+
+ // The placement information for the instance.
+ Placement *SpotPlacement `locationName:"placement" type:"structure"`
+
+ // The ID of the RAM disk.
+ RAMDiskID *string `locationName:"ramdiskId" type:"string"`
+
+ // One or more security groups. To request an instance in a nondefault VPC,
+ // you must specify the ID of the security group. To request an instance in
+ // EC2-Classic or a default VPC, you can specify the name or the ID of the security
+ // group.
+ SecurityGroups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"`
+
+ // The ID of the subnet in which to launch the instance.
+ SubnetID *string `locationName:"subnetId" type:"string"`
+
+ // The Base64-encoded MIME user data to make available to the instances.
+ UserData *string `locationName:"userData" type:"string"`
+
+ metadataLaunchSpecification `json:"-" xml:"-"`
+}
+
+type metadataLaunchSpecification struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s LaunchSpecification) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s LaunchSpecification) GoString() string {
+ return s.String()
+}
+
+type ModifyImageAttributeInput struct {
+ // The name of the attribute to modify.
+ Attribute *string `type:"string"`
+
+ // A description for the AMI.
+ Description *AttributeValue `type:"structure"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the AMI.
+ ImageID *string `locationName:"ImageId" type:"string" required:"true"`
+
+ // A launch permission modification.
+ LaunchPermission *LaunchPermissionModifications `type:"structure"`
+
+ // The operation type.
+ OperationType *string `type:"string"`
+
+ // One or more product codes. After you add a product code to an AMI, it can't
+ // be removed. This is only valid when modifying the productCodes attribute.
+ ProductCodes []*string `locationName:"ProductCode" locationNameList:"ProductCode" type:"list"`
+
+ // One or more user groups. This is only valid when modifying the launchPermission
+ // attribute.
+ UserGroups []*string `locationName:"UserGroup" locationNameList:"UserGroup" type:"list"`
+
+ // One or more AWS account IDs. This is only valid when modifying the launchPermission
+ // attribute.
+ UserIDs []*string `locationName:"UserId" locationNameList:"UserId" type:"list"`
+
+ // The value of the attribute being modified. This is only valid when modifying
+ // the description attribute.
+ Value *string `type:"string"`
+
+ metadataModifyImageAttributeInput `json:"-" xml:"-"`
+}
+
+type metadataModifyImageAttributeInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ModifyImageAttributeInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyImageAttributeInput) GoString() string {
+ return s.String()
+}
+
+type ModifyImageAttributeOutput struct {
+ metadataModifyImageAttributeOutput `json:"-" xml:"-"`
+}
+
+type metadataModifyImageAttributeOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ModifyImageAttributeOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyImageAttributeOutput) GoString() string {
+ return s.String()
+}
+
+type ModifyInstanceAttributeInput struct {
+ // The name of the attribute.
+ Attribute *string `locationName:"attribute" type:"string" enum:"InstanceAttributeName"`
+
+ // Modifies the DeleteOnTermination attribute for volumes that are currently
+ // attached. The volume must be owned by the caller. If no value is specified
+ // for DeleteOnTermination, the default is true and the volume is deleted when
+ // the instance is terminated.
+ //
+ // To add instance store volumes to an Amazon EBS-backed instance, you must
+ // add them when you launch the instance. For more information, see Updating
+ // the Block Device Mapping when Launching an Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html#Using_OverridingAMIBDM)
+ // in the Amazon Elastic Compute Cloud User Guide.
+ BlockDeviceMappings []*InstanceBlockDeviceMappingSpecification `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"`
+
+ // If the value is true, you can't terminate the instance using the Amazon EC2
+ // console, CLI, or API; otherwise, you can.
+ DisableAPITermination *AttributeBooleanValue `locationName:"disableApiTermination" type:"structure"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // Specifies whether the instance is optimized for EBS I/O. This optimization
+ // provides dedicated throughput to Amazon EBS and an optimized configuration
+ // stack to provide optimal EBS I/O performance. This optimization isn't available
+ // with all instance types. Additional usage charges apply when using an EBS
+ // Optimized instance.
+ EBSOptimized *AttributeBooleanValue `locationName:"ebsOptimized" type:"structure"`
+
+ // [EC2-VPC] Changes the security groups of the instance. You must specify at
+ // least one security group, even if it's just the default security group for
+ // the VPC. You must specify the security group ID, not the security group name.
+ Groups []*string `locationName:"GroupId" locationNameList:"groupId" type:"list"`
+
+ // The ID of the instance.
+ InstanceID *string `locationName:"instanceId" type:"string" required:"true"`
+
+ // Specifies whether an instance stops or terminates when you initiate shutdown
+ // from the instance (using the operating system command for system shutdown).
+ InstanceInitiatedShutdownBehavior *AttributeValue `locationName:"instanceInitiatedShutdownBehavior" type:"structure"`
+
+ // Changes the instance type to the specified value. For more information, see
+ // Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html).
+ // If the instance type is not valid, the error returned is InvalidInstanceAttributeValue.
+ InstanceType *AttributeValue `locationName:"instanceType" type:"structure"`
+
+ // Changes the instance's kernel to the specified value. We recommend that you
+ // use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB
+ // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html).
+ Kernel *AttributeValue `locationName:"kernel" type:"structure"`
+
+ // Changes the instance's RAM disk to the specified value. We recommend that
+ // you use PV-GRUB instead of kernels and RAM disks. For more information, see
+ // PV-GRUB (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html).
+ RAMDisk *AttributeValue `locationName:"ramdisk" type:"structure"`
+
+ // Set to simple to enable enhanced networking for the instance.
+ //
+ // There is no way to disable enhanced networking at this time.
+ //
+ // This option is supported only for HVM instances. Specifying this option
+ // with a PV instance can make it unreachable.
+ SRIOVNetSupport *AttributeValue `locationName:"sriovNetSupport" type:"structure"`
+
+ // Specifies whether source/destination checking is enabled. A value of true
+ // means that checking is enabled, and false means checking is disabled. This
+ // value must be false for a NAT instance to perform NAT.
+ SourceDestCheck *AttributeBooleanValue `type:"structure"`
+
+ // Changes the instance's user data to the specified value.
+ UserData *BlobAttributeValue `locationName:"userData" type:"structure"`
+
+ // A new value for the attribute. Use only with the kernel, ramdisk, userData,
+ // disableApiTermination, or intanceInitiateShutdownBehavior attribute.
+ Value *string `locationName:"value" type:"string"`
+
+ metadataModifyInstanceAttributeInput `json:"-" xml:"-"`
+}
+
+type metadataModifyInstanceAttributeInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ModifyInstanceAttributeInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyInstanceAttributeInput) GoString() string {
+ return s.String()
+}
+
+type ModifyInstanceAttributeOutput struct {
+ metadataModifyInstanceAttributeOutput `json:"-" xml:"-"`
+}
+
+type metadataModifyInstanceAttributeOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ModifyInstanceAttributeOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyInstanceAttributeOutput) GoString() string {
+ return s.String()
+}
+
+type ModifyNetworkInterfaceAttributeInput struct {
+ // Information about the interface attachment. If modifying the 'delete on termination'
+ // attribute, you must specify the ID of the interface attachment.
+ Attachment *NetworkInterfaceAttachmentChanges `locationName:"attachment" type:"structure"`
+
+ // A description for the network interface.
+ Description *AttributeValue `locationName:"description" type:"structure"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // Changes the security groups for the network interface. The new set of groups
+ // you specify replaces the current set. You must specify at least one group,
+ // even if it's just the default security group in the VPC. You must specify
+ // the ID of the security group, not the name.
+ Groups []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"`
+
+ // The ID of the network interface.
+ NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string" required:"true"`
+
+ // Indicates whether source/destination checking is enabled. A value of true
+ // means checking is enabled, and false means checking is disabled. This value
+ // must be false for a NAT instance to perform NAT. For more information, see
+ // NAT Instances (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html)
+ // in the Amazon Virtual Private Cloud User Guide.
+ SourceDestCheck *AttributeBooleanValue `locationName:"sourceDestCheck" type:"structure"`
+
+ metadataModifyNetworkInterfaceAttributeInput `json:"-" xml:"-"`
+}
+
+type metadataModifyNetworkInterfaceAttributeInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ModifyNetworkInterfaceAttributeInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyNetworkInterfaceAttributeInput) GoString() string {
+ return s.String()
+}
+
+type ModifyNetworkInterfaceAttributeOutput struct {
+ metadataModifyNetworkInterfaceAttributeOutput `json:"-" xml:"-"`
+}
+
+type metadataModifyNetworkInterfaceAttributeOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ModifyNetworkInterfaceAttributeOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyNetworkInterfaceAttributeOutput) GoString() string {
+ return s.String()
+}
+
+type ModifyReservedInstancesInput struct {
+ // A unique, case-sensitive token you provide to ensure idempotency of your
+ // modification request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string `locationName:"clientToken" type:"string"`
+
+ // The IDs of the Reserved Instances to modify.
+ ReservedInstancesIDs []*string `locationName:"ReservedInstancesId" locationNameList:"ReservedInstancesId" type:"list" required:"true"`
+
+ // The configuration settings for the Reserved Instances to modify.
+ TargetConfigurations []*ReservedInstancesConfiguration `locationName:"ReservedInstancesConfigurationSetItemType" locationNameList:"item" type:"list" required:"true"`
+
+ metadataModifyReservedInstancesInput `json:"-" xml:"-"`
+}
+
+type metadataModifyReservedInstancesInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ModifyReservedInstancesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyReservedInstancesInput) GoString() string {
+ return s.String()
+}
+
+type ModifyReservedInstancesOutput struct {
+ // The ID for the modification.
+ ReservedInstancesModificationID *string `locationName:"reservedInstancesModificationId" type:"string"`
+
+ metadataModifyReservedInstancesOutput `json:"-" xml:"-"`
+}
+
+type metadataModifyReservedInstancesOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ModifyReservedInstancesOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyReservedInstancesOutput) GoString() string {
+ return s.String()
+}
+
+type ModifySnapshotAttributeInput struct {
+ // The snapshot attribute to modify.
+ //
+ // Only volume creation permissions may be modified at the customer level.
+ Attribute *string `type:"string" enum:"SnapshotAttributeName"`
+
+ // A JSON representation of the snapshot attribute modification.
+ CreateVolumePermission *CreateVolumePermissionModifications `type:"structure"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The group to modify for the snapshot.
+ GroupNames []*string `locationName:"UserGroup" locationNameList:"GroupName" type:"list"`
+
+ // The type of operation to perform to the attribute.
+ OperationType *string `type:"string"`
+
+ // The ID of the snapshot.
+ SnapshotID *string `locationName:"SnapshotId" type:"string" required:"true"`
+
+ // The account ID to modify for the snapshot.
+ UserIDs []*string `locationName:"UserId" locationNameList:"UserId" type:"list"`
+
+ metadataModifySnapshotAttributeInput `json:"-" xml:"-"`
+}
+
+type metadataModifySnapshotAttributeInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ModifySnapshotAttributeInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifySnapshotAttributeInput) GoString() string {
+ return s.String()
+}
+
+type ModifySnapshotAttributeOutput struct {
+ metadataModifySnapshotAttributeOutput `json:"-" xml:"-"`
+}
+
+type metadataModifySnapshotAttributeOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ModifySnapshotAttributeOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifySnapshotAttributeOutput) GoString() string {
+ return s.String()
+}
+
+type ModifySubnetAttributeInput struct {
+ // Specify true to indicate that instances launched into the specified subnet
+ // should be assigned public IP address.
+ MapPublicIPOnLaunch *AttributeBooleanValue `locationName:"MapPublicIpOnLaunch" type:"structure"`
+
+ // The ID of the subnet.
+ SubnetID *string `locationName:"subnetId" type:"string" required:"true"`
+
+ metadataModifySubnetAttributeInput `json:"-" xml:"-"`
+}
+
+type metadataModifySubnetAttributeInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ModifySubnetAttributeInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifySubnetAttributeInput) GoString() string {
+ return s.String()
+}
+
+type ModifySubnetAttributeOutput struct {
+ metadataModifySubnetAttributeOutput `json:"-" xml:"-"`
+}
+
+type metadataModifySubnetAttributeOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ModifySubnetAttributeOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifySubnetAttributeOutput) GoString() string {
+ return s.String()
+}
+
+type ModifyVPCAttributeInput struct {
+ // Indicates whether the instances launched in the VPC get DNS hostnames. If
+ // enabled, instances in the VPC get DNS hostnames; otherwise, they do not.
+ //
+ // You can only enable DNS hostnames if you also enable DNS support.
+ EnableDNSHostnames *AttributeBooleanValue `locationName:"EnableDnsHostnames" type:"structure"`
+
+ // Indicates whether the DNS resolution is supported for the VPC. If enabled,
+ // queries to the Amazon provided DNS server at the 169.254.169.253 IP address,
+ // or the reserved IP address at the base of the VPC network range "plus two"
+ // will succeed. If disabled, the Amazon provided DNS service in the VPC that
+ // resolves public DNS hostnames to IP addresses is not enabled.
+ EnableDNSSupport *AttributeBooleanValue `locationName:"EnableDnsSupport" type:"structure"`
+
+ // The ID of the VPC.
+ VPCID *string `locationName:"vpcId" type:"string" required:"true"`
+
+ metadataModifyVPCAttributeInput `json:"-" xml:"-"`
+}
+
+type metadataModifyVPCAttributeInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ModifyVPCAttributeInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyVPCAttributeInput) GoString() string {
+ return s.String()
+}
+
+type ModifyVPCAttributeOutput struct {
+ metadataModifyVPCAttributeOutput `json:"-" xml:"-"`
+}
+
+type metadataModifyVPCAttributeOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ModifyVPCAttributeOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyVPCAttributeOutput) GoString() string {
+ return s.String()
+}
+
+type ModifyVPCEndpointInput struct {
+ // One or more route tables IDs to associate with the endpoint.
+ AddRouteTableIDs []*string `locationName:"AddRouteTableId" locationNameList:"item" type:"list"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `type:"boolean"`
+
+ // A policy document to attach to the endpoint. The policy must be in valid
+ // JSON format.
+ PolicyDocument *string `type:"string"`
+
+ // One or more route table IDs to disassociate from the endpoint.
+ RemoveRouteTableIDs []*string `locationName:"RemoveRouteTableId" locationNameList:"item" type:"list"`
+
+ // Specify true to reset the policy document to the default policy. The default
+ // policy allows access to the service.
+ ResetPolicy *bool `type:"boolean"`
+
+ // The ID of the endpoint.
+ VPCEndpointID *string `locationName:"VpcEndpointId" type:"string" required:"true"`
+
+ metadataModifyVPCEndpointInput `json:"-" xml:"-"`
+}
+
+type metadataModifyVPCEndpointInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ModifyVPCEndpointInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyVPCEndpointInput) GoString() string {
+ return s.String()
+}
+
+type ModifyVPCEndpointOutput struct {
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool `locationName:"return" type:"boolean"`
+
+ metadataModifyVPCEndpointOutput `json:"-" xml:"-"`
+}
+
+type metadataModifyVPCEndpointOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ModifyVPCEndpointOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyVPCEndpointOutput) GoString() string {
+ return s.String()
+}
+
+type ModifyVolumeAttributeInput struct {
+ // Indicates whether the volume should be auto-enabled for I/O operations.
+ AutoEnableIO *AttributeBooleanValue `type:"structure"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the volume.
+ VolumeID *string `locationName:"VolumeId" type:"string" required:"true"`
+
+ metadataModifyVolumeAttributeInput `json:"-" xml:"-"`
+}
+
+type metadataModifyVolumeAttributeInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ModifyVolumeAttributeInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyVolumeAttributeInput) GoString() string {
+ return s.String()
+}
+
+type ModifyVolumeAttributeOutput struct {
+ metadataModifyVolumeAttributeOutput `json:"-" xml:"-"`
+}
+
+type metadataModifyVolumeAttributeOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ModifyVolumeAttributeOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ModifyVolumeAttributeOutput) GoString() string {
+ return s.String()
+}
+
+type MonitorInstancesInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more instance IDs.
+ InstanceIDs []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"`
+
+ metadataMonitorInstancesInput `json:"-" xml:"-"`
+}
+
+type metadataMonitorInstancesInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s MonitorInstancesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s MonitorInstancesInput) GoString() string {
+ return s.String()
+}
+
+type MonitorInstancesOutput struct {
+ // Monitoring information for one or more instances.
+ InstanceMonitorings []*InstanceMonitoring `locationName:"instancesSet" locationNameList:"item" type:"list"`
+
+ metadataMonitorInstancesOutput `json:"-" xml:"-"`
+}
+
+type metadataMonitorInstancesOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s MonitorInstancesOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s MonitorInstancesOutput) GoString() string {
+ return s.String()
+}
+
+// Describes the monitoring for the instance.
+type Monitoring struct {
+ // Indicates whether monitoring is enabled for the instance.
+ State *string `locationName:"state" type:"string" enum:"MonitoringState"`
+
+ metadataMonitoring `json:"-" xml:"-"`
+}
+
+type metadataMonitoring struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s Monitoring) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Monitoring) GoString() string {
+ return s.String()
+}
+
+type MoveAddressToVPCInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The Elastic IP address.
+ PublicIP *string `locationName:"publicIp" type:"string" required:"true"`
+
+ metadataMoveAddressToVPCInput `json:"-" xml:"-"`
+}
+
+type metadataMoveAddressToVPCInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s MoveAddressToVPCInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s MoveAddressToVPCInput) GoString() string {
+ return s.String()
+}
+
+type MoveAddressToVPCOutput struct {
+ // The allocation ID for the Elastic IP address.
+ AllocationID *string `locationName:"allocationId" type:"string"`
+
+ // The status of the move of the IP address.
+ Status *string `locationName:"status" type:"string" enum:"Status"`
+
+ metadataMoveAddressToVPCOutput `json:"-" xml:"-"`
+}
+
+type metadataMoveAddressToVPCOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s MoveAddressToVPCOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s MoveAddressToVPCOutput) GoString() string {
+ return s.String()
+}
+
+// Describes the status of a moving Elastic IP address.
+type MovingAddressStatus struct {
+ // The status of the Elastic IP address that's being moved to the EC2-VPC platform,
+ // or restored to the EC2-Classic platform.
+ MoveStatus *string `locationName:"moveStatus" type:"string" enum:"MoveStatus"`
+
+ // The Elastic IP address.
+ PublicIP *string `locationName:"publicIp" type:"string"`
+
+ metadataMovingAddressStatus `json:"-" xml:"-"`
+}
+
+type metadataMovingAddressStatus struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s MovingAddressStatus) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s MovingAddressStatus) GoString() string {
+ return s.String()
+}
+
+// Describes a network ACL.
+type NetworkACL struct {
+ // Any associations between the network ACL and one or more subnets
+ Associations []*NetworkACLAssociation `locationName:"associationSet" locationNameList:"item" type:"list"`
+
+ // One or more entries (rules) in the network ACL.
+ Entries []*NetworkACLEntry `locationName:"entrySet" locationNameList:"item" type:"list"`
+
+ // Indicates whether this is the default network ACL for the VPC.
+ IsDefault *bool `locationName:"default" type:"boolean"`
+
+ // The ID of the network ACL.
+ NetworkACLID *string `locationName:"networkAclId" type:"string"`
+
+ // Any tags assigned to the network ACL.
+ Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
+
+ // The ID of the VPC for the network ACL.
+ VPCID *string `locationName:"vpcId" type:"string"`
+
+ metadataNetworkACL `json:"-" xml:"-"`
+}
+
+type metadataNetworkACL struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s NetworkACL) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s NetworkACL) GoString() string {
+ return s.String()
+}
+
+// Describes an association between a network ACL and a subnet.
+type NetworkACLAssociation struct {
+ // The ID of the association between a network ACL and a subnet.
+ NetworkACLAssociationID *string `locationName:"networkAclAssociationId" type:"string"`
+
+ // The ID of the network ACL.
+ NetworkACLID *string `locationName:"networkAclId" type:"string"`
+
+ // The ID of the subnet.
+ SubnetID *string `locationName:"subnetId" type:"string"`
+
+ metadataNetworkACLAssociation `json:"-" xml:"-"`
+}
+
+type metadataNetworkACLAssociation struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s NetworkACLAssociation) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s NetworkACLAssociation) GoString() string {
+ return s.String()
+}
+
+// Describes an entry in a network ACL.
+type NetworkACLEntry struct {
+ // The network range to allow or deny, in CIDR notation.
+ CIDRBlock *string `locationName:"cidrBlock" type:"string"`
+
+ // Indicates whether the rule is an egress rule (applied to traffic leaving
+ // the subnet).
+ Egress *bool `locationName:"egress" type:"boolean"`
+
+ // ICMP protocol: The ICMP type and code.
+ ICMPTypeCode *ICMPTypeCode `locationName:"icmpTypeCode" type:"structure"`
+
+ // TCP or UDP protocols: The range of ports the rule applies to.
+ PortRange *PortRange `locationName:"portRange" type:"structure"`
+
+ // The protocol. A value of -1 means all protocols.
+ Protocol *string `locationName:"protocol" type:"string"`
+
+ // Indicates whether to allow or deny the traffic that matches the rule.
+ RuleAction *string `locationName:"ruleAction" type:"string" enum:"RuleAction"`
+
+ // The rule number for the entry. ACL entries are processed in ascending order
+ // by rule number.
+ RuleNumber *int64 `locationName:"ruleNumber" type:"integer"`
+
+ metadataNetworkACLEntry `json:"-" xml:"-"`
+}
+
+type metadataNetworkACLEntry struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s NetworkACLEntry) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s NetworkACLEntry) GoString() string {
+ return s.String()
+}
+
+// Describes a network interface.
+type NetworkInterface struct {
+ // The association information for an Elastic IP associated with the network
+ // interface.
+ Association *NetworkInterfaceAssociation `locationName:"association" type:"structure"`
+
+ // The network interface attachment.
+ Attachment *NetworkInterfaceAttachment `locationName:"attachment" type:"structure"`
+
+ // The Availability Zone.
+ AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
+
+ // A description.
+ Description *string `locationName:"description" type:"string"`
+
+ // Any security groups for the network interface.
+ Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"`
+
+ // The MAC address.
+ MACAddress *string `locationName:"macAddress" type:"string"`
+
+ // The ID of the network interface.
+ NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string"`
+
+ // The AWS account ID of the owner of the network interface.
+ OwnerID *string `locationName:"ownerId" type:"string"`
+
+ // The private DNS name.
+ PrivateDNSName *string `locationName:"privateDnsName" type:"string"`
+
+ // The IP address of the network interface within the subnet.
+ PrivateIPAddress *string `locationName:"privateIpAddress" type:"string"`
+
+ // The private IP addresses associated with the network interface.
+ PrivateIPAddresses []*NetworkInterfacePrivateIPAddress `locationName:"privateIpAddressesSet" locationNameList:"item" type:"list"`
+
+ // The ID of the entity that launched the instance on your behalf (for example,
+ // AWS Management Console or Auto Scaling).
+ RequesterID *string `locationName:"requesterId" type:"string"`
+
+ // Indicates whether the network interface is being managed by AWS.
+ RequesterManaged *bool `locationName:"requesterManaged" type:"boolean"`
+
+ // Indicates whether traffic to or from the instance is validated.
+ SourceDestCheck *bool `locationName:"sourceDestCheck" type:"boolean"`
+
+ // The status of the network interface.
+ Status *string `locationName:"status" type:"string" enum:"NetworkInterfaceStatus"`
+
+ // The ID of the subnet.
+ SubnetID *string `locationName:"subnetId" type:"string"`
+
+ // Any tags assigned to the network interface.
+ TagSet []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
+
+ // The ID of the VPC.
+ VPCID *string `locationName:"vpcId" type:"string"`
+
+ metadataNetworkInterface `json:"-" xml:"-"`
+}
+
+type metadataNetworkInterface struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s NetworkInterface) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s NetworkInterface) GoString() string {
+ return s.String()
+}
+
+// Describes association information for an Elastic IP address.
+type NetworkInterfaceAssociation struct {
+ // The allocation ID.
+ AllocationID *string `locationName:"allocationId" type:"string"`
+
+ // The association ID.
+ AssociationID *string `locationName:"associationId" type:"string"`
+
+ // The ID of the Elastic IP address owner.
+ IPOwnerID *string `locationName:"ipOwnerId" type:"string"`
+
+ // The public DNS name.
+ PublicDNSName *string `locationName:"publicDnsName" type:"string"`
+
+ // The address of the Elastic IP address bound to the network interface.
+ PublicIP *string `locationName:"publicIp" type:"string"`
+
+ metadataNetworkInterfaceAssociation `json:"-" xml:"-"`
+}
+
+type metadataNetworkInterfaceAssociation struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s NetworkInterfaceAssociation) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s NetworkInterfaceAssociation) GoString() string {
+ return s.String()
+}
+
+// Describes a network interface attachment.
+type NetworkInterfaceAttachment struct {
+ // The timestamp indicating when the attachment initiated.
+ AttachTime *time.Time `locationName:"attachTime" type:"timestamp" timestampFormat:"iso8601"`
+
+ // The ID of the network interface attachment.
+ AttachmentID *string `locationName:"attachmentId" type:"string"`
+
+ // Indicates whether the network interface is deleted when the instance is terminated.
+ DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"`
+
+ // The device index of the network interface attachment on the instance.
+ DeviceIndex *int64 `locationName:"deviceIndex" type:"integer"`
+
+ // The ID of the instance.
+ InstanceID *string `locationName:"instanceId" type:"string"`
+
+ // The AWS account ID of the owner of the instance.
+ InstanceOwnerID *string `locationName:"instanceOwnerId" type:"string"`
+
+ // The attachment state.
+ Status *string `locationName:"status" type:"string" enum:"AttachmentStatus"`
+
+ metadataNetworkInterfaceAttachment `json:"-" xml:"-"`
+}
+
+type metadataNetworkInterfaceAttachment struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s NetworkInterfaceAttachment) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s NetworkInterfaceAttachment) GoString() string {
+ return s.String()
+}
+
+// Describes an attachment change.
+type NetworkInterfaceAttachmentChanges struct {
+ // The ID of the network interface attachment.
+ AttachmentID *string `locationName:"attachmentId" type:"string"`
+
+ // Indicates whether the network interface is deleted when the instance is terminated.
+ DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"`
+
+ metadataNetworkInterfaceAttachmentChanges `json:"-" xml:"-"`
+}
+
+type metadataNetworkInterfaceAttachmentChanges struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s NetworkInterfaceAttachmentChanges) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s NetworkInterfaceAttachmentChanges) GoString() string {
+ return s.String()
+}
+
+// Describes the private IP address of a network interface.
+type NetworkInterfacePrivateIPAddress struct {
+ // The association information for an Elastic IP address associated with the
+ // network interface.
+ Association *NetworkInterfaceAssociation `locationName:"association" type:"structure"`
+
+ // Indicates whether this IP address is the primary private IP address of the
+ // network interface.
+ Primary *bool `locationName:"primary" type:"boolean"`
+
+ // The private DNS name.
+ PrivateDNSName *string `locationName:"privateDnsName" type:"string"`
+
+ // The private IP address.
+ PrivateIPAddress *string `locationName:"privateIpAddress" type:"string"`
+
+ metadataNetworkInterfacePrivateIPAddress `json:"-" xml:"-"`
+}
+
+type metadataNetworkInterfacePrivateIPAddress struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s NetworkInterfacePrivateIPAddress) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s NetworkInterfacePrivateIPAddress) GoString() string {
+ return s.String()
+}
+
+type NewDHCPConfiguration struct {
+ Key *string `locationName:"key" type:"string"`
+
+ Values []*string `locationName:"Value" locationNameList:"item" type:"list"`
+
+ metadataNewDHCPConfiguration `json:"-" xml:"-"`
+}
+
+type metadataNewDHCPConfiguration struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s NewDHCPConfiguration) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s NewDHCPConfiguration) GoString() string {
+ return s.String()
+}
+
+// Describes the placement for the instance.
+type Placement struct {
+ // The Availability Zone of the instance.
+ AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
+
+ // The name of the placement group the instance is in (for cluster compute instances).
+ GroupName *string `locationName:"groupName" type:"string"`
+
+ // The tenancy of the instance (if the instance is running in a VPC). An instance
+ // with a tenancy of dedicated runs on single-tenant hardware.
+ Tenancy *string `locationName:"tenancy" type:"string" enum:"Tenancy"`
+
+ metadataPlacement `json:"-" xml:"-"`
+}
+
+type metadataPlacement struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s Placement) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Placement) GoString() string {
+ return s.String()
+}
+
+// Describes a placement group.
+type PlacementGroup struct {
+ // The name of the placement group.
+ GroupName *string `locationName:"groupName" type:"string"`
+
+ // The state of the placement group.
+ State *string `locationName:"state" type:"string" enum:"PlacementGroupState"`
+
+ // The placement strategy.
+ Strategy *string `locationName:"strategy" type:"string" enum:"PlacementStrategy"`
+
+ metadataPlacementGroup `json:"-" xml:"-"`
+}
+
+type metadataPlacementGroup struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s PlacementGroup) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PlacementGroup) GoString() string {
+ return s.String()
+}
+
+// Describes a range of ports.
+type PortRange struct {
+ // The first port in the range.
+ From *int64 `locationName:"from" type:"integer"`
+
+ // The last port in the range.
+ To *int64 `locationName:"to" type:"integer"`
+
+ metadataPortRange `json:"-" xml:"-"`
+}
+
+type metadataPortRange struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s PortRange) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PortRange) GoString() string {
+ return s.String()
+}
+
+// Describes prefixes for AWS services.
+type PrefixList struct {
+ // The IP address range of the AWS service.
+ CIDRs []*string `locationName:"cidrSet" locationNameList:"item" type:"list"`
+
+ // The ID of the prefix.
+ PrefixListID *string `locationName:"prefixListId" type:"string"`
+
+ // The name of the prefix.
+ PrefixListName *string `locationName:"prefixListName" type:"string"`
+
+ metadataPrefixList `json:"-" xml:"-"`
+}
+
+type metadataPrefixList struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s PrefixList) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PrefixList) GoString() string {
+ return s.String()
+}
+
+// The ID of the prefix.
+type PrefixListID struct {
+ // The ID of the prefix.
+ PrefixListID *string `locationName:"prefixListId" type:"string"`
+
+ metadataPrefixListID `json:"-" xml:"-"`
+}
+
+type metadataPrefixListID struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s PrefixListID) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PrefixListID) GoString() string {
+ return s.String()
+}
+
+// Describes the price for a Reserved Instance.
+type PriceSchedule struct {
+ // The current price schedule, as determined by the term remaining for the Reserved
+ // Instance in the listing.
+ //
+ // A specific price schedule is always in effect, but only one price schedule
+ // can be active at any time. Take, for example, a Reserved Instance listing
+ // that has five months remaining in its term. When you specify price schedules
+ // for five months and two months, this means that schedule 1, covering the
+ // first three months of the remaining term, will be active during months 5,
+ // 4, and 3. Then schedule 2, covering the last two months of the term, will
+ // be active for months 2 and 1.
+ Active *bool `locationName:"active" type:"boolean"`
+
+ // The currency for transacting the Reserved Instance resale. At this time,
+ // the only supported currency is USD.
+ CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"`
+
+ // The fixed price for the term.
+ Price *float64 `locationName:"price" type:"double"`
+
+ // The number of months remaining in the reservation. For example, 2 is the
+ // second to the last month before the capacity reservation expires.
+ Term *int64 `locationName:"term" type:"long"`
+
+ metadataPriceSchedule `json:"-" xml:"-"`
+}
+
+type metadataPriceSchedule struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s PriceSchedule) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PriceSchedule) GoString() string {
+ return s.String()
+}
+
+// Describes the price for a Reserved Instance.
+type PriceScheduleSpecification struct {
+ // The currency for transacting the Reserved Instance resale. At this time,
+ // the only supported currency is USD.
+ CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"`
+
+ // The fixed price for the term.
+ Price *float64 `locationName:"price" type:"double"`
+
+ // The number of months remaining in the reservation. For example, 2 is the
+ // second to the last month before the capacity reservation expires.
+ Term *int64 `locationName:"term" type:"long"`
+
+ metadataPriceScheduleSpecification `json:"-" xml:"-"`
+}
+
+type metadataPriceScheduleSpecification struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s PriceScheduleSpecification) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PriceScheduleSpecification) GoString() string {
+ return s.String()
+}
+
+// Describes a Reserved Instance offering.
+type PricingDetail struct {
+ // The number of instances available for the price.
+ Count *int64 `locationName:"count" type:"integer"`
+
+ // The price per instance.
+ Price *float64 `locationName:"price" type:"double"`
+
+ metadataPricingDetail `json:"-" xml:"-"`
+}
+
+type metadataPricingDetail struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s PricingDetail) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PricingDetail) GoString() string {
+ return s.String()
+}
+
+// Describes a secondary private IP address for a network interface.
+type PrivateIPAddressSpecification struct {
+ // Indicates whether the private IP address is the primary private IP address.
+ // Only one IP address can be designated as primary.
+ Primary *bool `locationName:"primary" type:"boolean"`
+
+ // The private IP addresses.
+ PrivateIPAddress *string `locationName:"privateIpAddress" type:"string" required:"true"`
+
+ metadataPrivateIPAddressSpecification `json:"-" xml:"-"`
+}
+
+type metadataPrivateIPAddressSpecification struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s PrivateIPAddressSpecification) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PrivateIPAddressSpecification) GoString() string {
+ return s.String()
+}
+
+// Describes a product code.
+type ProductCode struct {
+ // The product code.
+ ProductCodeID *string `locationName:"productCode" type:"string"`
+
+ // The type of product code.
+ ProductCodeType *string `locationName:"type" type:"string" enum:"ProductCodeValues"`
+
+ metadataProductCode `json:"-" xml:"-"`
+}
+
+type metadataProductCode struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ProductCode) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ProductCode) GoString() string {
+ return s.String()
+}
+
+// Describes a virtual private gateway propagating route.
+type PropagatingVGW struct {
+ // The ID of the virtual private gateway (VGW).
+ GatewayID *string `locationName:"gatewayId" type:"string"`
+
+ metadataPropagatingVGW `json:"-" xml:"-"`
+}
+
+type metadataPropagatingVGW struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s PropagatingVGW) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PropagatingVGW) GoString() string {
+ return s.String()
+}
+
+type PurchaseReservedInstancesOfferingInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The number of Reserved Instances to purchase.
+ InstanceCount *int64 `type:"integer" required:"true"`
+
+ // Specified for Reserved Instance Marketplace offerings to limit the total
+ // order and ensure that the Reserved Instances are not purchased at unexpected
+ // prices.
+ LimitPrice *ReservedInstanceLimitPrice `locationName:"limitPrice" type:"structure"`
+
+ // The ID of the Reserved Instance offering to purchase.
+ ReservedInstancesOfferingID *string `locationName:"ReservedInstancesOfferingId" type:"string" required:"true"`
+
+ metadataPurchaseReservedInstancesOfferingInput `json:"-" xml:"-"`
+}
+
+type metadataPurchaseReservedInstancesOfferingInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s PurchaseReservedInstancesOfferingInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PurchaseReservedInstancesOfferingInput) GoString() string {
+ return s.String()
+}
+
+type PurchaseReservedInstancesOfferingOutput struct {
+ // The IDs of the purchased Reserved Instances.
+ ReservedInstancesID *string `locationName:"reservedInstancesId" type:"string"`
+
+ metadataPurchaseReservedInstancesOfferingOutput `json:"-" xml:"-"`
+}
+
+type metadataPurchaseReservedInstancesOfferingOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s PurchaseReservedInstancesOfferingOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s PurchaseReservedInstancesOfferingOutput) GoString() string {
+ return s.String()
+}
+
+type RebootInstancesInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more instance IDs.
+ InstanceIDs []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"`
+
+ metadataRebootInstancesInput `json:"-" xml:"-"`
+}
+
+type metadataRebootInstancesInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s RebootInstancesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RebootInstancesInput) GoString() string {
+ return s.String()
+}
+
+type RebootInstancesOutput struct {
+ metadataRebootInstancesOutput `json:"-" xml:"-"`
+}
+
+type metadataRebootInstancesOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s RebootInstancesOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RebootInstancesOutput) GoString() string {
+ return s.String()
+}
+
+// Describes a recurring charge.
+type RecurringCharge struct {
+ // The amount of the recurring charge.
+ Amount *float64 `locationName:"amount" type:"double"`
+
+ // The frequency of the recurring charge.
+ Frequency *string `locationName:"frequency" type:"string" enum:"RecurringChargeFrequency"`
+
+ metadataRecurringCharge `json:"-" xml:"-"`
+}
+
+type metadataRecurringCharge struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s RecurringCharge) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RecurringCharge) GoString() string {
+ return s.String()
+}
+
+// Describes a region.
+type Region struct {
+ // The region service endpoint.
+ Endpoint *string `locationName:"regionEndpoint" type:"string"`
+
+ // The name of the region.
+ RegionName *string `locationName:"regionName" type:"string"`
+
+ metadataRegion `json:"-" xml:"-"`
+}
+
+type metadataRegion struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s Region) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Region) GoString() string {
+ return s.String()
+}
+
+type RegisterImageInput struct {
+ // The architecture of the AMI.
+ //
+ // Default: For Amazon EBS-backed AMIs, i386. For instance store-backed AMIs,
+ // the architecture specified in the manifest file.
+ Architecture *string `locationName:"architecture" type:"string" enum:"ArchitectureValues"`
+
+ // One or more block device mapping entries.
+ BlockDeviceMappings []*BlockDeviceMapping `locationName:"BlockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"`
+
+ // A description for your AMI.
+ Description *string `locationName:"description" type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The full path to your AMI manifest in Amazon S3 storage.
+ ImageLocation *string `type:"string"`
+
+ // The ID of the kernel.
+ KernelID *string `locationName:"kernelId" type:"string"`
+
+ // A name for your AMI.
+ //
+ // Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets
+ // ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('),
+ // at-signs (@), or underscores(_)
+ Name *string `locationName:"name" type:"string" required:"true"`
+
+ // The ID of the RAM disk.
+ RAMDiskID *string `locationName:"ramdiskId" type:"string"`
+
+ // The name of the root device (for example, /dev/sda1, or /dev/xvda).
+ RootDeviceName *string `locationName:"rootDeviceName" type:"string"`
+
+ // Set to simple to enable enhanced networking for the AMI and any instances
+ // that you launch from the AMI.
+ //
+ // There is no way to disable enhanced networking at this time.
+ //
+ // This option is supported only for HVM AMIs. Specifying this option with
+ // a PV AMI can make instances launched from the AMI unreachable.
+ SRIOVNetSupport *string `locationName:"sriovNetSupport" type:"string"`
+
+ // The type of virtualization.
+ //
+ // Default: paravirtual
+ VirtualizationType *string `locationName:"virtualizationType" type:"string"`
+
+ metadataRegisterImageInput `json:"-" xml:"-"`
+}
+
+type metadataRegisterImageInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s RegisterImageInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RegisterImageInput) GoString() string {
+ return s.String()
+}
+
+type RegisterImageOutput struct {
+ // The ID of the newly registered AMI.
+ ImageID *string `locationName:"imageId" type:"string"`
+
+ metadataRegisterImageOutput `json:"-" xml:"-"`
+}
+
+type metadataRegisterImageOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s RegisterImageOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RegisterImageOutput) GoString() string {
+ return s.String()
+}
+
+type RejectVPCPeeringConnectionInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the VPC peering connection.
+ VPCPeeringConnectionID *string `locationName:"vpcPeeringConnectionId" type:"string" required:"true"`
+
+ metadataRejectVPCPeeringConnectionInput `json:"-" xml:"-"`
+}
+
+type metadataRejectVPCPeeringConnectionInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s RejectVPCPeeringConnectionInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RejectVPCPeeringConnectionInput) GoString() string {
+ return s.String()
+}
+
+type RejectVPCPeeringConnectionOutput struct {
+ // Returns true if the request succeeds; otherwise, it returns an error.
+ Return *bool `locationName:"return" type:"boolean"`
+
+ metadataRejectVPCPeeringConnectionOutput `json:"-" xml:"-"`
+}
+
+type metadataRejectVPCPeeringConnectionOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s RejectVPCPeeringConnectionOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RejectVPCPeeringConnectionOutput) GoString() string {
+ return s.String()
+}
+
+type ReleaseAddressInput struct {
+ // [EC2-VPC] The allocation ID. Required for EC2-VPC.
+ AllocationID *string `locationName:"AllocationId" type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // [EC2-Classic] The Elastic IP address. Required for EC2-Classic.
+ PublicIP *string `locationName:"PublicIp" type:"string"`
+
+ metadataReleaseAddressInput `json:"-" xml:"-"`
+}
+
+type metadataReleaseAddressInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ReleaseAddressInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReleaseAddressInput) GoString() string {
+ return s.String()
+}
+
+type ReleaseAddressOutput struct {
+ metadataReleaseAddressOutput `json:"-" xml:"-"`
+}
+
+type metadataReleaseAddressOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ReleaseAddressOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReleaseAddressOutput) GoString() string {
+ return s.String()
+}
+
+type ReplaceNetworkACLAssociationInput struct {
+ // The ID of the current association between the original network ACL and the
+ // subnet.
+ AssociationID *string `locationName:"associationId" type:"string" required:"true"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the new network ACL to associate with the subnet.
+ NetworkACLID *string `locationName:"networkAclId" type:"string" required:"true"`
+
+ metadataReplaceNetworkACLAssociationInput `json:"-" xml:"-"`
+}
+
+type metadataReplaceNetworkACLAssociationInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ReplaceNetworkACLAssociationInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReplaceNetworkACLAssociationInput) GoString() string {
+ return s.String()
+}
+
+type ReplaceNetworkACLAssociationOutput struct {
+ // The ID of the new association.
+ NewAssociationID *string `locationName:"newAssociationId" type:"string"`
+
+ metadataReplaceNetworkACLAssociationOutput `json:"-" xml:"-"`
+}
+
+type metadataReplaceNetworkACLAssociationOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ReplaceNetworkACLAssociationOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReplaceNetworkACLAssociationOutput) GoString() string {
+ return s.String()
+}
+
+type ReplaceNetworkACLEntryInput struct {
+ // The network range to allow or deny, in CIDR notation.
+ CIDRBlock *string `locationName:"cidrBlock" type:"string" required:"true"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // Indicates whether to replace the egress rule.
+ //
+ // Default: If no value is specified, we replace the ingress rule.
+ Egress *bool `locationName:"egress" type:"boolean" required:"true"`
+
+ // ICMP protocol: The ICMP type and code. Required if specifying 1 (ICMP) for
+ // the protocol.
+ ICMPTypeCode *ICMPTypeCode `locationName:"Icmp" type:"structure"`
+
+ // The ID of the ACL.
+ NetworkACLID *string `locationName:"networkAclId" type:"string" required:"true"`
+
+ // TCP or UDP protocols: The range of ports the rule applies to. Required if
+ // specifying 6 (TCP) or 17 (UDP) for the protocol.
+ PortRange *PortRange `locationName:"portRange" type:"structure"`
+
+ // The IP protocol. You can specify all or -1 to mean all protocols.
+ Protocol *string `locationName:"protocol" type:"string" required:"true"`
+
+ // Indicates whether to allow or deny the traffic that matches the rule.
+ RuleAction *string `locationName:"ruleAction" type:"string" required:"true" enum:"RuleAction"`
+
+ // The rule number of the entry to replace.
+ RuleNumber *int64 `locationName:"ruleNumber" type:"integer" required:"true"`
+
+ metadataReplaceNetworkACLEntryInput `json:"-" xml:"-"`
+}
+
+type metadataReplaceNetworkACLEntryInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ReplaceNetworkACLEntryInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReplaceNetworkACLEntryInput) GoString() string {
+ return s.String()
+}
+
+type ReplaceNetworkACLEntryOutput struct {
+ metadataReplaceNetworkACLEntryOutput `json:"-" xml:"-"`
+}
+
+type metadataReplaceNetworkACLEntryOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ReplaceNetworkACLEntryOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReplaceNetworkACLEntryOutput) GoString() string {
+ return s.String()
+}
+
+type ReplaceRouteInput struct {
+ // The CIDR address block used for the destination match. The value you provide
+ // must match the CIDR of an existing route in the table.
+ DestinationCIDRBlock *string `locationName:"destinationCidrBlock" type:"string" required:"true"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of an Internet gateway or virtual private gateway.
+ GatewayID *string `locationName:"gatewayId" type:"string"`
+
+ // The ID of a NAT instance in your VPC.
+ InstanceID *string `locationName:"instanceId" type:"string"`
+
+ // The ID of a network interface.
+ NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string"`
+
+ // The ID of the route table.
+ RouteTableID *string `locationName:"routeTableId" type:"string" required:"true"`
+
+ // The ID of a VPC peering connection.
+ VPCPeeringConnectionID *string `locationName:"vpcPeeringConnectionId" type:"string"`
+
+ metadataReplaceRouteInput `json:"-" xml:"-"`
+}
+
+type metadataReplaceRouteInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ReplaceRouteInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReplaceRouteInput) GoString() string {
+ return s.String()
+}
+
+type ReplaceRouteOutput struct {
+ metadataReplaceRouteOutput `json:"-" xml:"-"`
+}
+
+type metadataReplaceRouteOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ReplaceRouteOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReplaceRouteOutput) GoString() string {
+ return s.String()
+}
+
+type ReplaceRouteTableAssociationInput struct {
+ // The association ID.
+ AssociationID *string `locationName:"associationId" type:"string" required:"true"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the new route table to associate with the subnet.
+ RouteTableID *string `locationName:"routeTableId" type:"string" required:"true"`
+
+ metadataReplaceRouteTableAssociationInput `json:"-" xml:"-"`
+}
+
+type metadataReplaceRouteTableAssociationInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ReplaceRouteTableAssociationInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReplaceRouteTableAssociationInput) GoString() string {
+ return s.String()
+}
+
+type ReplaceRouteTableAssociationOutput struct {
+ // The ID of the new association.
+ NewAssociationID *string `locationName:"newAssociationId" type:"string"`
+
+ metadataReplaceRouteTableAssociationOutput `json:"-" xml:"-"`
+}
+
+type metadataReplaceRouteTableAssociationOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ReplaceRouteTableAssociationOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReplaceRouteTableAssociationOutput) GoString() string {
+ return s.String()
+}
+
+type ReportInstanceStatusInput struct {
+ // Descriptive text about the health state of your instance.
+ Description *string `locationName:"description" type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The time at which the reported instance health state ended.
+ EndTime *time.Time `locationName:"endTime" type:"timestamp" timestampFormat:"iso8601"`
+
+ // One or more instances.
+ Instances []*string `locationName:"instanceId" locationNameList:"InstanceId" type:"list" required:"true"`
+
+ // One or more reason codes that describes the health state of your instance.
+ //
+ // instance-stuck-in-state: My instance is stuck in a state.
+ //
+ // unresponsive: My instance is unresponsive.
+ //
+ // not-accepting-credentials: My instance is not accepting my credentials.
+ //
+ // password-not-available: A password is not available for my instance.
+ //
+ // performance-network: My instance is experiencing performance problems which
+ // I believe are network related.
+ //
+ // performance-instance-store: My instance is experiencing performance problems
+ // which I believe are related to the instance stores.
+ //
+ // performance-ebs-volume: My instance is experiencing performance problems
+ // which I believe are related to an EBS volume.
+ //
+ // performance-other: My instance is experiencing performance problems.
+ //
+ // other: [explain using the description parameter]
+ ReasonCodes []*string `locationName:"reasonCode" locationNameList:"item" type:"list" required:"true"`
+
+ // The time at which the reported instance health state began.
+ StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601"`
+
+ // The status of all instances listed.
+ Status *string `locationName:"status" type:"string" required:"true" enum:"ReportStatusType"`
+
+ metadataReportInstanceStatusInput `json:"-" xml:"-"`
+}
+
+type metadataReportInstanceStatusInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ReportInstanceStatusInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReportInstanceStatusInput) GoString() string {
+ return s.String()
+}
+
+type ReportInstanceStatusOutput struct {
+ metadataReportInstanceStatusOutput `json:"-" xml:"-"`
+}
+
+type metadataReportInstanceStatusOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ReportInstanceStatusOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReportInstanceStatusOutput) GoString() string {
+ return s.String()
+}
+
+// Contains the parameters for RequestSpotFleet.
+type RequestSpotFleetInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The configuration for the Spot fleet request.
+ SpotFleetRequestConfig *SpotFleetRequestConfigData `locationName:"spotFleetRequestConfig" type:"structure" required:"true"`
+
+ metadataRequestSpotFleetInput `json:"-" xml:"-"`
+}
+
+type metadataRequestSpotFleetInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s RequestSpotFleetInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RequestSpotFleetInput) GoString() string {
+ return s.String()
+}
+
+// Contains the output of RequestSpotFleet.
+type RequestSpotFleetOutput struct {
+ // The ID of the Spot fleet request.
+ SpotFleetRequestID *string `locationName:"spotFleetRequestId" type:"string" required:"true"`
+
+ metadataRequestSpotFleetOutput `json:"-" xml:"-"`
+}
+
+type metadataRequestSpotFleetOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s RequestSpotFleetOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RequestSpotFleetOutput) GoString() string {
+ return s.String()
+}
+
+// Contains the parameters for RequestSpotInstances.
+type RequestSpotInstancesInput struct {
+ // The user-specified name for a logical grouping of bids.
+ //
+ // When you specify an Availability Zone group in a Spot Instance request,
+ // all Spot Instances in the request are launched in the same Availability Zone.
+ // Instance proximity is maintained with this parameter, but the choice of Availability
+ // Zone is not. The group applies only to bids for Spot Instances of the same
+ // instance type. Any additional Spot Instance requests that are specified with
+ // the same Availability Zone group name are launched in that same Availability
+ // Zone, as long as at least one instance from the group is still active.
+ //
+ // If there is no active instance running in the Availability Zone group that
+ // you specify for a new Spot Instance request (all instances are terminated,
+ // the bid is expired, or the bid falls below current market), then Amazon EC2
+ // launches the instance in any Availability Zone where the constraint can be
+ // met. Consequently, the subsequent set of Spot Instances could be placed in
+ // a different zone from the original request, even if you specified the same
+ // Availability Zone group.
+ //
+ // Default: Instances are launched in any available Availability Zone.
+ AvailabilityZoneGroup *string `locationName:"availabilityZoneGroup" type:"string"`
+
+ // Unique, case-sensitive identifier that you provide to ensure the idempotency
+ // of the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html)
+ // in the Amazon Elastic Compute Cloud User Guide.
+ ClientToken *string `locationName:"clientToken" type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The maximum number of Spot Instances to launch.
+ //
+ // Default: 1
+ InstanceCount *int64 `locationName:"instanceCount" type:"integer"`
+
+ // The instance launch group. Launch groups are Spot Instances that launch together
+ // and terminate together.
+ //
+ // Default: Instances are launched and terminated individually
+ LaunchGroup *string `locationName:"launchGroup" type:"string"`
+
+ // Describes the launch specification for an instance.
+ LaunchSpecification *RequestSpotLaunchSpecification `type:"structure"`
+
+ // The maximum hourly price (bid) for any Spot Instance launched to fulfill
+ // the request.
+ SpotPrice *string `locationName:"spotPrice" type:"string" required:"true"`
+
+ // The Spot Instance request type.
+ //
+ // Default: one-time
+ Type *string `locationName:"type" type:"string" enum:"SpotInstanceType"`
+
+ // The start date of the request. If this is a one-time request, the request
+ // becomes active at this date and time and remains active until all instances
+ // launch, the request expires, or the request is canceled. If the request is
+ // persistent, the request becomes active at this date and time and remains
+ // active until it expires or is canceled.
+ //
+ // Default: The request is effective indefinitely.
+ ValidFrom *time.Time `locationName:"validFrom" type:"timestamp" timestampFormat:"iso8601"`
+
+ // The end date of the request. If this is a one-time request, the request remains
+ // active until all instances launch, the request is canceled, or this date
+ // is reached. If the request is persistent, it remains active until it is canceled
+ // or this date and time is reached.
+ //
+ // Default: The request is effective indefinitely.
+ ValidUntil *time.Time `locationName:"validUntil" type:"timestamp" timestampFormat:"iso8601"`
+
+ metadataRequestSpotInstancesInput `json:"-" xml:"-"`
+}
+
+type metadataRequestSpotInstancesInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s RequestSpotInstancesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RequestSpotInstancesInput) GoString() string {
+ return s.String()
+}
+
+// Contains the output of RequestSpotInstances.
+type RequestSpotInstancesOutput struct {
+ // One or more Spot Instance requests.
+ SpotInstanceRequests []*SpotInstanceRequest `locationName:"spotInstanceRequestSet" locationNameList:"item" type:"list"`
+
+ metadataRequestSpotInstancesOutput `json:"-" xml:"-"`
+}
+
+type metadataRequestSpotInstancesOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s RequestSpotInstancesOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RequestSpotInstancesOutput) GoString() string {
+ return s.String()
+}
+
+// Describes the launch specification for an instance.
+type RequestSpotLaunchSpecification struct {
+ // Deprecated.
+ AddressingType *string `locationName:"addressingType" type:"string"`
+
+ // One or more block device mapping entries.
+ BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"`
+
+ // Indicates whether the instance is optimized for EBS I/O. This optimization
+ // provides dedicated throughput to Amazon EBS and an optimized configuration
+ // stack to provide optimal EBS I/O performance. This optimization isn't available
+ // with all instance types. Additional usage charges apply when using an EBS
+ // Optimized instance.
+ //
+ // Default: false
+ EBSOptimized *bool `locationName:"ebsOptimized" type:"boolean"`
+
+ // The IAM instance profile.
+ IAMInstanceProfile *IAMInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"`
+
+ // The ID of the AMI.
+ ImageID *string `locationName:"imageId" type:"string"`
+
+ // The instance type.
+ InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"`
+
+ // The ID of the kernel.
+ KernelID *string `locationName:"kernelId" type:"string"`
+
+ // The name of the key pair.
+ KeyName *string `locationName:"keyName" type:"string"`
+
+ // Describes the monitoring for the instance.
+ Monitoring *RunInstancesMonitoringEnabled `locationName:"monitoring" type:"structure"`
+
+ // One or more network interfaces.
+ NetworkInterfaces []*InstanceNetworkInterfaceSpecification `locationName:"NetworkInterface" locationNameList:"item" type:"list"`
+
+ // The placement information for the instance.
+ Placement *SpotPlacement `locationName:"placement" type:"structure"`
+
+ // The ID of the RAM disk.
+ RAMDiskID *string `locationName:"ramdiskId" type:"string"`
+
+ SecurityGroupIDs []*string `locationName:"SecurityGroupId" locationNameList:"item" type:"list"`
+
+ SecurityGroups []*string `locationName:"SecurityGroup" locationNameList:"item" type:"list"`
+
+ // The ID of the subnet in which to launch the instance.
+ SubnetID *string `locationName:"subnetId" type:"string"`
+
+ // The Base64-encoded MIME user data to make available to the instances.
+ UserData *string `locationName:"userData" type:"string"`
+
+ metadataRequestSpotLaunchSpecification `json:"-" xml:"-"`
+}
+
+type metadataRequestSpotLaunchSpecification struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s RequestSpotLaunchSpecification) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RequestSpotLaunchSpecification) GoString() string {
+ return s.String()
+}
+
+// Describes a reservation.
+type Reservation struct {
+ // One or more security groups.
+ Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"`
+
+ // One or more instances.
+ Instances []*Instance `locationName:"instancesSet" locationNameList:"item" type:"list"`
+
+ // The ID of the AWS account that owns the reservation.
+ OwnerID *string `locationName:"ownerId" type:"string"`
+
+ // The ID of the requester that launched the instances on your behalf (for example,
+ // AWS Management Console or Auto Scaling).
+ RequesterID *string `locationName:"requesterId" type:"string"`
+
+ // The ID of the reservation.
+ ReservationID *string `locationName:"reservationId" type:"string"`
+
+ metadataReservation `json:"-" xml:"-"`
+}
+
+type metadataReservation struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s Reservation) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Reservation) GoString() string {
+ return s.String()
+}
+
+// Describes the limit price of a Reserved Instance offering.
+type ReservedInstanceLimitPrice struct {
+ // Used for Reserved Instance Marketplace offerings. Specifies the limit price
+ // on the total order (instanceCount * price).
+ Amount *float64 `locationName:"amount" type:"double"`
+
+ // The currency in which the limitPrice amount is specified. At this time, the
+ // only supported currency is USD.
+ CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"`
+
+ metadataReservedInstanceLimitPrice `json:"-" xml:"-"`
+}
+
+type metadataReservedInstanceLimitPrice struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ReservedInstanceLimitPrice) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReservedInstanceLimitPrice) GoString() string {
+ return s.String()
+}
+
+// Describes a Reserved Instance.
+type ReservedInstances struct {
+ // The Availability Zone in which the Reserved Instance can be used.
+ AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
+
+ // The currency of the Reserved Instance. It's specified using ISO 4217 standard
+ // currency codes. At this time, the only supported currency is USD.
+ CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"`
+
+ // The duration of the Reserved Instance, in seconds.
+ Duration *int64 `locationName:"duration" type:"long"`
+
+ // The time when the Reserved Instance expires.
+ End *time.Time `locationName:"end" type:"timestamp" timestampFormat:"iso8601"`
+
+ // The purchase price of the Reserved Instance.
+ FixedPrice *float64 `locationName:"fixedPrice" type:"float"`
+
+ // The number of Reserved Instances purchased.
+ InstanceCount *int64 `locationName:"instanceCount" type:"integer"`
+
+ // The tenancy of the reserved instance.
+ InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"`
+
+ // The instance type on which the Reserved Instance can be used.
+ InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"`
+
+ // The Reserved Instance offering type.
+ OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingTypeValues"`
+
+ // The Reserved Instance product platform description.
+ ProductDescription *string `locationName:"productDescription" type:"string" enum:"RIProductDescription"`
+
+ // The recurring charge tag assigned to the resource.
+ RecurringCharges []*RecurringCharge `locationName:"recurringCharges" locationNameList:"item" type:"list"`
+
+ // The ID of the Reserved Instance.
+ ReservedInstancesID *string `locationName:"reservedInstancesId" type:"string"`
+
+ // The date and time the Reserved Instance started.
+ Start *time.Time `locationName:"start" type:"timestamp" timestampFormat:"iso8601"`
+
+ // The state of the Reserved Instance purchase.
+ State *string `locationName:"state" type:"string" enum:"ReservedInstanceState"`
+
+ // Any tags assigned to the resource.
+ Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
+
+ // The usage price of the Reserved Instance, per hour.
+ UsagePrice *float64 `locationName:"usagePrice" type:"float"`
+
+ metadataReservedInstances `json:"-" xml:"-"`
+}
+
+type metadataReservedInstances struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ReservedInstances) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReservedInstances) GoString() string {
+ return s.String()
+}
+
+// Describes the configuration settings for the modified Reserved Instances.
+type ReservedInstancesConfiguration struct {
+ // The Availability Zone for the modified Reserved Instances.
+ AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
+
+ // The number of modified Reserved Instances.
+ InstanceCount *int64 `locationName:"instanceCount" type:"integer"`
+
+ // The instance type for the modified Reserved Instances.
+ InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"`
+
+ // The network platform of the modified Reserved Instances, which is either
+ // EC2-Classic or EC2-VPC.
+ Platform *string `locationName:"platform" type:"string"`
+
+ metadataReservedInstancesConfiguration `json:"-" xml:"-"`
+}
+
+type metadataReservedInstancesConfiguration struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ReservedInstancesConfiguration) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReservedInstancesConfiguration) GoString() string {
+ return s.String()
+}
+
+// Describes the ID of a Reserved Instance.
+type ReservedInstancesID struct {
+ // The ID of the Reserved Instance.
+ ReservedInstancesID *string `locationName:"reservedInstancesId" type:"string"`
+
+ metadataReservedInstancesID `json:"-" xml:"-"`
+}
+
+type metadataReservedInstancesID struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ReservedInstancesID) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReservedInstancesID) GoString() string {
+ return s.String()
+}
+
+// Describes a Reserved Instance listing.
+type ReservedInstancesListing struct {
+ // A unique, case-sensitive key supplied by the client to ensure that the request
+ // is idempotent. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string `locationName:"clientToken" type:"string"`
+
+ // The time the listing was created.
+ CreateDate *time.Time `locationName:"createDate" type:"timestamp" timestampFormat:"iso8601"`
+
+ // The number of instances in this state.
+ InstanceCounts []*InstanceCount `locationName:"instanceCounts" locationNameList:"item" type:"list"`
+
+ // The price of the Reserved Instance listing.
+ PriceSchedules []*PriceSchedule `locationName:"priceSchedules" locationNameList:"item" type:"list"`
+
+ // The ID of the Reserved Instance.
+ ReservedInstancesID *string `locationName:"reservedInstancesId" type:"string"`
+
+ // The ID of the Reserved Instance listing.
+ ReservedInstancesListingID *string `locationName:"reservedInstancesListingId" type:"string"`
+
+ // The status of the Reserved Instance listing.
+ Status *string `locationName:"status" type:"string" enum:"ListingStatus"`
+
+ // The reason for the current status of the Reserved Instance listing. The response
+ // can be blank.
+ StatusMessage *string `locationName:"statusMessage" type:"string"`
+
+ // Any tags assigned to the resource.
+ Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
+
+ // The last modified timestamp of the listing.
+ UpdateDate *time.Time `locationName:"updateDate" type:"timestamp" timestampFormat:"iso8601"`
+
+ metadataReservedInstancesListing `json:"-" xml:"-"`
+}
+
+type metadataReservedInstancesListing struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ReservedInstancesListing) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReservedInstancesListing) GoString() string {
+ return s.String()
+}
+
+// Describes a Reserved Instance modification.
+type ReservedInstancesModification struct {
+ // A unique, case-sensitive key supplied by the client to ensure that the request
+ // is idempotent. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string `locationName:"clientToken" type:"string"`
+
+ // The time when the modification request was created.
+ CreateDate *time.Time `locationName:"createDate" type:"timestamp" timestampFormat:"iso8601"`
+
+ // The time for the modification to become effective.
+ EffectiveDate *time.Time `locationName:"effectiveDate" type:"timestamp" timestampFormat:"iso8601"`
+
+ // Contains target configurations along with their corresponding new Reserved
+ // Instance IDs.
+ ModificationResults []*ReservedInstancesModificationResult `locationName:"modificationResultSet" locationNameList:"item" type:"list"`
+
+ // The IDs of one or more Reserved Instances.
+ ReservedInstancesIDs []*ReservedInstancesID `locationName:"reservedInstancesSet" locationNameList:"item" type:"list"`
+
+ // A unique ID for the Reserved Instance modification.
+ ReservedInstancesModificationID *string `locationName:"reservedInstancesModificationId" type:"string"`
+
+ // The status of the Reserved Instances modification request.
+ Status *string `locationName:"status" type:"string"`
+
+ // The reason for the status.
+ StatusMessage *string `locationName:"statusMessage" type:"string"`
+
+ // The time when the modification request was last updated.
+ UpdateDate *time.Time `locationName:"updateDate" type:"timestamp" timestampFormat:"iso8601"`
+
+ metadataReservedInstancesModification `json:"-" xml:"-"`
+}
+
+type metadataReservedInstancesModification struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ReservedInstancesModification) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReservedInstancesModification) GoString() string {
+ return s.String()
+}
+
+type ReservedInstancesModificationResult struct {
+ // The ID for the Reserved Instances that were created as part of the modification
+ // request. This field is only available when the modification is fulfilled.
+ ReservedInstancesID *string `locationName:"reservedInstancesId" type:"string"`
+
+ // The target Reserved Instances configurations supplied as part of the modification
+ // request.
+ TargetConfiguration *ReservedInstancesConfiguration `locationName:"targetConfiguration" type:"structure"`
+
+ metadataReservedInstancesModificationResult `json:"-" xml:"-"`
+}
+
+type metadataReservedInstancesModificationResult struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ReservedInstancesModificationResult) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReservedInstancesModificationResult) GoString() string {
+ return s.String()
+}
+
+// Describes a Reserved Instance offering.
+type ReservedInstancesOffering struct {
+ // The Availability Zone in which the Reserved Instance can be used.
+ AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
+
+ // The currency of the Reserved Instance offering you are purchasing. It's specified
+ // using ISO 4217 standard currency codes. At this time, the only supported
+ // currency is USD.
+ CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"`
+
+ // The duration of the Reserved Instance, in seconds.
+ Duration *int64 `locationName:"duration" type:"long"`
+
+ // The purchase price of the Reserved Instance.
+ FixedPrice *float64 `locationName:"fixedPrice" type:"float"`
+
+ // The tenancy of the reserved instance.
+ InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"`
+
+ // The instance type on which the Reserved Instance can be used.
+ InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"`
+
+ // Indicates whether the offering is available through the Reserved Instance
+ // Marketplace (resale) or AWS. If it's a Reserved Instance Marketplace offering,
+ // this is true.
+ Marketplace *bool `locationName:"marketplace" type:"boolean"`
+
+ // The Reserved Instance offering type.
+ OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingTypeValues"`
+
+ // The pricing details of the Reserved Instance offering.
+ PricingDetails []*PricingDetail `locationName:"pricingDetailsSet" locationNameList:"item" type:"list"`
+
+ // The Reserved Instance product platform description.
+ ProductDescription *string `locationName:"productDescription" type:"string" enum:"RIProductDescription"`
+
+ // The recurring charge tag assigned to the resource.
+ RecurringCharges []*RecurringCharge `locationName:"recurringCharges" locationNameList:"item" type:"list"`
+
+ // The ID of the Reserved Instance offering.
+ ReservedInstancesOfferingID *string `locationName:"reservedInstancesOfferingId" type:"string"`
+
+ // The usage price of the Reserved Instance, per hour.
+ UsagePrice *float64 `locationName:"usagePrice" type:"float"`
+
+ metadataReservedInstancesOffering `json:"-" xml:"-"`
+}
+
+type metadataReservedInstancesOffering struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ReservedInstancesOffering) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ReservedInstancesOffering) GoString() string {
+ return s.String()
+}
+
+type ResetImageAttributeInput struct {
+ // The attribute to reset (currently you can only reset the launch permission
+ // attribute).
+ Attribute *string `type:"string" required:"true" enum:"ResetImageAttributeName"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the AMI.
+ ImageID *string `locationName:"ImageId" type:"string" required:"true"`
+
+ metadataResetImageAttributeInput `json:"-" xml:"-"`
+}
+
+type metadataResetImageAttributeInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ResetImageAttributeInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ResetImageAttributeInput) GoString() string {
+ return s.String()
+}
+
+type ResetImageAttributeOutput struct {
+ metadataResetImageAttributeOutput `json:"-" xml:"-"`
+}
+
+type metadataResetImageAttributeOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ResetImageAttributeOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ResetImageAttributeOutput) GoString() string {
+ return s.String()
+}
+
+type ResetInstanceAttributeInput struct {
+ // The attribute to reset.
+ Attribute *string `locationName:"attribute" type:"string" required:"true" enum:"InstanceAttributeName"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the instance.
+ InstanceID *string `locationName:"instanceId" type:"string" required:"true"`
+
+ metadataResetInstanceAttributeInput `json:"-" xml:"-"`
+}
+
+type metadataResetInstanceAttributeInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ResetInstanceAttributeInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ResetInstanceAttributeInput) GoString() string {
+ return s.String()
+}
+
+type ResetInstanceAttributeOutput struct {
+ metadataResetInstanceAttributeOutput `json:"-" xml:"-"`
+}
+
+type metadataResetInstanceAttributeOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ResetInstanceAttributeOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ResetInstanceAttributeOutput) GoString() string {
+ return s.String()
+}
+
+type ResetNetworkInterfaceAttributeInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the network interface.
+ NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string" required:"true"`
+
+ // The source/destination checking attribute. Resets the value to true.
+ SourceDestCheck *string `locationName:"sourceDestCheck" type:"string"`
+
+ metadataResetNetworkInterfaceAttributeInput `json:"-" xml:"-"`
+}
+
+type metadataResetNetworkInterfaceAttributeInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ResetNetworkInterfaceAttributeInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ResetNetworkInterfaceAttributeInput) GoString() string {
+ return s.String()
+}
+
+type ResetNetworkInterfaceAttributeOutput struct {
+ metadataResetNetworkInterfaceAttributeOutput `json:"-" xml:"-"`
+}
+
+type metadataResetNetworkInterfaceAttributeOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ResetNetworkInterfaceAttributeOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ResetNetworkInterfaceAttributeOutput) GoString() string {
+ return s.String()
+}
+
+type ResetSnapshotAttributeInput struct {
+ // The attribute to reset. Currently, only the attribute for permission to create
+ // volumes can be reset.
+ Attribute *string `type:"string" required:"true" enum:"SnapshotAttributeName"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The ID of the snapshot.
+ SnapshotID *string `locationName:"SnapshotId" type:"string" required:"true"`
+
+ metadataResetSnapshotAttributeInput `json:"-" xml:"-"`
+}
+
+type metadataResetSnapshotAttributeInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ResetSnapshotAttributeInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ResetSnapshotAttributeInput) GoString() string {
+ return s.String()
+}
+
+type ResetSnapshotAttributeOutput struct {
+ metadataResetSnapshotAttributeOutput `json:"-" xml:"-"`
+}
+
+type metadataResetSnapshotAttributeOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s ResetSnapshotAttributeOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s ResetSnapshotAttributeOutput) GoString() string {
+ return s.String()
+}
+
+type RestoreAddressToClassicInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The Elastic IP address.
+ PublicIP *string `locationName:"publicIp" type:"string" required:"true"`
+
+ metadataRestoreAddressToClassicInput `json:"-" xml:"-"`
+}
+
+type metadataRestoreAddressToClassicInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s RestoreAddressToClassicInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RestoreAddressToClassicInput) GoString() string {
+ return s.String()
+}
+
+type RestoreAddressToClassicOutput struct {
+ // The Elastic IP address.
+ PublicIP *string `locationName:"publicIp" type:"string"`
+
+ // The move status for the IP address.
+ Status *string `locationName:"status" type:"string" enum:"Status"`
+
+ metadataRestoreAddressToClassicOutput `json:"-" xml:"-"`
+}
+
+type metadataRestoreAddressToClassicOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s RestoreAddressToClassicOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RestoreAddressToClassicOutput) GoString() string {
+ return s.String()
+}
+
+type RevokeSecurityGroupEgressInput struct {
+ // The CIDR IP address range. You can't specify this parameter when specifying
+ // a source security group.
+ CIDRIP *string `locationName:"cidrIp" type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The start of port range for the TCP and UDP protocols, or an ICMP type number.
+ // For the ICMP type number, use -1 to specify all ICMP types.
+ FromPort *int64 `locationName:"fromPort" type:"integer"`
+
+ // The ID of the security group.
+ GroupID *string `locationName:"groupId" type:"string" required:"true"`
+
+ // A set of IP permissions. You can't specify a destination security group and
+ // a CIDR IP address range.
+ IPPermissions []*IPPermission `locationName:"ipPermissions" locationNameList:"item" type:"list"`
+
+ // The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)).
+ // Use -1 to specify all.
+ IPProtocol *string `locationName:"ipProtocol" type:"string"`
+
+ // The name of a destination security group. To revoke outbound access to a
+ // destination security group, we recommend that you use a set of IP permissions
+ // instead.
+ SourceSecurityGroupName *string `locationName:"sourceSecurityGroupName" type:"string"`
+
+ // The AWS account number for a destination security group. To revoke outbound
+ // access to a destination security group, we recommend that you use a set of
+ // IP permissions instead.
+ SourceSecurityGroupOwnerID *string `locationName:"sourceSecurityGroupOwnerId" type:"string"`
+
+ // The end of port range for the TCP and UDP protocols, or an ICMP code number.
+ // For the ICMP code number, use -1 to specify all ICMP codes for the ICMP type.
+ ToPort *int64 `locationName:"toPort" type:"integer"`
+
+ metadataRevokeSecurityGroupEgressInput `json:"-" xml:"-"`
+}
+
+type metadataRevokeSecurityGroupEgressInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s RevokeSecurityGroupEgressInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RevokeSecurityGroupEgressInput) GoString() string {
+ return s.String()
+}
+
+type RevokeSecurityGroupEgressOutput struct {
+ metadataRevokeSecurityGroupEgressOutput `json:"-" xml:"-"`
+}
+
+type metadataRevokeSecurityGroupEgressOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s RevokeSecurityGroupEgressOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RevokeSecurityGroupEgressOutput) GoString() string {
+ return s.String()
+}
+
+type RevokeSecurityGroupIngressInput struct {
+ // The CIDR IP address range. You can't specify this parameter when specifying
+ // a source security group.
+ CIDRIP *string `locationName:"CidrIp" type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // The start of port range for the TCP and UDP protocols, or an ICMP type number.
+ // For the ICMP type number, use -1 to specify all ICMP types.
+ FromPort *int64 `type:"integer"`
+
+ // The ID of the security group. Required for a security group in a nondefault
+ // VPC.
+ GroupID *string `locationName:"GroupId" type:"string"`
+
+ // [EC2-Classic, default VPC] The name of the security group.
+ GroupName *string `type:"string"`
+
+ // A set of IP permissions. You can't specify a source security group and a
+ // CIDR IP address range.
+ IPPermissions []*IPPermission `locationName:"IpPermissions" locationNameList:"item" type:"list"`
+
+ // The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)).
+ // Use -1 to specify all.
+ IPProtocol *string `locationName:"IpProtocol" type:"string"`
+
+ // [EC2-Classic, default VPC] The name of the source security group. You can't
+ // specify this parameter in combination with the following parameters: the
+ // CIDR IP address range, the start of the port range, the IP protocol, and
+ // the end of the port range. For EC2-VPC, the source security group must be
+ // in the same VPC.
+ SourceSecurityGroupName *string `type:"string"`
+
+ // [EC2-Classic, default VPC] The AWS account ID of the source security group.
+ // For EC2-VPC, the source security group must be in the same VPC. You can't
+ // specify this parameter in combination with the following parameters: the
+ // CIDR IP address range, the IP protocol, the start of the port range, and
+ // the end of the port range. To revoke a specific rule for an IP protocol and
+ // port range, use a set of IP permissions instead.
+ SourceSecurityGroupOwnerID *string `locationName:"SourceSecurityGroupOwnerId" type:"string"`
+
+ // The end of port range for the TCP and UDP protocols, or an ICMP code number.
+ // For the ICMP code number, use -1 to specify all ICMP codes for the ICMP type.
+ ToPort *int64 `type:"integer"`
+
+ metadataRevokeSecurityGroupIngressInput `json:"-" xml:"-"`
+}
+
+type metadataRevokeSecurityGroupIngressInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s RevokeSecurityGroupIngressInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RevokeSecurityGroupIngressInput) GoString() string {
+ return s.String()
+}
+
+type RevokeSecurityGroupIngressOutput struct {
+ metadataRevokeSecurityGroupIngressOutput `json:"-" xml:"-"`
+}
+
+type metadataRevokeSecurityGroupIngressOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s RevokeSecurityGroupIngressOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RevokeSecurityGroupIngressOutput) GoString() string {
+ return s.String()
+}
+
+// Describes a route in a route table.
+type Route struct {
+ // The CIDR block used for the destination match.
+ DestinationCIDRBlock *string `locationName:"destinationCidrBlock" type:"string"`
+
+ // The prefix of the AWS service.
+ DestinationPrefixListID *string `locationName:"destinationPrefixListId" type:"string"`
+
+ // The ID of a gateway attached to your VPC.
+ GatewayID *string `locationName:"gatewayId" type:"string"`
+
+ // The ID of a NAT instance in your VPC.
+ InstanceID *string `locationName:"instanceId" type:"string"`
+
+ // The AWS account ID of the owner of the instance.
+ InstanceOwnerID *string `locationName:"instanceOwnerId" type:"string"`
+
+ // The ID of the network interface.
+ NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string"`
+
+ // Describes how the route was created.
+ //
+ // CreateRouteTable indicates that route was automatically created when the
+ // route table was created. CreateRoute indicates that the route was manually
+ // added to the route table. EnableVgwRoutePropagation indicates that the route
+ // was propagated by route propagation.
+ Origin *string `locationName:"origin" type:"string" enum:"RouteOrigin"`
+
+ // The state of the route. The blackhole state indicates that the route's target
+ // isn't available (for example, the specified gateway isn't attached to the
+ // VPC, or the specified NAT instance has been terminated).
+ State *string `locationName:"state" type:"string" enum:"RouteState"`
+
+ // The ID of the VPC peering connection.
+ VPCPeeringConnectionID *string `locationName:"vpcPeeringConnectionId" type:"string"`
+
+ metadataRoute `json:"-" xml:"-"`
+}
+
+type metadataRoute struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s Route) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Route) GoString() string {
+ return s.String()
+}
+
+// Describes a route table.
+type RouteTable struct {
+ // The associations between the route table and one or more subnets.
+ Associations []*RouteTableAssociation `locationName:"associationSet" locationNameList:"item" type:"list"`
+
+ // Any virtual private gateway (VGW) propagating routes.
+ PropagatingVGWs []*PropagatingVGW `locationName:"propagatingVgwSet" locationNameList:"item" type:"list"`
+
+ // The ID of the route table.
+ RouteTableID *string `locationName:"routeTableId" type:"string"`
+
+ // The routes in the route table.
+ Routes []*Route `locationName:"routeSet" locationNameList:"item" type:"list"`
+
+ // Any tags assigned to the route table.
+ Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
+
+ // The ID of the VPC.
+ VPCID *string `locationName:"vpcId" type:"string"`
+
+ metadataRouteTable `json:"-" xml:"-"`
+}
+
+type metadataRouteTable struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s RouteTable) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RouteTable) GoString() string {
+ return s.String()
+}
+
+// Describes an association between a route table and a subnet.
+type RouteTableAssociation struct {
+ // Indicates whether this is the main route table.
+ Main *bool `locationName:"main" type:"boolean"`
+
+ // The ID of the association between a route table and a subnet.
+ RouteTableAssociationID *string `locationName:"routeTableAssociationId" type:"string"`
+
+ // The ID of the route table.
+ RouteTableID *string `locationName:"routeTableId" type:"string"`
+
+ // The ID of the subnet. A subnet ID is not returned for an implicit association.
+ SubnetID *string `locationName:"subnetId" type:"string"`
+
+ metadataRouteTableAssociation `json:"-" xml:"-"`
+}
+
+type metadataRouteTableAssociation struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s RouteTableAssociation) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RouteTableAssociation) GoString() string {
+ return s.String()
+}
+
+type RunInstancesInput struct {
+ // Reserved.
+ AdditionalInfo *string `locationName:"additionalInfo" type:"string"`
+
+ // The block device mapping.
+ BlockDeviceMappings []*BlockDeviceMapping `locationName:"BlockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"`
+
+ // Unique, case-sensitive identifier you provide to ensure the idempotency of
+ // the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ //
+ // Constraints: Maximum 64 ASCII characters
+ ClientToken *string `locationName:"clientToken" type:"string"`
+
+ // If you set this parameter to true, you can't terminate the instance using
+ // the Amazon EC2 console, CLI, or API; otherwise, you can. If you set this
+ // parameter to true and then later want to be able to terminate the instance,
+ // you must first change the value of the disableApiTermination attribute to
+ // false using ModifyInstanceAttribute. Alternatively, if you set InstanceInitiatedShutdownBehavior
+ // to terminate, you can terminate the instance by running the shutdown command
+ // from the instance.
+ //
+ // Default: false
+ DisableAPITermination *bool `locationName:"disableApiTermination" type:"boolean"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // Indicates whether the instance is optimized for EBS I/O. This optimization
+ // provides dedicated throughput to Amazon EBS and an optimized configuration
+ // stack to provide optimal EBS I/O performance. This optimization isn't available
+ // with all instance types. Additional usage charges apply when using an EBS-optimized
+ // instance.
+ //
+ // Default: false
+ EBSOptimized *bool `locationName:"ebsOptimized" type:"boolean"`
+
+ // The IAM instance profile.
+ IAMInstanceProfile *IAMInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"`
+
+ // The ID of the AMI, which you can get by calling DescribeImages.
+ ImageID *string `locationName:"ImageId" type:"string" required:"true"`
+
+ // Indicates whether an instance stops or terminates when you initiate shutdown
+ // from the instance (using the operating system command for system shutdown).
+ //
+ // Default: stop
+ InstanceInitiatedShutdownBehavior *string `locationName:"instanceInitiatedShutdownBehavior" type:"string" enum:"ShutdownBehavior"`
+
+ // The instance type. For more information, see Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html)
+ // in the Amazon Elastic Compute Cloud User Guide.
+ //
+ // Default: m1.small
+ InstanceType *string `type:"string" enum:"InstanceType"`
+
+ // The ID of the kernel.
+ //
+ // We recommend that you use PV-GRUB instead of kernels and RAM disks. For
+ // more information, see PV-GRUB (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html)
+ // in the Amazon Elastic Compute Cloud User Guide.
+ KernelID *string `locationName:"KernelId" type:"string"`
+
+ // The name of the key pair. You can create a key pair using CreateKeyPair or
+ // ImportKeyPair.
+ //
+ // If you do not specify a key pair, you can't connect to the instance unless
+ // you choose an AMI that is configured to allow users another way to log in.
+ KeyName *string `type:"string"`
+
+ // The maximum number of instances to launch. If you specify more instances
+ // than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches
+ // the largest possible number of instances above MinCount.
+ //
+ // Constraints: Between 1 and the maximum number you're allowed for the specified
+ // instance type. For more information about the default limits, and how to
+ // request an increase, see How many instances can I run in Amazon EC2 (http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2)
+ // in the Amazon EC2 General FAQ.
+ MaxCount *int64 `type:"integer" required:"true"`
+
+ // The minimum number of instances to launch. If you specify a minimum that
+ // is more instances than Amazon EC2 can launch in the target Availability Zone,
+ // Amazon EC2 launches no instances.
+ //
+ // Constraints: Between 1 and the maximum number you're allowed for the specified
+ // instance type. For more information about the default limits, and how to
+ // request an increase, see How many instances can I run in Amazon EC2 (http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2)
+ // in the Amazon EC2 General FAQ.
+ MinCount *int64 `type:"integer" required:"true"`
+
+ // The monitoring for the instance.
+ Monitoring *RunInstancesMonitoringEnabled `type:"structure"`
+
+ // One or more network interfaces.
+ NetworkInterfaces []*InstanceNetworkInterfaceSpecification `locationName:"networkInterface" locationNameList:"item" type:"list"`
+
+ // The placement for the instance.
+ Placement *Placement `type:"structure"`
+
+ // [EC2-VPC] The primary IP address. You must specify a value from the IP address
+ // range of the subnet.
+ //
+ // Only one private IP address can be designated as primary. Therefore, you
+ // can't specify this parameter if PrivateIpAddresses.n.Primary is set to true
+ // and PrivateIpAddresses.n.PrivateIpAddress is set to an IP address.
+ //
+ // Default: We select an IP address from the IP address range of the subnet.
+ PrivateIPAddress *string `locationName:"privateIpAddress" type:"string"`
+
+ // The ID of the RAM disk.
+ //
+ // We recommend that you use PV-GRUB instead of kernels and RAM disks. For
+ // more information, see PV-GRUB (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html)
+ // in the Amazon Elastic Compute Cloud User Guide.
+ RAMDiskID *string `locationName:"RamdiskId" type:"string"`
+
+ // One or more security group IDs. You can create a security group using CreateSecurityGroup.
+ //
+ // Default: Amazon EC2 uses the default security group.
+ SecurityGroupIDs []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"`
+
+ // [EC2-Classic, default VPC] One or more security group names. For a nondefault
+ // VPC, you must use security group IDs instead.
+ //
+ // Default: Amazon EC2 uses the default security group.
+ SecurityGroups []*string `locationName:"SecurityGroup" locationNameList:"SecurityGroup" type:"list"`
+
+ // [EC2-VPC] The ID of the subnet to launch the instance into.
+ SubnetID *string `locationName:"SubnetId" type:"string"`
+
+ // The Base64-encoded MIME user data for the instances.
+ UserData *string `type:"string"`
+
+ metadataRunInstancesInput `json:"-" xml:"-"`
+}
+
+type metadataRunInstancesInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s RunInstancesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RunInstancesInput) GoString() string {
+ return s.String()
+}
+
+// Describes the monitoring for the instance.
+type RunInstancesMonitoringEnabled struct {
+ // Indicates whether monitoring is enabled for the instance.
+ Enabled *bool `locationName:"enabled" type:"boolean" required:"true"`
+
+ metadataRunInstancesMonitoringEnabled `json:"-" xml:"-"`
+}
+
+type metadataRunInstancesMonitoringEnabled struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s RunInstancesMonitoringEnabled) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s RunInstancesMonitoringEnabled) GoString() string {
+ return s.String()
+}
+
+// Describes the storage parameters for S3 and S3 buckets for an instance store-backed
+// AMI.
+type S3Storage struct {
+ // The access key ID of the owner of the bucket. Before you specify a value
+ // for your access key ID, review and follow the guidance in Best Practices
+ // for Managing AWS Access Keys (http://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html).
+ AWSAccessKeyID *string `locationName:"AWSAccessKeyId" type:"string"`
+
+ // The bucket in which to store the AMI. You can specify a bucket that you already
+ // own or a new bucket that Amazon EC2 creates on your behalf. If you specify
+ // a bucket that belongs to someone else, Amazon EC2 returns an error.
+ Bucket *string `locationName:"bucket" type:"string"`
+
+ // The beginning of the file name of the AMI.
+ Prefix *string `locationName:"prefix" type:"string"`
+
+ // A Base64-encoded Amazon S3 upload policy that gives Amazon EC2 permission
+ // to upload items into Amazon S3 on your behalf.
+ UploadPolicy []byte `locationName:"uploadPolicy" type:"blob"`
+
+ // The signature of the Base64 encoded JSON document.
+ UploadPolicySignature *string `locationName:"uploadPolicySignature" type:"string"`
+
+ metadataS3Storage `json:"-" xml:"-"`
+}
+
+type metadataS3Storage struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s S3Storage) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s S3Storage) GoString() string {
+ return s.String()
+}
+
+// Describes a security group
+type SecurityGroup struct {
+ // A description of the security group.
+ Description *string `locationName:"groupDescription" type:"string"`
+
+ // The ID of the security group.
+ GroupID *string `locationName:"groupId" type:"string"`
+
+ // The name of the security group.
+ GroupName *string `locationName:"groupName" type:"string"`
+
+ // One or more inbound rules associated with the security group.
+ IPPermissions []*IPPermission `locationName:"ipPermissions" locationNameList:"item" type:"list"`
+
+ // [EC2-VPC] One or more outbound rules associated with the security group.
+ IPPermissionsEgress []*IPPermission `locationName:"ipPermissionsEgress" locationNameList:"item" type:"list"`
+
+ // The AWS account ID of the owner of the security group.
+ OwnerID *string `locationName:"ownerId" type:"string"`
+
+ // Any tags assigned to the security group.
+ Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
+
+ // [EC2-VPC] The ID of the VPC for the security group.
+ VPCID *string `locationName:"vpcId" type:"string"`
+
+ metadataSecurityGroup `json:"-" xml:"-"`
+}
+
+type metadataSecurityGroup struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s SecurityGroup) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SecurityGroup) GoString() string {
+ return s.String()
+}
+
+// Describes a snapshot.
+type Snapshot struct {
+ // The description for the snapshot.
+ Description *string `locationName:"description" type:"string"`
+
+ // Indicates whether the snapshot is encrypted.
+ Encrypted *bool `locationName:"encrypted" type:"boolean"`
+
+ // The full ARN of the AWS Key Management Service (AWS KMS) customer master
+ // key (CMK) that was used to protect the volume encryption key for the parent
+ // volume.
+ KMSKeyID *string `locationName:"kmsKeyId" type:"string"`
+
+ // The AWS account alias (for example, amazon, self) or AWS account ID that
+ // owns the snapshot.
+ OwnerAlias *string `locationName:"ownerAlias" type:"string"`
+
+ // The AWS account ID of the EBS snapshot owner.
+ OwnerID *string `locationName:"ownerId" type:"string"`
+
+ // The progress of the snapshot, as a percentage.
+ Progress *string `locationName:"progress" type:"string"`
+
+ // The ID of the snapshot.
+ SnapshotID *string `locationName:"snapshotId" type:"string"`
+
+ // The time stamp when the snapshot was initiated.
+ StartTime *time.Time `locationName:"startTime" type:"timestamp" timestampFormat:"iso8601"`
+
+ // The snapshot state.
+ State *string `locationName:"status" type:"string" enum:"SnapshotState"`
+
+ // Any tags assigned to the snapshot.
+ Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
+
+ // The ID of the volume.
+ VolumeID *string `locationName:"volumeId" type:"string"`
+
+ // The size of the volume, in GiB.
+ VolumeSize *int64 `locationName:"volumeSize" type:"integer"`
+
+ metadataSnapshot `json:"-" xml:"-"`
+}
+
+type metadataSnapshot struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s Snapshot) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Snapshot) GoString() string {
+ return s.String()
+}
+
+// Describes the snapshot created from the imported disk.
+type SnapshotDetail struct {
+ // A description for the snapshot.
+ Description *string `locationName:"description" type:"string"`
+
+ // The block device mapping for the snapshot.
+ DeviceName *string `locationName:"deviceName" type:"string"`
+
+ // The size of the disk in the snapshot, in GiB.
+ DiskImageSize *float64 `locationName:"diskImageSize" type:"double"`
+
+ // The format of the disk image from which the snapshot is created.
+ Format *string `locationName:"format" type:"string"`
+
+ // The percentage of progress for the task.
+ Progress *string `locationName:"progress" type:"string"`
+
+ // The snapshot ID of the disk being imported.
+ SnapshotID *string `locationName:"snapshotId" type:"string"`
+
+ // A brief status of the snapshot creation.
+ Status *string `locationName:"status" type:"string"`
+
+ // A detailed status message for the snapshot creation.
+ StatusMessage *string `locationName:"statusMessage" type:"string"`
+
+ // The URL used to access the disk image.
+ URL *string `locationName:"url" type:"string"`
+
+ // Describes the S3 bucket for the disk image.
+ UserBucket *UserBucketDetails `locationName:"userBucket" type:"structure"`
+
+ metadataSnapshotDetail `json:"-" xml:"-"`
+}
+
+type metadataSnapshotDetail struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s SnapshotDetail) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SnapshotDetail) GoString() string {
+ return s.String()
+}
+
+// The disk container object for the import snapshot request.
+type SnapshotDiskContainer struct {
+ // The description of the disk image being imported.
+ Description *string `type:"string"`
+
+ // The format of the disk image being imported.
+ //
+ // Valid values: RAW | VHD | VMDK | OVA
+ Format *string `type:"string"`
+
+ // The URL to the Amazon S3-based disk image being imported. It can either be
+ // a https URL (https://..) or an Amazon S3 URL (s3://..).
+ URL *string `locationName:"Url" type:"string"`
+
+ // Describes the S3 bucket for the disk image.
+ UserBucket *UserBucket `type:"structure"`
+
+ metadataSnapshotDiskContainer `json:"-" xml:"-"`
+}
+
+type metadataSnapshotDiskContainer struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s SnapshotDiskContainer) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SnapshotDiskContainer) GoString() string {
+ return s.String()
+}
+
+// Details about the import snapshot task.
+type SnapshotTaskDetail struct {
+ // The description of the snapshot.
+ Description *string `locationName:"description" type:"string"`
+
+ // The size of the disk in the snapshot, in GiB.
+ DiskImageSize *float64 `locationName:"diskImageSize" type:"double"`
+
+ // The format of the disk image from which the snapshot is created.
+ Format *string `locationName:"format" type:"string"`
+
+ // The percentage of completion for the import snapshot task.
+ Progress *string `locationName:"progress" type:"string"`
+
+ // The snapshot ID of the disk being imported.
+ SnapshotID *string `locationName:"snapshotId" type:"string"`
+
+ // A brief status for the import snapshot task.
+ Status *string `locationName:"status" type:"string"`
+
+ // A detailed status message for the import snapshot task.
+ StatusMessage *string `locationName:"statusMessage" type:"string"`
+
+ // The URL of the disk image from which the snapshot is created.
+ URL *string `locationName:"url" type:"string"`
+
+ // The S3 bucket for the disk image.
+ UserBucket *UserBucketDetails `locationName:"userBucket" type:"structure"`
+
+ metadataSnapshotTaskDetail `json:"-" xml:"-"`
+}
+
+type metadataSnapshotTaskDetail struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s SnapshotTaskDetail) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SnapshotTaskDetail) GoString() string {
+ return s.String()
+}
+
+// Describes the data feed for a Spot Instance.
+type SpotDatafeedSubscription struct {
+ // The Amazon S3 bucket where the Spot Instance data feed is located.
+ Bucket *string `locationName:"bucket" type:"string"`
+
+ // The fault codes for the Spot Instance request, if any.
+ Fault *SpotInstanceStateFault `locationName:"fault" type:"structure"`
+
+ // The AWS account ID of the account.
+ OwnerID *string `locationName:"ownerId" type:"string"`
+
+ // The prefix that is prepended to data feed files.
+ Prefix *string `locationName:"prefix" type:"string"`
+
+ // The state of the Spot Instance data feed subscription.
+ State *string `locationName:"state" type:"string" enum:"DatafeedSubscriptionState"`
+
+ metadataSpotDatafeedSubscription `json:"-" xml:"-"`
+}
+
+type metadataSpotDatafeedSubscription struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s SpotDatafeedSubscription) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SpotDatafeedSubscription) GoString() string {
+ return s.String()
+}
+
+// Describes the launch specification for an instance.
+type SpotFleetLaunchSpecification struct {
+ // Deprecated.
+ AddressingType *string `locationName:"addressingType" type:"string"`
+
+ // One or more block device mapping entries.
+ BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"`
+
+ // Indicates whether the instance is optimized for EBS I/O. This optimization
+ // provides dedicated throughput to Amazon EBS and an optimized configuration
+ // stack to provide optimal EBS I/O performance. This optimization isn't available
+ // with all instance types. Additional usage charges apply when using an EBS
+ // Optimized instance.
+ //
+ // Default: false
+ EBSOptimized *bool `locationName:"ebsOptimized" type:"boolean"`
+
+ // Describes an IAM instance profile.
+ IAMInstanceProfile *IAMInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"`
+
+ // The ID of the AMI.
+ ImageID *string `locationName:"imageId" type:"string"`
+
+ // The instance type.
+ InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"`
+
+ // The ID of the kernel.
+ KernelID *string `locationName:"kernelId" type:"string"`
+
+ // The name of the key pair.
+ KeyName *string `locationName:"keyName" type:"string"`
+
+ // Enable or disable monitoring for the instance.
+ Monitoring *SpotFleetMonitoring `locationName:"monitoring" type:"structure"`
+
+ // One or more network interfaces.
+ NetworkInterfaces []*InstanceNetworkInterfaceSpecification `locationName:"networkInterfaceSet" locationNameList:"item" type:"list"`
+
+ // Describes Spot Instance placement.
+ Placement *SpotPlacement `locationName:"placement" type:"structure"`
+
+ // The ID of the RAM disk.
+ RAMDiskID *string `locationName:"ramdiskId" type:"string"`
+
+ // One or more security groups. To request an instance in a nondefault VPC,
+ // you must specify the ID of the security group. To request an instance in
+ // EC2-Classic or a default VPC, you can specify the name or the ID of the security
+ // group.
+ SecurityGroups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"`
+
+ // The ID of the subnet in which to launch the instance.
+ SubnetID *string `locationName:"subnetId" type:"string"`
+
+ // The Base64-encoded MIME user data to make available to the instances.
+ UserData *string `locationName:"userData" type:"string"`
+
+ metadataSpotFleetLaunchSpecification `json:"-" xml:"-"`
+}
+
+type metadataSpotFleetLaunchSpecification struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s SpotFleetLaunchSpecification) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SpotFleetLaunchSpecification) GoString() string {
+ return s.String()
+}
+
+// Describes whether monitoring is enabled.
+type SpotFleetMonitoring struct {
+ // Enables monitoring for the instance.
+ //
+ // Default: false
+ Enabled *bool `locationName:"enabled" type:"boolean"`
+
+ metadataSpotFleetMonitoring `json:"-" xml:"-"`
+}
+
+type metadataSpotFleetMonitoring struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s SpotFleetMonitoring) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SpotFleetMonitoring) GoString() string {
+ return s.String()
+}
+
+// Describes a Spot fleet request.
+type SpotFleetRequestConfig struct {
+ // Information about the configuration of the Spot fleet request.
+ SpotFleetRequestConfig *SpotFleetRequestConfigData `locationName:"spotFleetRequestConfig" type:"structure" required:"true"`
+
+ // The ID of the Spot fleet request.
+ SpotFleetRequestID *string `locationName:"spotFleetRequestId" type:"string" required:"true"`
+
+ // The state of the Spot fleet request.
+ SpotFleetRequestState *string `locationName:"spotFleetRequestState" type:"string" required:"true" enum:"BatchState"`
+
+ metadataSpotFleetRequestConfig `json:"-" xml:"-"`
+}
+
+type metadataSpotFleetRequestConfig struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s SpotFleetRequestConfig) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SpotFleetRequestConfig) GoString() string {
+ return s.String()
+}
+
+// Describes the configuration of a Spot fleet request.
+type SpotFleetRequestConfigData struct {
+ // A unique, case-sensitive identifier you provide to ensure idempotency of
+ // your listings. This helps avoid duplicate listings. For more information,
+ // see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
+ ClientToken *string `locationName:"clientToken" type:"string"`
+
+ // Grants the Spot fleet service permission to terminate instances on your behalf
+ // when you cancel a Spot fleet request using CancelSpotFleetRequests or when
+ // the Spot fleet request expires, if you set terminateInstancesWithExpiration.
+ IAMFleetRole *string `locationName:"iamFleetRole" type:"string" required:"true"`
+
+ // Information about the launch specifications for the instances.
+ LaunchSpecifications []*SpotFleetLaunchSpecification `locationName:"launchSpecifications" locationNameList:"item" type:"list" required:"true"`
+
+ // The maximum hourly price (bid) for any Spot Instance launched to fulfill
+ // the request.
+ SpotPrice *string `locationName:"spotPrice" type:"string" required:"true"`
+
+ // The maximum number of Spot Instances to launch.
+ TargetCapacity *int64 `locationName:"targetCapacity" type:"integer" required:"true"`
+
+ // Indicates whether running instances should be terminated when the Spot fleet
+ // request expires.
+ TerminateInstancesWithExpiration *bool `locationName:"terminateInstancesWithExpiration" type:"boolean"`
+
+ // The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
+ // The default is to start fulfilling the request immediately.
+ ValidFrom *time.Time `locationName:"validFrom" type:"timestamp" timestampFormat:"iso8601"`
+
+ // The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
+ // At this point, no new Spot Instance requests are placed or enabled to fulfill
+ // the request.
+ ValidUntil *time.Time `locationName:"validUntil" type:"timestamp" timestampFormat:"iso8601"`
+
+ metadataSpotFleetRequestConfigData `json:"-" xml:"-"`
+}
+
+type metadataSpotFleetRequestConfigData struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s SpotFleetRequestConfigData) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SpotFleetRequestConfigData) GoString() string {
+ return s.String()
+}
+
+// Describe a Spot Instance request.
+type SpotInstanceRequest struct {
+ // The Availability Zone group. If you specify the same Availability Zone group
+ // for all Spot Instance requests, all Spot Instances are launched in the same
+ // Availability Zone.
+ AvailabilityZoneGroup *string `locationName:"availabilityZoneGroup" type:"string"`
+
+ // The date and time when the Spot Instance request was created, in UTC format
+ // (for example, YYYY-MM-DDTHH:MM:SSZ).
+ CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601"`
+
+ // The fault codes for the Spot Instance request, if any.
+ Fault *SpotInstanceStateFault `locationName:"fault" type:"structure"`
+
+ // The instance ID, if an instance has been launched to fulfill the Spot Instance
+ // request.
+ InstanceID *string `locationName:"instanceId" type:"string"`
+
+ // The instance launch group. Launch groups are Spot Instances that launch together
+ // and terminate together.
+ LaunchGroup *string `locationName:"launchGroup" type:"string"`
+
+ // Additional information for launching instances.
+ LaunchSpecification *LaunchSpecification `locationName:"launchSpecification" type:"structure"`
+
+ // The Availability Zone in which the bid is launched.
+ LaunchedAvailabilityZone *string `locationName:"launchedAvailabilityZone" type:"string"`
+
+ // The product description associated with the Spot Instance.
+ ProductDescription *string `locationName:"productDescription" type:"string" enum:"RIProductDescription"`
+
+ // The ID of the Spot Instance request.
+ SpotInstanceRequestID *string `locationName:"spotInstanceRequestId" type:"string"`
+
+ // The maximum hourly price (bid) for any Spot Instance launched to fulfill
+ // the request.
+ SpotPrice *string `locationName:"spotPrice" type:"string"`
+
+ // The state of the Spot Instance request. Spot bid status information can help
+ // you track your Spot Instance requests. For more information, see Spot Bid
+ // Status (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html)
+ // in the Amazon Elastic Compute Cloud User Guide.
+ State *string `locationName:"state" type:"string" enum:"SpotInstanceState"`
+
+ // The status code and status message describing the Spot Instance request.
+ Status *SpotInstanceStatus `locationName:"status" type:"structure"`
+
+ // Any tags assigned to the resource.
+ Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
+
+ // The Spot Instance request type.
+ Type *string `locationName:"type" type:"string" enum:"SpotInstanceType"`
+
+ // The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
+ // If this is a one-time request, the request becomes active at this date and
+ // time and remains active until all instances launch, the request expires,
+ // or the request is canceled. If the request is persistent, the request becomes
+ // active at this date and time and remains active until it expires or is canceled.
+ ValidFrom *time.Time `locationName:"validFrom" type:"timestamp" timestampFormat:"iso8601"`
+
+ // The end date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
+ // If this is a one-time request, the request remains active until all instances
+ // launch, the request is canceled, or this date is reached. If the request
+ // is persistent, it remains active until it is canceled or this date is reached.
+ ValidUntil *time.Time `locationName:"validUntil" type:"timestamp" timestampFormat:"iso8601"`
+
+ metadataSpotInstanceRequest `json:"-" xml:"-"`
+}
+
+type metadataSpotInstanceRequest struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s SpotInstanceRequest) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SpotInstanceRequest) GoString() string {
+ return s.String()
+}
+
+// Describes a Spot Instance state change.
+type SpotInstanceStateFault struct {
+ // The reason code for the Spot Instance state change.
+ Code *string `locationName:"code" type:"string"`
+
+ // The message for the Spot Instance state change.
+ Message *string `locationName:"message" type:"string"`
+
+ metadataSpotInstanceStateFault `json:"-" xml:"-"`
+}
+
+type metadataSpotInstanceStateFault struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s SpotInstanceStateFault) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SpotInstanceStateFault) GoString() string {
+ return s.String()
+}
+
+// Describes the status of a Spot Instance request.
+type SpotInstanceStatus struct {
+ // The status code.
+ Code *string `locationName:"code" type:"string"`
+
+ // The description for the status code.
+ Message *string `locationName:"message" type:"string"`
+
+ // The date and time of the most recent status update, in UTC format (for example,
+ // YYYY-MM-DDTHH:MM:SSZ).
+ UpdateTime *time.Time `locationName:"updateTime" type:"timestamp" timestampFormat:"iso8601"`
+
+ metadataSpotInstanceStatus `json:"-" xml:"-"`
+}
+
+type metadataSpotInstanceStatus struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s SpotInstanceStatus) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SpotInstanceStatus) GoString() string {
+ return s.String()
+}
+
+// Describes Spot Instance placement.
+type SpotPlacement struct {
+ // The Availability Zone.
+ AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
+
+ // The name of the placement group (for cluster instances).
+ GroupName *string `locationName:"groupName" type:"string"`
+
+ metadataSpotPlacement `json:"-" xml:"-"`
+}
+
+type metadataSpotPlacement struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s SpotPlacement) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SpotPlacement) GoString() string {
+ return s.String()
+}
+
+// Describes the maximum hourly price (bid) for any Spot Instance launched to
+// fulfill the request.
+type SpotPrice struct {
+ // The Availability Zone.
+ AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
+
+ // The instance type.
+ InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"`
+
+ // A general description of the AMI.
+ ProductDescription *string `locationName:"productDescription" type:"string" enum:"RIProductDescription"`
+
+ // The maximum price (bid) that you are willing to pay for a Spot Instance.
+ SpotPrice *string `locationName:"spotPrice" type:"string"`
+
+ // The date and time the request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ).
+ Timestamp *time.Time `locationName:"timestamp" type:"timestamp" timestampFormat:"iso8601"`
+
+ metadataSpotPrice `json:"-" xml:"-"`
+}
+
+type metadataSpotPrice struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s SpotPrice) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s SpotPrice) GoString() string {
+ return s.String()
+}
+
+type StartInstancesInput struct {
+ // Reserved.
+ AdditionalInfo *string `locationName:"additionalInfo" type:"string"`
+
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more instance IDs.
+ InstanceIDs []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"`
+
+ metadataStartInstancesInput `json:"-" xml:"-"`
+}
+
+type metadataStartInstancesInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s StartInstancesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s StartInstancesInput) GoString() string {
+ return s.String()
+}
+
+type StartInstancesOutput struct {
+ // Information about one or more started instances.
+ StartingInstances []*InstanceStateChange `locationName:"instancesSet" locationNameList:"item" type:"list"`
+
+ metadataStartInstancesOutput `json:"-" xml:"-"`
+}
+
+type metadataStartInstancesOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s StartInstancesOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s StartInstancesOutput) GoString() string {
+ return s.String()
+}
+
+// Describes a state change.
+type StateReason struct {
+ // The reason code for the state change.
+ Code *string `locationName:"code" type:"string"`
+
+ // The message for the state change.
+ //
+ // Server.SpotInstanceTermination: A Spot Instance was terminated due to an
+ // increase in the market price.
+ //
+ // Server.InternalError: An internal error occurred during instance launch,
+ // resulting in termination.
+ //
+ // Server.InsufficientInstanceCapacity: There was insufficient instance capacity
+ // to satisfy the launch request.
+ //
+ // Client.InternalError: A client error caused the instance to terminate on
+ // launch.
+ //
+ // Client.InstanceInitiatedShutdown: The instance was shut down using the shutdown
+ // -h command from the instance.
+ //
+ // Client.UserInitiatedShutdown: The instance was shut down using the Amazon
+ // EC2 API.
+ //
+ // Client.VolumeLimitExceeded: The volume limit was exceeded.
+ //
+ // Client.InvalidSnapshot.NotFound: The specified snapshot was not found.
+ Message *string `locationName:"message" type:"string"`
+
+ metadataStateReason `json:"-" xml:"-"`
+}
+
+type metadataStateReason struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s StateReason) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s StateReason) GoString() string {
+ return s.String()
+}
+
+type StopInstancesInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // Forces the instances to stop. The instances do not have an opportunity to
+ // flush file system caches or file system metadata. If you use this option,
+ // you must perform file system check and repair procedures. This option is
+ // not recommended for Windows instances.
+ //
+ // Default: false
+ Force *bool `locationName:"force" type:"boolean"`
+
+ // One or more instance IDs.
+ InstanceIDs []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"`
+
+ metadataStopInstancesInput `json:"-" xml:"-"`
+}
+
+type metadataStopInstancesInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s StopInstancesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s StopInstancesInput) GoString() string {
+ return s.String()
+}
+
+type StopInstancesOutput struct {
+ // Information about one or more stopped instances.
+ StoppingInstances []*InstanceStateChange `locationName:"instancesSet" locationNameList:"item" type:"list"`
+
+ metadataStopInstancesOutput `json:"-" xml:"-"`
+}
+
+type metadataStopInstancesOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s StopInstancesOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s StopInstancesOutput) GoString() string {
+ return s.String()
+}
+
+// Describes the storage location for an instance store-backed AMI.
+type Storage struct {
+ // An Amazon S3 storage location.
+ S3 *S3Storage `type:"structure"`
+
+ metadataStorage `json:"-" xml:"-"`
+}
+
+type metadataStorage struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s Storage) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Storage) GoString() string {
+ return s.String()
+}
+
+// Describes a subnet.
+type Subnet struct {
+ // The Availability Zone of the subnet.
+ AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
+
+ // The number of unused IP addresses in the subnet. Note that the IP addresses
+ // for any stopped instances are considered unavailable.
+ AvailableIPAddressCount *int64 `locationName:"availableIpAddressCount" type:"integer"`
+
+ // The CIDR block assigned to the subnet.
+ CIDRBlock *string `locationName:"cidrBlock" type:"string"`
+
+ // Indicates whether this is the default subnet for the Availability Zone.
+ DefaultForAZ *bool `locationName:"defaultForAz" type:"boolean"`
+
+ // Indicates whether instances launched in this subnet receive a public IP address.
+ MapPublicIPOnLaunch *bool `locationName:"mapPublicIpOnLaunch" type:"boolean"`
+
+ // The current state of the subnet.
+ State *string `locationName:"state" type:"string" enum:"SubnetState"`
+
+ // The ID of the subnet.
+ SubnetID *string `locationName:"subnetId" type:"string"`
+
+ // Any tags assigned to the subnet.
+ Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
+
+ // The ID of the VPC the subnet is in.
+ VPCID *string `locationName:"vpcId" type:"string"`
+
+ metadataSubnet `json:"-" xml:"-"`
+}
+
+type metadataSubnet struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s Subnet) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Subnet) GoString() string {
+ return s.String()
+}
+
+// Describes a tag.
+type Tag struct {
+ // The key of the tag.
+ //
+ // Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode
+ // characters. May not begin with aws:
+ Key *string `locationName:"key" type:"string"`
+
+ // The value of the tag.
+ //
+ // Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode
+ // characters.
+ Value *string `locationName:"value" type:"string"`
+
+ metadataTag `json:"-" xml:"-"`
+}
+
+type metadataTag struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s Tag) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Tag) GoString() string {
+ return s.String()
+}
+
+// Describes a tag.
+type TagDescription struct {
+ // The tag key.
+ Key *string `locationName:"key" type:"string"`
+
+ // The ID of the resource. For example, ami-1a2b3c4d.
+ ResourceID *string `locationName:"resourceId" type:"string"`
+
+ // The resource type.
+ ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"`
+
+ // The tag value.
+ Value *string `locationName:"value" type:"string"`
+
+ metadataTagDescription `json:"-" xml:"-"`
+}
+
+type metadataTagDescription struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s TagDescription) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s TagDescription) GoString() string {
+ return s.String()
+}
+
+type TerminateInstancesInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more instance IDs.
+ InstanceIDs []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"`
+
+ metadataTerminateInstancesInput `json:"-" xml:"-"`
+}
+
+type metadataTerminateInstancesInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s TerminateInstancesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s TerminateInstancesInput) GoString() string {
+ return s.String()
+}
+
+type TerminateInstancesOutput struct {
+ // Information about one or more terminated instances.
+ TerminatingInstances []*InstanceStateChange `locationName:"instancesSet" locationNameList:"item" type:"list"`
+
+ metadataTerminateInstancesOutput `json:"-" xml:"-"`
+}
+
+type metadataTerminateInstancesOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s TerminateInstancesOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s TerminateInstancesOutput) GoString() string {
+ return s.String()
+}
+
+type UnassignPrivateIPAddressesInput struct {
+ // The ID of the network interface.
+ NetworkInterfaceID *string `locationName:"networkInterfaceId" type:"string" required:"true"`
+
+ // The secondary private IP addresses to unassign from the network interface.
+ // You can specify this option multiple times to unassign more than one IP address.
+ PrivateIPAddresses []*string `locationName:"privateIpAddress" locationNameList:"PrivateIpAddress" type:"list" required:"true"`
+
+ metadataUnassignPrivateIPAddressesInput `json:"-" xml:"-"`
+}
+
+type metadataUnassignPrivateIPAddressesInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s UnassignPrivateIPAddressesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UnassignPrivateIPAddressesInput) GoString() string {
+ return s.String()
+}
+
+type UnassignPrivateIPAddressesOutput struct {
+ metadataUnassignPrivateIPAddressesOutput `json:"-" xml:"-"`
+}
+
+type metadataUnassignPrivateIPAddressesOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s UnassignPrivateIPAddressesOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UnassignPrivateIPAddressesOutput) GoString() string {
+ return s.String()
+}
+
+type UnmonitorInstancesInput struct {
+ // Checks whether you have the required permissions for the action, without
+ // actually making the request, and provides an error response. If you have
+ // the required permissions, the error response is DryRunOperation. Otherwise,
+ // it is UnauthorizedOperation.
+ DryRun *bool `locationName:"dryRun" type:"boolean"`
+
+ // One or more instance IDs.
+ InstanceIDs []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"`
+
+ metadataUnmonitorInstancesInput `json:"-" xml:"-"`
+}
+
+type metadataUnmonitorInstancesInput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s UnmonitorInstancesInput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UnmonitorInstancesInput) GoString() string {
+ return s.String()
+}
+
+type UnmonitorInstancesOutput struct {
+ // Monitoring information for one or more instances.
+ InstanceMonitorings []*InstanceMonitoring `locationName:"instancesSet" locationNameList:"item" type:"list"`
+
+ metadataUnmonitorInstancesOutput `json:"-" xml:"-"`
+}
+
+type metadataUnmonitorInstancesOutput struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s UnmonitorInstancesOutput) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UnmonitorInstancesOutput) GoString() string {
+ return s.String()
+}
+
+// Information about items that were not successfully processed in a batch call.
+type UnsuccessfulItem struct {
+ // Information about the error.
+ Error *UnsuccessfulItemError `locationName:"error" type:"structure" required:"true"`
+
+ // The ID of the resource.
+ ResourceID *string `locationName:"resourceId" type:"string"`
+
+ metadataUnsuccessfulItem `json:"-" xml:"-"`
+}
+
+type metadataUnsuccessfulItem struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s UnsuccessfulItem) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UnsuccessfulItem) GoString() string {
+ return s.String()
+}
+
+// Information about the error that occured. For more information about errors,
+// see Error Codes (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html).
+type UnsuccessfulItemError struct {
+ // The error code.
+ Code *string `locationName:"code" type:"string" required:"true"`
+
+ // The error message accompanying the error code.
+ Message *string `locationName:"message" type:"string" required:"true"`
+
+ metadataUnsuccessfulItemError `json:"-" xml:"-"`
+}
+
+type metadataUnsuccessfulItemError struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s UnsuccessfulItemError) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UnsuccessfulItemError) GoString() string {
+ return s.String()
+}
+
+// Describes the S3 bucket for the disk image.
+type UserBucket struct {
+ // The name of the S3 bucket where the disk image is located.
+ S3Bucket *string `type:"string"`
+
+ // The key for the disk image.
+ S3Key *string `type:"string"`
+
+ metadataUserBucket `json:"-" xml:"-"`
+}
+
+type metadataUserBucket struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s UserBucket) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UserBucket) GoString() string {
+ return s.String()
+}
+
+// Describes the S3 bucket for the disk image.
+type UserBucketDetails struct {
+ // The S3 bucket from which the disk image was created.
+ S3Bucket *string `locationName:"s3Bucket" type:"string"`
+
+ // The key from which the disk image was created.
+ S3Key *string `locationName:"s3Key" type:"string"`
+
+ metadataUserBucketDetails `json:"-" xml:"-"`
+}
+
+type metadataUserBucketDetails struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s UserBucketDetails) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UserBucketDetails) GoString() string {
+ return s.String()
+}
+
+// Describes the user data to be made available to an instance.
+type UserData struct {
+ // The Base64-encoded MIME user data for the instance.
+ Data *string `locationName:"data" type:"string"`
+
+ metadataUserData `json:"-" xml:"-"`
+}
+
+type metadataUserData struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s UserData) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UserData) GoString() string {
+ return s.String()
+}
+
+// Describes a security group and AWS account ID pair.
+type UserIDGroupPair struct {
+ // The ID of the security group.
+ GroupID *string `locationName:"groupId" type:"string"`
+
+ // The name of the security group. In a request, use this parameter for a security
+ // group in EC2-Classic or a default VPC only. For a security group in a nondefault
+ // VPC, use GroupId.
+ GroupName *string `locationName:"groupName" type:"string"`
+
+ // The ID of an AWS account. EC2-Classic only.
+ UserID *string `locationName:"userId" type:"string"`
+
+ metadataUserIDGroupPair `json:"-" xml:"-"`
+}
+
+type metadataUserIDGroupPair struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s UserIDGroupPair) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s UserIDGroupPair) GoString() string {
+ return s.String()
+}
+
+// Describes telemetry for a VPN tunnel.
+type VGWTelemetry struct {
+ // The number of accepted routes.
+ AcceptedRouteCount *int64 `locationName:"acceptedRouteCount" type:"integer"`
+
+ // The date and time of the last change in status.
+ LastStatusChange *time.Time `locationName:"lastStatusChange" type:"timestamp" timestampFormat:"iso8601"`
+
+ // The Internet-routable IP address of the virtual private gateway's outside
+ // interface.
+ OutsideIPAddress *string `locationName:"outsideIpAddress" type:"string"`
+
+ // The status of the VPN tunnel.
+ Status *string `locationName:"status" type:"string" enum:"TelemetryStatus"`
+
+ // If an error occurs, a description of the error.
+ StatusMessage *string `locationName:"statusMessage" type:"string"`
+
+ metadataVGWTelemetry `json:"-" xml:"-"`
+}
+
+type metadataVGWTelemetry struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s VGWTelemetry) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s VGWTelemetry) GoString() string {
+ return s.String()
+}
+
+// Describes a VPC.
+type VPC struct {
+ // The CIDR block for the VPC.
+ CIDRBlock *string `locationName:"cidrBlock" type:"string"`
+
+ // The ID of the set of DHCP options you've associated with the VPC (or default
+ // if the default options are associated with the VPC).
+ DHCPOptionsID *string `locationName:"dhcpOptionsId" type:"string"`
+
+ // The allowed tenancy of instances launched into the VPC.
+ InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"`
+
+ // Indicates whether the VPC is the default VPC.
+ IsDefault *bool `locationName:"isDefault" type:"boolean"`
+
+ // The current state of the VPC.
+ State *string `locationName:"state" type:"string" enum:"VpcState"`
+
+ // Any tags assigned to the VPC.
+ Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
+
+ // The ID of the VPC.
+ VPCID *string `locationName:"vpcId" type:"string"`
+
+ metadataVPC `json:"-" xml:"-"`
+}
+
+type metadataVPC struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s VPC) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s VPC) GoString() string {
+ return s.String()
+}
+
+// Describes an attachment between a virtual private gateway and a VPC.
+type VPCAttachment struct {
+ // The current state of the attachment.
+ State *string `locationName:"state" type:"string" enum:"AttachmentStatus"`
+
+ // The ID of the VPC.
+ VPCID *string `locationName:"vpcId" type:"string"`
+
+ metadataVPCAttachment `json:"-" xml:"-"`
+}
+
+type metadataVPCAttachment struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s VPCAttachment) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s VPCAttachment) GoString() string {
+ return s.String()
+}
+
+// Describes whether a VPC is enabled for ClassicLink.
+type VPCClassicLink struct {
+ // Indicates whether the VPC is enabled for ClassicLink.
+ ClassicLinkEnabled *bool `locationName:"classicLinkEnabled" type:"boolean"`
+
+ // Any tags assigned to the VPC.
+ Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
+
+ // The ID of the VPC.
+ VPCID *string `locationName:"vpcId" type:"string"`
+
+ metadataVPCClassicLink `json:"-" xml:"-"`
+}
+
+type metadataVPCClassicLink struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s VPCClassicLink) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s VPCClassicLink) GoString() string {
+ return s.String()
+}
+
+// Describes a VPC endpoint.
+type VPCEndpoint struct {
+ // The date and time the VPC endpoint was created.
+ CreationTimestamp *time.Time `locationName:"creationTimestamp" type:"timestamp" timestampFormat:"iso8601"`
+
+ // The policy document associated with the endpoint.
+ PolicyDocument *string `locationName:"policyDocument" type:"string"`
+
+ // One or more route tables associated with the endpoint.
+ RouteTableIDs []*string `locationName:"routeTableIdSet" locationNameList:"item" type:"list"`
+
+ // The name of the AWS service to which the endpoint is associated.
+ ServiceName *string `locationName:"serviceName" type:"string"`
+
+ // The state of the VPC endpoint.
+ State *string `locationName:"state" type:"string" enum:"State"`
+
+ // The ID of the VPC endpoint.
+ VPCEndpointID *string `locationName:"vpcEndpointId" type:"string"`
+
+ // The ID of the VPC to which the endpoint is associated.
+ VPCID *string `locationName:"vpcId" type:"string"`
+
+ metadataVPCEndpoint `json:"-" xml:"-"`
+}
+
+type metadataVPCEndpoint struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s VPCEndpoint) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s VPCEndpoint) GoString() string {
+ return s.String()
+}
+
+// Describes a VPC peering connection.
+type VPCPeeringConnection struct {
+ // The information of the peer VPC.
+ AccepterVPCInfo *VPCPeeringConnectionVPCInfo `locationName:"accepterVpcInfo" type:"structure"`
+
+ // The time that an unaccepted VPC peering connection will expire.
+ ExpirationTime *time.Time `locationName:"expirationTime" type:"timestamp" timestampFormat:"iso8601"`
+
+ // The information of the requester VPC.
+ RequesterVPCInfo *VPCPeeringConnectionVPCInfo `locationName:"requesterVpcInfo" type:"structure"`
+
+ // The status of the VPC peering connection.
+ Status *VPCPeeringConnectionStateReason `locationName:"status" type:"structure"`
+
+ // Any tags assigned to the resource.
+ Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
+
+ // The ID of the VPC peering connection.
+ VPCPeeringConnectionID *string `locationName:"vpcPeeringConnectionId" type:"string"`
+
+ metadataVPCPeeringConnection `json:"-" xml:"-"`
+}
+
+type metadataVPCPeeringConnection struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s VPCPeeringConnection) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s VPCPeeringConnection) GoString() string {
+ return s.String()
+}
+
+// Describes the status of a VPC peering connection.
+type VPCPeeringConnectionStateReason struct {
+ // The status of the VPC peering connection.
+ Code *string `locationName:"code" type:"string" enum:"VpcPeeringConnectionStateReasonCode"`
+
+ // A message that provides more information about the status, if applicable.
+ Message *string `locationName:"message" type:"string"`
+
+ metadataVPCPeeringConnectionStateReason `json:"-" xml:"-"`
+}
+
+type metadataVPCPeeringConnectionStateReason struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s VPCPeeringConnectionStateReason) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s VPCPeeringConnectionStateReason) GoString() string {
+ return s.String()
+}
+
+// Describes a VPC in a VPC peering connection.
+type VPCPeeringConnectionVPCInfo struct {
+ // The CIDR block for the VPC.
+ CIDRBlock *string `locationName:"cidrBlock" type:"string"`
+
+ // The AWS account ID of the VPC owner.
+ OwnerID *string `locationName:"ownerId" type:"string"`
+
+ // The ID of the VPC.
+ VPCID *string `locationName:"vpcId" type:"string"`
+
+ metadataVPCPeeringConnectionVPCInfo `json:"-" xml:"-"`
+}
+
+type metadataVPCPeeringConnectionVPCInfo struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s VPCPeeringConnectionVPCInfo) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s VPCPeeringConnectionVPCInfo) GoString() string {
+ return s.String()
+}
+
+// Describes a VPN connection.
+type VPNConnection struct {
+ // The configuration information for the VPN connection's customer gateway (in
+ // the native XML format). This element is always present in the CreateVpnConnection
+ // response; however, it's present in the DescribeVpnConnections response only
+ // if the VPN connection is in the pending or available state.
+ CustomerGatewayConfiguration *string `locationName:"customerGatewayConfiguration" type:"string"`
+
+ // The ID of the customer gateway at your end of the VPN connection.
+ CustomerGatewayID *string `locationName:"customerGatewayId" type:"string"`
+
+ // The VPN connection options.
+ Options *VPNConnectionOptions `locationName:"options" type:"structure"`
+
+ // The static routes associated with the VPN connection.
+ Routes []*VPNStaticRoute `locationName:"routes" locationNameList:"item" type:"list"`
+
+ // The current state of the VPN connection.
+ State *string `locationName:"state" type:"string" enum:"VpnState"`
+
+ // Any tags assigned to the VPN connection.
+ Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
+
+ // The type of VPN connection.
+ Type *string `locationName:"type" type:"string" enum:"GatewayType"`
+
+ // Information about the VPN tunnel.
+ VGWTelemetry []*VGWTelemetry `locationName:"vgwTelemetry" locationNameList:"item" type:"list"`
+
+ // The ID of the VPN connection.
+ VPNConnectionID *string `locationName:"vpnConnectionId" type:"string"`
+
+ // The ID of the virtual private gateway at the AWS side of the VPN connection.
+ VPNGatewayID *string `locationName:"vpnGatewayId" type:"string"`
+
+ metadataVPNConnection `json:"-" xml:"-"`
+}
+
+type metadataVPNConnection struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s VPNConnection) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s VPNConnection) GoString() string {
+ return s.String()
+}
+
+// Describes VPN connection options.
+type VPNConnectionOptions struct {
+ // Indicates whether the VPN connection uses static routes only. Static routes
+ // must be used for devices that don't support BGP.
+ StaticRoutesOnly *bool `locationName:"staticRoutesOnly" type:"boolean"`
+
+ metadataVPNConnectionOptions `json:"-" xml:"-"`
+}
+
+type metadataVPNConnectionOptions struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s VPNConnectionOptions) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s VPNConnectionOptions) GoString() string {
+ return s.String()
+}
+
+// Describes VPN connection options.
+type VPNConnectionOptionsSpecification struct {
+ // Indicates whether the VPN connection uses static routes only. Static routes
+ // must be used for devices that don't support BGP.
+ StaticRoutesOnly *bool `locationName:"staticRoutesOnly" type:"boolean"`
+
+ metadataVPNConnectionOptionsSpecification `json:"-" xml:"-"`
+}
+
+type metadataVPNConnectionOptionsSpecification struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s VPNConnectionOptionsSpecification) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s VPNConnectionOptionsSpecification) GoString() string {
+ return s.String()
+}
+
+// Describes a virtual private gateway.
+type VPNGateway struct {
+ // The Availability Zone where the virtual private gateway was created.
+ AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
+
+ // The current state of the virtual private gateway.
+ State *string `locationName:"state" type:"string" enum:"VpnState"`
+
+ // Any tags assigned to the virtual private gateway.
+ Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
+
+ // The type of VPN connection the virtual private gateway supports.
+ Type *string `locationName:"type" type:"string" enum:"GatewayType"`
+
+ // Any VPCs attached to the virtual private gateway.
+ VPCAttachments []*VPCAttachment `locationName:"attachments" locationNameList:"item" type:"list"`
+
+ // The ID of the virtual private gateway.
+ VPNGatewayID *string `locationName:"vpnGatewayId" type:"string"`
+
+ metadataVPNGateway `json:"-" xml:"-"`
+}
+
+type metadataVPNGateway struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s VPNGateway) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s VPNGateway) GoString() string {
+ return s.String()
+}
+
+// Describes a static route for a VPN connection.
+type VPNStaticRoute struct {
+ // The CIDR block associated with the local subnet of the customer data center.
+ DestinationCIDRBlock *string `locationName:"destinationCidrBlock" type:"string"`
+
+ // Indicates how the routes were provided.
+ Source *string `locationName:"source" type:"string" enum:"VpnStaticRouteSource"`
+
+ // The current state of the static route.
+ State *string `locationName:"state" type:"string" enum:"VpnState"`
+
+ metadataVPNStaticRoute `json:"-" xml:"-"`
+}
+
+type metadataVPNStaticRoute struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s VPNStaticRoute) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s VPNStaticRoute) GoString() string {
+ return s.String()
+}
+
+// Describes a volume.
+type Volume struct {
+ // Information about the volume attachments.
+ Attachments []*VolumeAttachment `locationName:"attachmentSet" locationNameList:"item" type:"list"`
+
+ // The Availability Zone for the volume.
+ AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
+
+ // The time stamp when volume creation was initiated.
+ CreateTime *time.Time `locationName:"createTime" type:"timestamp" timestampFormat:"iso8601"`
+
+ // Indicates whether the volume will be encrypted.
+ Encrypted *bool `locationName:"encrypted" type:"boolean"`
+
+ // The number of I/O operations per second (IOPS) that the volume supports.
+ // For Provisioned IOPS (SSD) volumes, this represents the number of IOPS that
+ // are provisioned for the volume. For General Purpose (SSD) volumes, this represents
+ // the baseline performance of the volume and the rate at which the volume accumulates
+ // I/O credits for bursting. For more information on General Purpose (SSD) baseline
+ // performance, I/O credits, and bursting, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html)
+ // in the Amazon Elastic Compute Cloud User Guide.
+ //
+ // Constraint: Range is 100 to 20000 for Provisioned IOPS (SSD) volumes and
+ // 3 to 10000 for General Purpose (SSD) volumes.
+ //
+ // Condition: This parameter is required for requests to create io1 volumes;
+ // it is not used in requests to create standard or gp2 volumes.
+ IOPS *int64 `locationName:"iops" type:"integer"`
+
+ // The full ARN of the AWS Key Management Service (AWS KMS) customer master
+ // key (CMK) that was used to protect the volume encryption key for the volume.
+ KMSKeyID *string `locationName:"kmsKeyId" type:"string"`
+
+ // The size of the volume, in GiBs.
+ Size *int64 `locationName:"size" type:"integer"`
+
+ // The snapshot from which the volume was created, if applicable.
+ SnapshotID *string `locationName:"snapshotId" type:"string"`
+
+ // The volume state.
+ State *string `locationName:"status" type:"string" enum:"VolumeState"`
+
+ // Any tags assigned to the volume.
+ Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"`
+
+ // The ID of the volume.
+ VolumeID *string `locationName:"volumeId" type:"string"`
+
+ // The volume type. This can be gp2 for General Purpose (SSD) volumes, io1 for
+ // Provisioned IOPS (SSD) volumes, or standard for Magnetic volumes.
+ VolumeType *string `locationName:"volumeType" type:"string" enum:"VolumeType"`
+
+ metadataVolume `json:"-" xml:"-"`
+}
+
+type metadataVolume struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s Volume) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s Volume) GoString() string {
+ return s.String()
+}
+
+// Describes volume attachment details.
+type VolumeAttachment struct {
+ // The time stamp when the attachment initiated.
+ AttachTime *time.Time `locationName:"attachTime" type:"timestamp" timestampFormat:"iso8601"`
+
+ // Indicates whether the EBS volume is deleted on instance termination.
+ DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"`
+
+ // The device name.
+ Device *string `locationName:"device" type:"string"`
+
+ // The ID of the instance.
+ InstanceID *string `locationName:"instanceId" type:"string"`
+
+ // The attachment state of the volume.
+ State *string `locationName:"status" type:"string" enum:"VolumeAttachmentState"`
+
+ // The ID of the volume.
+ VolumeID *string `locationName:"volumeId" type:"string"`
+
+ metadataVolumeAttachment `json:"-" xml:"-"`
+}
+
+type metadataVolumeAttachment struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s VolumeAttachment) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s VolumeAttachment) GoString() string {
+ return s.String()
+}
+
+// Describes an EBS volume.
+type VolumeDetail struct {
+ // The size of the volume, in GiB.
+ Size *int64 `locationName:"size" type:"long" required:"true"`
+
+ metadataVolumeDetail `json:"-" xml:"-"`
+}
+
+type metadataVolumeDetail struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s VolumeDetail) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s VolumeDetail) GoString() string {
+ return s.String()
+}
+
+// Describes a volume status operation code.
+type VolumeStatusAction struct {
+ // The code identifying the operation, for example, enable-volume-io.
+ Code *string `locationName:"code" type:"string"`
+
+ // A description of the operation.
+ Description *string `locationName:"description" type:"string"`
+
+ // The ID of the event associated with this operation.
+ EventID *string `locationName:"eventId" type:"string"`
+
+ // The event type associated with this operation.
+ EventType *string `locationName:"eventType" type:"string"`
+
+ metadataVolumeStatusAction `json:"-" xml:"-"`
+}
+
+type metadataVolumeStatusAction struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s VolumeStatusAction) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s VolumeStatusAction) GoString() string {
+ return s.String()
+}
+
+// Describes a volume status.
+type VolumeStatusDetails struct {
+ // The name of the volume status.
+ Name *string `locationName:"name" type:"string" enum:"VolumeStatusName"`
+
+ // The intended status of the volume status.
+ Status *string `locationName:"status" type:"string"`
+
+ metadataVolumeStatusDetails `json:"-" xml:"-"`
+}
+
+type metadataVolumeStatusDetails struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s VolumeStatusDetails) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s VolumeStatusDetails) GoString() string {
+ return s.String()
+}
+
+// Describes a volume status event.
+type VolumeStatusEvent struct {
+ // A description of the event.
+ Description *string `locationName:"description" type:"string"`
+
+ // The ID of this event.
+ EventID *string `locationName:"eventId" type:"string"`
+
+ // The type of this event.
+ EventType *string `locationName:"eventType" type:"string"`
+
+ // The latest end time of the event.
+ NotAfter *time.Time `locationName:"notAfter" type:"timestamp" timestampFormat:"iso8601"`
+
+ // The earliest start time of the event.
+ NotBefore *time.Time `locationName:"notBefore" type:"timestamp" timestampFormat:"iso8601"`
+
+ metadataVolumeStatusEvent `json:"-" xml:"-"`
+}
+
+type metadataVolumeStatusEvent struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s VolumeStatusEvent) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s VolumeStatusEvent) GoString() string {
+ return s.String()
+}
+
+// Describes the status of a volume.
+type VolumeStatusInfo struct {
+ // The details of the volume status.
+ Details []*VolumeStatusDetails `locationName:"details" locationNameList:"item" type:"list"`
+
+ // The status of the volume.
+ Status *string `locationName:"status" type:"string" enum:"VolumeStatusInfoStatus"`
+
+ metadataVolumeStatusInfo `json:"-" xml:"-"`
+}
+
+type metadataVolumeStatusInfo struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s VolumeStatusInfo) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s VolumeStatusInfo) GoString() string {
+ return s.String()
+}
+
+// Describes the volume status.
+type VolumeStatusItem struct {
+ // The details of the operation.
+ Actions []*VolumeStatusAction `locationName:"actionsSet" locationNameList:"item" type:"list"`
+
+ // The Availability Zone of the volume.
+ AvailabilityZone *string `locationName:"availabilityZone" type:"string"`
+
+ // A list of events associated with the volume.
+ Events []*VolumeStatusEvent `locationName:"eventsSet" locationNameList:"item" type:"list"`
+
+ // The volume ID.
+ VolumeID *string `locationName:"volumeId" type:"string"`
+
+ // The volume status.
+ VolumeStatus *VolumeStatusInfo `locationName:"volumeStatus" type:"structure"`
+
+ metadataVolumeStatusItem `json:"-" xml:"-"`
+}
+
+type metadataVolumeStatusItem struct {
+ SDKShapeTraits bool `type:"structure"`
+}
+
+// String returns the string representation
+func (s VolumeStatusItem) String() string {
+ return awsutil.Prettify(s)
+}
+
+// GoString returns the string representation
+func (s VolumeStatusItem) GoString() string {
+ return s.String()
+}
+
+const (
+ // @enum AccountAttributeName
+ AccountAttributeNameSupportedPlatforms = "supported-platforms"
+ // @enum AccountAttributeName
+ AccountAttributeNameDefaultVpc = "default-vpc"
+)
+
+const (
+ // @enum ArchitectureValues
+ ArchitectureValuesI386 = "i386"
+ // @enum ArchitectureValues
+ ArchitectureValuesX8664 = "x86_64"
+)
+
+const (
+ // @enum AttachmentStatus
+ AttachmentStatusAttaching = "attaching"
+ // @enum AttachmentStatus
+ AttachmentStatusAttached = "attached"
+ // @enum AttachmentStatus
+ AttachmentStatusDetaching = "detaching"
+ // @enum AttachmentStatus
+ AttachmentStatusDetached = "detached"
+)
+
+const (
+ // @enum AvailabilityZoneState
+ AvailabilityZoneStateAvailable = "available"
+)
+
+const (
+ // @enum BatchState
+ BatchStateSubmitted = "submitted"
+ // @enum BatchState
+ BatchStateActive = "active"
+ // @enum BatchState
+ BatchStateCancelled = "cancelled"
+ // @enum BatchState
+ BatchStateFailed = "failed"
+ // @enum BatchState
+ BatchStateCancelledRunning = "cancelled_running"
+ // @enum BatchState
+ BatchStateCancelledTerminating = "cancelled_terminating"
+)
+
+const (
+ // @enum BundleTaskState
+ BundleTaskStatePending = "pending"
+ // @enum BundleTaskState
+ BundleTaskStateWaitingForShutdown = "waiting-for-shutdown"
+ // @enum BundleTaskState
+ BundleTaskStateBundling = "bundling"
+ // @enum BundleTaskState
+ BundleTaskStateStoring = "storing"
+ // @enum BundleTaskState
+ BundleTaskStateCancelling = "cancelling"
+ // @enum BundleTaskState
+ BundleTaskStateComplete = "complete"
+ // @enum BundleTaskState
+ BundleTaskStateFailed = "failed"
+)
+
+const (
+ // @enum CancelBatchErrorCode
+ CancelBatchErrorCodeFleetRequestIdDoesNotExist = "fleetRequestIdDoesNotExist"
+ // @enum CancelBatchErrorCode
+ CancelBatchErrorCodeFleetRequestIdMalformed = "fleetRequestIdMalformed"
+ // @enum CancelBatchErrorCode
+ CancelBatchErrorCodeFleetRequestNotInCancellableState = "fleetRequestNotInCancellableState"
+ // @enum CancelBatchErrorCode
+ CancelBatchErrorCodeUnexpectedError = "unexpectedError"
+)
+
+const (
+ // @enum CancelSpotInstanceRequestState
+ CancelSpotInstanceRequestStateActive = "active"
+ // @enum CancelSpotInstanceRequestState
+ CancelSpotInstanceRequestStateOpen = "open"
+ // @enum CancelSpotInstanceRequestState
+ CancelSpotInstanceRequestStateClosed = "closed"
+ // @enum CancelSpotInstanceRequestState
+ CancelSpotInstanceRequestStateCancelled = "cancelled"
+ // @enum CancelSpotInstanceRequestState
+ CancelSpotInstanceRequestStateCompleted = "completed"
+)
+
+const (
+ // @enum ContainerFormat
+ ContainerFormatOva = "ova"
+)
+
+const (
+ // @enum ConversionTaskState
+ ConversionTaskStateActive = "active"
+ // @enum ConversionTaskState
+ ConversionTaskStateCancelling = "cancelling"
+ // @enum ConversionTaskState
+ ConversionTaskStateCancelled = "cancelled"
+ // @enum ConversionTaskState
+ ConversionTaskStateCompleted = "completed"
+)
+
+const (
+ // @enum CurrencyCodeValues
+ CurrencyCodeValuesUsd = "USD"
+)
+
+const (
+ // @enum DatafeedSubscriptionState
+ DatafeedSubscriptionStateActive = "Active"
+ // @enum DatafeedSubscriptionState
+ DatafeedSubscriptionStateInactive = "Inactive"
+)
+
+const (
+ // @enum DeviceType
+ DeviceTypeEbs = "ebs"
+ // @enum DeviceType
+ DeviceTypeInstanceStore = "instance-store"
+)
+
+const (
+ // @enum DiskImageFormat
+ DiskImageFormatVmdk = "VMDK"
+ // @enum DiskImageFormat
+ DiskImageFormatRaw = "RAW"
+ // @enum DiskImageFormat
+ DiskImageFormatVhd = "VHD"
+)
+
+const (
+ // @enum DomainType
+ DomainTypeVpc = "vpc"
+ // @enum DomainType
+ DomainTypeStandard = "standard"
+)
+
+const (
+ // @enum EventCode
+ EventCodeInstanceReboot = "instance-reboot"
+ // @enum EventCode
+ EventCodeSystemReboot = "system-reboot"
+ // @enum EventCode
+ EventCodeSystemMaintenance = "system-maintenance"
+ // @enum EventCode
+ EventCodeInstanceRetirement = "instance-retirement"
+ // @enum EventCode
+ EventCodeInstanceStop = "instance-stop"
+)
+
+const (
+ // @enum EventType
+ EventTypeInstanceChange = "instanceChange"
+ // @enum EventType
+ EventTypeFleetRequestChange = "fleetRequestChange"
+ // @enum EventType
+ EventTypeError = "error"
+)
+
+const (
+ // @enum ExportEnvironment
+ ExportEnvironmentCitrix = "citrix"
+ // @enum ExportEnvironment
+ ExportEnvironmentVmware = "vmware"
+ // @enum ExportEnvironment
+ ExportEnvironmentMicrosoft = "microsoft"
+)
+
+const (
+ // @enum ExportTaskState
+ ExportTaskStateActive = "active"
+ // @enum ExportTaskState
+ ExportTaskStateCancelling = "cancelling"
+ // @enum ExportTaskState
+ ExportTaskStateCancelled = "cancelled"
+ // @enum ExportTaskState
+ ExportTaskStateCompleted = "completed"
+)
+
+const (
+ // @enum FlowLogsResourceType
+ FlowLogsResourceTypeVpc = "VPC"
+ // @enum FlowLogsResourceType
+ FlowLogsResourceTypeSubnet = "Subnet"
+ // @enum FlowLogsResourceType
+ FlowLogsResourceTypeNetworkInterface = "NetworkInterface"
+)
+
+const (
+ // @enum GatewayType
+ GatewayTypeIpsec1 = "ipsec.1"
+)
+
+const (
+ // @enum HypervisorType
+ HypervisorTypeOvm = "ovm"
+ // @enum HypervisorType
+ HypervisorTypeXen = "xen"
+)
+
+const (
+ // @enum ImageAttributeName
+ ImageAttributeNameDescription = "description"
+ // @enum ImageAttributeName
+ ImageAttributeNameKernel = "kernel"
+ // @enum ImageAttributeName
+ ImageAttributeNameRamdisk = "ramdisk"
+ // @enum ImageAttributeName
+ ImageAttributeNameLaunchPermission = "launchPermission"
+ // @enum ImageAttributeName
+ ImageAttributeNameProductCodes = "productCodes"
+ // @enum ImageAttributeName
+ ImageAttributeNameBlockDeviceMapping = "blockDeviceMapping"
+ // @enum ImageAttributeName
+ ImageAttributeNameSriovNetSupport = "sriovNetSupport"
+)
+
+const (
+ // @enum ImageState
+ ImageStatePending = "pending"
+ // @enum ImageState
+ ImageStateAvailable = "available"
+ // @enum ImageState
+ ImageStateInvalid = "invalid"
+ // @enum ImageState
+ ImageStateDeregistered = "deregistered"
+ // @enum ImageState
+ ImageStateTransient = "transient"
+ // @enum ImageState
+ ImageStateFailed = "failed"
+ // @enum ImageState
+ ImageStateError = "error"
+)
+
+const (
+ // @enum ImageTypeValues
+ ImageTypeValuesMachine = "machine"
+ // @enum ImageTypeValues
+ ImageTypeValuesKernel = "kernel"
+ // @enum ImageTypeValues
+ ImageTypeValuesRamdisk = "ramdisk"
+)
+
+const (
+ // @enum InstanceAttributeName
+ InstanceAttributeNameInstanceType = "instanceType"
+ // @enum InstanceAttributeName
+ InstanceAttributeNameKernel = "kernel"
+ // @enum InstanceAttributeName
+ InstanceAttributeNameRamdisk = "ramdisk"
+ // @enum InstanceAttributeName
+ InstanceAttributeNameUserData = "userData"
+ // @enum InstanceAttributeName
+ InstanceAttributeNameDisableApiTermination = "disableApiTermination"
+ // @enum InstanceAttributeName
+ InstanceAttributeNameInstanceInitiatedShutdownBehavior = "instanceInitiatedShutdownBehavior"
+ // @enum InstanceAttributeName
+ InstanceAttributeNameRootDeviceName = "rootDeviceName"
+ // @enum InstanceAttributeName
+ InstanceAttributeNameBlockDeviceMapping = "blockDeviceMapping"
+ // @enum InstanceAttributeName
+ InstanceAttributeNameProductCodes = "productCodes"
+ // @enum InstanceAttributeName
+ InstanceAttributeNameSourceDestCheck = "sourceDestCheck"
+ // @enum InstanceAttributeName
+ InstanceAttributeNameGroupSet = "groupSet"
+ // @enum InstanceAttributeName
+ InstanceAttributeNameEbsOptimized = "ebsOptimized"
+ // @enum InstanceAttributeName
+ InstanceAttributeNameSriovNetSupport = "sriovNetSupport"
+)
+
+const (
+ // @enum InstanceLifecycleType
+ InstanceLifecycleTypeSpot = "spot"
+)
+
+const (
+ // @enum InstanceStateName
+ InstanceStateNamePending = "pending"
+ // @enum InstanceStateName
+ InstanceStateNameRunning = "running"
+ // @enum InstanceStateName
+ InstanceStateNameShuttingDown = "shutting-down"
+ // @enum InstanceStateName
+ InstanceStateNameTerminated = "terminated"
+ // @enum InstanceStateName
+ InstanceStateNameStopping = "stopping"
+ // @enum InstanceStateName
+ InstanceStateNameStopped = "stopped"
+)
+
+const (
+ // @enum InstanceType
+ InstanceTypeT1Micro = "t1.micro"
+ // @enum InstanceType
+ InstanceTypeM1Small = "m1.small"
+ // @enum InstanceType
+ InstanceTypeM1Medium = "m1.medium"
+ // @enum InstanceType
+ InstanceTypeM1Large = "m1.large"
+ // @enum InstanceType
+ InstanceTypeM1Xlarge = "m1.xlarge"
+ // @enum InstanceType
+ InstanceTypeM3Medium = "m3.medium"
+ // @enum InstanceType
+ InstanceTypeM3Large = "m3.large"
+ // @enum InstanceType
+ InstanceTypeM3Xlarge = "m3.xlarge"
+ // @enum InstanceType
+ InstanceTypeM32xlarge = "m3.2xlarge"
+ // @enum InstanceType
+ InstanceTypeM4Large = "m4.large"
+ // @enum InstanceType
+ InstanceTypeM4Xlarge = "m4.xlarge"
+ // @enum InstanceType
+ InstanceTypeM42xlarge = "m4.2xlarge"
+ // @enum InstanceType
+ InstanceTypeM44xlarge = "m4.4xlarge"
+ // @enum InstanceType
+ InstanceTypeM410xlarge = "m4.10xlarge"
+ // @enum InstanceType
+ InstanceTypeT2Micro = "t2.micro"
+ // @enum InstanceType
+ InstanceTypeT2Small = "t2.small"
+ // @enum InstanceType
+ InstanceTypeT2Medium = "t2.medium"
+ // @enum InstanceType
+ InstanceTypeT2Large = "t2.large"
+ // @enum InstanceType
+ InstanceTypeM2Xlarge = "m2.xlarge"
+ // @enum InstanceType
+ InstanceTypeM22xlarge = "m2.2xlarge"
+ // @enum InstanceType
+ InstanceTypeM24xlarge = "m2.4xlarge"
+ // @enum InstanceType
+ InstanceTypeCr18xlarge = "cr1.8xlarge"
+ // @enum InstanceType
+ InstanceTypeI2Xlarge = "i2.xlarge"
+ // @enum InstanceType
+ InstanceTypeI22xlarge = "i2.2xlarge"
+ // @enum InstanceType
+ InstanceTypeI24xlarge = "i2.4xlarge"
+ // @enum InstanceType
+ InstanceTypeI28xlarge = "i2.8xlarge"
+ // @enum InstanceType
+ InstanceTypeHi14xlarge = "hi1.4xlarge"
+ // @enum InstanceType
+ InstanceTypeHs18xlarge = "hs1.8xlarge"
+ // @enum InstanceType
+ InstanceTypeC1Medium = "c1.medium"
+ // @enum InstanceType
+ InstanceTypeC1Xlarge = "c1.xlarge"
+ // @enum InstanceType
+ InstanceTypeC3Large = "c3.large"
+ // @enum InstanceType
+ InstanceTypeC3Xlarge = "c3.xlarge"
+ // @enum InstanceType
+ InstanceTypeC32xlarge = "c3.2xlarge"
+ // @enum InstanceType
+ InstanceTypeC34xlarge = "c3.4xlarge"
+ // @enum InstanceType
+ InstanceTypeC38xlarge = "c3.8xlarge"
+ // @enum InstanceType
+ InstanceTypeC4Large = "c4.large"
+ // @enum InstanceType
+ InstanceTypeC4Xlarge = "c4.xlarge"
+ // @enum InstanceType
+ InstanceTypeC42xlarge = "c4.2xlarge"
+ // @enum InstanceType
+ InstanceTypeC44xlarge = "c4.4xlarge"
+ // @enum InstanceType
+ InstanceTypeC48xlarge = "c4.8xlarge"
+ // @enum InstanceType
+ InstanceTypeCc14xlarge = "cc1.4xlarge"
+ // @enum InstanceType
+ InstanceTypeCc28xlarge = "cc2.8xlarge"
+ // @enum InstanceType
+ InstanceTypeG22xlarge = "g2.2xlarge"
+ // @enum InstanceType
+ InstanceTypeCg14xlarge = "cg1.4xlarge"
+ // @enum InstanceType
+ InstanceTypeR3Large = "r3.large"
+ // @enum InstanceType
+ InstanceTypeR3Xlarge = "r3.xlarge"
+ // @enum InstanceType
+ InstanceTypeR32xlarge = "r3.2xlarge"
+ // @enum InstanceType
+ InstanceTypeR34xlarge = "r3.4xlarge"
+ // @enum InstanceType
+ InstanceTypeR38xlarge = "r3.8xlarge"
+ // @enum InstanceType
+ InstanceTypeD2Xlarge = "d2.xlarge"
+ // @enum InstanceType
+ InstanceTypeD22xlarge = "d2.2xlarge"
+ // @enum InstanceType
+ InstanceTypeD24xlarge = "d2.4xlarge"
+ // @enum InstanceType
+ InstanceTypeD28xlarge = "d2.8xlarge"
+)
+
+const (
+ // @enum ListingState
+ ListingStateAvailable = "available"
+ // @enum ListingState
+ ListingStateSold = "sold"
+ // @enum ListingState
+ ListingStateCancelled = "cancelled"
+ // @enum ListingState
+ ListingStatePending = "pending"
+)
+
+const (
+ // @enum ListingStatus
+ ListingStatusActive = "active"
+ // @enum ListingStatus
+ ListingStatusPending = "pending"
+ // @enum ListingStatus
+ ListingStatusCancelled = "cancelled"
+ // @enum ListingStatus
+ ListingStatusClosed = "closed"
+)
+
+const (
+ // @enum MonitoringState
+ MonitoringStateDisabled = "disabled"
+ // @enum MonitoringState
+ MonitoringStateDisabling = "disabling"
+ // @enum MonitoringState
+ MonitoringStateEnabled = "enabled"
+ // @enum MonitoringState
+ MonitoringStatePending = "pending"
+)
+
+const (
+ // @enum MoveStatus
+ MoveStatusMovingToVpc = "movingToVpc"
+ // @enum MoveStatus
+ MoveStatusRestoringToClassic = "restoringToClassic"
+)
+
+const (
+ // @enum NetworkInterfaceAttribute
+ NetworkInterfaceAttributeDescription = "description"
+ // @enum NetworkInterfaceAttribute
+ NetworkInterfaceAttributeGroupSet = "groupSet"
+ // @enum NetworkInterfaceAttribute
+ NetworkInterfaceAttributeSourceDestCheck = "sourceDestCheck"
+ // @enum NetworkInterfaceAttribute
+ NetworkInterfaceAttributeAttachment = "attachment"
+)
+
+const (
+ // @enum NetworkInterfaceStatus
+ NetworkInterfaceStatusAvailable = "available"
+ // @enum NetworkInterfaceStatus
+ NetworkInterfaceStatusAttaching = "attaching"
+ // @enum NetworkInterfaceStatus
+ NetworkInterfaceStatusInUse = "in-use"
+ // @enum NetworkInterfaceStatus
+ NetworkInterfaceStatusDetaching = "detaching"
+)
+
+const (
+ // @enum OfferingTypeValues
+ OfferingTypeValuesHeavyUtilization = "Heavy Utilization"
+ // @enum OfferingTypeValues
+ OfferingTypeValuesMediumUtilization = "Medium Utilization"
+ // @enum OfferingTypeValues
+ OfferingTypeValuesLightUtilization = "Light Utilization"
+ // @enum OfferingTypeValues
+ OfferingTypeValuesNoUpfront = "No Upfront"
+ // @enum OfferingTypeValues
+ OfferingTypeValuesPartialUpfront = "Partial Upfront"
+ // @enum OfferingTypeValues
+ OfferingTypeValuesAllUpfront = "All Upfront"
+)
+
+const (
+ // @enum PermissionGroup
+ PermissionGroupAll = "all"
+)
+
+const (
+ // @enum PlacementGroupState
+ PlacementGroupStatePending = "pending"
+ // @enum PlacementGroupState
+ PlacementGroupStateAvailable = "available"
+ // @enum PlacementGroupState
+ PlacementGroupStateDeleting = "deleting"
+ // @enum PlacementGroupState
+ PlacementGroupStateDeleted = "deleted"
+)
+
+const (
+ // @enum PlacementStrategy
+ PlacementStrategyCluster = "cluster"
+)
+
+const (
+ // @enum PlatformValues
+ PlatformValuesWindows = "Windows"
+)
+
+const (
+ // @enum ProductCodeValues
+ ProductCodeValuesDevpay = "devpay"
+ // @enum ProductCodeValues
+ ProductCodeValuesMarketplace = "marketplace"
+)
+
+const (
+ // @enum RIProductDescription
+ RIProductDescriptionLinuxUnix = "Linux/UNIX"
+ // @enum RIProductDescription
+ RIProductDescriptionLinuxUnixamazonVpc = "Linux/UNIX (Amazon VPC)"
+ // @enum RIProductDescription
+ RIProductDescriptionWindows = "Windows"
+ // @enum RIProductDescription
+ RIProductDescriptionWindowsAmazonVpc = "Windows (Amazon VPC)"
+)
+
+const (
+ // @enum RecurringChargeFrequency
+ RecurringChargeFrequencyHourly = "Hourly"
+)
+
+const (
+ // @enum ReportInstanceReasonCodes
+ ReportInstanceReasonCodesInstanceStuckInState = "instance-stuck-in-state"
+ // @enum ReportInstanceReasonCodes
+ ReportInstanceReasonCodesUnresponsive = "unresponsive"
+ // @enum ReportInstanceReasonCodes
+ ReportInstanceReasonCodesNotAcceptingCredentials = "not-accepting-credentials"
+ // @enum ReportInstanceReasonCodes
+ ReportInstanceReasonCodesPasswordNotAvailable = "password-not-available"
+ // @enum ReportInstanceReasonCodes
+ ReportInstanceReasonCodesPerformanceNetwork = "performance-network"
+ // @enum ReportInstanceReasonCodes
+ ReportInstanceReasonCodesPerformanceInstanceStore = "performance-instance-store"
+ // @enum ReportInstanceReasonCodes
+ ReportInstanceReasonCodesPerformanceEbsVolume = "performance-ebs-volume"
+ // @enum ReportInstanceReasonCodes
+ ReportInstanceReasonCodesPerformanceOther = "performance-other"
+ // @enum ReportInstanceReasonCodes
+ ReportInstanceReasonCodesOther = "other"
+)
+
+const (
+ // @enum ReportStatusType
+ ReportStatusTypeOk = "ok"
+ // @enum ReportStatusType
+ ReportStatusTypeImpaired = "impaired"
+)
+
+const (
+ // @enum ReservedInstanceState
+ ReservedInstanceStatePaymentPending = "payment-pending"
+ // @enum ReservedInstanceState
+ ReservedInstanceStateActive = "active"
+ // @enum ReservedInstanceState
+ ReservedInstanceStatePaymentFailed = "payment-failed"
+ // @enum ReservedInstanceState
+ ReservedInstanceStateRetired = "retired"
+)
+
+const (
+ // @enum ResetImageAttributeName
+ ResetImageAttributeNameLaunchPermission = "launchPermission"
+)
+
+const (
+ // @enum ResourceType
+ ResourceTypeCustomerGateway = "customer-gateway"
+ // @enum ResourceType
+ ResourceTypeDhcpOptions = "dhcp-options"
+ // @enum ResourceType
+ ResourceTypeImage = "image"
+ // @enum ResourceType
+ ResourceTypeInstance = "instance"
+ // @enum ResourceType
+ ResourceTypeInternetGateway = "internet-gateway"
+ // @enum ResourceType
+ ResourceTypeNetworkAcl = "network-acl"
+ // @enum ResourceType
+ ResourceTypeNetworkInterface = "network-interface"
+ // @enum ResourceType
+ ResourceTypeReservedInstances = "reserved-instances"
+ // @enum ResourceType
+ ResourceTypeRouteTable = "route-table"
+ // @enum ResourceType
+ ResourceTypeSnapshot = "snapshot"
+ // @enum ResourceType
+ ResourceTypeSpotInstancesRequest = "spot-instances-request"
+ // @enum ResourceType
+ ResourceTypeSubnet = "subnet"
+ // @enum ResourceType
+ ResourceTypeSecurityGroup = "security-group"
+ // @enum ResourceType
+ ResourceTypeVolume = "volume"
+ // @enum ResourceType
+ ResourceTypeVpc = "vpc"
+ // @enum ResourceType
+ ResourceTypeVpnConnection = "vpn-connection"
+ // @enum ResourceType
+ ResourceTypeVpnGateway = "vpn-gateway"
+)
+
+const (
+ // @enum RouteOrigin
+ RouteOriginCreateRouteTable = "CreateRouteTable"
+ // @enum RouteOrigin
+ RouteOriginCreateRoute = "CreateRoute"
+ // @enum RouteOrigin
+ RouteOriginEnableVgwRoutePropagation = "EnableVgwRoutePropagation"
+)
+
+const (
+ // @enum RouteState
+ RouteStateActive = "active"
+ // @enum RouteState
+ RouteStateBlackhole = "blackhole"
+)
+
+const (
+ // @enum RuleAction
+ RuleActionAllow = "allow"
+ // @enum RuleAction
+ RuleActionDeny = "deny"
+)
+
+const (
+ // @enum ShutdownBehavior
+ ShutdownBehaviorStop = "stop"
+ // @enum ShutdownBehavior
+ ShutdownBehaviorTerminate = "terminate"
+)
+
+const (
+ // @enum SnapshotAttributeName
+ SnapshotAttributeNameProductCodes = "productCodes"
+ // @enum SnapshotAttributeName
+ SnapshotAttributeNameCreateVolumePermission = "createVolumePermission"
+)
+
+const (
+ // @enum SnapshotState
+ SnapshotStatePending = "pending"
+ // @enum SnapshotState
+ SnapshotStateCompleted = "completed"
+ // @enum SnapshotState
+ SnapshotStateError = "error"
+)
+
+const (
+ // @enum SpotInstanceState
+ SpotInstanceStateOpen = "open"
+ // @enum SpotInstanceState
+ SpotInstanceStateActive = "active"
+ // @enum SpotInstanceState
+ SpotInstanceStateClosed = "closed"
+ // @enum SpotInstanceState
+ SpotInstanceStateCancelled = "cancelled"
+ // @enum SpotInstanceState
+ SpotInstanceStateFailed = "failed"
+)
+
+const (
+ // @enum SpotInstanceType
+ SpotInstanceTypeOneTime = "one-time"
+ // @enum SpotInstanceType
+ SpotInstanceTypePersistent = "persistent"
+)
+
+const (
+ // @enum State
+ StatePending = "Pending"
+ // @enum State
+ StateAvailable = "Available"
+ // @enum State
+ StateDeleting = "Deleting"
+ // @enum State
+ StateDeleted = "Deleted"
+)
+
+const (
+ // @enum Status
+ StatusMoveInProgress = "MoveInProgress"
+ // @enum Status
+ StatusInVpc = "InVpc"
+ // @enum Status
+ StatusInClassic = "InClassic"
+)
+
+const (
+ // @enum StatusName
+ StatusNameReachability = "reachability"
+)
+
+const (
+ // @enum StatusType
+ StatusTypePassed = "passed"
+ // @enum StatusType
+ StatusTypeFailed = "failed"
+ // @enum StatusType
+ StatusTypeInsufficientData = "insufficient-data"
+ // @enum StatusType
+ StatusTypeInitializing = "initializing"
+)
+
+const (
+ // @enum SubnetState
+ SubnetStatePending = "pending"
+ // @enum SubnetState
+ SubnetStateAvailable = "available"
+)
+
+const (
+ // @enum SummaryStatus
+ SummaryStatusOk = "ok"
+ // @enum SummaryStatus
+ SummaryStatusImpaired = "impaired"
+ // @enum SummaryStatus
+ SummaryStatusInsufficientData = "insufficient-data"
+ // @enum SummaryStatus
+ SummaryStatusNotApplicable = "not-applicable"
+ // @enum SummaryStatus
+ SummaryStatusInitializing = "initializing"
+)
+
+const (
+ // @enum TelemetryStatus
+ TelemetryStatusUp = "UP"
+ // @enum TelemetryStatus
+ TelemetryStatusDown = "DOWN"
+)
+
+const (
+ // @enum Tenancy
+ TenancyDefault = "default"
+ // @enum Tenancy
+ TenancyDedicated = "dedicated"
+)
+
+const (
+ // @enum TrafficType
+ TrafficTypeAccept = "ACCEPT"
+ // @enum TrafficType
+ TrafficTypeReject = "REJECT"
+ // @enum TrafficType
+ TrafficTypeAll = "ALL"
+)
+
+const (
+ // @enum VirtualizationType
+ VirtualizationTypeHvm = "hvm"
+ // @enum VirtualizationType
+ VirtualizationTypeParavirtual = "paravirtual"
+)
+
+const (
+ // @enum VolumeAttachmentState
+ VolumeAttachmentStateAttaching = "attaching"
+ // @enum VolumeAttachmentState
+ VolumeAttachmentStateAttached = "attached"
+ // @enum VolumeAttachmentState
+ VolumeAttachmentStateDetaching = "detaching"
+ // @enum VolumeAttachmentState
+ VolumeAttachmentStateDetached = "detached"
+)
+
+const (
+ // @enum VolumeAttributeName
+ VolumeAttributeNameAutoEnableIo = "autoEnableIO"
+ // @enum VolumeAttributeName
+ VolumeAttributeNameProductCodes = "productCodes"
+)
+
+const (
+ // @enum VolumeState
+ VolumeStateCreating = "creating"
+ // @enum VolumeState
+ VolumeStateAvailable = "available"
+ // @enum VolumeState
+ VolumeStateInUse = "in-use"
+ // @enum VolumeState
+ VolumeStateDeleting = "deleting"
+ // @enum VolumeState
+ VolumeStateDeleted = "deleted"
+ // @enum VolumeState
+ VolumeStateError = "error"
+)
+
+const (
+ // @enum VolumeStatusInfoStatus
+ VolumeStatusInfoStatusOk = "ok"
+ // @enum VolumeStatusInfoStatus
+ VolumeStatusInfoStatusImpaired = "impaired"
+ // @enum VolumeStatusInfoStatus
+ VolumeStatusInfoStatusInsufficientData = "insufficient-data"
+)
+
+const (
+ // @enum VolumeStatusName
+ VolumeStatusNameIoEnabled = "io-enabled"
+ // @enum VolumeStatusName
+ VolumeStatusNameIoPerformance = "io-performance"
+)
+
+const (
+ // @enum VolumeType
+ VolumeTypeStandard = "standard"
+ // @enum VolumeType
+ VolumeTypeIo1 = "io1"
+ // @enum VolumeType
+ VolumeTypeGp2 = "gp2"
+)
+
+const (
+ // @enum VpcAttributeName
+ VpcAttributeNameEnableDnsSupport = "enableDnsSupport"
+ // @enum VpcAttributeName
+ VpcAttributeNameEnableDnsHostnames = "enableDnsHostnames"
+)
+
+const (
+ // @enum VpcPeeringConnectionStateReasonCode
+ VpcPeeringConnectionStateReasonCodeInitiatingRequest = "initiating-request"
+ // @enum VpcPeeringConnectionStateReasonCode
+ VpcPeeringConnectionStateReasonCodePendingAcceptance = "pending-acceptance"
+ // @enum VpcPeeringConnectionStateReasonCode
+ VpcPeeringConnectionStateReasonCodeActive = "active"
+ // @enum VpcPeeringConnectionStateReasonCode
+ VpcPeeringConnectionStateReasonCodeDeleted = "deleted"
+ // @enum VpcPeeringConnectionStateReasonCode
+ VpcPeeringConnectionStateReasonCodeRejected = "rejected"
+ // @enum VpcPeeringConnectionStateReasonCode
+ VpcPeeringConnectionStateReasonCodeFailed = "failed"
+ // @enum VpcPeeringConnectionStateReasonCode
+ VpcPeeringConnectionStateReasonCodeExpired = "expired"
+ // @enum VpcPeeringConnectionStateReasonCode
+ VpcPeeringConnectionStateReasonCodeProvisioning = "provisioning"
+ // @enum VpcPeeringConnectionStateReasonCode
+ VpcPeeringConnectionStateReasonCodeDeleting = "deleting"
+)
+
+const (
+ // @enum VpcState
+ VpcStatePending = "pending"
+ // @enum VpcState
+ VpcStateAvailable = "available"
+)
+
+const (
+ // @enum VpnState
+ VpnStatePending = "pending"
+ // @enum VpnState
+ VpnStateAvailable = "available"
+ // @enum VpnState
+ VpnStateDeleting = "deleting"
+ // @enum VpnState
+ VpnStateDeleted = "deleted"
+)
+
+const (
+ // @enum VpnStaticRouteSource
+ VpnStaticRouteSourceStatic = "Static"
+)
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/customizations.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/customizations.go
new file mode 100644
index 00000000000..f3233e42e27
--- /dev/null
+++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/customizations.go
@@ -0,0 +1,57 @@
+package ec2
+
+import (
+ "time"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/awsutil"
+)
+
+func init() {
+ initRequest = func(r *aws.Request) {
+ if r.Operation.Name == opCopySnapshot { // fill the PresignedURL parameter
+ r.Handlers.Build.PushFront(fillPresignedURL)
+ }
+ }
+}
+
+func fillPresignedURL(r *aws.Request) {
+ if !r.ParamsFilled() {
+ return
+ }
+
+ params := r.Params.(*CopySnapshotInput)
+
+ // Stop if PresignedURL/DestinationRegion is set
+ if params.PresignedURL != nil || params.DestinationRegion != nil {
+ return
+ }
+
+ // First generate a copy of parameters
+ r.Params = awsutil.CopyOf(r.Params)
+ params = r.Params.(*CopySnapshotInput)
+
+ // Set destination region. Avoids infinite handler loop.
+ // Also needed to sign sub-request.
+ params.DestinationRegion = r.Service.Config.Region
+
+ // Create a new client pointing at source region.
+ // We will use this to presign the CopySnapshot request against
+ // the source region
+ config := r.Service.Config.Copy().
+ WithEndpoint("").
+ WithRegion(*params.SourceRegion)
+
+ client := New(config)
+
+ // Presign a CopySnapshot request with modified params
+ req, _ := client.CopySnapshotRequest(params)
+ url, err := req.Presign(300 * time.Second) // 5 minutes should be enough.
+
+ if err != nil { // bubble error back up to original request
+ r.Error = err
+ }
+
+ // We have our URL, set it on params
+ params.PresignedURL = &url
+}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/customizations_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/customizations_test.go
new file mode 100644
index 00000000000..2233ba7a295
--- /dev/null
+++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/customizations_test.go
@@ -0,0 +1,36 @@
+package ec2_test
+
+import (
+ "io/ioutil"
+ "net/url"
+ "testing"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/internal/test/unit"
+ "github.com/aws/aws-sdk-go/service/ec2"
+ "github.com/stretchr/testify/assert"
+)
+
+var _ = unit.Imported
+
+func TestCopySnapshotPresignedURL(t *testing.T) {
+ svc := ec2.New(&aws.Config{Region: aws.String("us-west-2")})
+
+ assert.NotPanics(t, func() {
+ // Doesn't panic on nil input
+ req, _ := svc.CopySnapshotRequest(nil)
+ req.Sign()
+ })
+
+ req, _ := svc.CopySnapshotRequest(&ec2.CopySnapshotInput{
+ SourceRegion: aws.String("us-west-1"),
+ SourceSnapshotID: aws.String("snap-id"),
+ })
+ req.Sign()
+
+ b, _ := ioutil.ReadAll(req.HTTPRequest.Body)
+ q, _ := url.ParseQuery(string(b))
+ url, _ := url.QueryUnescape(q.Get("PresignedUrl"))
+ assert.Equal(t, "us-west-2", q.Get("DestinationRegion"))
+ assert.Regexp(t, `^https://ec2\.us-west-1\.amazon.+&DestinationRegion=us-west-2`, url)
+}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/ec2iface/interface.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/ec2iface/interface.go
new file mode 100644
index 00000000000..cf5ed743131
--- /dev/null
+++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/ec2iface/interface.go
@@ -0,0 +1,756 @@
+// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+
+// Package ec2iface provides an interface for the Amazon Elastic Compute Cloud.
+package ec2iface
+
+import (
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/service/ec2"
+)
+
+// EC2API is the interface type for ec2.EC2.
+type EC2API interface {
+ AcceptVPCPeeringConnectionRequest(*ec2.AcceptVPCPeeringConnectionInput) (*aws.Request, *ec2.AcceptVPCPeeringConnectionOutput)
+
+ AcceptVPCPeeringConnection(*ec2.AcceptVPCPeeringConnectionInput) (*ec2.AcceptVPCPeeringConnectionOutput, error)
+
+ AllocateAddressRequest(*ec2.AllocateAddressInput) (*aws.Request, *ec2.AllocateAddressOutput)
+
+ AllocateAddress(*ec2.AllocateAddressInput) (*ec2.AllocateAddressOutput, error)
+
+ AssignPrivateIPAddressesRequest(*ec2.AssignPrivateIPAddressesInput) (*aws.Request, *ec2.AssignPrivateIPAddressesOutput)
+
+ AssignPrivateIPAddresses(*ec2.AssignPrivateIPAddressesInput) (*ec2.AssignPrivateIPAddressesOutput, error)
+
+ AssociateAddressRequest(*ec2.AssociateAddressInput) (*aws.Request, *ec2.AssociateAddressOutput)
+
+ AssociateAddress(*ec2.AssociateAddressInput) (*ec2.AssociateAddressOutput, error)
+
+ AssociateDHCPOptionsRequest(*ec2.AssociateDHCPOptionsInput) (*aws.Request, *ec2.AssociateDHCPOptionsOutput)
+
+ AssociateDHCPOptions(*ec2.AssociateDHCPOptionsInput) (*ec2.AssociateDHCPOptionsOutput, error)
+
+ AssociateRouteTableRequest(*ec2.AssociateRouteTableInput) (*aws.Request, *ec2.AssociateRouteTableOutput)
+
+ AssociateRouteTable(*ec2.AssociateRouteTableInput) (*ec2.AssociateRouteTableOutput, error)
+
+ AttachClassicLinkVPCRequest(*ec2.AttachClassicLinkVPCInput) (*aws.Request, *ec2.AttachClassicLinkVPCOutput)
+
+ AttachClassicLinkVPC(*ec2.AttachClassicLinkVPCInput) (*ec2.AttachClassicLinkVPCOutput, error)
+
+ AttachInternetGatewayRequest(*ec2.AttachInternetGatewayInput) (*aws.Request, *ec2.AttachInternetGatewayOutput)
+
+ AttachInternetGateway(*ec2.AttachInternetGatewayInput) (*ec2.AttachInternetGatewayOutput, error)
+
+ AttachNetworkInterfaceRequest(*ec2.AttachNetworkInterfaceInput) (*aws.Request, *ec2.AttachNetworkInterfaceOutput)
+
+ AttachNetworkInterface(*ec2.AttachNetworkInterfaceInput) (*ec2.AttachNetworkInterfaceOutput, error)
+
+ AttachVPNGatewayRequest(*ec2.AttachVPNGatewayInput) (*aws.Request, *ec2.AttachVPNGatewayOutput)
+
+ AttachVPNGateway(*ec2.AttachVPNGatewayInput) (*ec2.AttachVPNGatewayOutput, error)
+
+ AttachVolumeRequest(*ec2.AttachVolumeInput) (*aws.Request, *ec2.VolumeAttachment)
+
+ AttachVolume(*ec2.AttachVolumeInput) (*ec2.VolumeAttachment, error)
+
+ AuthorizeSecurityGroupEgressRequest(*ec2.AuthorizeSecurityGroupEgressInput) (*aws.Request, *ec2.AuthorizeSecurityGroupEgressOutput)
+
+ AuthorizeSecurityGroupEgress(*ec2.AuthorizeSecurityGroupEgressInput) (*ec2.AuthorizeSecurityGroupEgressOutput, error)
+
+ AuthorizeSecurityGroupIngressRequest(*ec2.AuthorizeSecurityGroupIngressInput) (*aws.Request, *ec2.AuthorizeSecurityGroupIngressOutput)
+
+ AuthorizeSecurityGroupIngress(*ec2.AuthorizeSecurityGroupIngressInput) (*ec2.AuthorizeSecurityGroupIngressOutput, error)
+
+ BundleInstanceRequest(*ec2.BundleInstanceInput) (*aws.Request, *ec2.BundleInstanceOutput)
+
+ BundleInstance(*ec2.BundleInstanceInput) (*ec2.BundleInstanceOutput, error)
+
+ CancelBundleTaskRequest(*ec2.CancelBundleTaskInput) (*aws.Request, *ec2.CancelBundleTaskOutput)
+
+ CancelBundleTask(*ec2.CancelBundleTaskInput) (*ec2.CancelBundleTaskOutput, error)
+
+ CancelConversionTaskRequest(*ec2.CancelConversionTaskInput) (*aws.Request, *ec2.CancelConversionTaskOutput)
+
+ CancelConversionTask(*ec2.CancelConversionTaskInput) (*ec2.CancelConversionTaskOutput, error)
+
+ CancelExportTaskRequest(*ec2.CancelExportTaskInput) (*aws.Request, *ec2.CancelExportTaskOutput)
+
+ CancelExportTask(*ec2.CancelExportTaskInput) (*ec2.CancelExportTaskOutput, error)
+
+ CancelImportTaskRequest(*ec2.CancelImportTaskInput) (*aws.Request, *ec2.CancelImportTaskOutput)
+
+ CancelImportTask(*ec2.CancelImportTaskInput) (*ec2.CancelImportTaskOutput, error)
+
+ CancelReservedInstancesListingRequest(*ec2.CancelReservedInstancesListingInput) (*aws.Request, *ec2.CancelReservedInstancesListingOutput)
+
+ CancelReservedInstancesListing(*ec2.CancelReservedInstancesListingInput) (*ec2.CancelReservedInstancesListingOutput, error)
+
+ CancelSpotFleetRequestsRequest(*ec2.CancelSpotFleetRequestsInput) (*aws.Request, *ec2.CancelSpotFleetRequestsOutput)
+
+ CancelSpotFleetRequests(*ec2.CancelSpotFleetRequestsInput) (*ec2.CancelSpotFleetRequestsOutput, error)
+
+ CancelSpotInstanceRequestsRequest(*ec2.CancelSpotInstanceRequestsInput) (*aws.Request, *ec2.CancelSpotInstanceRequestsOutput)
+
+ CancelSpotInstanceRequests(*ec2.CancelSpotInstanceRequestsInput) (*ec2.CancelSpotInstanceRequestsOutput, error)
+
+ ConfirmProductInstanceRequest(*ec2.ConfirmProductInstanceInput) (*aws.Request, *ec2.ConfirmProductInstanceOutput)
+
+ ConfirmProductInstance(*ec2.ConfirmProductInstanceInput) (*ec2.ConfirmProductInstanceOutput, error)
+
+ CopyImageRequest(*ec2.CopyImageInput) (*aws.Request, *ec2.CopyImageOutput)
+
+ CopyImage(*ec2.CopyImageInput) (*ec2.CopyImageOutput, error)
+
+ CopySnapshotRequest(*ec2.CopySnapshotInput) (*aws.Request, *ec2.CopySnapshotOutput)
+
+ CopySnapshot(*ec2.CopySnapshotInput) (*ec2.CopySnapshotOutput, error)
+
+ CreateCustomerGatewayRequest(*ec2.CreateCustomerGatewayInput) (*aws.Request, *ec2.CreateCustomerGatewayOutput)
+
+ CreateCustomerGateway(*ec2.CreateCustomerGatewayInput) (*ec2.CreateCustomerGatewayOutput, error)
+
+ CreateDHCPOptionsRequest(*ec2.CreateDHCPOptionsInput) (*aws.Request, *ec2.CreateDHCPOptionsOutput)
+
+ CreateDHCPOptions(*ec2.CreateDHCPOptionsInput) (*ec2.CreateDHCPOptionsOutput, error)
+
+ CreateFlowLogsRequest(*ec2.CreateFlowLogsInput) (*aws.Request, *ec2.CreateFlowLogsOutput)
+
+ CreateFlowLogs(*ec2.CreateFlowLogsInput) (*ec2.CreateFlowLogsOutput, error)
+
+ CreateImageRequest(*ec2.CreateImageInput) (*aws.Request, *ec2.CreateImageOutput)
+
+ CreateImage(*ec2.CreateImageInput) (*ec2.CreateImageOutput, error)
+
+ CreateInstanceExportTaskRequest(*ec2.CreateInstanceExportTaskInput) (*aws.Request, *ec2.CreateInstanceExportTaskOutput)
+
+ CreateInstanceExportTask(*ec2.CreateInstanceExportTaskInput) (*ec2.CreateInstanceExportTaskOutput, error)
+
+ CreateInternetGatewayRequest(*ec2.CreateInternetGatewayInput) (*aws.Request, *ec2.CreateInternetGatewayOutput)
+
+ CreateInternetGateway(*ec2.CreateInternetGatewayInput) (*ec2.CreateInternetGatewayOutput, error)
+
+ CreateKeyPairRequest(*ec2.CreateKeyPairInput) (*aws.Request, *ec2.CreateKeyPairOutput)
+
+ CreateKeyPair(*ec2.CreateKeyPairInput) (*ec2.CreateKeyPairOutput, error)
+
+ CreateNetworkACLRequest(*ec2.CreateNetworkACLInput) (*aws.Request, *ec2.CreateNetworkACLOutput)
+
+ CreateNetworkACL(*ec2.CreateNetworkACLInput) (*ec2.CreateNetworkACLOutput, error)
+
+ CreateNetworkACLEntryRequest(*ec2.CreateNetworkACLEntryInput) (*aws.Request, *ec2.CreateNetworkACLEntryOutput)
+
+ CreateNetworkACLEntry(*ec2.CreateNetworkACLEntryInput) (*ec2.CreateNetworkACLEntryOutput, error)
+
+ CreateNetworkInterfaceRequest(*ec2.CreateNetworkInterfaceInput) (*aws.Request, *ec2.CreateNetworkInterfaceOutput)
+
+ CreateNetworkInterface(*ec2.CreateNetworkInterfaceInput) (*ec2.CreateNetworkInterfaceOutput, error)
+
+ CreatePlacementGroupRequest(*ec2.CreatePlacementGroupInput) (*aws.Request, *ec2.CreatePlacementGroupOutput)
+
+ CreatePlacementGroup(*ec2.CreatePlacementGroupInput) (*ec2.CreatePlacementGroupOutput, error)
+
+ CreateReservedInstancesListingRequest(*ec2.CreateReservedInstancesListingInput) (*aws.Request, *ec2.CreateReservedInstancesListingOutput)
+
+ CreateReservedInstancesListing(*ec2.CreateReservedInstancesListingInput) (*ec2.CreateReservedInstancesListingOutput, error)
+
+ CreateRouteRequest(*ec2.CreateRouteInput) (*aws.Request, *ec2.CreateRouteOutput)
+
+ CreateRoute(*ec2.CreateRouteInput) (*ec2.CreateRouteOutput, error)
+
+ CreateRouteTableRequest(*ec2.CreateRouteTableInput) (*aws.Request, *ec2.CreateRouteTableOutput)
+
+ CreateRouteTable(*ec2.CreateRouteTableInput) (*ec2.CreateRouteTableOutput, error)
+
+ CreateSecurityGroupRequest(*ec2.CreateSecurityGroupInput) (*aws.Request, *ec2.CreateSecurityGroupOutput)
+
+ CreateSecurityGroup(*ec2.CreateSecurityGroupInput) (*ec2.CreateSecurityGroupOutput, error)
+
+ CreateSnapshotRequest(*ec2.CreateSnapshotInput) (*aws.Request, *ec2.Snapshot)
+
+ CreateSnapshot(*ec2.CreateSnapshotInput) (*ec2.Snapshot, error)
+
+ CreateSpotDatafeedSubscriptionRequest(*ec2.CreateSpotDatafeedSubscriptionInput) (*aws.Request, *ec2.CreateSpotDatafeedSubscriptionOutput)
+
+ CreateSpotDatafeedSubscription(*ec2.CreateSpotDatafeedSubscriptionInput) (*ec2.CreateSpotDatafeedSubscriptionOutput, error)
+
+ CreateSubnetRequest(*ec2.CreateSubnetInput) (*aws.Request, *ec2.CreateSubnetOutput)
+
+ CreateSubnet(*ec2.CreateSubnetInput) (*ec2.CreateSubnetOutput, error)
+
+ CreateTagsRequest(*ec2.CreateTagsInput) (*aws.Request, *ec2.CreateTagsOutput)
+
+ CreateTags(*ec2.CreateTagsInput) (*ec2.CreateTagsOutput, error)
+
+ CreateVPCRequest(*ec2.CreateVPCInput) (*aws.Request, *ec2.CreateVPCOutput)
+
+ CreateVPC(*ec2.CreateVPCInput) (*ec2.CreateVPCOutput, error)
+
+ CreateVPCEndpointRequest(*ec2.CreateVPCEndpointInput) (*aws.Request, *ec2.CreateVPCEndpointOutput)
+
+ CreateVPCEndpoint(*ec2.CreateVPCEndpointInput) (*ec2.CreateVPCEndpointOutput, error)
+
+ CreateVPCPeeringConnectionRequest(*ec2.CreateVPCPeeringConnectionInput) (*aws.Request, *ec2.CreateVPCPeeringConnectionOutput)
+
+ CreateVPCPeeringConnection(*ec2.CreateVPCPeeringConnectionInput) (*ec2.CreateVPCPeeringConnectionOutput, error)
+
+ CreateVPNConnectionRequest(*ec2.CreateVPNConnectionInput) (*aws.Request, *ec2.CreateVPNConnectionOutput)
+
+ CreateVPNConnection(*ec2.CreateVPNConnectionInput) (*ec2.CreateVPNConnectionOutput, error)
+
+ CreateVPNConnectionRouteRequest(*ec2.CreateVPNConnectionRouteInput) (*aws.Request, *ec2.CreateVPNConnectionRouteOutput)
+
+ CreateVPNConnectionRoute(*ec2.CreateVPNConnectionRouteInput) (*ec2.CreateVPNConnectionRouteOutput, error)
+
+ CreateVPNGatewayRequest(*ec2.CreateVPNGatewayInput) (*aws.Request, *ec2.CreateVPNGatewayOutput)
+
+ CreateVPNGateway(*ec2.CreateVPNGatewayInput) (*ec2.CreateVPNGatewayOutput, error)
+
+ CreateVolumeRequest(*ec2.CreateVolumeInput) (*aws.Request, *ec2.Volume)
+
+ CreateVolume(*ec2.CreateVolumeInput) (*ec2.Volume, error)
+
+ DeleteCustomerGatewayRequest(*ec2.DeleteCustomerGatewayInput) (*aws.Request, *ec2.DeleteCustomerGatewayOutput)
+
+ DeleteCustomerGateway(*ec2.DeleteCustomerGatewayInput) (*ec2.DeleteCustomerGatewayOutput, error)
+
+ DeleteDHCPOptionsRequest(*ec2.DeleteDHCPOptionsInput) (*aws.Request, *ec2.DeleteDHCPOptionsOutput)
+
+ DeleteDHCPOptions(*ec2.DeleteDHCPOptionsInput) (*ec2.DeleteDHCPOptionsOutput, error)
+
+ DeleteFlowLogsRequest(*ec2.DeleteFlowLogsInput) (*aws.Request, *ec2.DeleteFlowLogsOutput)
+
+ DeleteFlowLogs(*ec2.DeleteFlowLogsInput) (*ec2.DeleteFlowLogsOutput, error)
+
+ DeleteInternetGatewayRequest(*ec2.DeleteInternetGatewayInput) (*aws.Request, *ec2.DeleteInternetGatewayOutput)
+
+ DeleteInternetGateway(*ec2.DeleteInternetGatewayInput) (*ec2.DeleteInternetGatewayOutput, error)
+
+ DeleteKeyPairRequest(*ec2.DeleteKeyPairInput) (*aws.Request, *ec2.DeleteKeyPairOutput)
+
+ DeleteKeyPair(*ec2.DeleteKeyPairInput) (*ec2.DeleteKeyPairOutput, error)
+
+ DeleteNetworkACLRequest(*ec2.DeleteNetworkACLInput) (*aws.Request, *ec2.DeleteNetworkACLOutput)
+
+ DeleteNetworkACL(*ec2.DeleteNetworkACLInput) (*ec2.DeleteNetworkACLOutput, error)
+
+ DeleteNetworkACLEntryRequest(*ec2.DeleteNetworkACLEntryInput) (*aws.Request, *ec2.DeleteNetworkACLEntryOutput)
+
+ DeleteNetworkACLEntry(*ec2.DeleteNetworkACLEntryInput) (*ec2.DeleteNetworkACLEntryOutput, error)
+
+ DeleteNetworkInterfaceRequest(*ec2.DeleteNetworkInterfaceInput) (*aws.Request, *ec2.DeleteNetworkInterfaceOutput)
+
+ DeleteNetworkInterface(*ec2.DeleteNetworkInterfaceInput) (*ec2.DeleteNetworkInterfaceOutput, error)
+
+ DeletePlacementGroupRequest(*ec2.DeletePlacementGroupInput) (*aws.Request, *ec2.DeletePlacementGroupOutput)
+
+ DeletePlacementGroup(*ec2.DeletePlacementGroupInput) (*ec2.DeletePlacementGroupOutput, error)
+
+ DeleteRouteRequest(*ec2.DeleteRouteInput) (*aws.Request, *ec2.DeleteRouteOutput)
+
+ DeleteRoute(*ec2.DeleteRouteInput) (*ec2.DeleteRouteOutput, error)
+
+ DeleteRouteTableRequest(*ec2.DeleteRouteTableInput) (*aws.Request, *ec2.DeleteRouteTableOutput)
+
+ DeleteRouteTable(*ec2.DeleteRouteTableInput) (*ec2.DeleteRouteTableOutput, error)
+
+ DeleteSecurityGroupRequest(*ec2.DeleteSecurityGroupInput) (*aws.Request, *ec2.DeleteSecurityGroupOutput)
+
+ DeleteSecurityGroup(*ec2.DeleteSecurityGroupInput) (*ec2.DeleteSecurityGroupOutput, error)
+
+ DeleteSnapshotRequest(*ec2.DeleteSnapshotInput) (*aws.Request, *ec2.DeleteSnapshotOutput)
+
+ DeleteSnapshot(*ec2.DeleteSnapshotInput) (*ec2.DeleteSnapshotOutput, error)
+
+ DeleteSpotDatafeedSubscriptionRequest(*ec2.DeleteSpotDatafeedSubscriptionInput) (*aws.Request, *ec2.DeleteSpotDatafeedSubscriptionOutput)
+
+ DeleteSpotDatafeedSubscription(*ec2.DeleteSpotDatafeedSubscriptionInput) (*ec2.DeleteSpotDatafeedSubscriptionOutput, error)
+
+ DeleteSubnetRequest(*ec2.DeleteSubnetInput) (*aws.Request, *ec2.DeleteSubnetOutput)
+
+ DeleteSubnet(*ec2.DeleteSubnetInput) (*ec2.DeleteSubnetOutput, error)
+
+ DeleteTagsRequest(*ec2.DeleteTagsInput) (*aws.Request, *ec2.DeleteTagsOutput)
+
+ DeleteTags(*ec2.DeleteTagsInput) (*ec2.DeleteTagsOutput, error)
+
+ DeleteVPCRequest(*ec2.DeleteVPCInput) (*aws.Request, *ec2.DeleteVPCOutput)
+
+ DeleteVPC(*ec2.DeleteVPCInput) (*ec2.DeleteVPCOutput, error)
+
+ DeleteVPCEndpointsRequest(*ec2.DeleteVPCEndpointsInput) (*aws.Request, *ec2.DeleteVPCEndpointsOutput)
+
+ DeleteVPCEndpoints(*ec2.DeleteVPCEndpointsInput) (*ec2.DeleteVPCEndpointsOutput, error)
+
+ DeleteVPCPeeringConnectionRequest(*ec2.DeleteVPCPeeringConnectionInput) (*aws.Request, *ec2.DeleteVPCPeeringConnectionOutput)
+
+ DeleteVPCPeeringConnection(*ec2.DeleteVPCPeeringConnectionInput) (*ec2.DeleteVPCPeeringConnectionOutput, error)
+
+ DeleteVPNConnectionRequest(*ec2.DeleteVPNConnectionInput) (*aws.Request, *ec2.DeleteVPNConnectionOutput)
+
+ DeleteVPNConnection(*ec2.DeleteVPNConnectionInput) (*ec2.DeleteVPNConnectionOutput, error)
+
+ DeleteVPNConnectionRouteRequest(*ec2.DeleteVPNConnectionRouteInput) (*aws.Request, *ec2.DeleteVPNConnectionRouteOutput)
+
+ DeleteVPNConnectionRoute(*ec2.DeleteVPNConnectionRouteInput) (*ec2.DeleteVPNConnectionRouteOutput, error)
+
+ DeleteVPNGatewayRequest(*ec2.DeleteVPNGatewayInput) (*aws.Request, *ec2.DeleteVPNGatewayOutput)
+
+ DeleteVPNGateway(*ec2.DeleteVPNGatewayInput) (*ec2.DeleteVPNGatewayOutput, error)
+
+ DeleteVolumeRequest(*ec2.DeleteVolumeInput) (*aws.Request, *ec2.DeleteVolumeOutput)
+
+ DeleteVolume(*ec2.DeleteVolumeInput) (*ec2.DeleteVolumeOutput, error)
+
+ DeregisterImageRequest(*ec2.DeregisterImageInput) (*aws.Request, *ec2.DeregisterImageOutput)
+
+ DeregisterImage(*ec2.DeregisterImageInput) (*ec2.DeregisterImageOutput, error)
+
+ DescribeAccountAttributesRequest(*ec2.DescribeAccountAttributesInput) (*aws.Request, *ec2.DescribeAccountAttributesOutput)
+
+ DescribeAccountAttributes(*ec2.DescribeAccountAttributesInput) (*ec2.DescribeAccountAttributesOutput, error)
+
+ DescribeAddressesRequest(*ec2.DescribeAddressesInput) (*aws.Request, *ec2.DescribeAddressesOutput)
+
+ DescribeAddresses(*ec2.DescribeAddressesInput) (*ec2.DescribeAddressesOutput, error)
+
+ DescribeAvailabilityZonesRequest(*ec2.DescribeAvailabilityZonesInput) (*aws.Request, *ec2.DescribeAvailabilityZonesOutput)
+
+ DescribeAvailabilityZones(*ec2.DescribeAvailabilityZonesInput) (*ec2.DescribeAvailabilityZonesOutput, error)
+
+ DescribeBundleTasksRequest(*ec2.DescribeBundleTasksInput) (*aws.Request, *ec2.DescribeBundleTasksOutput)
+
+ DescribeBundleTasks(*ec2.DescribeBundleTasksInput) (*ec2.DescribeBundleTasksOutput, error)
+
+ DescribeClassicLinkInstancesRequest(*ec2.DescribeClassicLinkInstancesInput) (*aws.Request, *ec2.DescribeClassicLinkInstancesOutput)
+
+ DescribeClassicLinkInstances(*ec2.DescribeClassicLinkInstancesInput) (*ec2.DescribeClassicLinkInstancesOutput, error)
+
+ DescribeConversionTasksRequest(*ec2.DescribeConversionTasksInput) (*aws.Request, *ec2.DescribeConversionTasksOutput)
+
+ DescribeConversionTasks(*ec2.DescribeConversionTasksInput) (*ec2.DescribeConversionTasksOutput, error)
+
+ DescribeCustomerGatewaysRequest(*ec2.DescribeCustomerGatewaysInput) (*aws.Request, *ec2.DescribeCustomerGatewaysOutput)
+
+ DescribeCustomerGateways(*ec2.DescribeCustomerGatewaysInput) (*ec2.DescribeCustomerGatewaysOutput, error)
+
+ DescribeDHCPOptionsRequest(*ec2.DescribeDHCPOptionsInput) (*aws.Request, *ec2.DescribeDHCPOptionsOutput)
+
+ DescribeDHCPOptions(*ec2.DescribeDHCPOptionsInput) (*ec2.DescribeDHCPOptionsOutput, error)
+
+ DescribeExportTasksRequest(*ec2.DescribeExportTasksInput) (*aws.Request, *ec2.DescribeExportTasksOutput)
+
+ DescribeExportTasks(*ec2.DescribeExportTasksInput) (*ec2.DescribeExportTasksOutput, error)
+
+ DescribeFlowLogsRequest(*ec2.DescribeFlowLogsInput) (*aws.Request, *ec2.DescribeFlowLogsOutput)
+
+ DescribeFlowLogs(*ec2.DescribeFlowLogsInput) (*ec2.DescribeFlowLogsOutput, error)
+
+ DescribeImageAttributeRequest(*ec2.DescribeImageAttributeInput) (*aws.Request, *ec2.DescribeImageAttributeOutput)
+
+ DescribeImageAttribute(*ec2.DescribeImageAttributeInput) (*ec2.DescribeImageAttributeOutput, error)
+
+ DescribeImagesRequest(*ec2.DescribeImagesInput) (*aws.Request, *ec2.DescribeImagesOutput)
+
+ DescribeImages(*ec2.DescribeImagesInput) (*ec2.DescribeImagesOutput, error)
+
+ DescribeImportImageTasksRequest(*ec2.DescribeImportImageTasksInput) (*aws.Request, *ec2.DescribeImportImageTasksOutput)
+
+ DescribeImportImageTasks(*ec2.DescribeImportImageTasksInput) (*ec2.DescribeImportImageTasksOutput, error)
+
+ DescribeImportSnapshotTasksRequest(*ec2.DescribeImportSnapshotTasksInput) (*aws.Request, *ec2.DescribeImportSnapshotTasksOutput)
+
+ DescribeImportSnapshotTasks(*ec2.DescribeImportSnapshotTasksInput) (*ec2.DescribeImportSnapshotTasksOutput, error)
+
+ DescribeInstanceAttributeRequest(*ec2.DescribeInstanceAttributeInput) (*aws.Request, *ec2.DescribeInstanceAttributeOutput)
+
+ DescribeInstanceAttribute(*ec2.DescribeInstanceAttributeInput) (*ec2.DescribeInstanceAttributeOutput, error)
+
+ DescribeInstanceStatusRequest(*ec2.DescribeInstanceStatusInput) (*aws.Request, *ec2.DescribeInstanceStatusOutput)
+
+ DescribeInstanceStatus(*ec2.DescribeInstanceStatusInput) (*ec2.DescribeInstanceStatusOutput, error)
+
+ DescribeInstanceStatusPages(*ec2.DescribeInstanceStatusInput, func(*ec2.DescribeInstanceStatusOutput, bool) bool) error
+
+ DescribeInstancesRequest(*ec2.DescribeInstancesInput) (*aws.Request, *ec2.DescribeInstancesOutput)
+
+ DescribeInstances(*ec2.DescribeInstancesInput) (*ec2.DescribeInstancesOutput, error)
+
+ DescribeInstancesPages(*ec2.DescribeInstancesInput, func(*ec2.DescribeInstancesOutput, bool) bool) error
+
+ DescribeInternetGatewaysRequest(*ec2.DescribeInternetGatewaysInput) (*aws.Request, *ec2.DescribeInternetGatewaysOutput)
+
+ DescribeInternetGateways(*ec2.DescribeInternetGatewaysInput) (*ec2.DescribeInternetGatewaysOutput, error)
+
+ DescribeKeyPairsRequest(*ec2.DescribeKeyPairsInput) (*aws.Request, *ec2.DescribeKeyPairsOutput)
+
+ DescribeKeyPairs(*ec2.DescribeKeyPairsInput) (*ec2.DescribeKeyPairsOutput, error)
+
+ DescribeMovingAddressesRequest(*ec2.DescribeMovingAddressesInput) (*aws.Request, *ec2.DescribeMovingAddressesOutput)
+
+ DescribeMovingAddresses(*ec2.DescribeMovingAddressesInput) (*ec2.DescribeMovingAddressesOutput, error)
+
+ DescribeNetworkACLsRequest(*ec2.DescribeNetworkACLsInput) (*aws.Request, *ec2.DescribeNetworkACLsOutput)
+
+ DescribeNetworkACLs(*ec2.DescribeNetworkACLsInput) (*ec2.DescribeNetworkACLsOutput, error)
+
+ DescribeNetworkInterfaceAttributeRequest(*ec2.DescribeNetworkInterfaceAttributeInput) (*aws.Request, *ec2.DescribeNetworkInterfaceAttributeOutput)
+
+ DescribeNetworkInterfaceAttribute(*ec2.DescribeNetworkInterfaceAttributeInput) (*ec2.DescribeNetworkInterfaceAttributeOutput, error)
+
+ DescribeNetworkInterfacesRequest(*ec2.DescribeNetworkInterfacesInput) (*aws.Request, *ec2.DescribeNetworkInterfacesOutput)
+
+ DescribeNetworkInterfaces(*ec2.DescribeNetworkInterfacesInput) (*ec2.DescribeNetworkInterfacesOutput, error)
+
+ DescribePlacementGroupsRequest(*ec2.DescribePlacementGroupsInput) (*aws.Request, *ec2.DescribePlacementGroupsOutput)
+
+ DescribePlacementGroups(*ec2.DescribePlacementGroupsInput) (*ec2.DescribePlacementGroupsOutput, error)
+
+ DescribePrefixListsRequest(*ec2.DescribePrefixListsInput) (*aws.Request, *ec2.DescribePrefixListsOutput)
+
+ DescribePrefixLists(*ec2.DescribePrefixListsInput) (*ec2.DescribePrefixListsOutput, error)
+
+ DescribeRegionsRequest(*ec2.DescribeRegionsInput) (*aws.Request, *ec2.DescribeRegionsOutput)
+
+ DescribeRegions(*ec2.DescribeRegionsInput) (*ec2.DescribeRegionsOutput, error)
+
+ DescribeReservedInstancesRequest(*ec2.DescribeReservedInstancesInput) (*aws.Request, *ec2.DescribeReservedInstancesOutput)
+
+ DescribeReservedInstances(*ec2.DescribeReservedInstancesInput) (*ec2.DescribeReservedInstancesOutput, error)
+
+ DescribeReservedInstancesListingsRequest(*ec2.DescribeReservedInstancesListingsInput) (*aws.Request, *ec2.DescribeReservedInstancesListingsOutput)
+
+ DescribeReservedInstancesListings(*ec2.DescribeReservedInstancesListingsInput) (*ec2.DescribeReservedInstancesListingsOutput, error)
+
+ DescribeReservedInstancesModificationsRequest(*ec2.DescribeReservedInstancesModificationsInput) (*aws.Request, *ec2.DescribeReservedInstancesModificationsOutput)
+
+ DescribeReservedInstancesModifications(*ec2.DescribeReservedInstancesModificationsInput) (*ec2.DescribeReservedInstancesModificationsOutput, error)
+
+ DescribeReservedInstancesModificationsPages(*ec2.DescribeReservedInstancesModificationsInput, func(*ec2.DescribeReservedInstancesModificationsOutput, bool) bool) error
+
+ DescribeReservedInstancesOfferingsRequest(*ec2.DescribeReservedInstancesOfferingsInput) (*aws.Request, *ec2.DescribeReservedInstancesOfferingsOutput)
+
+ DescribeReservedInstancesOfferings(*ec2.DescribeReservedInstancesOfferingsInput) (*ec2.DescribeReservedInstancesOfferingsOutput, error)
+
+ DescribeReservedInstancesOfferingsPages(*ec2.DescribeReservedInstancesOfferingsInput, func(*ec2.DescribeReservedInstancesOfferingsOutput, bool) bool) error
+
+ DescribeRouteTablesRequest(*ec2.DescribeRouteTablesInput) (*aws.Request, *ec2.DescribeRouteTablesOutput)
+
+ DescribeRouteTables(*ec2.DescribeRouteTablesInput) (*ec2.DescribeRouteTablesOutput, error)
+
+ DescribeSecurityGroupsRequest(*ec2.DescribeSecurityGroupsInput) (*aws.Request, *ec2.DescribeSecurityGroupsOutput)
+
+ DescribeSecurityGroups(*ec2.DescribeSecurityGroupsInput) (*ec2.DescribeSecurityGroupsOutput, error)
+
+ DescribeSnapshotAttributeRequest(*ec2.DescribeSnapshotAttributeInput) (*aws.Request, *ec2.DescribeSnapshotAttributeOutput)
+
+ DescribeSnapshotAttribute(*ec2.DescribeSnapshotAttributeInput) (*ec2.DescribeSnapshotAttributeOutput, error)
+
+ DescribeSnapshotsRequest(*ec2.DescribeSnapshotsInput) (*aws.Request, *ec2.DescribeSnapshotsOutput)
+
+ DescribeSnapshots(*ec2.DescribeSnapshotsInput) (*ec2.DescribeSnapshotsOutput, error)
+
+ DescribeSnapshotsPages(*ec2.DescribeSnapshotsInput, func(*ec2.DescribeSnapshotsOutput, bool) bool) error
+
+ DescribeSpotDatafeedSubscriptionRequest(*ec2.DescribeSpotDatafeedSubscriptionInput) (*aws.Request, *ec2.DescribeSpotDatafeedSubscriptionOutput)
+
+ DescribeSpotDatafeedSubscription(*ec2.DescribeSpotDatafeedSubscriptionInput) (*ec2.DescribeSpotDatafeedSubscriptionOutput, error)
+
+ DescribeSpotFleetInstancesRequest(*ec2.DescribeSpotFleetInstancesInput) (*aws.Request, *ec2.DescribeSpotFleetInstancesOutput)
+
+ DescribeSpotFleetInstances(*ec2.DescribeSpotFleetInstancesInput) (*ec2.DescribeSpotFleetInstancesOutput, error)
+
+ DescribeSpotFleetRequestHistoryRequest(*ec2.DescribeSpotFleetRequestHistoryInput) (*aws.Request, *ec2.DescribeSpotFleetRequestHistoryOutput)
+
+ DescribeSpotFleetRequestHistory(*ec2.DescribeSpotFleetRequestHistoryInput) (*ec2.DescribeSpotFleetRequestHistoryOutput, error)
+
+ DescribeSpotFleetRequestsRequest(*ec2.DescribeSpotFleetRequestsInput) (*aws.Request, *ec2.DescribeSpotFleetRequestsOutput)
+
+ DescribeSpotFleetRequests(*ec2.DescribeSpotFleetRequestsInput) (*ec2.DescribeSpotFleetRequestsOutput, error)
+
+ DescribeSpotInstanceRequestsRequest(*ec2.DescribeSpotInstanceRequestsInput) (*aws.Request, *ec2.DescribeSpotInstanceRequestsOutput)
+
+ DescribeSpotInstanceRequests(*ec2.DescribeSpotInstanceRequestsInput) (*ec2.DescribeSpotInstanceRequestsOutput, error)
+
+ DescribeSpotPriceHistoryRequest(*ec2.DescribeSpotPriceHistoryInput) (*aws.Request, *ec2.DescribeSpotPriceHistoryOutput)
+
+ DescribeSpotPriceHistory(*ec2.DescribeSpotPriceHistoryInput) (*ec2.DescribeSpotPriceHistoryOutput, error)
+
+ DescribeSpotPriceHistoryPages(*ec2.DescribeSpotPriceHistoryInput, func(*ec2.DescribeSpotPriceHistoryOutput, bool) bool) error
+
+ DescribeSubnetsRequest(*ec2.DescribeSubnetsInput) (*aws.Request, *ec2.DescribeSubnetsOutput)
+
+ DescribeSubnets(*ec2.DescribeSubnetsInput) (*ec2.DescribeSubnetsOutput, error)
+
+ DescribeTagsRequest(*ec2.DescribeTagsInput) (*aws.Request, *ec2.DescribeTagsOutput)
+
+ DescribeTags(*ec2.DescribeTagsInput) (*ec2.DescribeTagsOutput, error)
+
+ DescribeVPCAttributeRequest(*ec2.DescribeVPCAttributeInput) (*aws.Request, *ec2.DescribeVPCAttributeOutput)
+
+ DescribeVPCAttribute(*ec2.DescribeVPCAttributeInput) (*ec2.DescribeVPCAttributeOutput, error)
+
+ DescribeVPCClassicLinkRequest(*ec2.DescribeVPCClassicLinkInput) (*aws.Request, *ec2.DescribeVPCClassicLinkOutput)
+
+ DescribeVPCClassicLink(*ec2.DescribeVPCClassicLinkInput) (*ec2.DescribeVPCClassicLinkOutput, error)
+
+ DescribeVPCEndpointServicesRequest(*ec2.DescribeVPCEndpointServicesInput) (*aws.Request, *ec2.DescribeVPCEndpointServicesOutput)
+
+ DescribeVPCEndpointServices(*ec2.DescribeVPCEndpointServicesInput) (*ec2.DescribeVPCEndpointServicesOutput, error)
+
+ DescribeVPCEndpointsRequest(*ec2.DescribeVPCEndpointsInput) (*aws.Request, *ec2.DescribeVPCEndpointsOutput)
+
+ DescribeVPCEndpoints(*ec2.DescribeVPCEndpointsInput) (*ec2.DescribeVPCEndpointsOutput, error)
+
+ DescribeVPCPeeringConnectionsRequest(*ec2.DescribeVPCPeeringConnectionsInput) (*aws.Request, *ec2.DescribeVPCPeeringConnectionsOutput)
+
+ DescribeVPCPeeringConnections(*ec2.DescribeVPCPeeringConnectionsInput) (*ec2.DescribeVPCPeeringConnectionsOutput, error)
+
+ DescribeVPCsRequest(*ec2.DescribeVPCsInput) (*aws.Request, *ec2.DescribeVPCsOutput)
+
+ DescribeVPCs(*ec2.DescribeVPCsInput) (*ec2.DescribeVPCsOutput, error)
+
+ DescribeVPNConnectionsRequest(*ec2.DescribeVPNConnectionsInput) (*aws.Request, *ec2.DescribeVPNConnectionsOutput)
+
+ DescribeVPNConnections(*ec2.DescribeVPNConnectionsInput) (*ec2.DescribeVPNConnectionsOutput, error)
+
+ DescribeVPNGatewaysRequest(*ec2.DescribeVPNGatewaysInput) (*aws.Request, *ec2.DescribeVPNGatewaysOutput)
+
+ DescribeVPNGateways(*ec2.DescribeVPNGatewaysInput) (*ec2.DescribeVPNGatewaysOutput, error)
+
+ DescribeVolumeAttributeRequest(*ec2.DescribeVolumeAttributeInput) (*aws.Request, *ec2.DescribeVolumeAttributeOutput)
+
+ DescribeVolumeAttribute(*ec2.DescribeVolumeAttributeInput) (*ec2.DescribeVolumeAttributeOutput, error)
+
+ DescribeVolumeStatusRequest(*ec2.DescribeVolumeStatusInput) (*aws.Request, *ec2.DescribeVolumeStatusOutput)
+
+ DescribeVolumeStatus(*ec2.DescribeVolumeStatusInput) (*ec2.DescribeVolumeStatusOutput, error)
+
+ DescribeVolumeStatusPages(*ec2.DescribeVolumeStatusInput, func(*ec2.DescribeVolumeStatusOutput, bool) bool) error
+
+ DescribeVolumesRequest(*ec2.DescribeVolumesInput) (*aws.Request, *ec2.DescribeVolumesOutput)
+
+ DescribeVolumes(*ec2.DescribeVolumesInput) (*ec2.DescribeVolumesOutput, error)
+
+ DescribeVolumesPages(*ec2.DescribeVolumesInput, func(*ec2.DescribeVolumesOutput, bool) bool) error
+
+ DetachClassicLinkVPCRequest(*ec2.DetachClassicLinkVPCInput) (*aws.Request, *ec2.DetachClassicLinkVPCOutput)
+
+ DetachClassicLinkVPC(*ec2.DetachClassicLinkVPCInput) (*ec2.DetachClassicLinkVPCOutput, error)
+
+ DetachInternetGatewayRequest(*ec2.DetachInternetGatewayInput) (*aws.Request, *ec2.DetachInternetGatewayOutput)
+
+ DetachInternetGateway(*ec2.DetachInternetGatewayInput) (*ec2.DetachInternetGatewayOutput, error)
+
+ DetachNetworkInterfaceRequest(*ec2.DetachNetworkInterfaceInput) (*aws.Request, *ec2.DetachNetworkInterfaceOutput)
+
+ DetachNetworkInterface(*ec2.DetachNetworkInterfaceInput) (*ec2.DetachNetworkInterfaceOutput, error)
+
+ DetachVPNGatewayRequest(*ec2.DetachVPNGatewayInput) (*aws.Request, *ec2.DetachVPNGatewayOutput)
+
+ DetachVPNGateway(*ec2.DetachVPNGatewayInput) (*ec2.DetachVPNGatewayOutput, error)
+
+ DetachVolumeRequest(*ec2.DetachVolumeInput) (*aws.Request, *ec2.VolumeAttachment)
+
+ DetachVolume(*ec2.DetachVolumeInput) (*ec2.VolumeAttachment, error)
+
+ DisableVGWRoutePropagationRequest(*ec2.DisableVGWRoutePropagationInput) (*aws.Request, *ec2.DisableVGWRoutePropagationOutput)
+
+ DisableVGWRoutePropagation(*ec2.DisableVGWRoutePropagationInput) (*ec2.DisableVGWRoutePropagationOutput, error)
+
+ DisableVPCClassicLinkRequest(*ec2.DisableVPCClassicLinkInput) (*aws.Request, *ec2.DisableVPCClassicLinkOutput)
+
+ DisableVPCClassicLink(*ec2.DisableVPCClassicLinkInput) (*ec2.DisableVPCClassicLinkOutput, error)
+
+ DisassociateAddressRequest(*ec2.DisassociateAddressInput) (*aws.Request, *ec2.DisassociateAddressOutput)
+
+ DisassociateAddress(*ec2.DisassociateAddressInput) (*ec2.DisassociateAddressOutput, error)
+
+ DisassociateRouteTableRequest(*ec2.DisassociateRouteTableInput) (*aws.Request, *ec2.DisassociateRouteTableOutput)
+
+ DisassociateRouteTable(*ec2.DisassociateRouteTableInput) (*ec2.DisassociateRouteTableOutput, error)
+
+ EnableVGWRoutePropagationRequest(*ec2.EnableVGWRoutePropagationInput) (*aws.Request, *ec2.EnableVGWRoutePropagationOutput)
+
+ EnableVGWRoutePropagation(*ec2.EnableVGWRoutePropagationInput) (*ec2.EnableVGWRoutePropagationOutput, error)
+
+ EnableVPCClassicLinkRequest(*ec2.EnableVPCClassicLinkInput) (*aws.Request, *ec2.EnableVPCClassicLinkOutput)
+
+ EnableVPCClassicLink(*ec2.EnableVPCClassicLinkInput) (*ec2.EnableVPCClassicLinkOutput, error)
+
+ EnableVolumeIORequest(*ec2.EnableVolumeIOInput) (*aws.Request, *ec2.EnableVolumeIOOutput)
+
+ EnableVolumeIO(*ec2.EnableVolumeIOInput) (*ec2.EnableVolumeIOOutput, error)
+
+ GetConsoleOutputRequest(*ec2.GetConsoleOutputInput) (*aws.Request, *ec2.GetConsoleOutputOutput)
+
+ GetConsoleOutput(*ec2.GetConsoleOutputInput) (*ec2.GetConsoleOutputOutput, error)
+
+ GetPasswordDataRequest(*ec2.GetPasswordDataInput) (*aws.Request, *ec2.GetPasswordDataOutput)
+
+ GetPasswordData(*ec2.GetPasswordDataInput) (*ec2.GetPasswordDataOutput, error)
+
+ ImportImageRequest(*ec2.ImportImageInput) (*aws.Request, *ec2.ImportImageOutput)
+
+ ImportImage(*ec2.ImportImageInput) (*ec2.ImportImageOutput, error)
+
+ ImportInstanceRequest(*ec2.ImportInstanceInput) (*aws.Request, *ec2.ImportInstanceOutput)
+
+ ImportInstance(*ec2.ImportInstanceInput) (*ec2.ImportInstanceOutput, error)
+
+ ImportKeyPairRequest(*ec2.ImportKeyPairInput) (*aws.Request, *ec2.ImportKeyPairOutput)
+
+ ImportKeyPair(*ec2.ImportKeyPairInput) (*ec2.ImportKeyPairOutput, error)
+
+ ImportSnapshotRequest(*ec2.ImportSnapshotInput) (*aws.Request, *ec2.ImportSnapshotOutput)
+
+ ImportSnapshot(*ec2.ImportSnapshotInput) (*ec2.ImportSnapshotOutput, error)
+
+ ImportVolumeRequest(*ec2.ImportVolumeInput) (*aws.Request, *ec2.ImportVolumeOutput)
+
+ ImportVolume(*ec2.ImportVolumeInput) (*ec2.ImportVolumeOutput, error)
+
+ ModifyImageAttributeRequest(*ec2.ModifyImageAttributeInput) (*aws.Request, *ec2.ModifyImageAttributeOutput)
+
+ ModifyImageAttribute(*ec2.ModifyImageAttributeInput) (*ec2.ModifyImageAttributeOutput, error)
+
+ ModifyInstanceAttributeRequest(*ec2.ModifyInstanceAttributeInput) (*aws.Request, *ec2.ModifyInstanceAttributeOutput)
+
+ ModifyInstanceAttribute(*ec2.ModifyInstanceAttributeInput) (*ec2.ModifyInstanceAttributeOutput, error)
+
+ ModifyNetworkInterfaceAttributeRequest(*ec2.ModifyNetworkInterfaceAttributeInput) (*aws.Request, *ec2.ModifyNetworkInterfaceAttributeOutput)
+
+ ModifyNetworkInterfaceAttribute(*ec2.ModifyNetworkInterfaceAttributeInput) (*ec2.ModifyNetworkInterfaceAttributeOutput, error)
+
+ ModifyReservedInstancesRequest(*ec2.ModifyReservedInstancesInput) (*aws.Request, *ec2.ModifyReservedInstancesOutput)
+
+ ModifyReservedInstances(*ec2.ModifyReservedInstancesInput) (*ec2.ModifyReservedInstancesOutput, error)
+
+ ModifySnapshotAttributeRequest(*ec2.ModifySnapshotAttributeInput) (*aws.Request, *ec2.ModifySnapshotAttributeOutput)
+
+ ModifySnapshotAttribute(*ec2.ModifySnapshotAttributeInput) (*ec2.ModifySnapshotAttributeOutput, error)
+
+ ModifySubnetAttributeRequest(*ec2.ModifySubnetAttributeInput) (*aws.Request, *ec2.ModifySubnetAttributeOutput)
+
+ ModifySubnetAttribute(*ec2.ModifySubnetAttributeInput) (*ec2.ModifySubnetAttributeOutput, error)
+
+ ModifyVPCAttributeRequest(*ec2.ModifyVPCAttributeInput) (*aws.Request, *ec2.ModifyVPCAttributeOutput)
+
+ ModifyVPCAttribute(*ec2.ModifyVPCAttributeInput) (*ec2.ModifyVPCAttributeOutput, error)
+
+ ModifyVPCEndpointRequest(*ec2.ModifyVPCEndpointInput) (*aws.Request, *ec2.ModifyVPCEndpointOutput)
+
+ ModifyVPCEndpoint(*ec2.ModifyVPCEndpointInput) (*ec2.ModifyVPCEndpointOutput, error)
+
+ ModifyVolumeAttributeRequest(*ec2.ModifyVolumeAttributeInput) (*aws.Request, *ec2.ModifyVolumeAttributeOutput)
+
+ ModifyVolumeAttribute(*ec2.ModifyVolumeAttributeInput) (*ec2.ModifyVolumeAttributeOutput, error)
+
+ MonitorInstancesRequest(*ec2.MonitorInstancesInput) (*aws.Request, *ec2.MonitorInstancesOutput)
+
+ MonitorInstances(*ec2.MonitorInstancesInput) (*ec2.MonitorInstancesOutput, error)
+
+ MoveAddressToVPCRequest(*ec2.MoveAddressToVPCInput) (*aws.Request, *ec2.MoveAddressToVPCOutput)
+
+ MoveAddressToVPC(*ec2.MoveAddressToVPCInput) (*ec2.MoveAddressToVPCOutput, error)
+
+ PurchaseReservedInstancesOfferingRequest(*ec2.PurchaseReservedInstancesOfferingInput) (*aws.Request, *ec2.PurchaseReservedInstancesOfferingOutput)
+
+ PurchaseReservedInstancesOffering(*ec2.PurchaseReservedInstancesOfferingInput) (*ec2.PurchaseReservedInstancesOfferingOutput, error)
+
+ RebootInstancesRequest(*ec2.RebootInstancesInput) (*aws.Request, *ec2.RebootInstancesOutput)
+
+ RebootInstances(*ec2.RebootInstancesInput) (*ec2.RebootInstancesOutput, error)
+
+ RegisterImageRequest(*ec2.RegisterImageInput) (*aws.Request, *ec2.RegisterImageOutput)
+
+ RegisterImage(*ec2.RegisterImageInput) (*ec2.RegisterImageOutput, error)
+
+ RejectVPCPeeringConnectionRequest(*ec2.RejectVPCPeeringConnectionInput) (*aws.Request, *ec2.RejectVPCPeeringConnectionOutput)
+
+ RejectVPCPeeringConnection(*ec2.RejectVPCPeeringConnectionInput) (*ec2.RejectVPCPeeringConnectionOutput, error)
+
+ ReleaseAddressRequest(*ec2.ReleaseAddressInput) (*aws.Request, *ec2.ReleaseAddressOutput)
+
+ ReleaseAddress(*ec2.ReleaseAddressInput) (*ec2.ReleaseAddressOutput, error)
+
+ ReplaceNetworkACLAssociationRequest(*ec2.ReplaceNetworkACLAssociationInput) (*aws.Request, *ec2.ReplaceNetworkACLAssociationOutput)
+
+ ReplaceNetworkACLAssociation(*ec2.ReplaceNetworkACLAssociationInput) (*ec2.ReplaceNetworkACLAssociationOutput, error)
+
+ ReplaceNetworkACLEntryRequest(*ec2.ReplaceNetworkACLEntryInput) (*aws.Request, *ec2.ReplaceNetworkACLEntryOutput)
+
+ ReplaceNetworkACLEntry(*ec2.ReplaceNetworkACLEntryInput) (*ec2.ReplaceNetworkACLEntryOutput, error)
+
+ ReplaceRouteRequest(*ec2.ReplaceRouteInput) (*aws.Request, *ec2.ReplaceRouteOutput)
+
+ ReplaceRoute(*ec2.ReplaceRouteInput) (*ec2.ReplaceRouteOutput, error)
+
+ ReplaceRouteTableAssociationRequest(*ec2.ReplaceRouteTableAssociationInput) (*aws.Request, *ec2.ReplaceRouteTableAssociationOutput)
+
+ ReplaceRouteTableAssociation(*ec2.ReplaceRouteTableAssociationInput) (*ec2.ReplaceRouteTableAssociationOutput, error)
+
+ ReportInstanceStatusRequest(*ec2.ReportInstanceStatusInput) (*aws.Request, *ec2.ReportInstanceStatusOutput)
+
+ ReportInstanceStatus(*ec2.ReportInstanceStatusInput) (*ec2.ReportInstanceStatusOutput, error)
+
+ RequestSpotFleetRequest(*ec2.RequestSpotFleetInput) (*aws.Request, *ec2.RequestSpotFleetOutput)
+
+ RequestSpotFleet(*ec2.RequestSpotFleetInput) (*ec2.RequestSpotFleetOutput, error)
+
+ RequestSpotInstancesRequest(*ec2.RequestSpotInstancesInput) (*aws.Request, *ec2.RequestSpotInstancesOutput)
+
+ RequestSpotInstances(*ec2.RequestSpotInstancesInput) (*ec2.RequestSpotInstancesOutput, error)
+
+ ResetImageAttributeRequest(*ec2.ResetImageAttributeInput) (*aws.Request, *ec2.ResetImageAttributeOutput)
+
+ ResetImageAttribute(*ec2.ResetImageAttributeInput) (*ec2.ResetImageAttributeOutput, error)
+
+ ResetInstanceAttributeRequest(*ec2.ResetInstanceAttributeInput) (*aws.Request, *ec2.ResetInstanceAttributeOutput)
+
+ ResetInstanceAttribute(*ec2.ResetInstanceAttributeInput) (*ec2.ResetInstanceAttributeOutput, error)
+
+ ResetNetworkInterfaceAttributeRequest(*ec2.ResetNetworkInterfaceAttributeInput) (*aws.Request, *ec2.ResetNetworkInterfaceAttributeOutput)
+
+ ResetNetworkInterfaceAttribute(*ec2.ResetNetworkInterfaceAttributeInput) (*ec2.ResetNetworkInterfaceAttributeOutput, error)
+
+ ResetSnapshotAttributeRequest(*ec2.ResetSnapshotAttributeInput) (*aws.Request, *ec2.ResetSnapshotAttributeOutput)
+
+ ResetSnapshotAttribute(*ec2.ResetSnapshotAttributeInput) (*ec2.ResetSnapshotAttributeOutput, error)
+
+ RestoreAddressToClassicRequest(*ec2.RestoreAddressToClassicInput) (*aws.Request, *ec2.RestoreAddressToClassicOutput)
+
+ RestoreAddressToClassic(*ec2.RestoreAddressToClassicInput) (*ec2.RestoreAddressToClassicOutput, error)
+
+ RevokeSecurityGroupEgressRequest(*ec2.RevokeSecurityGroupEgressInput) (*aws.Request, *ec2.RevokeSecurityGroupEgressOutput)
+
+ RevokeSecurityGroupEgress(*ec2.RevokeSecurityGroupEgressInput) (*ec2.RevokeSecurityGroupEgressOutput, error)
+
+ RevokeSecurityGroupIngressRequest(*ec2.RevokeSecurityGroupIngressInput) (*aws.Request, *ec2.RevokeSecurityGroupIngressOutput)
+
+ RevokeSecurityGroupIngress(*ec2.RevokeSecurityGroupIngressInput) (*ec2.RevokeSecurityGroupIngressOutput, error)
+
+ RunInstancesRequest(*ec2.RunInstancesInput) (*aws.Request, *ec2.Reservation)
+
+ RunInstances(*ec2.RunInstancesInput) (*ec2.Reservation, error)
+
+ StartInstancesRequest(*ec2.StartInstancesInput) (*aws.Request, *ec2.StartInstancesOutput)
+
+ StartInstances(*ec2.StartInstancesInput) (*ec2.StartInstancesOutput, error)
+
+ StopInstancesRequest(*ec2.StopInstancesInput) (*aws.Request, *ec2.StopInstancesOutput)
+
+ StopInstances(*ec2.StopInstancesInput) (*ec2.StopInstancesOutput, error)
+
+ TerminateInstancesRequest(*ec2.TerminateInstancesInput) (*aws.Request, *ec2.TerminateInstancesOutput)
+
+ TerminateInstances(*ec2.TerminateInstancesInput) (*ec2.TerminateInstancesOutput, error)
+
+ UnassignPrivateIPAddressesRequest(*ec2.UnassignPrivateIPAddressesInput) (*aws.Request, *ec2.UnassignPrivateIPAddressesOutput)
+
+ UnassignPrivateIPAddresses(*ec2.UnassignPrivateIPAddressesInput) (*ec2.UnassignPrivateIPAddressesOutput, error)
+
+ UnmonitorInstancesRequest(*ec2.UnmonitorInstancesInput) (*aws.Request, *ec2.UnmonitorInstancesOutput)
+
+ UnmonitorInstances(*ec2.UnmonitorInstancesInput) (*ec2.UnmonitorInstancesOutput, error)
+}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/ec2iface/interface_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/ec2iface/interface_test.go
new file mode 100644
index 00000000000..3941d260db0
--- /dev/null
+++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/ec2iface/interface_test.go
@@ -0,0 +1,15 @@
+// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+
+package ec2iface_test
+
+import (
+ "testing"
+
+ "github.com/aws/aws-sdk-go/service/ec2"
+ "github.com/aws/aws-sdk-go/service/ec2/ec2iface"
+ "github.com/stretchr/testify/assert"
+)
+
+func TestInterface(t *testing.T) {
+ assert.Implements(t, (*ec2iface.EC2API)(nil), ec2.New(nil))
+}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/examples_test.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/examples_test.go
new file mode 100644
index 00000000000..01840e53938
--- /dev/null
+++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/examples_test.go
@@ -0,0 +1,6619 @@
+// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+
+package ec2_test
+
+import (
+ "bytes"
+ "fmt"
+ "time"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/aws/awserr"
+ "github.com/aws/aws-sdk-go/aws/awsutil"
+ "github.com/aws/aws-sdk-go/service/ec2"
+)
+
+var _ time.Duration
+var _ bytes.Buffer
+
+func ExampleEC2_AcceptVPCPeeringConnection() {
+ svc := ec2.New(nil)
+
+ params := &ec2.AcceptVPCPeeringConnectionInput{
+ DryRun: aws.Bool(true),
+ VPCPeeringConnectionID: aws.String("String"),
+ }
+ resp, err := svc.AcceptVPCPeeringConnection(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_AllocateAddress() {
+ svc := ec2.New(nil)
+
+ params := &ec2.AllocateAddressInput{
+ Domain: aws.String("DomainType"),
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.AllocateAddress(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_AssignPrivateIPAddresses() {
+ svc := ec2.New(nil)
+
+ params := &ec2.AssignPrivateIPAddressesInput{
+ NetworkInterfaceID: aws.String("String"), // Required
+ AllowReassignment: aws.Bool(true),
+ PrivateIPAddresses: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ SecondaryPrivateIPAddressCount: aws.Int64(1),
+ }
+ resp, err := svc.AssignPrivateIPAddresses(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_AssociateAddress() {
+ svc := ec2.New(nil)
+
+ params := &ec2.AssociateAddressInput{
+ AllocationID: aws.String("String"),
+ AllowReassociation: aws.Bool(true),
+ DryRun: aws.Bool(true),
+ InstanceID: aws.String("String"),
+ NetworkInterfaceID: aws.String("String"),
+ PrivateIPAddress: aws.String("String"),
+ PublicIP: aws.String("String"),
+ }
+ resp, err := svc.AssociateAddress(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_AssociateDHCPOptions() {
+ svc := ec2.New(nil)
+
+ params := &ec2.AssociateDHCPOptionsInput{
+ DHCPOptionsID: aws.String("String"), // Required
+ VPCID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.AssociateDHCPOptions(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_AssociateRouteTable() {
+ svc := ec2.New(nil)
+
+ params := &ec2.AssociateRouteTableInput{
+ RouteTableID: aws.String("String"), // Required
+ SubnetID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.AssociateRouteTable(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_AttachClassicLinkVPC() {
+ svc := ec2.New(nil)
+
+ params := &ec2.AttachClassicLinkVPCInput{
+ Groups: []*string{ // Required
+ aws.String("String"), // Required
+ // More values...
+ },
+ InstanceID: aws.String("String"), // Required
+ VPCID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.AttachClassicLinkVPC(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_AttachInternetGateway() {
+ svc := ec2.New(nil)
+
+ params := &ec2.AttachInternetGatewayInput{
+ InternetGatewayID: aws.String("String"), // Required
+ VPCID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.AttachInternetGateway(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_AttachNetworkInterface() {
+ svc := ec2.New(nil)
+
+ params := &ec2.AttachNetworkInterfaceInput{
+ DeviceIndex: aws.Int64(1), // Required
+ InstanceID: aws.String("String"), // Required
+ NetworkInterfaceID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.AttachNetworkInterface(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_AttachVPNGateway() {
+ svc := ec2.New(nil)
+
+ params := &ec2.AttachVPNGatewayInput{
+ VPCID: aws.String("String"), // Required
+ VPNGatewayID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.AttachVPNGateway(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_AttachVolume() {
+ svc := ec2.New(nil)
+
+ params := &ec2.AttachVolumeInput{
+ Device: aws.String("String"), // Required
+ InstanceID: aws.String("String"), // Required
+ VolumeID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.AttachVolume(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_AuthorizeSecurityGroupEgress() {
+ svc := ec2.New(nil)
+
+ params := &ec2.AuthorizeSecurityGroupEgressInput{
+ GroupID: aws.String("String"), // Required
+ CIDRIP: aws.String("String"),
+ DryRun: aws.Bool(true),
+ FromPort: aws.Int64(1),
+ IPPermissions: []*ec2.IPPermission{
+ { // Required
+ FromPort: aws.Int64(1),
+ IPProtocol: aws.String("String"),
+ IPRanges: []*ec2.IPRange{
+ { // Required
+ CIDRIP: aws.String("String"),
+ },
+ // More values...
+ },
+ PrefixListIDs: []*ec2.PrefixListID{
+ { // Required
+ PrefixListID: aws.String("String"),
+ },
+ // More values...
+ },
+ ToPort: aws.Int64(1),
+ UserIDGroupPairs: []*ec2.UserIDGroupPair{
+ { // Required
+ GroupID: aws.String("String"),
+ GroupName: aws.String("String"),
+ UserID: aws.String("String"),
+ },
+ // More values...
+ },
+ },
+ // More values...
+ },
+ IPProtocol: aws.String("String"),
+ SourceSecurityGroupName: aws.String("String"),
+ SourceSecurityGroupOwnerID: aws.String("String"),
+ ToPort: aws.Int64(1),
+ }
+ resp, err := svc.AuthorizeSecurityGroupEgress(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_AuthorizeSecurityGroupIngress() {
+ svc := ec2.New(nil)
+
+ params := &ec2.AuthorizeSecurityGroupIngressInput{
+ CIDRIP: aws.String("String"),
+ DryRun: aws.Bool(true),
+ FromPort: aws.Int64(1),
+ GroupID: aws.String("String"),
+ GroupName: aws.String("String"),
+ IPPermissions: []*ec2.IPPermission{
+ { // Required
+ FromPort: aws.Int64(1),
+ IPProtocol: aws.String("String"),
+ IPRanges: []*ec2.IPRange{
+ { // Required
+ CIDRIP: aws.String("String"),
+ },
+ // More values...
+ },
+ PrefixListIDs: []*ec2.PrefixListID{
+ { // Required
+ PrefixListID: aws.String("String"),
+ },
+ // More values...
+ },
+ ToPort: aws.Int64(1),
+ UserIDGroupPairs: []*ec2.UserIDGroupPair{
+ { // Required
+ GroupID: aws.String("String"),
+ GroupName: aws.String("String"),
+ UserID: aws.String("String"),
+ },
+ // More values...
+ },
+ },
+ // More values...
+ },
+ IPProtocol: aws.String("String"),
+ SourceSecurityGroupName: aws.String("String"),
+ SourceSecurityGroupOwnerID: aws.String("String"),
+ ToPort: aws.Int64(1),
+ }
+ resp, err := svc.AuthorizeSecurityGroupIngress(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_BundleInstance() {
+ svc := ec2.New(nil)
+
+ params := &ec2.BundleInstanceInput{
+ InstanceID: aws.String("String"), // Required
+ Storage: &ec2.Storage{ // Required
+ S3: &ec2.S3Storage{
+ AWSAccessKeyID: aws.String("String"),
+ Bucket: aws.String("String"),
+ Prefix: aws.String("String"),
+ UploadPolicy: []byte("PAYLOAD"),
+ UploadPolicySignature: aws.String("String"),
+ },
+ },
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.BundleInstance(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CancelBundleTask() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CancelBundleTaskInput{
+ BundleID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.CancelBundleTask(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CancelConversionTask() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CancelConversionTaskInput{
+ ConversionTaskID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ ReasonMessage: aws.String("String"),
+ }
+ resp, err := svc.CancelConversionTask(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CancelExportTask() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CancelExportTaskInput{
+ ExportTaskID: aws.String("String"), // Required
+ }
+ resp, err := svc.CancelExportTask(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CancelImportTask() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CancelImportTaskInput{
+ CancelReason: aws.String("String"),
+ DryRun: aws.Bool(true),
+ ImportTaskID: aws.String("String"),
+ }
+ resp, err := svc.CancelImportTask(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CancelReservedInstancesListing() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CancelReservedInstancesListingInput{
+ ReservedInstancesListingID: aws.String("String"), // Required
+ }
+ resp, err := svc.CancelReservedInstancesListing(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CancelSpotFleetRequests() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CancelSpotFleetRequestsInput{
+ SpotFleetRequestIDs: []*string{ // Required
+ aws.String("String"), // Required
+ // More values...
+ },
+ TerminateInstances: aws.Bool(true), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.CancelSpotFleetRequests(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CancelSpotInstanceRequests() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CancelSpotInstanceRequestsInput{
+ SpotInstanceRequestIDs: []*string{ // Required
+ aws.String("String"), // Required
+ // More values...
+ },
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.CancelSpotInstanceRequests(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_ConfirmProductInstance() {
+ svc := ec2.New(nil)
+
+ params := &ec2.ConfirmProductInstanceInput{
+ InstanceID: aws.String("String"), // Required
+ ProductCode: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.ConfirmProductInstance(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CopyImage() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CopyImageInput{
+ Name: aws.String("String"), // Required
+ SourceImageID: aws.String("String"), // Required
+ SourceRegion: aws.String("String"), // Required
+ ClientToken: aws.String("String"),
+ Description: aws.String("String"),
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.CopyImage(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CopySnapshot() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CopySnapshotInput{
+ SourceRegion: aws.String("String"), // Required
+ SourceSnapshotID: aws.String("String"), // Required
+ Description: aws.String("String"),
+ DestinationRegion: aws.String("String"),
+ DryRun: aws.Bool(true),
+ Encrypted: aws.Bool(true),
+ KMSKeyID: aws.String("String"),
+ PresignedURL: aws.String("String"),
+ }
+ resp, err := svc.CopySnapshot(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CreateCustomerGateway() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CreateCustomerGatewayInput{
+ BGPASN: aws.Int64(1), // Required
+ PublicIP: aws.String("String"), // Required
+ Type: aws.String("GatewayType"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.CreateCustomerGateway(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CreateDHCPOptions() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CreateDHCPOptionsInput{
+ DHCPConfigurations: []*ec2.NewDHCPConfiguration{ // Required
+ { // Required
+ Key: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.CreateDHCPOptions(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CreateFlowLogs() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CreateFlowLogsInput{
+ DeliverLogsPermissionARN: aws.String("String"), // Required
+ LogGroupName: aws.String("String"), // Required
+ ResourceIDs: []*string{ // Required
+ aws.String("String"), // Required
+ // More values...
+ },
+ ResourceType: aws.String("FlowLogsResourceType"), // Required
+ TrafficType: aws.String("TrafficType"), // Required
+ ClientToken: aws.String("String"),
+ }
+ resp, err := svc.CreateFlowLogs(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CreateImage() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CreateImageInput{
+ InstanceID: aws.String("String"), // Required
+ Name: aws.String("String"), // Required
+ BlockDeviceMappings: []*ec2.BlockDeviceMapping{
+ { // Required
+ DeviceName: aws.String("String"),
+ EBS: &ec2.EBSBlockDevice{
+ DeleteOnTermination: aws.Bool(true),
+ Encrypted: aws.Bool(true),
+ IOPS: aws.Int64(1),
+ SnapshotID: aws.String("String"),
+ VolumeSize: aws.Int64(1),
+ VolumeType: aws.String("VolumeType"),
+ },
+ NoDevice: aws.String("String"),
+ VirtualName: aws.String("String"),
+ },
+ // More values...
+ },
+ Description: aws.String("String"),
+ DryRun: aws.Bool(true),
+ NoReboot: aws.Bool(true),
+ }
+ resp, err := svc.CreateImage(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CreateInstanceExportTask() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CreateInstanceExportTaskInput{
+ InstanceID: aws.String("String"), // Required
+ Description: aws.String("String"),
+ ExportToS3Task: &ec2.ExportToS3TaskSpecification{
+ ContainerFormat: aws.String("ContainerFormat"),
+ DiskImageFormat: aws.String("DiskImageFormat"),
+ S3Bucket: aws.String("String"),
+ S3Prefix: aws.String("String"),
+ },
+ TargetEnvironment: aws.String("ExportEnvironment"),
+ }
+ resp, err := svc.CreateInstanceExportTask(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CreateInternetGateway() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CreateInternetGatewayInput{
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.CreateInternetGateway(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CreateKeyPair() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CreateKeyPairInput{
+ KeyName: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.CreateKeyPair(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CreateNetworkACL() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CreateNetworkACLInput{
+ VPCID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.CreateNetworkACL(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CreateNetworkACLEntry() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CreateNetworkACLEntryInput{
+ CIDRBlock: aws.String("String"), // Required
+ Egress: aws.Bool(true), // Required
+ NetworkACLID: aws.String("String"), // Required
+ Protocol: aws.String("String"), // Required
+ RuleAction: aws.String("RuleAction"), // Required
+ RuleNumber: aws.Int64(1), // Required
+ DryRun: aws.Bool(true),
+ ICMPTypeCode: &ec2.ICMPTypeCode{
+ Code: aws.Int64(1),
+ Type: aws.Int64(1),
+ },
+ PortRange: &ec2.PortRange{
+ From: aws.Int64(1),
+ To: aws.Int64(1),
+ },
+ }
+ resp, err := svc.CreateNetworkACLEntry(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CreateNetworkInterface() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CreateNetworkInterfaceInput{
+ SubnetID: aws.String("String"), // Required
+ Description: aws.String("String"),
+ DryRun: aws.Bool(true),
+ Groups: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ PrivateIPAddress: aws.String("String"),
+ PrivateIPAddresses: []*ec2.PrivateIPAddressSpecification{
+ { // Required
+ PrivateIPAddress: aws.String("String"), // Required
+ Primary: aws.Bool(true),
+ },
+ // More values...
+ },
+ SecondaryPrivateIPAddressCount: aws.Int64(1),
+ }
+ resp, err := svc.CreateNetworkInterface(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CreatePlacementGroup() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CreatePlacementGroupInput{
+ GroupName: aws.String("String"), // Required
+ Strategy: aws.String("PlacementStrategy"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.CreatePlacementGroup(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CreateReservedInstancesListing() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CreateReservedInstancesListingInput{
+ ClientToken: aws.String("String"), // Required
+ InstanceCount: aws.Int64(1), // Required
+ PriceSchedules: []*ec2.PriceScheduleSpecification{ // Required
+ { // Required
+ CurrencyCode: aws.String("CurrencyCodeValues"),
+ Price: aws.Float64(1.0),
+ Term: aws.Int64(1),
+ },
+ // More values...
+ },
+ ReservedInstancesID: aws.String("String"), // Required
+ }
+ resp, err := svc.CreateReservedInstancesListing(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CreateRoute() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CreateRouteInput{
+ DestinationCIDRBlock: aws.String("String"), // Required
+ RouteTableID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ GatewayID: aws.String("String"),
+ InstanceID: aws.String("String"),
+ NetworkInterfaceID: aws.String("String"),
+ VPCPeeringConnectionID: aws.String("String"),
+ }
+ resp, err := svc.CreateRoute(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CreateRouteTable() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CreateRouteTableInput{
+ VPCID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.CreateRouteTable(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CreateSecurityGroup() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CreateSecurityGroupInput{
+ Description: aws.String("String"), // Required
+ GroupName: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ VPCID: aws.String("String"),
+ }
+ resp, err := svc.CreateSecurityGroup(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CreateSnapshot() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CreateSnapshotInput{
+ VolumeID: aws.String("String"), // Required
+ Description: aws.String("String"),
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.CreateSnapshot(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CreateSpotDatafeedSubscription() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CreateSpotDatafeedSubscriptionInput{
+ Bucket: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ Prefix: aws.String("String"),
+ }
+ resp, err := svc.CreateSpotDatafeedSubscription(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CreateSubnet() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CreateSubnetInput{
+ CIDRBlock: aws.String("String"), // Required
+ VPCID: aws.String("String"), // Required
+ AvailabilityZone: aws.String("String"),
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.CreateSubnet(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CreateTags() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CreateTagsInput{
+ Resources: []*string{ // Required
+ aws.String("String"), // Required
+ // More values...
+ },
+ Tags: []*ec2.Tag{ // Required
+ { // Required
+ Key: aws.String("String"),
+ Value: aws.String("String"),
+ },
+ // More values...
+ },
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.CreateTags(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CreateVPC() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CreateVPCInput{
+ CIDRBlock: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ InstanceTenancy: aws.String("Tenancy"),
+ }
+ resp, err := svc.CreateVPC(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CreateVPCEndpoint() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CreateVPCEndpointInput{
+ ServiceName: aws.String("String"), // Required
+ VPCID: aws.String("String"), // Required
+ ClientToken: aws.String("String"),
+ DryRun: aws.Bool(true),
+ PolicyDocument: aws.String("String"),
+ RouteTableIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.CreateVPCEndpoint(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CreateVPCPeeringConnection() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CreateVPCPeeringConnectionInput{
+ DryRun: aws.Bool(true),
+ PeerOwnerID: aws.String("String"),
+ PeerVPCID: aws.String("String"),
+ VPCID: aws.String("String"),
+ }
+ resp, err := svc.CreateVPCPeeringConnection(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CreateVPNConnection() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CreateVPNConnectionInput{
+ CustomerGatewayID: aws.String("String"), // Required
+ Type: aws.String("String"), // Required
+ VPNGatewayID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ Options: &ec2.VPNConnectionOptionsSpecification{
+ StaticRoutesOnly: aws.Bool(true),
+ },
+ }
+ resp, err := svc.CreateVPNConnection(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CreateVPNConnectionRoute() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CreateVPNConnectionRouteInput{
+ DestinationCIDRBlock: aws.String("String"), // Required
+ VPNConnectionID: aws.String("String"), // Required
+ }
+ resp, err := svc.CreateVPNConnectionRoute(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CreateVPNGateway() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CreateVPNGatewayInput{
+ Type: aws.String("GatewayType"), // Required
+ AvailabilityZone: aws.String("String"),
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.CreateVPNGateway(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_CreateVolume() {
+ svc := ec2.New(nil)
+
+ params := &ec2.CreateVolumeInput{
+ AvailabilityZone: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ Encrypted: aws.Bool(true),
+ IOPS: aws.Int64(1),
+ KMSKeyID: aws.String("String"),
+ Size: aws.Int64(1),
+ SnapshotID: aws.String("String"),
+ VolumeType: aws.String("VolumeType"),
+ }
+ resp, err := svc.CreateVolume(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DeleteCustomerGateway() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DeleteCustomerGatewayInput{
+ CustomerGatewayID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DeleteCustomerGateway(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DeleteDHCPOptions() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DeleteDHCPOptionsInput{
+ DHCPOptionsID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DeleteDHCPOptions(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DeleteFlowLogs() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DeleteFlowLogsInput{
+ FlowLogIDs: []*string{ // Required
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DeleteFlowLogs(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DeleteInternetGateway() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DeleteInternetGatewayInput{
+ InternetGatewayID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DeleteInternetGateway(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DeleteKeyPair() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DeleteKeyPairInput{
+ KeyName: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DeleteKeyPair(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DeleteNetworkACL() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DeleteNetworkACLInput{
+ NetworkACLID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DeleteNetworkACL(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DeleteNetworkACLEntry() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DeleteNetworkACLEntryInput{
+ Egress: aws.Bool(true), // Required
+ NetworkACLID: aws.String("String"), // Required
+ RuleNumber: aws.Int64(1), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DeleteNetworkACLEntry(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DeleteNetworkInterface() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DeleteNetworkInterfaceInput{
+ NetworkInterfaceID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DeleteNetworkInterface(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DeletePlacementGroup() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DeletePlacementGroupInput{
+ GroupName: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DeletePlacementGroup(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DeleteRoute() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DeleteRouteInput{
+ DestinationCIDRBlock: aws.String("String"), // Required
+ RouteTableID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DeleteRoute(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DeleteRouteTable() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DeleteRouteTableInput{
+ RouteTableID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DeleteRouteTable(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DeleteSecurityGroup() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DeleteSecurityGroupInput{
+ DryRun: aws.Bool(true),
+ GroupID: aws.String("String"),
+ GroupName: aws.String("String"),
+ }
+ resp, err := svc.DeleteSecurityGroup(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DeleteSnapshot() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DeleteSnapshotInput{
+ SnapshotID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DeleteSnapshot(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DeleteSpotDatafeedSubscription() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DeleteSpotDatafeedSubscriptionInput{
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DeleteSpotDatafeedSubscription(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DeleteSubnet() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DeleteSubnetInput{
+ SubnetID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DeleteSubnet(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DeleteTags() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DeleteTagsInput{
+ Resources: []*string{ // Required
+ aws.String("String"), // Required
+ // More values...
+ },
+ DryRun: aws.Bool(true),
+ Tags: []*ec2.Tag{
+ { // Required
+ Key: aws.String("String"),
+ Value: aws.String("String"),
+ },
+ // More values...
+ },
+ }
+ resp, err := svc.DeleteTags(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DeleteVPC() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DeleteVPCInput{
+ VPCID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DeleteVPC(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DeleteVPCEndpoints() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DeleteVPCEndpointsInput{
+ VPCEndpointIDs: []*string{ // Required
+ aws.String("String"), // Required
+ // More values...
+ },
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DeleteVPCEndpoints(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DeleteVPCPeeringConnection() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DeleteVPCPeeringConnectionInput{
+ VPCPeeringConnectionID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DeleteVPCPeeringConnection(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DeleteVPNConnection() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DeleteVPNConnectionInput{
+ VPNConnectionID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DeleteVPNConnection(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DeleteVPNConnectionRoute() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DeleteVPNConnectionRouteInput{
+ DestinationCIDRBlock: aws.String("String"), // Required
+ VPNConnectionID: aws.String("String"), // Required
+ }
+ resp, err := svc.DeleteVPNConnectionRoute(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DeleteVPNGateway() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DeleteVPNGatewayInput{
+ VPNGatewayID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DeleteVPNGateway(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DeleteVolume() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DeleteVolumeInput{
+ VolumeID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DeleteVolume(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DeregisterImage() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DeregisterImageInput{
+ ImageID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DeregisterImage(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeAccountAttributes() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeAccountAttributesInput{
+ AttributeNames: []*string{
+ aws.String("AccountAttributeName"), // Required
+ // More values...
+ },
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DescribeAccountAttributes(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeAddresses() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeAddressesInput{
+ AllocationIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ PublicIPs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeAddresses(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeAvailabilityZones() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeAvailabilityZonesInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ ZoneNames: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeAvailabilityZones(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeBundleTasks() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeBundleTasksInput{
+ BundleIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeBundleTasks(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeClassicLinkInstances() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeClassicLinkInstancesInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ InstanceIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ MaxResults: aws.Int64(1),
+ NextToken: aws.String("String"),
+ }
+ resp, err := svc.DescribeClassicLinkInstances(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeConversionTasks() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeConversionTasksInput{
+ ConversionTaskIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeConversionTasks(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeCustomerGateways() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeCustomerGatewaysInput{
+ CustomerGatewayIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeCustomerGateways(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeDHCPOptions() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeDHCPOptionsInput{
+ DHCPOptionsIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeDHCPOptions(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeExportTasks() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeExportTasksInput{
+ ExportTaskIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeExportTasks(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeFlowLogs() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeFlowLogsInput{
+ Filter: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ FlowLogIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ MaxResults: aws.Int64(1),
+ NextToken: aws.String("String"),
+ }
+ resp, err := svc.DescribeFlowLogs(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeImageAttribute() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeImageAttributeInput{
+ Attribute: aws.String("ImageAttributeName"), // Required
+ ImageID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DescribeImageAttribute(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeImages() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeImagesInput{
+ DryRun: aws.Bool(true),
+ ExecutableUsers: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ ImageIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ Owners: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeImages(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeImportImageTasks() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeImportImageTasksInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ ImportTaskIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ MaxResults: aws.Int64(1),
+ NextToken: aws.String("String"),
+ }
+ resp, err := svc.DescribeImportImageTasks(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeImportSnapshotTasks() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeImportSnapshotTasksInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ ImportTaskIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ MaxResults: aws.Int64(1),
+ NextToken: aws.String("String"),
+ }
+ resp, err := svc.DescribeImportSnapshotTasks(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeInstanceAttribute() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeInstanceAttributeInput{
+ Attribute: aws.String("InstanceAttributeName"), // Required
+ InstanceID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DescribeInstanceAttribute(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeInstanceStatus() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeInstanceStatusInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ IncludeAllInstances: aws.Bool(true),
+ InstanceIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ MaxResults: aws.Int64(1),
+ NextToken: aws.String("String"),
+ }
+ resp, err := svc.DescribeInstanceStatus(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeInstances() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeInstancesInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ InstanceIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ MaxResults: aws.Int64(1),
+ NextToken: aws.String("String"),
+ }
+ resp, err := svc.DescribeInstances(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeInternetGateways() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeInternetGatewaysInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ InternetGatewayIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeInternetGateways(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeKeyPairs() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeKeyPairsInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ KeyNames: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeKeyPairs(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeMovingAddresses() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeMovingAddressesInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ MaxResults: aws.Int64(1),
+ NextToken: aws.String("String"),
+ PublicIPs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeMovingAddresses(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeNetworkACLs() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeNetworkACLsInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ NetworkACLIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeNetworkACLs(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeNetworkInterfaceAttribute() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeNetworkInterfaceAttributeInput{
+ NetworkInterfaceID: aws.String("String"), // Required
+ Attribute: aws.String("NetworkInterfaceAttribute"),
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DescribeNetworkInterfaceAttribute(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeNetworkInterfaces() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeNetworkInterfacesInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ NetworkInterfaceIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeNetworkInterfaces(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribePlacementGroups() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribePlacementGroupsInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ GroupNames: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribePlacementGroups(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribePrefixLists() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribePrefixListsInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ MaxResults: aws.Int64(1),
+ NextToken: aws.String("String"),
+ PrefixListIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribePrefixLists(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeRegions() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeRegionsInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ RegionNames: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeRegions(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeReservedInstances() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeReservedInstancesInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ OfferingType: aws.String("OfferingTypeValues"),
+ ReservedInstancesIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeReservedInstances(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeReservedInstancesListings() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeReservedInstancesListingsInput{
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ ReservedInstancesID: aws.String("String"),
+ ReservedInstancesListingID: aws.String("String"),
+ }
+ resp, err := svc.DescribeReservedInstancesListings(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeReservedInstancesModifications() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeReservedInstancesModificationsInput{
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ NextToken: aws.String("String"),
+ ReservedInstancesModificationIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeReservedInstancesModifications(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeReservedInstancesOfferings() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeReservedInstancesOfferingsInput{
+ AvailabilityZone: aws.String("String"),
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ IncludeMarketplace: aws.Bool(true),
+ InstanceTenancy: aws.String("Tenancy"),
+ InstanceType: aws.String("InstanceType"),
+ MaxDuration: aws.Int64(1),
+ MaxInstanceCount: aws.Int64(1),
+ MaxResults: aws.Int64(1),
+ MinDuration: aws.Int64(1),
+ NextToken: aws.String("String"),
+ OfferingType: aws.String("OfferingTypeValues"),
+ ProductDescription: aws.String("RIProductDescription"),
+ ReservedInstancesOfferingIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeReservedInstancesOfferings(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeRouteTables() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeRouteTablesInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ RouteTableIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeRouteTables(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeSecurityGroups() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeSecurityGroupsInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ GroupIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ GroupNames: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeSecurityGroups(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeSnapshotAttribute() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeSnapshotAttributeInput{
+ Attribute: aws.String("SnapshotAttributeName"), // Required
+ SnapshotID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DescribeSnapshotAttribute(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeSnapshots() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeSnapshotsInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ MaxResults: aws.Int64(1),
+ NextToken: aws.String("String"),
+ OwnerIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ RestorableByUserIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ SnapshotIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeSnapshots(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeSpotDatafeedSubscription() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeSpotDatafeedSubscriptionInput{
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DescribeSpotDatafeedSubscription(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeSpotFleetInstances() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeSpotFleetInstancesInput{
+ SpotFleetRequestID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ MaxResults: aws.Int64(1),
+ NextToken: aws.String("String"),
+ }
+ resp, err := svc.DescribeSpotFleetInstances(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeSpotFleetRequestHistory() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeSpotFleetRequestHistoryInput{
+ SpotFleetRequestID: aws.String("String"), // Required
+ StartTime: aws.Time(time.Now()), // Required
+ DryRun: aws.Bool(true),
+ EventType: aws.String("EventType"),
+ MaxResults: aws.Int64(1),
+ NextToken: aws.String("String"),
+ }
+ resp, err := svc.DescribeSpotFleetRequestHistory(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeSpotFleetRequests() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeSpotFleetRequestsInput{
+ DryRun: aws.Bool(true),
+ MaxResults: aws.Int64(1),
+ NextToken: aws.String("String"),
+ SpotFleetRequestIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeSpotFleetRequests(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeSpotInstanceRequests() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeSpotInstanceRequestsInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ SpotInstanceRequestIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeSpotInstanceRequests(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeSpotPriceHistory() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeSpotPriceHistoryInput{
+ AvailabilityZone: aws.String("String"),
+ DryRun: aws.Bool(true),
+ EndTime: aws.Time(time.Now()),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ InstanceTypes: []*string{
+ aws.String("InstanceType"), // Required
+ // More values...
+ },
+ MaxResults: aws.Int64(1),
+ NextToken: aws.String("String"),
+ ProductDescriptions: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ StartTime: aws.Time(time.Now()),
+ }
+ resp, err := svc.DescribeSpotPriceHistory(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeSubnets() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeSubnetsInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ SubnetIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeSubnets(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeTags() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeTagsInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ MaxResults: aws.Int64(1),
+ NextToken: aws.String("String"),
+ }
+ resp, err := svc.DescribeTags(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeVPCAttribute() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeVPCAttributeInput{
+ VPCID: aws.String("String"), // Required
+ Attribute: aws.String("VpcAttributeName"),
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DescribeVPCAttribute(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeVPCClassicLink() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeVPCClassicLinkInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ VPCIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeVPCClassicLink(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeVPCEndpointServices() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeVPCEndpointServicesInput{
+ DryRun: aws.Bool(true),
+ MaxResults: aws.Int64(1),
+ NextToken: aws.String("String"),
+ }
+ resp, err := svc.DescribeVPCEndpointServices(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeVPCEndpoints() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeVPCEndpointsInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ MaxResults: aws.Int64(1),
+ NextToken: aws.String("String"),
+ VPCEndpointIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeVPCEndpoints(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeVPCPeeringConnections() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeVPCPeeringConnectionsInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ VPCPeeringConnectionIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeVPCPeeringConnections(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeVPCs() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeVPCsInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ VPCIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeVPCs(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeVPNConnections() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeVPNConnectionsInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ VPNConnectionIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeVPNConnections(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeVPNGateways() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeVPNGatewaysInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ VPNGatewayIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeVPNGateways(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeVolumeAttribute() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeVolumeAttributeInput{
+ VolumeID: aws.String("String"), // Required
+ Attribute: aws.String("VolumeAttributeName"),
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DescribeVolumeAttribute(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeVolumeStatus() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeVolumeStatusInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ MaxResults: aws.Int64(1),
+ NextToken: aws.String("String"),
+ VolumeIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeVolumeStatus(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DescribeVolumes() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DescribeVolumesInput{
+ DryRun: aws.Bool(true),
+ Filters: []*ec2.Filter{
+ { // Required
+ Name: aws.String("String"),
+ Values: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ },
+ // More values...
+ },
+ MaxResults: aws.Int64(1),
+ NextToken: aws.String("String"),
+ VolumeIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.DescribeVolumes(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DetachClassicLinkVPC() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DetachClassicLinkVPCInput{
+ InstanceID: aws.String("String"), // Required
+ VPCID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DetachClassicLinkVPC(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DetachInternetGateway() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DetachInternetGatewayInput{
+ InternetGatewayID: aws.String("String"), // Required
+ VPCID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DetachInternetGateway(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DetachNetworkInterface() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DetachNetworkInterfaceInput{
+ AttachmentID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ Force: aws.Bool(true),
+ }
+ resp, err := svc.DetachNetworkInterface(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DetachVPNGateway() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DetachVPNGatewayInput{
+ VPCID: aws.String("String"), // Required
+ VPNGatewayID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DetachVPNGateway(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DetachVolume() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DetachVolumeInput{
+ VolumeID: aws.String("String"), // Required
+ Device: aws.String("String"),
+ DryRun: aws.Bool(true),
+ Force: aws.Bool(true),
+ InstanceID: aws.String("String"),
+ }
+ resp, err := svc.DetachVolume(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DisableVGWRoutePropagation() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DisableVGWRoutePropagationInput{
+ GatewayID: aws.String("String"), // Required
+ RouteTableID: aws.String("String"), // Required
+ }
+ resp, err := svc.DisableVGWRoutePropagation(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DisableVPCClassicLink() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DisableVPCClassicLinkInput{
+ VPCID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DisableVPCClassicLink(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DisassociateAddress() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DisassociateAddressInput{
+ AssociationID: aws.String("String"),
+ DryRun: aws.Bool(true),
+ PublicIP: aws.String("String"),
+ }
+ resp, err := svc.DisassociateAddress(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_DisassociateRouteTable() {
+ svc := ec2.New(nil)
+
+ params := &ec2.DisassociateRouteTableInput{
+ AssociationID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.DisassociateRouteTable(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_EnableVGWRoutePropagation() {
+ svc := ec2.New(nil)
+
+ params := &ec2.EnableVGWRoutePropagationInput{
+ GatewayID: aws.String("String"), // Required
+ RouteTableID: aws.String("String"), // Required
+ }
+ resp, err := svc.EnableVGWRoutePropagation(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_EnableVPCClassicLink() {
+ svc := ec2.New(nil)
+
+ params := &ec2.EnableVPCClassicLinkInput{
+ VPCID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.EnableVPCClassicLink(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_EnableVolumeIO() {
+ svc := ec2.New(nil)
+
+ params := &ec2.EnableVolumeIOInput{
+ VolumeID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.EnableVolumeIO(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_GetConsoleOutput() {
+ svc := ec2.New(nil)
+
+ params := &ec2.GetConsoleOutputInput{
+ InstanceID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.GetConsoleOutput(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_GetPasswordData() {
+ svc := ec2.New(nil)
+
+ params := &ec2.GetPasswordDataInput{
+ InstanceID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.GetPasswordData(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_ImportImage() {
+ svc := ec2.New(nil)
+
+ params := &ec2.ImportImageInput{
+ Architecture: aws.String("String"),
+ ClientData: &ec2.ClientData{
+ Comment: aws.String("String"),
+ UploadEnd: aws.Time(time.Now()),
+ UploadSize: aws.Float64(1.0),
+ UploadStart: aws.Time(time.Now()),
+ },
+ ClientToken: aws.String("String"),
+ Description: aws.String("String"),
+ DiskContainers: []*ec2.ImageDiskContainer{
+ { // Required
+ Description: aws.String("String"),
+ DeviceName: aws.String("String"),
+ Format: aws.String("String"),
+ SnapshotID: aws.String("String"),
+ URL: aws.String("String"),
+ UserBucket: &ec2.UserBucket{
+ S3Bucket: aws.String("String"),
+ S3Key: aws.String("String"),
+ },
+ },
+ // More values...
+ },
+ DryRun: aws.Bool(true),
+ Hypervisor: aws.String("String"),
+ LicenseType: aws.String("String"),
+ Platform: aws.String("String"),
+ RoleName: aws.String("String"),
+ }
+ resp, err := svc.ImportImage(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_ImportInstance() {
+ svc := ec2.New(nil)
+
+ params := &ec2.ImportInstanceInput{
+ Platform: aws.String("PlatformValues"), // Required
+ Description: aws.String("String"),
+ DiskImages: []*ec2.DiskImage{
+ { // Required
+ Description: aws.String("String"),
+ Image: &ec2.DiskImageDetail{
+ Bytes: aws.Int64(1), // Required
+ Format: aws.String("DiskImageFormat"), // Required
+ ImportManifestURL: aws.String("String"), // Required
+ },
+ Volume: &ec2.VolumeDetail{
+ Size: aws.Int64(1), // Required
+ },
+ },
+ // More values...
+ },
+ DryRun: aws.Bool(true),
+ LaunchSpecification: &ec2.ImportInstanceLaunchSpecification{
+ AdditionalInfo: aws.String("String"),
+ Architecture: aws.String("ArchitectureValues"),
+ GroupIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ GroupNames: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ InstanceInitiatedShutdownBehavior: aws.String("ShutdownBehavior"),
+ InstanceType: aws.String("InstanceType"),
+ Monitoring: aws.Bool(true),
+ Placement: &ec2.Placement{
+ AvailabilityZone: aws.String("String"),
+ GroupName: aws.String("String"),
+ Tenancy: aws.String("Tenancy"),
+ },
+ PrivateIPAddress: aws.String("String"),
+ SubnetID: aws.String("String"),
+ UserData: &ec2.UserData{
+ Data: aws.String("String"),
+ },
+ },
+ }
+ resp, err := svc.ImportInstance(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_ImportKeyPair() {
+ svc := ec2.New(nil)
+
+ params := &ec2.ImportKeyPairInput{
+ KeyName: aws.String("String"), // Required
+ PublicKeyMaterial: []byte("PAYLOAD"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.ImportKeyPair(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_ImportSnapshot() {
+ svc := ec2.New(nil)
+
+ params := &ec2.ImportSnapshotInput{
+ ClientData: &ec2.ClientData{
+ Comment: aws.String("String"),
+ UploadEnd: aws.Time(time.Now()),
+ UploadSize: aws.Float64(1.0),
+ UploadStart: aws.Time(time.Now()),
+ },
+ ClientToken: aws.String("String"),
+ Description: aws.String("String"),
+ DiskContainer: &ec2.SnapshotDiskContainer{
+ Description: aws.String("String"),
+ Format: aws.String("String"),
+ URL: aws.String("String"),
+ UserBucket: &ec2.UserBucket{
+ S3Bucket: aws.String("String"),
+ S3Key: aws.String("String"),
+ },
+ },
+ DryRun: aws.Bool(true),
+ RoleName: aws.String("String"),
+ }
+ resp, err := svc.ImportSnapshot(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_ImportVolume() {
+ svc := ec2.New(nil)
+
+ params := &ec2.ImportVolumeInput{
+ AvailabilityZone: aws.String("String"), // Required
+ Image: &ec2.DiskImageDetail{ // Required
+ Bytes: aws.Int64(1), // Required
+ Format: aws.String("DiskImageFormat"), // Required
+ ImportManifestURL: aws.String("String"), // Required
+ },
+ Volume: &ec2.VolumeDetail{ // Required
+ Size: aws.Int64(1), // Required
+ },
+ Description: aws.String("String"),
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.ImportVolume(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_ModifyImageAttribute() {
+ svc := ec2.New(nil)
+
+ params := &ec2.ModifyImageAttributeInput{
+ ImageID: aws.String("String"), // Required
+ Attribute: aws.String("String"),
+ Description: &ec2.AttributeValue{
+ Value: aws.String("String"),
+ },
+ DryRun: aws.Bool(true),
+ LaunchPermission: &ec2.LaunchPermissionModifications{
+ Add: []*ec2.LaunchPermission{
+ { // Required
+ Group: aws.String("PermissionGroup"),
+ UserID: aws.String("String"),
+ },
+ // More values...
+ },
+ Remove: []*ec2.LaunchPermission{
+ { // Required
+ Group: aws.String("PermissionGroup"),
+ UserID: aws.String("String"),
+ },
+ // More values...
+ },
+ },
+ OperationType: aws.String("String"),
+ ProductCodes: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ UserGroups: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ UserIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ Value: aws.String("String"),
+ }
+ resp, err := svc.ModifyImageAttribute(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_ModifyInstanceAttribute() {
+ svc := ec2.New(nil)
+
+ params := &ec2.ModifyInstanceAttributeInput{
+ InstanceID: aws.String("String"), // Required
+ Attribute: aws.String("InstanceAttributeName"),
+ BlockDeviceMappings: []*ec2.InstanceBlockDeviceMappingSpecification{
+ { // Required
+ DeviceName: aws.String("String"),
+ EBS: &ec2.EBSInstanceBlockDeviceSpecification{
+ DeleteOnTermination: aws.Bool(true),
+ VolumeID: aws.String("String"),
+ },
+ NoDevice: aws.String("String"),
+ VirtualName: aws.String("String"),
+ },
+ // More values...
+ },
+ DisableAPITermination: &ec2.AttributeBooleanValue{
+ Value: aws.Bool(true),
+ },
+ DryRun: aws.Bool(true),
+ EBSOptimized: &ec2.AttributeBooleanValue{
+ Value: aws.Bool(true),
+ },
+ Groups: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ InstanceInitiatedShutdownBehavior: &ec2.AttributeValue{
+ Value: aws.String("String"),
+ },
+ InstanceType: &ec2.AttributeValue{
+ Value: aws.String("String"),
+ },
+ Kernel: &ec2.AttributeValue{
+ Value: aws.String("String"),
+ },
+ RAMDisk: &ec2.AttributeValue{
+ Value: aws.String("String"),
+ },
+ SRIOVNetSupport: &ec2.AttributeValue{
+ Value: aws.String("String"),
+ },
+ SourceDestCheck: &ec2.AttributeBooleanValue{
+ Value: aws.Bool(true),
+ },
+ UserData: &ec2.BlobAttributeValue{
+ Value: []byte("PAYLOAD"),
+ },
+ Value: aws.String("String"),
+ }
+ resp, err := svc.ModifyInstanceAttribute(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_ModifyNetworkInterfaceAttribute() {
+ svc := ec2.New(nil)
+
+ params := &ec2.ModifyNetworkInterfaceAttributeInput{
+ NetworkInterfaceID: aws.String("String"), // Required
+ Attachment: &ec2.NetworkInterfaceAttachmentChanges{
+ AttachmentID: aws.String("String"),
+ DeleteOnTermination: aws.Bool(true),
+ },
+ Description: &ec2.AttributeValue{
+ Value: aws.String("String"),
+ },
+ DryRun: aws.Bool(true),
+ Groups: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ SourceDestCheck: &ec2.AttributeBooleanValue{
+ Value: aws.Bool(true),
+ },
+ }
+ resp, err := svc.ModifyNetworkInterfaceAttribute(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_ModifyReservedInstances() {
+ svc := ec2.New(nil)
+
+ params := &ec2.ModifyReservedInstancesInput{
+ ReservedInstancesIDs: []*string{ // Required
+ aws.String("String"), // Required
+ // More values...
+ },
+ TargetConfigurations: []*ec2.ReservedInstancesConfiguration{ // Required
+ { // Required
+ AvailabilityZone: aws.String("String"),
+ InstanceCount: aws.Int64(1),
+ InstanceType: aws.String("InstanceType"),
+ Platform: aws.String("String"),
+ },
+ // More values...
+ },
+ ClientToken: aws.String("String"),
+ }
+ resp, err := svc.ModifyReservedInstances(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_ModifySnapshotAttribute() {
+ svc := ec2.New(nil)
+
+ params := &ec2.ModifySnapshotAttributeInput{
+ SnapshotID: aws.String("String"), // Required
+ Attribute: aws.String("SnapshotAttributeName"),
+ CreateVolumePermission: &ec2.CreateVolumePermissionModifications{
+ Add: []*ec2.CreateVolumePermission{
+ { // Required
+ Group: aws.String("PermissionGroup"),
+ UserID: aws.String("String"),
+ },
+ // More values...
+ },
+ Remove: []*ec2.CreateVolumePermission{
+ { // Required
+ Group: aws.String("PermissionGroup"),
+ UserID: aws.String("String"),
+ },
+ // More values...
+ },
+ },
+ DryRun: aws.Bool(true),
+ GroupNames: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ OperationType: aws.String("String"),
+ UserIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.ModifySnapshotAttribute(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_ModifySubnetAttribute() {
+ svc := ec2.New(nil)
+
+ params := &ec2.ModifySubnetAttributeInput{
+ SubnetID: aws.String("String"), // Required
+ MapPublicIPOnLaunch: &ec2.AttributeBooleanValue{
+ Value: aws.Bool(true),
+ },
+ }
+ resp, err := svc.ModifySubnetAttribute(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_ModifyVPCAttribute() {
+ svc := ec2.New(nil)
+
+ params := &ec2.ModifyVPCAttributeInput{
+ VPCID: aws.String("String"), // Required
+ EnableDNSHostnames: &ec2.AttributeBooleanValue{
+ Value: aws.Bool(true),
+ },
+ EnableDNSSupport: &ec2.AttributeBooleanValue{
+ Value: aws.Bool(true),
+ },
+ }
+ resp, err := svc.ModifyVPCAttribute(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_ModifyVPCEndpoint() {
+ svc := ec2.New(nil)
+
+ params := &ec2.ModifyVPCEndpointInput{
+ VPCEndpointID: aws.String("String"), // Required
+ AddRouteTableIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ DryRun: aws.Bool(true),
+ PolicyDocument: aws.String("String"),
+ RemoveRouteTableIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ ResetPolicy: aws.Bool(true),
+ }
+ resp, err := svc.ModifyVPCEndpoint(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_ModifyVolumeAttribute() {
+ svc := ec2.New(nil)
+
+ params := &ec2.ModifyVolumeAttributeInput{
+ VolumeID: aws.String("String"), // Required
+ AutoEnableIO: &ec2.AttributeBooleanValue{
+ Value: aws.Bool(true),
+ },
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.ModifyVolumeAttribute(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_MonitorInstances() {
+ svc := ec2.New(nil)
+
+ params := &ec2.MonitorInstancesInput{
+ InstanceIDs: []*string{ // Required
+ aws.String("String"), // Required
+ // More values...
+ },
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.MonitorInstances(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_MoveAddressToVPC() {
+ svc := ec2.New(nil)
+
+ params := &ec2.MoveAddressToVPCInput{
+ PublicIP: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.MoveAddressToVPC(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_PurchaseReservedInstancesOffering() {
+ svc := ec2.New(nil)
+
+ params := &ec2.PurchaseReservedInstancesOfferingInput{
+ InstanceCount: aws.Int64(1), // Required
+ ReservedInstancesOfferingID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ LimitPrice: &ec2.ReservedInstanceLimitPrice{
+ Amount: aws.Float64(1.0),
+ CurrencyCode: aws.String("CurrencyCodeValues"),
+ },
+ }
+ resp, err := svc.PurchaseReservedInstancesOffering(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_RebootInstances() {
+ svc := ec2.New(nil)
+
+ params := &ec2.RebootInstancesInput{
+ InstanceIDs: []*string{ // Required
+ aws.String("String"), // Required
+ // More values...
+ },
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.RebootInstances(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_RegisterImage() {
+ svc := ec2.New(nil)
+
+ params := &ec2.RegisterImageInput{
+ Name: aws.String("String"), // Required
+ Architecture: aws.String("ArchitectureValues"),
+ BlockDeviceMappings: []*ec2.BlockDeviceMapping{
+ { // Required
+ DeviceName: aws.String("String"),
+ EBS: &ec2.EBSBlockDevice{
+ DeleteOnTermination: aws.Bool(true),
+ Encrypted: aws.Bool(true),
+ IOPS: aws.Int64(1),
+ SnapshotID: aws.String("String"),
+ VolumeSize: aws.Int64(1),
+ VolumeType: aws.String("VolumeType"),
+ },
+ NoDevice: aws.String("String"),
+ VirtualName: aws.String("String"),
+ },
+ // More values...
+ },
+ Description: aws.String("String"),
+ DryRun: aws.Bool(true),
+ ImageLocation: aws.String("String"),
+ KernelID: aws.String("String"),
+ RAMDiskID: aws.String("String"),
+ RootDeviceName: aws.String("String"),
+ SRIOVNetSupport: aws.String("String"),
+ VirtualizationType: aws.String("String"),
+ }
+ resp, err := svc.RegisterImage(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_RejectVPCPeeringConnection() {
+ svc := ec2.New(nil)
+
+ params := &ec2.RejectVPCPeeringConnectionInput{
+ VPCPeeringConnectionID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.RejectVPCPeeringConnection(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_ReleaseAddress() {
+ svc := ec2.New(nil)
+
+ params := &ec2.ReleaseAddressInput{
+ AllocationID: aws.String("String"),
+ DryRun: aws.Bool(true),
+ PublicIP: aws.String("String"),
+ }
+ resp, err := svc.ReleaseAddress(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_ReplaceNetworkACLAssociation() {
+ svc := ec2.New(nil)
+
+ params := &ec2.ReplaceNetworkACLAssociationInput{
+ AssociationID: aws.String("String"), // Required
+ NetworkACLID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.ReplaceNetworkACLAssociation(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_ReplaceNetworkACLEntry() {
+ svc := ec2.New(nil)
+
+ params := &ec2.ReplaceNetworkACLEntryInput{
+ CIDRBlock: aws.String("String"), // Required
+ Egress: aws.Bool(true), // Required
+ NetworkACLID: aws.String("String"), // Required
+ Protocol: aws.String("String"), // Required
+ RuleAction: aws.String("RuleAction"), // Required
+ RuleNumber: aws.Int64(1), // Required
+ DryRun: aws.Bool(true),
+ ICMPTypeCode: &ec2.ICMPTypeCode{
+ Code: aws.Int64(1),
+ Type: aws.Int64(1),
+ },
+ PortRange: &ec2.PortRange{
+ From: aws.Int64(1),
+ To: aws.Int64(1),
+ },
+ }
+ resp, err := svc.ReplaceNetworkACLEntry(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_ReplaceRoute() {
+ svc := ec2.New(nil)
+
+ params := &ec2.ReplaceRouteInput{
+ DestinationCIDRBlock: aws.String("String"), // Required
+ RouteTableID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ GatewayID: aws.String("String"),
+ InstanceID: aws.String("String"),
+ NetworkInterfaceID: aws.String("String"),
+ VPCPeeringConnectionID: aws.String("String"),
+ }
+ resp, err := svc.ReplaceRoute(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_ReplaceRouteTableAssociation() {
+ svc := ec2.New(nil)
+
+ params := &ec2.ReplaceRouteTableAssociationInput{
+ AssociationID: aws.String("String"), // Required
+ RouteTableID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.ReplaceRouteTableAssociation(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_ReportInstanceStatus() {
+ svc := ec2.New(nil)
+
+ params := &ec2.ReportInstanceStatusInput{
+ Instances: []*string{ // Required
+ aws.String("String"), // Required
+ // More values...
+ },
+ ReasonCodes: []*string{ // Required
+ aws.String("ReportInstanceReasonCodes"), // Required
+ // More values...
+ },
+ Status: aws.String("ReportStatusType"), // Required
+ Description: aws.String("String"),
+ DryRun: aws.Bool(true),
+ EndTime: aws.Time(time.Now()),
+ StartTime: aws.Time(time.Now()),
+ }
+ resp, err := svc.ReportInstanceStatus(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_RequestSpotFleet() {
+ svc := ec2.New(nil)
+
+ params := &ec2.RequestSpotFleetInput{
+ SpotFleetRequestConfig: &ec2.SpotFleetRequestConfigData{ // Required
+ IAMFleetRole: aws.String("String"), // Required
+ LaunchSpecifications: []*ec2.SpotFleetLaunchSpecification{ // Required
+ { // Required
+ AddressingType: aws.String("String"),
+ BlockDeviceMappings: []*ec2.BlockDeviceMapping{
+ { // Required
+ DeviceName: aws.String("String"),
+ EBS: &ec2.EBSBlockDevice{
+ DeleteOnTermination: aws.Bool(true),
+ Encrypted: aws.Bool(true),
+ IOPS: aws.Int64(1),
+ SnapshotID: aws.String("String"),
+ VolumeSize: aws.Int64(1),
+ VolumeType: aws.String("VolumeType"),
+ },
+ NoDevice: aws.String("String"),
+ VirtualName: aws.String("String"),
+ },
+ // More values...
+ },
+ EBSOptimized: aws.Bool(true),
+ IAMInstanceProfile: &ec2.IAMInstanceProfileSpecification{
+ ARN: aws.String("String"),
+ Name: aws.String("String"),
+ },
+ ImageID: aws.String("String"),
+ InstanceType: aws.String("InstanceType"),
+ KernelID: aws.String("String"),
+ KeyName: aws.String("String"),
+ Monitoring: &ec2.SpotFleetMonitoring{
+ Enabled: aws.Bool(true),
+ },
+ NetworkInterfaces: []*ec2.InstanceNetworkInterfaceSpecification{
+ { // Required
+ AssociatePublicIPAddress: aws.Bool(true),
+ DeleteOnTermination: aws.Bool(true),
+ Description: aws.String("String"),
+ DeviceIndex: aws.Int64(1),
+ Groups: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ NetworkInterfaceID: aws.String("String"),
+ PrivateIPAddress: aws.String("String"),
+ PrivateIPAddresses: []*ec2.PrivateIPAddressSpecification{
+ { // Required
+ PrivateIPAddress: aws.String("String"), // Required
+ Primary: aws.Bool(true),
+ },
+ // More values...
+ },
+ SecondaryPrivateIPAddressCount: aws.Int64(1),
+ SubnetID: aws.String("String"),
+ },
+ // More values...
+ },
+ Placement: &ec2.SpotPlacement{
+ AvailabilityZone: aws.String("String"),
+ GroupName: aws.String("String"),
+ },
+ RAMDiskID: aws.String("String"),
+ SecurityGroups: []*ec2.GroupIdentifier{
+ { // Required
+ GroupID: aws.String("String"),
+ GroupName: aws.String("String"),
+ },
+ // More values...
+ },
+ SubnetID: aws.String("String"),
+ UserData: aws.String("String"),
+ },
+ // More values...
+ },
+ SpotPrice: aws.String("String"), // Required
+ TargetCapacity: aws.Int64(1), // Required
+ ClientToken: aws.String("String"),
+ TerminateInstancesWithExpiration: aws.Bool(true),
+ ValidFrom: aws.Time(time.Now()),
+ ValidUntil: aws.Time(time.Now()),
+ },
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.RequestSpotFleet(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_RequestSpotInstances() {
+ svc := ec2.New(nil)
+
+ params := &ec2.RequestSpotInstancesInput{
+ SpotPrice: aws.String("String"), // Required
+ AvailabilityZoneGroup: aws.String("String"),
+ ClientToken: aws.String("String"),
+ DryRun: aws.Bool(true),
+ InstanceCount: aws.Int64(1),
+ LaunchGroup: aws.String("String"),
+ LaunchSpecification: &ec2.RequestSpotLaunchSpecification{
+ AddressingType: aws.String("String"),
+ BlockDeviceMappings: []*ec2.BlockDeviceMapping{
+ { // Required
+ DeviceName: aws.String("String"),
+ EBS: &ec2.EBSBlockDevice{
+ DeleteOnTermination: aws.Bool(true),
+ Encrypted: aws.Bool(true),
+ IOPS: aws.Int64(1),
+ SnapshotID: aws.String("String"),
+ VolumeSize: aws.Int64(1),
+ VolumeType: aws.String("VolumeType"),
+ },
+ NoDevice: aws.String("String"),
+ VirtualName: aws.String("String"),
+ },
+ // More values...
+ },
+ EBSOptimized: aws.Bool(true),
+ IAMInstanceProfile: &ec2.IAMInstanceProfileSpecification{
+ ARN: aws.String("String"),
+ Name: aws.String("String"),
+ },
+ ImageID: aws.String("String"),
+ InstanceType: aws.String("InstanceType"),
+ KernelID: aws.String("String"),
+ KeyName: aws.String("String"),
+ Monitoring: &ec2.RunInstancesMonitoringEnabled{
+ Enabled: aws.Bool(true), // Required
+ },
+ NetworkInterfaces: []*ec2.InstanceNetworkInterfaceSpecification{
+ { // Required
+ AssociatePublicIPAddress: aws.Bool(true),
+ DeleteOnTermination: aws.Bool(true),
+ Description: aws.String("String"),
+ DeviceIndex: aws.Int64(1),
+ Groups: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ NetworkInterfaceID: aws.String("String"),
+ PrivateIPAddress: aws.String("String"),
+ PrivateIPAddresses: []*ec2.PrivateIPAddressSpecification{
+ { // Required
+ PrivateIPAddress: aws.String("String"), // Required
+ Primary: aws.Bool(true),
+ },
+ // More values...
+ },
+ SecondaryPrivateIPAddressCount: aws.Int64(1),
+ SubnetID: aws.String("String"),
+ },
+ // More values...
+ },
+ Placement: &ec2.SpotPlacement{
+ AvailabilityZone: aws.String("String"),
+ GroupName: aws.String("String"),
+ },
+ RAMDiskID: aws.String("String"),
+ SecurityGroupIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ SecurityGroups: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ SubnetID: aws.String("String"),
+ UserData: aws.String("String"),
+ },
+ Type: aws.String("SpotInstanceType"),
+ ValidFrom: aws.Time(time.Now()),
+ ValidUntil: aws.Time(time.Now()),
+ }
+ resp, err := svc.RequestSpotInstances(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_ResetImageAttribute() {
+ svc := ec2.New(nil)
+
+ params := &ec2.ResetImageAttributeInput{
+ Attribute: aws.String("ResetImageAttributeName"), // Required
+ ImageID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.ResetImageAttribute(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_ResetInstanceAttribute() {
+ svc := ec2.New(nil)
+
+ params := &ec2.ResetInstanceAttributeInput{
+ Attribute: aws.String("InstanceAttributeName"), // Required
+ InstanceID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.ResetInstanceAttribute(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_ResetNetworkInterfaceAttribute() {
+ svc := ec2.New(nil)
+
+ params := &ec2.ResetNetworkInterfaceAttributeInput{
+ NetworkInterfaceID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ SourceDestCheck: aws.String("String"),
+ }
+ resp, err := svc.ResetNetworkInterfaceAttribute(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_ResetSnapshotAttribute() {
+ svc := ec2.New(nil)
+
+ params := &ec2.ResetSnapshotAttributeInput{
+ Attribute: aws.String("SnapshotAttributeName"), // Required
+ SnapshotID: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.ResetSnapshotAttribute(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_RestoreAddressToClassic() {
+ svc := ec2.New(nil)
+
+ params := &ec2.RestoreAddressToClassicInput{
+ PublicIP: aws.String("String"), // Required
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.RestoreAddressToClassic(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_RevokeSecurityGroupEgress() {
+ svc := ec2.New(nil)
+
+ params := &ec2.RevokeSecurityGroupEgressInput{
+ GroupID: aws.String("String"), // Required
+ CIDRIP: aws.String("String"),
+ DryRun: aws.Bool(true),
+ FromPort: aws.Int64(1),
+ IPPermissions: []*ec2.IPPermission{
+ { // Required
+ FromPort: aws.Int64(1),
+ IPProtocol: aws.String("String"),
+ IPRanges: []*ec2.IPRange{
+ { // Required
+ CIDRIP: aws.String("String"),
+ },
+ // More values...
+ },
+ PrefixListIDs: []*ec2.PrefixListID{
+ { // Required
+ PrefixListID: aws.String("String"),
+ },
+ // More values...
+ },
+ ToPort: aws.Int64(1),
+ UserIDGroupPairs: []*ec2.UserIDGroupPair{
+ { // Required
+ GroupID: aws.String("String"),
+ GroupName: aws.String("String"),
+ UserID: aws.String("String"),
+ },
+ // More values...
+ },
+ },
+ // More values...
+ },
+ IPProtocol: aws.String("String"),
+ SourceSecurityGroupName: aws.String("String"),
+ SourceSecurityGroupOwnerID: aws.String("String"),
+ ToPort: aws.Int64(1),
+ }
+ resp, err := svc.RevokeSecurityGroupEgress(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_RevokeSecurityGroupIngress() {
+ svc := ec2.New(nil)
+
+ params := &ec2.RevokeSecurityGroupIngressInput{
+ CIDRIP: aws.String("String"),
+ DryRun: aws.Bool(true),
+ FromPort: aws.Int64(1),
+ GroupID: aws.String("String"),
+ GroupName: aws.String("String"),
+ IPPermissions: []*ec2.IPPermission{
+ { // Required
+ FromPort: aws.Int64(1),
+ IPProtocol: aws.String("String"),
+ IPRanges: []*ec2.IPRange{
+ { // Required
+ CIDRIP: aws.String("String"),
+ },
+ // More values...
+ },
+ PrefixListIDs: []*ec2.PrefixListID{
+ { // Required
+ PrefixListID: aws.String("String"),
+ },
+ // More values...
+ },
+ ToPort: aws.Int64(1),
+ UserIDGroupPairs: []*ec2.UserIDGroupPair{
+ { // Required
+ GroupID: aws.String("String"),
+ GroupName: aws.String("String"),
+ UserID: aws.String("String"),
+ },
+ // More values...
+ },
+ },
+ // More values...
+ },
+ IPProtocol: aws.String("String"),
+ SourceSecurityGroupName: aws.String("String"),
+ SourceSecurityGroupOwnerID: aws.String("String"),
+ ToPort: aws.Int64(1),
+ }
+ resp, err := svc.RevokeSecurityGroupIngress(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_RunInstances() {
+ svc := ec2.New(nil)
+
+ params := &ec2.RunInstancesInput{
+ ImageID: aws.String("String"), // Required
+ MaxCount: aws.Int64(1), // Required
+ MinCount: aws.Int64(1), // Required
+ AdditionalInfo: aws.String("String"),
+ BlockDeviceMappings: []*ec2.BlockDeviceMapping{
+ { // Required
+ DeviceName: aws.String("String"),
+ EBS: &ec2.EBSBlockDevice{
+ DeleteOnTermination: aws.Bool(true),
+ Encrypted: aws.Bool(true),
+ IOPS: aws.Int64(1),
+ SnapshotID: aws.String("String"),
+ VolumeSize: aws.Int64(1),
+ VolumeType: aws.String("VolumeType"),
+ },
+ NoDevice: aws.String("String"),
+ VirtualName: aws.String("String"),
+ },
+ // More values...
+ },
+ ClientToken: aws.String("String"),
+ DisableAPITermination: aws.Bool(true),
+ DryRun: aws.Bool(true),
+ EBSOptimized: aws.Bool(true),
+ IAMInstanceProfile: &ec2.IAMInstanceProfileSpecification{
+ ARN: aws.String("String"),
+ Name: aws.String("String"),
+ },
+ InstanceInitiatedShutdownBehavior: aws.String("ShutdownBehavior"),
+ InstanceType: aws.String("InstanceType"),
+ KernelID: aws.String("String"),
+ KeyName: aws.String("String"),
+ Monitoring: &ec2.RunInstancesMonitoringEnabled{
+ Enabled: aws.Bool(true), // Required
+ },
+ NetworkInterfaces: []*ec2.InstanceNetworkInterfaceSpecification{
+ { // Required
+ AssociatePublicIPAddress: aws.Bool(true),
+ DeleteOnTermination: aws.Bool(true),
+ Description: aws.String("String"),
+ DeviceIndex: aws.Int64(1),
+ Groups: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ NetworkInterfaceID: aws.String("String"),
+ PrivateIPAddress: aws.String("String"),
+ PrivateIPAddresses: []*ec2.PrivateIPAddressSpecification{
+ { // Required
+ PrivateIPAddress: aws.String("String"), // Required
+ Primary: aws.Bool(true),
+ },
+ // More values...
+ },
+ SecondaryPrivateIPAddressCount: aws.Int64(1),
+ SubnetID: aws.String("String"),
+ },
+ // More values...
+ },
+ Placement: &ec2.Placement{
+ AvailabilityZone: aws.String("String"),
+ GroupName: aws.String("String"),
+ Tenancy: aws.String("Tenancy"),
+ },
+ PrivateIPAddress: aws.String("String"),
+ RAMDiskID: aws.String("String"),
+ SecurityGroupIDs: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ SecurityGroups: []*string{
+ aws.String("String"), // Required
+ // More values...
+ },
+ SubnetID: aws.String("String"),
+ UserData: aws.String("String"),
+ }
+ resp, err := svc.RunInstances(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_StartInstances() {
+ svc := ec2.New(nil)
+
+ params := &ec2.StartInstancesInput{
+ InstanceIDs: []*string{ // Required
+ aws.String("String"), // Required
+ // More values...
+ },
+ AdditionalInfo: aws.String("String"),
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.StartInstances(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_StopInstances() {
+ svc := ec2.New(nil)
+
+ params := &ec2.StopInstancesInput{
+ InstanceIDs: []*string{ // Required
+ aws.String("String"), // Required
+ // More values...
+ },
+ DryRun: aws.Bool(true),
+ Force: aws.Bool(true),
+ }
+ resp, err := svc.StopInstances(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_TerminateInstances() {
+ svc := ec2.New(nil)
+
+ params := &ec2.TerminateInstancesInput{
+ InstanceIDs: []*string{ // Required
+ aws.String("String"), // Required
+ // More values...
+ },
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.TerminateInstances(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_UnassignPrivateIPAddresses() {
+ svc := ec2.New(nil)
+
+ params := &ec2.UnassignPrivateIPAddressesInput{
+ NetworkInterfaceID: aws.String("String"), // Required
+ PrivateIPAddresses: []*string{ // Required
+ aws.String("String"), // Required
+ // More values...
+ },
+ }
+ resp, err := svc.UnassignPrivateIPAddresses(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
+
+func ExampleEC2_UnmonitorInstances() {
+ svc := ec2.New(nil)
+
+ params := &ec2.UnmonitorInstancesInput{
+ InstanceIDs: []*string{ // Required
+ aws.String("String"), // Required
+ // More values...
+ },
+ DryRun: aws.Bool(true),
+ }
+ resp, err := svc.UnmonitorInstances(params)
+
+ if err != nil {
+ if awsErr, ok := err.(awserr.Error); ok {
+ // Generic AWS error with Code, Message, and original error (if any)
+ fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
+ if reqErr, ok := err.(awserr.RequestFailure); ok {
+ // A service error occurred
+ fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
+ }
+ } else {
+ // This case should never be hit, the SDK should always return an
+ // error which satisfies the awserr.Error interface.
+ fmt.Println(err.Error())
+ }
+ }
+
+ // Pretty-print the response data.
+ fmt.Println(awsutil.Prettify(resp))
+}
diff --git a/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/service.go b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/service.go
new file mode 100644
index 00000000000..b9767171118
--- /dev/null
+++ b/Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/service.go
@@ -0,0 +1,60 @@
+// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
+
+package ec2
+
+import (
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/internal/protocol/ec2query"
+ "github.com/aws/aws-sdk-go/internal/signer/v4"
+)
+
+// Amazon Elastic Compute Cloud (Amazon EC2) provides resizable computing capacity
+// in the Amazon Web Services (AWS) cloud. Using Amazon EC2 eliminates your
+// need to invest in hardware up front, so you can develop and deploy applications
+// faster.
+type EC2 struct {
+ *aws.Service
+}
+
+// Used for custom service initialization logic
+var initService func(*aws.Service)
+
+// Used for custom request initialization logic
+var initRequest func(*aws.Request)
+
+// New returns a new EC2 client.
+func New(config *aws.Config) *EC2 {
+ service := &aws.Service{
+ Config: aws.DefaultConfig.Merge(config),
+ ServiceName: "ec2",
+ APIVersion: "2015-04-15",
+ }
+ service.Initialize()
+
+ // Handlers
+ service.Handlers.Sign.PushBack(v4.Sign)
+ service.Handlers.Build.PushBack(ec2query.Build)
+ service.Handlers.Unmarshal.PushBack(ec2query.Unmarshal)
+ service.Handlers.UnmarshalMeta.PushBack(ec2query.UnmarshalMeta)
+ service.Handlers.UnmarshalError.PushBack(ec2query.UnmarshalError)
+
+ // Run custom service initialization if present
+ if initService != nil {
+ initService(service)
+ }
+
+ return &EC2{service}
+}
+
+// newRequest creates a new request for a EC2 operation and runs any
+// custom request initialization.
+func (c *EC2) newRequest(op *aws.Operation, params, data interface{}) *aws.Request {
+ req := aws.NewRequest(c.Service, op, params, data)
+
+ // Run custom request initialization if present
+ if initRequest != nil {
+ initRequest(req)
+ }
+
+ return req
+}
diff --git a/bower.json b/bower.json
index ac6990b2004..88cb0b3df4a 100644
--- a/bower.json
+++ b/bower.json
@@ -21,7 +21,6 @@
"angular-native-dragdrop": "~1.1.1",
"angular-bindonce": "~0.3.3",
"requirejs": "~2.1.18",
- "requirejs-text": "~2.0.14",
- "aws-sdk": "~2.1.42"
+ "requirejs-text": "~2.0.14"
}
}
diff --git a/pkg/api/cloudwatch/cloudwatch.go b/pkg/api/cloudwatch/cloudwatch.go
new file mode 100644
index 00000000000..536a81ee3fe
--- /dev/null
+++ b/pkg/api/cloudwatch/cloudwatch.go
@@ -0,0 +1,138 @@
+package cloudwatch
+
+import (
+ "encoding/json"
+ "errors"
+ "io/ioutil"
+ "time"
+
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/service/cloudwatch"
+ "github.com/aws/aws-sdk-go/service/ec2"
+ "github.com/grafana/grafana/pkg/middleware"
+)
+
+type actionHandler func(*cwRequest, *middleware.Context)
+
+var actionHandlers map[string]actionHandler
+
+type cwRequest struct {
+ Region string `json:"region"`
+ Action string `json:"action"`
+ Body []byte `json:"-"`
+}
+
+func init() {
+ actionHandlers = map[string]actionHandler{
+ "GetMetricStatistics": handleGetMetricStatistics,
+ "ListMetrics": handleListMetrics,
+ "DescribeInstances": handleDescribeInstances,
+ "__GetRegions": handleGetRegions,
+ "__GetNamespaces": handleGetNamespaces,
+ "__GetMetrics": handleGetMetrics,
+ "__GetDimensions": handleGetDimensions,
+ }
+}
+
+func handleGetMetricStatistics(req *cwRequest, c *middleware.Context) {
+ svc := cloudwatch.New(&aws.Config{Region: aws.String(req.Region)})
+
+ reqParam := &struct {
+ Parameters struct {
+ Namespace string `json:"namespace"`
+ MetricName string `json:"metricName"`
+ Dimensions []*cloudwatch.Dimension `json:"dimensions"`
+ Statistics []*string `json:"statistics"`
+ StartTime int64 `json:"startTime"`
+ EndTime int64 `json:"endTime"`
+ Period int64 `json:"period"`
+ } `json:"parameters"`
+ }{}
+ json.Unmarshal(req.Body, reqParam)
+
+ params := &cloudwatch.GetMetricStatisticsInput{
+ Namespace: aws.String(reqParam.Parameters.Namespace),
+ MetricName: aws.String(reqParam.Parameters.MetricName),
+ Dimensions: reqParam.Parameters.Dimensions,
+ Statistics: reqParam.Parameters.Statistics,
+ StartTime: aws.Time(time.Unix(reqParam.Parameters.StartTime, 0)),
+ EndTime: aws.Time(time.Unix(reqParam.Parameters.EndTime, 0)),
+ Period: aws.Int64(reqParam.Parameters.Period),
+ }
+
+ resp, err := svc.GetMetricStatistics(params)
+ if err != nil {
+ c.JsonApiErr(500, "Unable to call AWS API", err)
+ return
+ }
+
+ c.JSON(200, resp)
+}
+
+func handleListMetrics(req *cwRequest, c *middleware.Context) {
+ svc := cloudwatch.New(&aws.Config{Region: aws.String(req.Region)})
+ reqParam := &struct {
+ Parameters struct {
+ Namespace string `json:"namespace"`
+ MetricName string `json:"metricName"`
+ Dimensions []*cloudwatch.DimensionFilter `json:"dimensions"`
+ } `json:"parameters"`
+ }{}
+
+ json.Unmarshal(req.Body, reqParam)
+
+ params := &cloudwatch.ListMetricsInput{
+ Namespace: aws.String(reqParam.Parameters.Namespace),
+ MetricName: aws.String(reqParam.Parameters.MetricName),
+ Dimensions: reqParam.Parameters.Dimensions,
+ }
+
+ resp, err := svc.ListMetrics(params)
+ if err != nil {
+ c.JsonApiErr(500, "Unable to call AWS API", err)
+ return
+ }
+
+ c.JSON(200, resp)
+}
+
+func handleDescribeInstances(req *cwRequest, c *middleware.Context) {
+ svc := ec2.New(&aws.Config{Region: aws.String(req.Region)})
+
+ reqParam := &struct {
+ Parameters struct {
+ Filters []*ec2.Filter `json:"filters"`
+ InstanceIds []*string `json:"instanceIds"`
+ } `json:"parameters"`
+ }{}
+ json.Unmarshal(req.Body, reqParam)
+
+ params := &ec2.DescribeInstancesInput{}
+ if len(reqParam.Parameters.Filters) > 0 {
+ params.Filters = reqParam.Parameters.Filters
+ }
+ if len(reqParam.Parameters.InstanceIds) > 0 {
+ params.InstanceIDs = reqParam.Parameters.InstanceIds
+ }
+
+ resp, err := svc.DescribeInstances(params)
+ if err != nil {
+ c.JsonApiErr(500, "Unable to call AWS API", err)
+ return
+ }
+
+ c.JSON(200, resp)
+}
+
+func HandleRequest(c *middleware.Context) {
+ var req cwRequest
+ req.Body, _ = ioutil.ReadAll(c.Req.Request.Body)
+ json.Unmarshal(req.Body, &req)
+
+ if handler, found := actionHandlers[req.Action]; !found {
+ c.JsonApiErr(500, "Unexpected AWS Action", errors.New(req.Action))
+ return
+ } else {
+ handler(&req, c)
+ }
+}
diff --git a/pkg/api/cloudwatch/metrics.go b/pkg/api/cloudwatch/metrics.go
new file mode 100644
index 00000000000..edf10634b61
--- /dev/null
+++ b/pkg/api/cloudwatch/metrics.go
@@ -0,0 +1,135 @@
+package cloudwatch
+
+import (
+ "encoding/json"
+
+ "github.com/grafana/grafana/pkg/middleware"
+ "github.com/grafana/grafana/pkg/util"
+)
+
+var metricsMap map[string][]string
+var dimensionsMap map[string][]string
+
+func init() {
+ metricsMap = map[string][]string{
+ "AWS/AutoScaling": []string{"GroupMinSize", "GroupMaxSize", "GroupDesiredCapacity", "GroupInServiceInstances", "GroupPendingInstances", "GroupStandbyInstances", "GroupTerminatingInstances", "GroupTotalInstances"},
+ "AWS/Billing": []string{"EstimatedCharges"},
+ "AWS/EC2": []string{"CPUCreditUsage", "CPUCreditBalance", "CPUUtilization", "DiskReadOps", "DiskWriteOps", "DiskReadBytes", "DiskWriteBytes", "NetworkIn", "NetworkOut", "StatusCheckFailed", "StatusCheckFailed_Instance", "StatusCheckFailed_System"},
+ "AWS/CloudFront": []string{"Requests", "BytesDownloaded", "BytesUploaded", "TotalErrorRate", "4xxErrorRate", "5xxErrorRate"},
+ "AWS/CloudSearch": []string{"SuccessfulRequests", "SearchableDocuments", "IndexUtilization", "Partitions"},
+ "AWS/DynamoDB": []string{"ConditionalCheckFailedRequests", "ConsumedReadCapacityUnits", "ConsumedWriteCapacityUnits", "OnlineIndexConsumedWriteCapacity", "OnlineIndexPercentageProgress", "OnlineIndexThrottleEvents", "ProvisionedReadCapacityUnits", "ProvisionedWriteCapacityUnits", "ReadThrottleEvents", "ReturnedItemCount", "SuccessfulRequestLatency", "SystemErrors", "ThrottledRequests", "UserErrors", "WriteThrottleEvents"},
+ "AWS/ElastiCache": []string{
+ "CPUUtilization", "SwapUsage", "FreeableMemory", "NetworkBytesIn", "NetworkBytesOut",
+ "BytesUsedForCacheItems", "BytesReadIntoMemcached", "BytesWrittenOutFromMemcached", "CasBadval", "CasHits", "CasMisses", "CmdFlush", "CmdGet", "CmdSet", "CurrConnections", "CurrItems", "DecrHits", "DecrMisses", "DeleteHits", "DeleteMisses", "Evictions", "GetHits", "GetMisses", "IncrHits", "IncrMisses", "Reclaimed",
+ "CurrConnections", "Evictions", "Reclaimed", "NewConnections", "BytesUsedForCache", "CacheHits", "CacheMisses", "ReplicationLag", "GetTypeCmds", "SetTypeCmds", "KeyBasedCmds", "StringBasedCmds", "HashBasedCmds", "ListBasedCmds", "SetBasedCmds", "SortedSetBasedCmds", "CurrItems",
+ },
+ "AWS/EBS": []string{"VolumeReadBytes", "VolumeWriteBytes", "VolumeReadOps", "VolumeWriteOps", "VolumeTotalReadTime", "VolumeTotalWriteTime", "VolumeIdleTime", "VolumeQueueLength", "VolumeThroughputPercentage", "VolumeConsumedReadWriteOps"},
+ "AWS/ELB": []string{"HealthyHostCount", "UnHealthyHostCount", "RequestCount", "Latency", "HTTPCode_ELB_4XX", "HTTPCode_ELB_5XX", "HTTPCode_Backend_2XX", "HTTPCode_Backend_3XX", "HTTPCode_Backend_4XX", "HTTPCode_Backend_5XX", "BackendConnectionErrors", "SurgeQueueLength", "SpilloverCount"},
+ "AWS/ElasticMapReduce": []string{"CoreNodesPending", "CoreNodesRunning", "HBaseBackupFailed", "HBaseMostRecentBackupDuration", "HBaseTimeSinceLastSuccessfulBackup", "HDFSBytesRead", "HDFSBytesWritten", "HDFSUtilization", "IsIdle", "JobsFailed", "JobsRunning", "LiveDataNodes", "LiveTaskTrackers", "MapSlotsOpen", "MissingBlocks", "ReduceSlotsOpen", "RemainingMapTasks", "RemainingMapTasksPerSlot", "RemainingReduceTasks", "RunningMapTasks", "RunningReduceTasks", "S3BytesRead", "S3BytesWritten", "TaskNodesPending", "TaskNodesRunning", "TotalLoad"},
+ "AWS/Kinesis": []string{"PutRecord.Bytes", "PutRecord.Latency", "PutRecord.Success", "PutRecords.Bytes", "PutRecords.Latency", "PutRecords.Records", "PutRecords.Success", "IncomingBytes", "IncomingRecords", "GetRecords.Bytes", "GetRecords.IteratorAgeMilliseconds", "GetRecords.Latency", "GetRecords.Success"},
+ "AWS/ML": []string{"PredictCount", "PredictFailureCount"},
+ "AWS/OpsWorks": []string{"cpu_idle", "cpu_nice", "cpu_system", "cpu_user", "cpu_waitio", "load_1", "load_5", "load_15", "memory_buffers", "memory_cached", "memory_free", "memory_swap", "memory_total", "memory_used", "procs"},
+ "AWS/Redshift": []string{"CPUUtilization", "DatabaseConnections", "HealthStatus", "MaintenanceMode", "NetworkReceiveThroughput", "NetworkTransmitThroughput", "PercentageDiskSpaceUsed", "ReadIOPS", "ReadLatency", "ReadThroughput", "WriteIOPS", "WriteLatency", "WriteThroughput"},
+ "AWS/RDS": []string{"BinLogDiskUsage", "CPUUtilization", "DatabaseConnections", "DiskQueueDepth", "FreeableMemory", "FreeStorageSpace", "ReplicaLag", "SwapUsage", "ReadIOPS", "WriteIOPS", "ReadLatency", "WriteLatency", "ReadThroughput", "WriteThroughput", "NetworkReceiveThroughput", "NetworkTransmitThroughput"},
+ "AWS/Route53": []string{"HealthCheckStatus", "HealthCheckPercentageHealthy"},
+ "AWS/SNS": []string{"NumberOfMessagesPublished", "PublishSize", "NumberOfNotificationsDelivered", "NumberOfNotificationsFailed"},
+ "AWS/SQS": []string{"NumberOfMessagesSent", "SentMessageSize", "NumberOfMessagesReceived", "NumberOfEmptyReceives", "NumberOfMessagesDeleted", "ApproximateNumberOfMessagesDelayed", "ApproximateNumberOfMessagesVisible", "ApproximateNumberOfMessagesNotVisible"},
+ "AWS/S3": []string{"BucketSizeBytes", "NumberOfObjects"},
+ "AWS/SWF": []string{"DecisionTaskScheduleToStartTime", "DecisionTaskStartToCloseTime", "DecisionTasksCompleted", "StartedDecisionTasksTimedOutOnClose", "WorkflowStartToCloseTime", "WorkflowsCanceled", "WorkflowsCompleted", "WorkflowsContinuedAsNew", "WorkflowsFailed", "WorkflowsTerminated", "WorkflowsTimedOut"},
+ "AWS/StorageGateway": []string{"CacheHitPercent", "CachePercentUsed", "CachePercentDirty", "CloudBytesDownloaded", "CloudDownloadLatency", "CloudBytesUploaded", "UploadBufferFree", "UploadBufferPercentUsed", "UploadBufferUsed", "QueuedWrites", "ReadBytes", "ReadTime", "TotalCacheSize", "WriteBytes", "WriteTime", "WorkingStorageFree", "WorkingStoragePercentUsed", "WorkingStorageUsed", "CacheHitPercent", "CachePercentUsed", "CachePercentDirty", "ReadBytes", "ReadTime", "WriteBytes", "WriteTime", "QueuedWrites"},
+ "AWS/WorkSpaces": []string{"Available", "Unhealthy", "ConnectionAttempt", "ConnectionSuccess", "ConnectionFailure", "SessionLaunchTime", "InSessionLatency", "SessionDisconnect"},
+ }
+ dimensionsMap = map[string][]string{
+ "AWS/AutoScaling": []string{"AutoScalingGroupName"},
+ "AWS/Billing": []string{"ServiceName", "LinkedAccount", "Currency"},
+ "AWS/CloudFront": []string{"DistributionId", "Region"},
+ "AWS/CloudSearch": []string{},
+ "AWS/DynamoDB": []string{"TableName", "GlobalSecondaryIndexName", "Operation"},
+ "AWS/ElastiCache": []string{"CacheClusterId", "CacheNodeId"},
+ "AWS/EBS": []string{"VolumeId"},
+ "AWS/EC2": []string{"AutoScalingGroupName", "ImageId", "InstanceId", "InstanceType"},
+ "AWS/ELB": []string{"LoadBalancerName", "AvailabilityZone"},
+ "AWS/ElasticMapReduce": []string{"ClusterId", "JobId"},
+ "AWS/Kinesis": []string{"StreamName"},
+ "AWS/ML": []string{"MLModelId", "RequestMode"},
+ "AWS/OpsWorks": []string{"StackId", "LayerId", "InstanceId"},
+ "AWS/Redshift": []string{"NodeID", "ClusterIdentifier"},
+ "AWS/RDS": []string{"DBInstanceIdentifier", "DatabaseClass", "EngineName"},
+ "AWS/Route53": []string{"HealthCheckId"},
+ "AWS/SNS": []string{"Application", "Platform", "TopicName"},
+ "AWS/SQS": []string{"QueueName"},
+ "AWS/S3": []string{"BucketName", "StorageType"},
+ "AWS/SWF": []string{"Domain", "ActivityTypeName", "ActivityTypeVersion"},
+ "AWS/StorageGateway": []string{"GatewayId", "GatewayName", "VolumeId"},
+ "AWS/WorkSpaces": []string{"DirectoryId", "WorkspaceId"},
+ }
+}
+
+func handleGetRegions(req *cwRequest, c *middleware.Context) {
+ regions := []string{
+ "us-west-2", "us-west-1", "eu-west-1", "eu-central-1", "ap-southeast-1",
+ "ap-southeast-2", "ap-northeast-1", "sa-east-1",
+ }
+
+ result := []interface{}{}
+ for _, region := range regions {
+ result = append(result, util.DynMap{"text": region, "value": region})
+ }
+
+ c.JSON(200, result)
+}
+
+func handleGetNamespaces(req *cwRequest, c *middleware.Context) {
+ result := []interface{}{}
+ for key, _ := range metricsMap {
+ result = append(result, util.DynMap{"text": key, "value": key})
+ }
+
+ c.JSON(200, result)
+}
+
+func handleGetMetrics(req *cwRequest, c *middleware.Context) {
+ reqParam := &struct {
+ Parameters struct {
+ Namespace string `json:"namespace"`
+ } `json:"parameters"`
+ }{}
+
+ json.Unmarshal(req.Body, reqParam)
+
+ namespaceMetrics, exists := metricsMap[reqParam.Parameters.Namespace]
+ if !exists {
+ c.JsonApiErr(404, "Unable to find namespace "+reqParam.Parameters.Namespace, nil)
+ return
+ }
+
+ result := []interface{}{}
+ for _, name := range namespaceMetrics {
+ result = append(result, util.DynMap{"text": name, "value": name})
+ }
+
+ c.JSON(200, result)
+}
+
+func handleGetDimensions(req *cwRequest, c *middleware.Context) {
+ reqParam := &struct {
+ Parameters struct {
+ Namespace string `json:"namespace"`
+ } `json:"parameters"`
+ }{}
+
+ json.Unmarshal(req.Body, reqParam)
+
+ dimensionValues, exists := dimensionsMap[reqParam.Parameters.Namespace]
+ if !exists {
+ c.JsonApiErr(404, "Unable to find dimension "+reqParam.Parameters.Namespace, nil)
+ return
+ }
+
+ result := []interface{}{}
+ for _, name := range dimensionValues {
+ result = append(result, util.DynMap{"text": name, "value": name})
+ }
+
+ c.JSON(200, result)
+}
diff --git a/pkg/api/dataproxy.go b/pkg/api/dataproxy.go
index 085fe3886d3..f95ccb97c94 100644
--- a/pkg/api/dataproxy.go
+++ b/pkg/api/dataproxy.go
@@ -8,6 +8,7 @@ import (
"net/url"
"time"
+ "github.com/grafana/grafana/pkg/api/cloudwatch"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/middleware"
m "github.com/grafana/grafana/pkg/models"
@@ -83,7 +84,7 @@ func ProxyDataSourceRequest(c *middleware.Context) {
}
if query.Result.Type == m.DS_CLOUDWATCH {
- ProxyCloudWatchDataSourceRequest(c)
+ cloudwatch.HandleRequest(c)
} else {
proxyPath := c.Params("*")
proxy := NewReverseProxy(&ds, proxyPath, targetUrl)
diff --git a/pkg/api/dataproxy_cloudwatch.go b/pkg/api/dataproxy_cloudwatch.go
deleted file mode 100644
index 3a0b4b16bc2..00000000000
--- a/pkg/api/dataproxy_cloudwatch.go
+++ /dev/null
@@ -1,107 +0,0 @@
-package api
-
-import (
- "encoding/json"
- "errors"
- "fmt"
- "io/ioutil"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/service/cloudwatch"
- "github.com/grafana/grafana/pkg/middleware"
-)
-
-func ProxyCloudWatchDataSourceRequest(c *middleware.Context) {
- body, _ := ioutil.ReadAll(c.Req.Request.Body)
-
- reqInfo := &struct {
- Region string `json:"region"`
- Service string `json:"service"`
- Action string `json:"action"`
- }{}
- json.Unmarshal([]byte(body), reqInfo)
-
- svc := cloudwatch.New(&aws.Config{Region: aws.String(reqInfo.Region)})
-
- switch reqInfo.Action {
- case "GetMetricStatistics":
- reqParam := &struct {
- Parameters struct {
- Namespace string `json:"Namespace"`
- MetricName string `json:"MetricName"`
- Dimensions []map[string]string `json:"Dimensions"`
- Statistics []string `json:"Statistics"`
- StartTime int64 `json:"StartTime"`
- EndTime int64 `json:"EndTime"`
- Period int64 `json:"Period"`
- } `json:"parameters"`
- }{}
- json.Unmarshal([]byte(body), reqParam)
-
- statistics := make([]*string, 0)
- for k := range reqParam.Parameters.Statistics {
- statistics = append(statistics, &reqParam.Parameters.Statistics[k])
- }
- dimensions := make([]*cloudwatch.Dimension, 0)
- for _, d := range reqParam.Parameters.Dimensions {
- dimensions = append(dimensions, &cloudwatch.Dimension{
- Name: aws.String(d["Name"]),
- Value: aws.String(d["Value"]),
- })
- }
-
- params := &cloudwatch.GetMetricStatisticsInput{
- Namespace: aws.String(reqParam.Parameters.Namespace),
- MetricName: aws.String(reqParam.Parameters.MetricName),
- Dimensions: dimensions,
- Statistics: statistics,
- StartTime: aws.Time(time.Unix(reqParam.Parameters.StartTime, 0)),
- EndTime: aws.Time(time.Unix(reqParam.Parameters.EndTime, 0)),
- Period: aws.Int64(reqParam.Parameters.Period),
- }
-
- resp, err := svc.GetMetricStatistics(params)
- if err != nil {
- c.JsonApiErr(500, "Unable to call AWS API", err)
- return
- }
-
- respJson, _ := json.Marshal(resp)
- fmt.Fprint(c.RW(), string(respJson))
- case "ListMetrics":
- reqParam := &struct {
- Parameters struct {
- Namespace string `json:"Namespace"`
- MetricName string `json:"MetricName"`
- Dimensions []map[string]string `json:"Dimensions"`
- } `json:"parameters"`
- }{}
- json.Unmarshal([]byte(body), reqParam)
-
- dimensions := make([]*cloudwatch.DimensionFilter, 0)
- for _, d := range reqParam.Parameters.Dimensions {
- dimensions = append(dimensions, &cloudwatch.DimensionFilter{
- Name: aws.String(d["Name"]),
- Value: aws.String(d["Value"]),
- })
- }
-
- params := &cloudwatch.ListMetricsInput{
- Namespace: aws.String(reqParam.Parameters.Namespace),
- MetricName: aws.String(reqParam.Parameters.MetricName),
- Dimensions: dimensions,
- }
-
- resp, err := svc.ListMetrics(params)
- if err != nil {
- c.JsonApiErr(500, "Unable to call AWS API", err)
- return
- }
-
- respJson, _ := json.Marshal(resp)
- fmt.Fprint(c.RW(), string(respJson))
- default:
- c.JsonApiErr(500, "Unexpected CloudWatch action", errors.New(reqInfo.Action))
- }
-}
diff --git a/public/app/features/dashboard/dashboardCtrl.js b/public/app/features/dashboard/dashboardCtrl.js
index f25fea26afe..30dda154e94 100644
--- a/public/app/features/dashboard/dashboardCtrl.js
+++ b/public/app/features/dashboard/dashboardCtrl.js
@@ -64,7 +64,7 @@ function (angular, $, config) {
$scope.appEvent("dashboard-loaded", $scope.dashboard);
}).catch(function(err) {
- console.log('Failed to initialize dashboard', err);
+ if (err.data && err.data.message) { err.message = err.data.message; }
$scope.appEvent("alert-error", ['Dashboard init failed', 'Template variables could not be initialized: ' + err.message]);
});
};
diff --git a/public/app/features/templating/editorCtrl.js b/public/app/features/templating/editorCtrl.js
index 74157ac3dd8..2f30129eedb 100644
--- a/public/app/features/templating/editorCtrl.js
+++ b/public/app/features/templating/editorCtrl.js
@@ -7,7 +7,7 @@ function (angular, _) {
var module = angular.module('grafana.controllers');
- module.controller('TemplateEditorCtrl', function($scope, datasourceSrv, templateSrv, templateValuesSrv, alertSrv) {
+ module.controller('TemplateEditorCtrl', function($scope, datasourceSrv, templateSrv, templateValuesSrv) {
var replacementDefaults = {
type: 'query',
@@ -78,9 +78,9 @@ function (angular, _) {
};
$scope.runQuery = function() {
- return templateValuesSrv.updateOptions($scope.current).then(function() {
- }, function(err) {
- alertSrv.set('Templating', 'Failed to run query for variable values: ' + err.message, 'error');
+ return templateValuesSrv.updateOptions($scope.current).then(null, function(err) {
+ if (err.data && err.data.message) { err.message = err.data.message; }
+ $scope.appEvent("alert-error", ['Templating', 'Template variables could not be initialized: ' + err.message]);
});
};
diff --git a/public/app/plugins/datasource/cloudwatch/datasource.js b/public/app/plugins/datasource/cloudwatch/datasource.js
index 1dc87def301..9a9876b53ae 100644
--- a/public/app/plugins/datasource/cloudwatch/datasource.js
+++ b/public/app/plugins/datasource/cloudwatch/datasource.js
@@ -1,233 +1,32 @@
-/* global AWS */
define([
'angular',
'lodash',
- 'kbn',
'moment',
- './queryCtrl',
+ './query_ctrl',
'./directives',
- 'aws-sdk',
],
-function (angular, _, kbn) {
+function (angular, _) {
'use strict';
var module = angular.module('grafana.services');
- module.factory('CloudWatchDatasource', function($q, $http, templateSrv) {
+ module.factory('CloudWatchDatasource', function($q, backendSrv, templateSrv) {
function CloudWatchDatasource(datasource) {
this.type = 'cloudwatch';
this.name = datasource.name;
this.supportMetrics = true;
- this.proxyMode = (datasource.jsonData.access === 'proxy');
this.proxyUrl = datasource.url;
-
this.defaultRegion = datasource.jsonData.defaultRegion;
- this.credentials = {
- accessKeyId: datasource.jsonData.accessKeyId,
- secretAccessKey: datasource.jsonData.secretAccessKey
- };
-
- /* jshint -W101 */
- this.supportedRegion = [
- 'us-east-1', 'us-west-2', 'us-west-1', 'eu-west-1', 'eu-central-1', 'ap-southeast-1', 'ap-southeast-2', 'ap-northeast-1', 'sa-east-1'
- ];
-
- this.supportedMetrics = {
- 'AWS/AutoScaling': [
- 'GroupMinSize', 'GroupMaxSize', 'GroupDesiredCapacity', 'GroupInServiceInstances', 'GroupPendingInstances', 'GroupStandbyInstances', 'GroupTerminatingInstances', 'GroupTotalInstances'
- ],
- 'AWS/Billing': [
- 'EstimatedCharges'
- ],
- 'AWS/CloudFront': [
- 'Requests', 'BytesDownloaded', 'BytesUploaded', 'TotalErrorRate', '4xxErrorRate', '5xxErrorRate'
- ],
- 'AWS/CloudSearch': [
- 'SuccessfulRequests', 'SearchableDocuments', 'IndexUtilization', 'Partitions'
- ],
- 'AWS/DynamoDB': [
- 'ConditionalCheckFailedRequests', 'ConsumedReadCapacityUnits', 'ConsumedWriteCapacityUnits', 'OnlineIndexConsumedWriteCapacity', 'OnlineIndexPercentageProgress', 'OnlineIndexThrottleEvents', 'ProvisionedReadCapacityUnits', 'ProvisionedWriteCapacityUnits', 'ReadThrottleEvents', 'ReturnedItemCount', 'SuccessfulRequestLatency', 'SystemErrors', 'ThrottledRequests', 'UserErrors', 'WriteThrottleEvents'
- ],
- 'AWS/ElastiCache': [
- 'CPUUtilization', 'SwapUsage', 'FreeableMemory', 'NetworkBytesIn', 'NetworkBytesOut',
- 'BytesUsedForCacheItems', 'BytesReadIntoMemcached', 'BytesWrittenOutFromMemcached', 'CasBadval', 'CasHits', 'CasMisses', 'CmdFlush', 'CmdGet', 'CmdSet', 'CurrConnections', 'CurrItems', 'DecrHits', 'DecrMisses', 'DeleteHits', 'DeleteMisses', 'Evictions', 'GetHits', 'GetMisses', 'IncrHits', 'IncrMisses', 'Reclaimed',
- 'CurrConnections', 'Evictions', 'Reclaimed', 'NewConnections', 'BytesUsedForCache', 'CacheHits', 'CacheMisses', 'ReplicationLag', 'GetTypeCmds', 'SetTypeCmds', 'KeyBasedCmds', 'StringBasedCmds', 'HashBasedCmds', 'ListBasedCmds', 'SetBasedCmds', 'SortedSetBasedCmds', 'CurrItems'
- ],
- 'AWS/EBS': [
- 'VolumeReadBytes', 'VolumeWriteBytes', 'VolumeReadOps', 'VolumeWriteOps', 'VolumeTotalReadTime', 'VolumeTotalWriteTime', 'VolumeIdleTime', 'VolumeQueueLength', 'VolumeThroughputPercentage', 'VolumeConsumedReadWriteOps'
- ],
- 'AWS/EC2': [
- 'CPUCreditUsage', 'CPUCreditBalance', 'CPUUtilization', 'DiskReadOps', 'DiskWriteOps', 'DiskReadBytes', 'DiskWriteBytes', 'NetworkIn', 'NetworkOut', 'StatusCheckFailed', 'StatusCheckFailed_Instance', 'StatusCheckFailed_System'
- ],
- 'AWS/ELB': [
- 'HealthyHostCount', 'UnHealthyHostCount', 'RequestCount', 'Latency', 'HTTPCode_ELB_4XX', 'HTTPCode_ELB_5XX', 'HTTPCode_Backend_2XX', 'HTTPCode_Backend_3XX', 'HTTPCode_Backend_4XX', 'HTTPCode_Backend_5XX', 'BackendConnectionErrors', 'SurgeQueueLength', 'SpilloverCount'
- ],
- 'AWS/ElasticMapReduce': [
- 'CoreNodesPending', 'CoreNodesRunning', 'HBaseBackupFailed', 'HBaseMostRecentBackupDuration', 'HBaseTimeSinceLastSuccessfulBackup', 'HDFSBytesRead', 'HDFSBytesWritten', 'HDFSUtilization', 'IsIdle', 'JobsFailed', 'JobsRunning', 'LiveDataNodes', 'LiveTaskTrackers', 'MapSlotsOpen', 'MissingBlocks', 'ReduceSlotsOpen', 'RemainingMapTasks', 'RemainingMapTasksPerSlot', 'RemainingReduceTasks', 'RunningMapTasks', 'RunningReduceTasks', 'S3BytesRead', 'S3BytesWritten', 'TaskNodesPending', 'TaskNodesRunning', 'TotalLoad'
- ],
- 'AWS/Kinesis': [
- 'PutRecord.Bytes', 'PutRecord.Latency', 'PutRecord.Success', 'PutRecords.Bytes', 'PutRecords.Latency', 'PutRecords.Records', 'PutRecords.Success', 'IncomingBytes', 'IncomingRecords', 'GetRecords.Bytes', 'GetRecords.IteratorAgeMilliseconds', 'GetRecords.Latency', 'GetRecords.Success'
- ],
- 'AWS/ML': [
- 'PredictCount', 'PredictFailureCount'
- ],
- 'AWS/OpsWorks': [
- 'cpu_idle', 'cpu_nice', 'cpu_system', 'cpu_user', 'cpu_waitio', 'load_1', 'load_5', 'load_15', 'memory_buffers', 'memory_cached', 'memory_free', 'memory_swap', 'memory_total', 'memory_used', 'procs'
- ],
- 'AWS/Redshift': [
- 'CPUUtilization', 'DatabaseConnections', 'HealthStatus', 'MaintenanceMode', 'NetworkReceiveThroughput', 'NetworkTransmitThroughput', 'PercentageDiskSpaceUsed', 'ReadIOPS', 'ReadLatency', 'ReadThroughput', 'WriteIOPS', 'WriteLatency', 'WriteThroughput'
- ],
- 'AWS/RDS': [
- 'BinLogDiskUsage', 'CPUUtilization', 'DatabaseConnections', 'DiskQueueDepth', 'FreeableMemory', 'FreeStorageSpace', 'ReplicaLag', 'SwapUsage', 'ReadIOPS', 'WriteIOPS', 'ReadLatency', 'WriteLatency', 'ReadThroughput', 'WriteThroughput', 'NetworkReceiveThroughput', 'NetworkTransmitThroughput'
- ],
- 'AWS/Route53': [
- 'HealthCheckStatus', 'HealthCheckPercentageHealthy'
- ],
- 'AWS/SNS': [
- 'NumberOfMessagesPublished', 'PublishSize', 'NumberOfNotificationsDelivered', 'NumberOfNotificationsFailed'
- ],
- 'AWS/SQS': [
- 'NumberOfMessagesSent', 'SentMessageSize', 'NumberOfMessagesReceived', 'NumberOfEmptyReceives', 'NumberOfMessagesDeleted', 'ApproximateNumberOfMessagesDelayed', 'ApproximateNumberOfMessagesVisible', 'ApproximateNumberOfMessagesNotVisible'
- ],
- 'AWS/S3': [
- 'BucketSizeBytes', 'NumberOfObjects'
- ],
- 'AWS/SWF': [
- 'DecisionTaskScheduleToStartTime', 'DecisionTaskStartToCloseTime', 'DecisionTasksCompleted', 'StartedDecisionTasksTimedOutOnClose', 'WorkflowStartToCloseTime', 'WorkflowsCanceled', 'WorkflowsCompleted', 'WorkflowsContinuedAsNew', 'WorkflowsFailed', 'WorkflowsTerminated', 'WorkflowsTimedOut'
- ],
- 'AWS/StorageGateway': [
- 'CacheHitPercent', 'CachePercentUsed', 'CachePercentDirty', 'CloudBytesDownloaded', 'CloudDownloadLatency', 'CloudBytesUploaded', 'UploadBufferFree', 'UploadBufferPercentUsed', 'UploadBufferUsed', 'QueuedWrites', 'ReadBytes', 'ReadTime', 'TotalCacheSize', 'WriteBytes', 'WriteTime', 'WorkingStorageFree', 'WorkingStoragePercentUsed', 'WorkingStorageUsed', 'CacheHitPercent', 'CachePercentUsed', 'CachePercentDirty', 'ReadBytes', 'ReadTime', 'WriteBytes', 'WriteTime', 'QueuedWrites'
- ],
- 'AWS/WorkSpaces': [
- 'Available', 'Unhealthy', 'ConnectionAttempt', 'ConnectionSuccess', 'ConnectionFailure', 'SessionLaunchTime', 'InSessionLatency', 'SessionDisconnect'
- ],
- };
-
- this.supportedDimensions = {
- 'AWS/AutoScaling': [
- 'AutoScalingGroupName'
- ],
- 'AWS/Billing': [
- 'ServiceName', 'LinkedAccount', 'Currency'
- ],
- 'AWS/CloudFront': [
- 'DistributionId', 'Region'
- ],
- 'AWS/CloudSearch': [
-
- ],
- 'AWS/DynamoDB': [
- 'TableName', 'GlobalSecondaryIndexName', 'Operation'
- ],
- 'AWS/ElastiCache': [
- 'CacheClusterId', 'CacheNodeId'
- ],
- 'AWS/EBS': [
- 'VolumeId'
- ],
- 'AWS/EC2': [
- 'AutoScalingGroupName', 'ImageId', 'InstanceId', 'InstanceType'
- ],
- 'AWS/ELB': [
- 'LoadBalancerName', 'AvailabilityZone'
- ],
- 'AWS/ElasticMapReduce': [
- 'ClusterId', 'JobId'
- ],
- 'AWS/Kinesis': [
- 'StreamName'
- ],
- 'AWS/ML': [
- 'MLModelId', 'RequestMode'
- ],
- 'AWS/OpsWorks': [
- 'StackId', 'LayerId', 'InstanceId'
- ],
- 'AWS/Redshift': [
- 'NodeID', 'ClusterIdentifier'
- ],
- 'AWS/RDS': [
- 'DBInstanceIdentifier', 'DatabaseClass', 'EngineName'
- ],
- 'AWS/Route53': [
- 'HealthCheckId'
- ],
- 'AWS/SNS': [
- 'Application', 'Platform', 'TopicName'
- ],
- 'AWS/SQS': [
- 'QueueName'
- ],
- 'AWS/S3': [
- 'BucketName', 'StorageType'
- ],
- 'AWS/SWF': [
- 'Domain', 'ActivityTypeName', 'ActivityTypeVersion'
- ],
- 'AWS/StorageGateway': [
- 'GatewayId', 'GatewayName', 'VolumeId'
- ],
- 'AWS/WorkSpaces': [
- 'DirectoryId', 'WorkspaceId'
- ],
- };
- /* jshint +W101 */
-
- /* load custom metrics definitions */
- var self = this;
- $q.all(
- _.chain(datasource.jsonData.customMetricsAttributes)
- .reject(function(u) {
- return _.isEmpty(u);
- })
- .map(function(u) {
- return $http({ method: 'GET', url: u });
- })
- )
- .then(function(allResponse) {
- _.chain(allResponse)
- .map(function(d) {
- return d.data.Metrics;
- })
- .flatten()
- .reject(function(metric) {
- return metric.Namespace.indexOf('AWS/') === 0;
- })
- .map(function(metric) {
- metric.Dimensions = _.chain(metric.Dimensions)
- .map(function(d) {
- return d.Name;
- })
- .value().sort();
- return metric;
- })
- .uniq(function(metric) {
- return metric.Namespace + metric.MetricName + metric.Dimensions.join('');
- })
- .each(function(metric) {
- if (!_.has(self.supportedMetrics, metric.Namespace)) {
- self.supportedMetrics[metric.Namespace] = [];
- }
- self.supportedMetrics[metric.Namespace].push(metric.MetricName);
-
- if (!_.has(self.supportedDimensions, metric.Namespace)) {
- self.supportedDimensions[metric.Namespace] = [];
- }
-
- self.supportedDimensions[metric.Namespace] = _.union(self.supportedDimensions[metric.Namespace], metric.Dimensions);
- });
- });
}
- // Called once per panel (graph)
CloudWatchDatasource.prototype.query = function(options) {
var start = convertToCloudWatchTime(options.range.from);
var end = convertToCloudWatchTime(options.range.to);
var queries = [];
_.each(options.targets, _.bind(function(target) {
- if (!target.namespace || !target.metricName || _.isEmpty(target.statistics)) {
+ if (target.hide || !target.namespace || !target.metricName || _.isEmpty(target.statistics)) {
return;
}
@@ -236,7 +35,7 @@ function (angular, _, kbn) {
query.namespace = templateSrv.replace(target.namespace, options.scopedVars);
query.metricName = templateSrv.replace(target.metricName, options.scopedVars);
query.dimensions = convertDimensionFormat(target.dimensions);
- query.statistics = getActivatedStatistics(target.statistics);
+ query.statistics = target.statistics;
query.period = parseInt(target.period, 10);
var range = end - start;
@@ -255,110 +54,91 @@ function (angular, _, kbn) {
return d.promise;
}
- var allQueryPromise = _.map(queries, _.bind(function(query) {
+ var allQueryPromise = _.map(queries, function(query) {
return this.performTimeSeriesQuery(query, start, end);
- }, this));
+ }, this);
- return $q.all(allQueryPromise)
- .then(function(allResponse) {
- var result = [];
+ return $q.all(allQueryPromise).then(function(allResponse) {
+ var result = [];
- _.each(allResponse, function(response, index) {
- var metrics = transformMetricData(response, options.targets[index]);
- _.each(metrics, function(m) {
- result.push(m);
- });
- });
-
- return { data: result };
+ _.each(allResponse, function(response, index) {
+ var metrics = transformMetricData(response, options.targets[index]);
+ result = result.concat(metrics);
});
+
+ return { data: result };
+ });
};
CloudWatchDatasource.prototype.performTimeSeriesQuery = function(query, start, end) {
- var cloudwatch = this.getCloudWatchClient(query.region);
+ return this.awsRequest({
+ region: query.region,
+ action: 'GetMetricStatistics',
+ parameters: {
+ namespace: query.namespace,
+ metricName: query.metricName,
+ dimensions: query.dimensions,
+ statistics: query.statistics,
+ startTime: start,
+ endTime: end,
+ period: query.period
+ }
+ });
+ };
- var params = {
- Namespace: query.namespace,
- MetricName: query.metricName,
- Dimensions: query.dimensions,
- Statistics: query.statistics,
- StartTime: start,
- EndTime: end,
- Period: query.period
+ CloudWatchDatasource.prototype.getRegions = function() {
+ return this.awsRequest({action: '__GetRegions'});
+ };
+
+ CloudWatchDatasource.prototype.getNamespaces = function() {
+ return this.awsRequest({action: '__GetNamespaces'});
+ };
+
+ CloudWatchDatasource.prototype.getMetrics = function(namespace) {
+ return this.awsRequest({
+ action: '__GetMetrics',
+ parameters: {
+ namespace: templateSrv.replace(namespace)
+ }
+ });
+ };
+
+ CloudWatchDatasource.prototype.getDimensionKeys = function(namespace) {
+ return this.awsRequest({
+ action: '__GetDimensions',
+ parameters: {
+ namespace: templateSrv.replace(namespace)
+ }
+ });
+ };
+
+ CloudWatchDatasource.prototype.getDimensionValues = function(region, namespace, metricName, dimensions) {
+ var request = {
+ region: templateSrv.replace(region),
+ action: 'ListMetrics',
+ parameters: {
+ namespace: templateSrv.replace(namespace),
+ metricName: templateSrv.replace(metricName),
+ dimensions: convertDimensionFormat(dimensions),
+ }
};
- var d = $q.defer();
- cloudwatch.getMetricStatistics(params, function(err, data) {
- if (err) {
- return d.reject(err);
- }
- return d.resolve(data);
+ return this.awsRequest(request).then(function(result) {
+ return _.chain(result.Metrics).map(function(metric) {
+ return _.pluck(metric.Dimensions, 'Value');
+ }).flatten().uniq().sortBy(function(name) {
+ return name;
+ }).map(function(value) {
+ return {value: value, text: value};
+ }).value();
});
-
- return d.promise;
};
- CloudWatchDatasource.prototype.performSuggestRegion = function() {
- return this.supportedRegion;
- };
-
- CloudWatchDatasource.prototype.performSuggestNamespace = function() {
- return _.keys(this.supportedMetrics);
- };
-
- CloudWatchDatasource.prototype.performSuggestMetrics = function(namespace) {
- namespace = templateSrv.replace(namespace);
- return this.supportedMetrics[namespace] || [];
- };
-
- CloudWatchDatasource.prototype.performSuggestDimensionKeys = function(namespace) {
- namespace = templateSrv.replace(namespace);
- return this.supportedDimensions[namespace] || [];
- };
-
- CloudWatchDatasource.prototype.performSuggestDimensionValues = function(region, namespace, metricName, dimensions) {
- region = templateSrv.replace(region);
- namespace = templateSrv.replace(namespace);
- metricName = templateSrv.replace(metricName);
-
- var cloudwatch = this.getCloudWatchClient(region);
-
- var params = {
- Namespace: namespace,
- MetricName: metricName
- };
- if (!_.isEmpty(dimensions)) {
- params.Dimensions = convertDimensionFormat(dimensions);
- }
-
- var d = $q.defer();
-
- cloudwatch.listMetrics(params, function(err, data) {
- if (err) {
- return d.reject(err);
- }
-
- var suggestData = _.chain(data.Metrics)
- .map(function(metric) {
- return metric.Dimensions;
- })
- .reject(function(metric) {
- return _.isEmpty(metric);
- })
- .value();
-
- return d.resolve(suggestData);
- });
-
- return d.promise;
- };
-
- CloudWatchDatasource.prototype.getTemplateVariableNames = function() {
- var variables = [];
- templateSrv.fillVariableValuesForUrl(variables);
-
- return _.map(_.keys(variables), function(k) {
- return k.replace(/var-/, '$');
+ CloudWatchDatasource.prototype.performEC2DescribeInstances = function(region, filters, instanceIds) {
+ return this.awsRequest({
+ region: region,
+ action: 'DescribeInstances',
+ parameters: { filter: filters, instanceIds: instanceIds }
});
};
@@ -373,32 +153,24 @@ function (angular, _, kbn) {
});
};
- var d = $q.defer();
-
- var regionQuery = query.match(/^region\(\)/);
+ var regionQuery = query.match(/^regions\(\)/);
if (regionQuery) {
- d.resolve(transformSuggestData(this.performSuggestRegion()));
- return d.promise;
+ return this.getRegions();
}
- var namespaceQuery = query.match(/^namespace\(\)/);
+ var namespaceQuery = query.match(/^namespaces\(\)/);
if (namespaceQuery) {
- d.resolve(transformSuggestData(this.performSuggestNamespace()));
- return d.promise;
+ return this.getNamespaces();
}
var metricNameQuery = query.match(/^metrics\(([^\)]+?)\)/);
if (metricNameQuery) {
- namespace = templateSrv.replace(metricNameQuery[1]);
- d.resolve(transformSuggestData(this.performSuggestMetrics(namespace)));
- return d.promise;
+ return this.getMetrics(metricNameQuery[1]);
}
var dimensionKeysQuery = query.match(/^dimension_keys\(([^\)]+?)\)/);
if (dimensionKeysQuery) {
- namespace = templateSrv.replace(dimensionKeysQuery[1]);
- d.resolve(transformSuggestData(this.performSuggestDimensionKeys(namespace)));
- return d.promise;
+ return this.getDimensionKeys(dimensionKeysQuery[1]);
}
var dimensionValuesQuery = query.match(/^dimension_values\(([^,]+?),\s?([^,]+?),\s?([^,]+?)(,\s?([^)]*))?\)/);
@@ -419,20 +191,23 @@ function (angular, _, kbn) {
});
}
- return this.performSuggestDimensionValues(region, namespace, metricName, dimensions)
- .then(function(suggestData) {
- return _.map(suggestData, function(dimensions) {
- var result = _.chain(dimensions)
- .sortBy(function(dimension) {
- return dimension.Name;
- })
- .map(function(dimension) {
- return dimension.Name + '=' + dimension.Value;
- })
- .value().join(',');
+ return this.getDimensionValues(region, namespace, metricName, dimensions);
+ }
- return { text: result };
+ var ebsVolumeIdsQuery = query.match(/^ebs_volume_ids\(([^,]+?),\s?([^,]+?)\)/);
+ if (ebsVolumeIdsQuery) {
+ region = templateSrv.replace(ebsVolumeIdsQuery[1]);
+ var instanceId = templateSrv.replace(ebsVolumeIdsQuery[2]);
+ var instanceIds = [
+ instanceId
+ ];
+
+ return this.performEC2DescribeInstances(region, [], instanceIds).then(function(result) {
+ var volumeIds = _.map(result.Reservations[0].Instances[0].BlockDeviceMappings, function(mapping) {
+ return mapping.EBS.VolumeID;
});
+
+ return transformSuggestData(volumeIds);
});
}
@@ -446,48 +221,21 @@ function (angular, _, kbn) {
var metricName = 'EstimatedCharges';
var dimensions = {};
- return this.performSuggestDimensionValues(region, namespace, metricName, dimensions).then(function () {
+ return this.getDimensionValues(region, namespace, metricName, dimensions).then(function () {
return { status: 'success', message: 'Data source is working', title: 'Success' };
});
};
- CloudWatchDatasource.prototype.getCloudWatchClient = function(region) {
- if (!this.proxyMode) {
- return new AWS.CloudWatch({
- region: region,
- accessKeyId: this.credentials.accessKeyId,
- secretAccessKey: this.credentials.secretAccessKey
- });
- } else {
- var self = this;
- var generateRequestProxy = function(service, action) {
- return function(params, callback) {
- var data = {
- region: region,
- service: service,
- action: action,
- parameters: params
- };
+ CloudWatchDatasource.prototype.awsRequest = function(data) {
+ var options = {
+ method: 'POST',
+ url: this.proxyUrl,
+ data: data
+ };
- var options = {
- method: 'POST',
- url: self.proxyUrl,
- data: data
- };
-
- $http(options).then(function(response) {
- callback(null, response.data);
- }, function(err) {
- callback(err, []);
- });
- };
- };
-
- return {
- getMetricStatistics: generateRequestProxy('CloudWatch', 'GetMetricStatistics'),
- listMetrics: generateRequestProxy('CloudWatch', 'ListMetrics')
- };
- }
+ return backendSrv.datasourceRequest(options).then(function(result) {
+ return result.data;
+ });
};
CloudWatchDatasource.prototype.getDefaultRegion = function() {
@@ -495,62 +243,44 @@ function (angular, _, kbn) {
};
function transformMetricData(md, options) {
- var result = [];
+ var aliasRegex = /\{\{(.+?)\}\}/g;
+ var aliasPattern = options.alias || '{{metric}}_{{stat}}';
+ var aliasData = {
+ region: templateSrv.replace(options.region),
+ namespace: templateSrv.replace(options.namespace),
+ metric: templateSrv.replace(options.metricName),
+ };
+ _.extend(aliasData, options.dimensions);
- var dimensionPart = templateSrv.replace(JSON.stringify(options.dimensions));
- _.each(getActivatedStatistics(options.statistics), function(s) {
- var originalSettings = _.templateSettings;
- _.templateSettings = {
- interpolate: /\{\{(.+?)\}\}/g
- };
- var template = _.template(options.legendFormat);
+ return _.map(options.statistics, function(stat) {
+ var dps = _.chain(md.Datapoints).map(function(dp) {
+ return [dp[stat], new Date(dp.Timestamp).getTime()];
+ })
+ .sortBy(function(dp) {
+ return dp[1];
+ }).value();
- var metricLabel;
- if (_.isEmpty(options.legendFormat)) {
- metricLabel = md.Label + '_' + s + dimensionPart;
- } else {
- var d = convertDimensionFormat(options.dimensions);
- metricLabel = template({
- Region: templateSrv.replace(options.region),
- Namespace: templateSrv.replace(options.namespace),
- MetricName: templateSrv.replace(options.metricName),
- Dimensions: d,
- Statistics: s
- });
- }
-
- _.templateSettings = originalSettings;
-
- var dps = _.map(md.Datapoints, function(value) {
- return [value[s], new Date(value.Timestamp).getTime()];
+ aliasData.stat = stat;
+ var seriesName = aliasPattern.replace(aliasRegex, function(match, g1) {
+ if (aliasData[g1]) {
+ return aliasData[g1];
+ }
+ return g1;
});
- dps = _.sortBy(dps, function(dp) { return dp[1]; });
- result.push({ target: metricLabel, datapoints: dps });
+ return {target: seriesName, datapoints: dps};
});
-
- return result;
- }
-
- function getActivatedStatistics(statistics) {
- var activatedStatistics = [];
- _.each(statistics, function(v, k) {
- if (v) {
- activatedStatistics.push(k);
- }
- });
- return activatedStatistics;
}
function convertToCloudWatchTime(date) {
- return Math.round(kbn.parseDate(date).getTime() / 1000);
+ return Math.round(date.valueOf() / 1000);
}
function convertDimensionFormat(dimensions) {
- return _.map(_.keys(dimensions), function(key) {
+ return _.map(dimensions, function(value, key) {
return {
Name: templateSrv.replace(key),
- Value: templateSrv.replace(dimensions[key])
+ Value: templateSrv.replace(value)
};
});
}
diff --git a/public/app/plugins/datasource/cloudwatch/partials/config.html b/public/app/plugins/datasource/cloudwatch/partials/config.html
index 220e2efce7f..3757dfba833 100644
--- a/public/app/plugins/datasource/cloudwatch/partials/config.html
+++ b/public/app/plugins/datasource/cloudwatch/partials/config.html
@@ -9,46 +9,53 @@
-
-
- Access Direct = url is used directly from browser, Proxy = Grafana backend will proxy the request
-
diff --git a/public/app/plugins/datasource/cloudwatch/_plugin.json b/public/app/plugins/datasource/cloudwatch/plugin.json
similarity index 100%
rename from public/app/plugins/datasource/cloudwatch/_plugin.json
rename to public/app/plugins/datasource/cloudwatch/plugin.json
diff --git a/public/app/plugins/datasource/cloudwatch/queryCtrl.js b/public/app/plugins/datasource/cloudwatch/queryCtrl.js
deleted file mode 100644
index ee63e317c55..00000000000
--- a/public/app/plugins/datasource/cloudwatch/queryCtrl.js
+++ /dev/null
@@ -1,172 +0,0 @@
-define([
- 'angular',
- 'lodash',
-],
-function (angular, _) {
- 'use strict';
-
- var module = angular.module('grafana.controllers');
-
- module.controller('CloudWatchQueryCtrl', function($scope, templateSrv, uiSegmentSrv) {
-
- $scope.init = function() {
- $scope.target.namespace = $scope.target.namespace || '';
- $scope.target.metricName = $scope.target.metricName || '';
- $scope.target.dimensions = $scope.target.dimensions || {};
- $scope.target.escapedDimensions = this.escapeDimensions($scope.target.dimensions);
- $scope.target.statistics = $scope.target.statistics || {};
- $scope.target.period = $scope.target.period || 60;
- $scope.target.region = $scope.target.region || $scope.datasource.getDefaultRegion();
- $scope.target.errors = validateTarget();
-
- $scope.regionSegment = uiSegmentSrv.getSegmentForValue($scope.target.region, 'select region');
- $scope.namespaceSegment = uiSegmentSrv.getSegmentForValue($scope.target.namespace, 'select namespace');
- $scope.metricSegment = uiSegmentSrv.getSegmentForValue($scope.target.metricName, 'select metric');
- };
-
- $scope.getRegions = function() {
- return $scope.datasource.metricFindQuery('region()')
- .then($scope.transformToSegments(true));
- };
-
- $scope.getNamespaces = function() {
- return $scope.datasource.metricFindQuery('namespace()')
- .then($scope.transformToSegments(true));
- };
-
- $scope.getMetrics = function() {
- return $scope.datasource.metricFindQuery('metrics(' + $scope.target.namespace + ')')
- .then($scope.transformToSegments(true));
- };
-
- $scope.regionChanged = function() {
- $scope.target.region = $scope.regionSegment.value;
- $scope.get_data();
- };
-
- $scope.namespaceChanged = function() {
- $scope.target.namespace = $scope.namespaceSegment.value;
- $scope.get_data();
- };
-
- $scope.metricChanged = function() {
- $scope.target.metricName = $scope.metricSegment.value;
- $scope.get_data();
- };
-
- $scope.transformToSegments = function(addTemplateVars) {
- return function(results) {
- var segments = _.map(results, function(segment) {
- return uiSegmentSrv.newSegment({ value: segment.text, expandable: segment.expandable });
- });
-
- if (addTemplateVars) {
- _.each(templateSrv.variables, function(variable) {
- segments.unshift(uiSegmentSrv.newSegment({ type: 'template', value: '$' + variable.name, expandable: true }));
- });
- }
-
- return segments;
- };
- };
-
- $scope.refreshMetricData = function() {
- $scope.target.errors = validateTarget($scope.target);
-
- // this does not work so good
- if (!_.isEqual($scope.oldTarget, $scope.target) && _.isEmpty($scope.target.errors)) {
- $scope.oldTarget = angular.copy($scope.target);
- $scope.get_data();
- }
- };
-
- $scope.suggestDimensionKeys = function(query, callback) { // jshint unused:false
- return _.union($scope.datasource.performSuggestDimensionKeys($scope.target.namespace), $scope.datasource.getTemplateVariableNames());
- };
-
- $scope.suggestDimensionValues = function(query, callback) {
- if (!$scope.target.namespace || !$scope.target.metricName) {
- return callback([]);
- }
-
- $scope.datasource.performSuggestDimensionValues(
- $scope.target.region,
- $scope.target.namespace,
- $scope.target.metricName,
- $scope.target.dimensions
- )
- .then(function(result) {
- var suggestData = _.chain(result)
- .flatten(true)
- .filter(function(dimension) {
- return dimension.Name === templateSrv.replace($scope.target.currentDimensionKey);
- })
- .pluck('Value')
- .uniq()
- .value();
-
- suggestData = _.union(suggestData, $scope.datasource.getTemplateVariableNames());
- callback(suggestData);
- }, function() {
- callback([]);
- });
- };
-
- $scope.addDimension = function() {
- if (!$scope.addDimensionMode) {
- $scope.addDimensionMode = true;
- return;
- }
-
- if (!$scope.target.dimensions) {
- $scope.target.dimensions = {};
- }
-
- $scope.target.dimensions[$scope.target.currentDimensionKey] = $scope.target.currentDimensionValue;
- $scope.target.escapedDimensions = this.escapeDimensions($scope.target.dimensions);
- $scope.target.currentDimensionKey = '';
- $scope.target.currentDimensionValue = '';
- $scope.refreshMetricData();
-
- $scope.addDimensionMode = false;
- };
-
- $scope.removeDimension = function(key) {
- key = key.replace(/\\\$/g, '$');
- delete $scope.target.dimensions[key];
- $scope.target.escapedDimensions = this.escapeDimensions($scope.target.dimensions);
- $scope.refreshMetricData();
- };
-
- $scope.escapeDimensions = function(d) {
- var result = {};
- _.chain(d)
- .keys(d)
- .each(function(k) {
- var v = d[k];
- result[k.replace(/\$/g, '\uFF04')] = v.replace(/\$/g, '\$');
- });
-
- return result;
- };
-
- $scope.statisticsOptionChanged = function() {
- $scope.refreshMetricData();
- };
-
- // TODO: validate target
- function validateTarget() {
- var errs = {};
-
- if ($scope.target.period < 60 || ($scope.target.period % 60) !== 0) {
- errs.period = 'Period must be at least 60 seconds and must be a multiple of 60';
- }
-
- return errs;
- }
-
- $scope.init();
-
- });
-
-});
diff --git a/public/app/plugins/datasource/cloudwatch/query_ctrl.js b/public/app/plugins/datasource/cloudwatch/query_ctrl.js
new file mode 100644
index 00000000000..ccbc36f0912
--- /dev/null
+++ b/public/app/plugins/datasource/cloudwatch/query_ctrl.js
@@ -0,0 +1,189 @@
+define([
+ 'angular',
+ 'lodash',
+],
+function (angular, _) {
+ 'use strict';
+
+ var module = angular.module('grafana.controllers');
+
+ module.controller('CloudWatchQueryCtrl', function($scope, templateSrv, uiSegmentSrv, $q) {
+
+ $scope.init = function() {
+ var target = $scope.target;
+ target.namespace = target.namespace || '';
+ target.metricName = target.metricName || '';
+ target.statistics = target.statistics || ['Average'];
+ target.dimensions = target.dimensions || {};
+ target.period = target.period || 60;
+ target.region = target.region || $scope.datasource.getDefaultRegion();
+
+ $scope.aliasSyntax = '{{metric}} {{stat}} {{namespace}} {{region}} {{}}';
+
+ $scope.regionSegment = uiSegmentSrv.getSegmentForValue($scope.target.region, 'select region');
+ $scope.namespaceSegment = uiSegmentSrv.getSegmentForValue($scope.target.namespace, 'select namespace');
+ $scope.metricSegment = uiSegmentSrv.getSegmentForValue($scope.target.metricName, 'select metric');
+
+ $scope.dimSegments = _.reduce($scope.target.dimensions, function(memo, value, key) {
+ memo.push(uiSegmentSrv.newKey(key));
+ memo.push(uiSegmentSrv.newOperator("="));
+ memo.push(uiSegmentSrv.newKeyValue(value));
+ return memo;
+ }, []);
+
+ $scope.statSegments = _.map($scope.target.statistics, function(stat) {
+ return uiSegmentSrv.getSegmentForValue(stat);
+ });
+
+ $scope.ensurePlusButton($scope.statSegments);
+ $scope.ensurePlusButton($scope.dimSegments);
+ $scope.removeDimSegment = uiSegmentSrv.newSegment({fake: true, value: '-- remove dimension --'});
+ $scope.removeStatSegment = uiSegmentSrv.newSegment({fake: true, value: '-- remove stat --'});
+ };
+
+ $scope.getStatSegments = function() {
+ return $q.when([
+ angular.copy($scope.removeStatSegment),
+ uiSegmentSrv.getSegmentForValue('Average'),
+ uiSegmentSrv.getSegmentForValue('Maximum'),
+ uiSegmentSrv.getSegmentForValue('Minimum'),
+ uiSegmentSrv.getSegmentForValue('Sum'),
+ uiSegmentSrv.getSegmentForValue('SampleCount'),
+ ]);
+ };
+
+ $scope.statSegmentChanged = function(segment, index) {
+ if (segment.value === $scope.removeStatSegment.value) {
+ $scope.statSegments.splice(index, 1);
+ } else {
+ segment.type = 'value';
+ }
+
+ $scope.target.statistics = _.reduce($scope.statSegments, function(memo, seg) {
+ if (!seg.fake) { memo.push(seg.value); } return memo;
+ }, []);
+
+ $scope.ensurePlusButton($scope.statSegments);
+ $scope.get_data();
+ };
+
+ $scope.ensurePlusButton = function(segments) {
+ var count = segments.length;
+ var lastSegment = segments[Math.max(count-1, 0)];
+
+ if (!lastSegment || lastSegment.type !== 'plus-button') {
+ segments.push(uiSegmentSrv.newPlusButton());
+ }
+ };
+
+ $scope.getDimSegments = function(segment) {
+ if (segment.type === 'operator') { return $q.when([]); }
+
+ var target = $scope.target;
+ var query = $q.when([]);
+
+ if (segment.type === 'key' || segment.type === 'plus-button') {
+ query = $scope.datasource.getDimensionKeys($scope.target.namespace);
+ } else if (segment.type === 'value') {
+ query = $scope.datasource.getDimensionValues(target.region, target.namespace, target.metricName, {});
+ }
+
+ return query.then($scope.transformToSegments(true)).then(function(results) {
+ if (segment.type === 'key') {
+ results.splice(0, 0, angular.copy($scope.removeDimSegment));
+ }
+ return results;
+ });
+ };
+
+ $scope.dimSegmentChanged = function(segment, index) {
+ $scope.dimSegments[index] = segment;
+
+ if (segment.value === $scope.removeDimSegment.value) {
+ $scope.dimSegments.splice(index, 3);
+ }
+ else if (segment.type === 'plus-button') {
+ $scope.dimSegments.push(uiSegmentSrv.newOperator('='));
+ $scope.dimSegments.push(uiSegmentSrv.newFake('select dimension value', 'value', 'query-segment-value'));
+ segment.type = 'key';
+ segment.cssClass = 'query-segment-key';
+ }
+
+ $scope.syncDimSegmentsWithModel();
+ $scope.ensurePlusButton($scope.dimSegments);
+ $scope.get_data();
+ };
+
+ $scope.syncDimSegmentsWithModel = function() {
+ var dims = {};
+ var length = $scope.dimSegments.length;
+
+ for (var i = 0; i < length - 2; i += 3) {
+ var keySegment = $scope.dimSegments[i];
+ var valueSegment = $scope.dimSegments[i + 2];
+ if (!valueSegment.fake) {
+ dims[keySegment.value] = valueSegment.value;
+ }
+ }
+
+ $scope.target.dimensions = dims;
+ };
+
+ $scope.getRegions = function() {
+ return $scope.datasource.metricFindQuery('regions()')
+ .then($scope.transformToSegments(true));
+ };
+
+ $scope.getNamespaces = function() {
+ return $scope.datasource.metricFindQuery('namespaces()')
+ .then($scope.transformToSegments(true));
+ };
+
+ $scope.getMetrics = function() {
+ return $scope.datasource.metricFindQuery('metrics(' + $scope.target.namespace + ')')
+ .then($scope.transformToSegments(true));
+ };
+
+ $scope.regionChanged = function() {
+ $scope.target.region = $scope.regionSegment.value;
+ $scope.get_data();
+ };
+
+ $scope.namespaceChanged = function() {
+ $scope.target.namespace = $scope.namespaceSegment.value;
+ $scope.get_data();
+ };
+
+ $scope.metricChanged = function() {
+ $scope.target.metricName = $scope.metricSegment.value;
+ $scope.get_data();
+ };
+
+ $scope.transformToSegments = function(addTemplateVars) {
+ return function(results) {
+ var segments = _.map(results, function(segment) {
+ return uiSegmentSrv.newSegment({ value: segment.text, expandable: segment.expandable });
+ });
+
+ if (addTemplateVars) {
+ _.each(templateSrv.variables, function(variable) {
+ segments.unshift(uiSegmentSrv.newSegment({ type: 'template', value: '$' + variable.name, expandable: true }));
+ });
+ }
+
+ return segments;
+ };
+ };
+
+ $scope.refreshMetricData = function() {
+ if (!_.isEqual($scope.oldTarget, $scope.target)) {
+ $scope.oldTarget = angular.copy($scope.target);
+ $scope.get_data();
+ }
+ };
+
+ $scope.init();
+
+ });
+
+});
diff --git a/public/app/plugins/datasource/cloudwatch/specs/datasource_specs.ts b/public/app/plugins/datasource/cloudwatch/specs/datasource_specs.ts
new file mode 100644
index 00000000000..4714a642d30
--- /dev/null
+++ b/public/app/plugins/datasource/cloudwatch/specs/datasource_specs.ts
@@ -0,0 +1,173 @@
+///
+///
+
+import {describe, beforeEach, it, sinon, expect, angularMocks} from 'test/lib/common';
+
+declare var helpers: any;
+
+describe('CloudWatchDatasource', function() {
+ var ctx = new helpers.ServiceTestContext();
+
+ beforeEach(angularMocks.module('grafana.services'));
+ beforeEach(angularMocks.module('grafana.controllers'));
+ beforeEach(ctx.providePhase(['templateSrv', 'backendSrv']));
+ beforeEach(ctx.createService('CloudWatchDatasource'));
+ beforeEach(function() {
+ ctx.ds = new ctx.service({
+ jsonData: {
+ defaultRegion: 'us-east-1',
+ access: 'proxy'
+ }
+ });
+ });
+
+ describe('When performing CloudWatch query', function() {
+ var requestParams;
+
+ var query = {
+ range: { from: 'now-1h', to: 'now' },
+ targets: [
+ {
+ region: 'us-east-1',
+ namespace: 'AWS/EC2',
+ metricName: 'CPUUtilization',
+ dimensions: {
+ InstanceId: 'i-12345678'
+ },
+ statistics: ['Average'],
+ period: 300
+ }
+ ]
+ };
+
+ var response = {
+ Datapoints: [
+ {
+ Average: 1,
+ Timestamp: 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)'
+ }
+ ],
+ Label: 'CPUUtilization'
+ };
+
+ beforeEach(function() {
+ ctx.backendSrv.datasourceRequest = function(params) {
+ requestParams = params;
+ return ctx.$q.when({data: response});
+ };
+ });
+
+ it('should generate the correct query', function(done) {
+ ctx.ds.query(query).then(function() {
+ var params = requestParams.data.parameters;
+ expect(params.namespace).to.be(query.targets[0].namespace);
+ expect(params.metricName).to.be(query.targets[0].metricName);
+ expect(params.dimensions[0].Name).to.be(Object.keys(query.targets[0].dimensions)[0]);
+ expect(params.dimensions[0].Value).to.be(query.targets[0].dimensions[Object.keys(query.targets[0].dimensions)[0]]);
+ expect(params.statistics).to.eql(query.targets[0].statistics);
+ expect(params.period).to.be(query.targets[0].period);
+ done();
+ });
+ ctx.$rootScope.$apply();
+ });
+
+ it('should return series list', function(done) {
+ ctx.ds.query(query).then(function(result) {
+ expect(result.data[0].target).to.be('CPUUtilization_Average');
+ expect(result.data[0].datapoints[0][0]).to.be(response.Datapoints[0]['Average']);
+ done();
+ });
+ ctx.$rootScope.$apply();
+ });
+ });
+
+ function describeMetricFindQuery(query, func) {
+ describe('metricFindQuery ' + query, () => {
+ let scenario: any = {};
+ scenario.setup = setupCallback => {
+ beforeEach(() => {
+ setupCallback();
+ ctx.backendSrv.datasourceRequest = args => {
+ scenario.request = args;
+ return ctx.$q.when({data: scenario.requestResponse });
+ };
+ ctx.ds.metricFindQuery(query).then(args => {
+ scenario.result = args;
+ });
+ ctx.$rootScope.$apply();
+ });
+ };
+
+ func(scenario);
+ });
+ }
+
+ describeMetricFindQuery('regions()', scenario => {
+ scenario.setup(() => {
+ scenario.requestResponse = [{text: 'us-east-1'}];
+ });
+
+ it('should call __GetRegions and return result', () => {
+ expect(scenario.result[0].text).to.contain('us-east-1');
+ expect(scenario.request.data.action).to.be('__GetRegions');
+ });
+ });
+
+ describeMetricFindQuery('namespaces()', scenario => {
+ scenario.setup(() => {
+ scenario.requestResponse = [{text: 'AWS/EC2'}];
+ });
+
+ it('should call __GetNamespaces and return result', () => {
+ expect(scenario.result[0].text).to.contain('AWS/EC2');
+ expect(scenario.request.data.action).to.be('__GetNamespaces');
+ });
+ });
+
+ describeMetricFindQuery('metrics(AWS/EC2)', scenario => {
+ scenario.setup(() => {
+ scenario.requestResponse = [{text: 'CPUUtilization'}];
+ });
+
+ it('should call __GetMetrics and return result', () => {
+ expect(scenario.result[0].text).to.be('CPUUtilization');
+ expect(scenario.request.data.action).to.be('__GetMetrics');
+ });
+ });
+
+ describeMetricFindQuery('dimension_keys(AWS/EC2)', scenario => {
+ scenario.setup(() => {
+ scenario.requestResponse = [{text: 'InstanceId'}];
+ });
+
+ it('should call __GetDimensions and return result', () => {
+ expect(scenario.result[0].text).to.be('InstanceId');
+ expect(scenario.request.data.action).to.be('__GetDimensions');
+ });
+ });
+
+ describeMetricFindQuery('dimension_values(us-east-1,AWS/EC2,CPUUtilization)', scenario => {
+ scenario.setup(() => {
+ scenario.requestResponse = {
+ Metrics: [
+ {
+ Namespace: 'AWS/EC2',
+ MetricName: 'CPUUtilization',
+ Dimensions: [
+ {
+ Name: 'InstanceId',
+ Value: 'i-12345678'
+ }
+ ]
+ }
+ ]
+ };
+ });
+
+ it('should call __ListMetrics and return result', () => {
+ expect(scenario.result[0].text).to.be('i-12345678');
+ expect(scenario.request.data.action).to.be('ListMetrics');
+ });
+ });
+
+});
diff --git a/public/test/specs/cloudwatch-datasource-specs.js b/public/test/specs/cloudwatch-datasource-specs.js
deleted file mode 100644
index a92088d623b..00000000000
--- a/public/test/specs/cloudwatch-datasource-specs.js
+++ /dev/null
@@ -1,155 +0,0 @@
-// define([
-// './helpers',
-// 'app/plugins/datasource/cloudwatch/datasource',
-// 'aws-sdk',
-// ], function(helpers) {
-// 'use strict';
-//
-// describe('CloudWatchDatasource', function() {
-// var ctx = new helpers.ServiceTestContext();
-//
-// beforeEach(module('grafana.services'));
-// beforeEach(module('grafana.controllers'));
-// beforeEach(ctx.providePhase(['templateSrv']));
-// beforeEach(ctx.createService('CloudWatchDatasource'));
-// beforeEach(function() {
-// ctx.ds = new ctx.service({
-// jsonData: {
-// defaultRegion: 'us-east-1',
-// access: 'proxy'
-// }
-// });
-// });
-//
-// describe('When performing CloudWatch query', function() {
-// var requestParams;
-//
-// var query = {
-// range: { from: 'now-1h', to: 'now' },
-// targets: [
-// {
-// region: 'us-east-1',
-// namespace: 'AWS/EC2',
-// metricName: 'CPUUtilization',
-// dimensions: {
-// InstanceId: 'i-12345678'
-// },
-// statistics: {
-// Average: true
-// },
-// period: 300
-// }
-// ]
-// };
-//
-// var response = {
-// Datapoints: [
-// {
-// Average: 1,
-// Timestamp: 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)'
-// }
-// ],
-// Label: 'CPUUtilization'
-// };
-//
-// beforeEach(function() {
-// ctx.ds.getCloudWatchClient = function() {
-// return {
-// getMetricStatistics: function(params, callback) {
-// setTimeout(function() {
-// requestParams = params;
-// callback(null, response);
-// }, 0);
-// }
-// };
-// };
-// });
-//
-// it('should generate the correct query', function() {
-// ctx.ds.query(query).then(function() {
-// expect(requestParams.Namespace).to.be(query.targets[0].namespace);
-// expect(requestParams.MetricName).to.be(query.targets[0].metricName);
-// expect(requestParams.Dimensions[0].Name).to.be(Object.keys(query.targets[0].dimensions)[0]);
-// expect(requestParams.Dimensions[0].Value).to.be(query.targets[0].dimensions[Object.keys(query.targets[0].dimensions)[0]]);
-// expect(requestParams.Statistics).to.eql(Object.keys(query.targets[0].statistics));
-// expect(requestParams.Period).to.be(query.targets[0].period);
-// });
-// });
-//
-// it('should return series list', function() {
-// ctx.ds.query(query).then(function(result) {
-// var s = Object.keys(query.targets[0].statistics)[0];
-// expect(result.data[0].target).to.be(response.Label + s);
-// expect(result.data[0].datapoints[0][0]).to.be(response.Datapoints[0][s]);
-// });
-// });
-// });
-//
-// describe('When performing CloudWatch metricFindQuery', function() {
-// var requestParams;
-//
-// var response = {
-// Metrics: [
-// {
-// Namespace: 'AWS/EC2',
-// MetricName: 'CPUUtilization',
-// Dimensions: [
-// {
-// Name: 'InstanceId',
-// Value: 'i-12345678'
-// }
-// ]
-// }
-// ]
-// };
-//
-// beforeEach(function() {
-// ctx.ds.getCloudWatchClient = function() {
-// return {
-// listMetrics: function(params, callback) {
-// setTimeout(function() {
-// requestParams = params;
-// callback(null, response);
-// }, 0);
-// }
-// };
-// };
-// });
-//
-// it('should return suggest list for region()', function() {
-// var query = 'region()';
-// ctx.ds.metricFindQuery(query).then(function(result) {
-// expect(result).to.contain('us-east-1');
-// });
-// });
-//
-// it('should return suggest list for namespace()', function() {
-// var query = 'namespace()';
-// ctx.ds.metricFindQuery(query).then(function(result) {
-// expect(result).to.contain('AWS/EC2');
-// });
-// });
-//
-// it('should return suggest list for metrics()', function() {
-// var query = 'metrics(AWS/EC2)';
-// ctx.ds.metricFindQuery(query).then(function(result) {
-// expect(result).to.contain('CPUUtilization');
-// });
-// });
-//
-// it('should return suggest list for dimension_keys()', function() {
-// var query = 'dimension_keys(AWS/EC2)';
-// ctx.ds.metricFindQuery(query).then(function(result) {
-// expect(result).to.contain('InstanceId');
-// });
-// });
-//
-// it('should return suggest list for dimension_values()', function() {
-// var query = 'dimension_values(us-east-1,AWS/EC2,CPUUtilization)';
-// ctx.ds.metricFindQuery(query).then(function(result) {
-// expect(result).to.contain('InstanceId');
-// });
-// });
-// });
-// });
-// });
diff --git a/public/vendor/aws-sdk/.bower.json b/public/vendor/aws-sdk/.bower.json
deleted file mode 100644
index bb0b777e832..00000000000
--- a/public/vendor/aws-sdk/.bower.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "name": "aws-sdk",
- "ignore": [
- "apis",
- "doc-src",
- "dist-tools",
- "eslint-rules",
- "features",
- "lib",
- "scripts",
- "tasks",
- "test",
- "Gemfile*",
- "configuration*",
- "Rakefile",
- "package.json",
- "testem.json",
- ".*",
- "index.js"
- ],
- "main": "dist/aws-sdk.js",
- "homepage": "https://github.com/aws/aws-sdk-js",
- "version": "2.1.42",
- "_release": "2.1.42",
- "_resolution": {
- "type": "version",
- "tag": "v2.1.42",
- "commit": "6ad65d3e09a3a4531c84d12b980e6fb9af136a0a"
- },
- "_source": "git://github.com/aws/aws-sdk-js.git",
- "_target": "~2.1.41",
- "_originalSource": "aws-sdk"
-}
\ No newline at end of file
diff --git a/public/vendor/aws-sdk/CONTRIBUTING.md b/public/vendor/aws-sdk/CONTRIBUTING.md
deleted file mode 100644
index 79cbc7ee694..00000000000
--- a/public/vendor/aws-sdk/CONTRIBUTING.md
+++ /dev/null
@@ -1,84 +0,0 @@
-# Contributing to the AWS SDK for JavaScript
-
-We work hard to provide a high-quality and useful SDK, and we greatly value
-feedback and contributions from our community. Whether it's a bug report,
-new feature, correction, or additional documentation, we welcome your issues
-and pull requests. Please read through this document before submitting any
-issues or pull requests to ensure we have all the necessary information to
-effectively respond to your bug report or contribution.
-
-
-## Filing Bug Reports
-
-You can file bug reports against the SDK on the [GitHub issues][issues] page.
-
-If you are filing a report for a bug or regression in the SDK, it's extremely
-helpful to provide as much information as possible when opening the original
-issue. This helps us reproduce and investigate the possible bug without having
-to wait for this extra information to be provided. Please read the following
-guidelines prior to filing a bug report.
-
-1. Search through existing [issues][] to ensure that your specific issue has
- not yet been reported. If it is a common issue, it is likely there is
- already a bug report for your problem.
-
-2. Ensure that you have tested the latest version of the SDK. Although you
- may have an issue against an older version of the SDK, we cannot provide
- bug fixes for old versions. It's also possible that the bug may have been
- fixed in the latest release.
-
-3. Provide as much information about your environment, SDK version, and
- relevant dependencies as possible. For example, let us know what version
- of Node.js you are using, or if it's a browser issue, which browser you
- are using. If the issue only occurs with a specific dependency loaded,
- please provide that dependency name and version.
-
-4. Provide a minimal test case that reproduces your issue or any error
- information you related to your problem. We can provide feedback much
- more quickly if we know what operations you are calling in the SDK. If
- you cannot provide a full test case, provide as much code as you can
- to help us diagnose the problem. Any relevant information should be provided
- as well, like whether this is a persistent issue, or if it only occurs
- some of the time.
-
-
-## Submitting Pull Requests
-
-We are always happy to receive code and documentation contributions to the SDK.
-Please be aware of the following notes prior to opening a pull request:
-
-1. The SDK is released under the [Apache license][license]. Any code you submit
- will be released under that license. For substantial contributions, we may
- ask you to sign a [Contributor License Agreement (CLA)][cla].
-
-2. If you would like to implement support for a significant feature that is not
- yet available in the SDK, please talk to us beforehand to avoid any
- duplication of effort.
-
-### Testing
-
-To run the tests locally, install `phantomjs`. You can do so using [Homebrew][homebrew]:
-
-```
-brew install phantomjs
-```
-
-Then, to run all tests:
-
-```
-npm test
-```
-
-To run a particular test subset e.g. just the unit tests:
-
-```
-npm run-script unit
-```
-
-See the implementation of the `test` script in `package.json` for more options.
-
-[issues]: https://github.com/aws/aws-sdk-js/issues
-[pr]: https://github.com/aws/aws-sdk-js/pulls
-[license]: http://aws.amazon.com/apache2.0/
-[cla]: http://en.wikipedia.org/wiki/Contributor_License_Agreement
-[homebrew]: http://brew.sh/
diff --git a/public/vendor/aws-sdk/LICENSE.txt b/public/vendor/aws-sdk/LICENSE.txt
deleted file mode 100644
index feaf8659d62..00000000000
--- a/public/vendor/aws-sdk/LICENSE.txt
+++ /dev/null
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
-Copyright 2012-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
diff --git a/public/vendor/aws-sdk/NOTICE.txt b/public/vendor/aws-sdk/NOTICE.txt
deleted file mode 100644
index 23fd6f0c984..00000000000
--- a/public/vendor/aws-sdk/NOTICE.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-AWS SDK for JavaScript
-Copyright 2012-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
-
-This product includes software developed at
-Amazon Web Services, Inc. (http://aws.amazon.com/).
diff --git a/public/vendor/aws-sdk/README.md b/public/vendor/aws-sdk/README.md
deleted file mode 100644
index 852efa5e73b..00000000000
--- a/public/vendor/aws-sdk/README.md
+++ /dev/null
@@ -1,124 +0,0 @@
-# AWS SDK for JavaScript
-
-[](https://nodei.co/npm/aws-sdk/)
-
-[](https://gitter.im/aws/aws-sdk-js)
-
-[](http://badge.fury.io/js/aws-sdk) [](https://travis-ci.org/aws/aws-sdk-js) [](https://coveralls.io/r/aws/aws-sdk-js?branch=master)
-
-The official AWS SDK for JavaScript, available for browsers and mobile devices,
-or Node.js backends
-
-Release notes can be found at http://aws.amazon.com/releasenotes/SDK/JavaScript
-
-
-If you are upgrading from 1.x to 2.0 of the SDK, please see
-the {file:UPGRADING.md} notes for information on how to migrate existing code
-to work with the new major version.
-
-
-## Installing
-
-### In the Browser
-
-To use the SDK in the browser, simply add the following script tag to your
-HTML pages:
-
-
-
-The AWS SDK is also compatible with [browserify](http://browserify.org).
-
-### In Node.js
-
-The preferred way to install the AWS SDK for Node.js is to use the
-[npm](http://npmjs.org) package manager for Node.js. Simply type the following
-into a terminal window:
-
-```sh
-npm install aws-sdk
-```
-
-### Using Bower
-
-You can also use [Bower](http://bower.io) to install the SDK by typing the
-following into a terminal window:
-
-```sh
-bower install aws-sdk-js
-```
-
-## Usage and Getting Started
-
-You can find a getting started guide at:
-
-http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/
-
-## Supported Services
-
-
Note:
-Although all services are supported in the browser version of the SDK,
-not all of the services are available in the default hosted build (using the
-script tag provided above). A list of services in the hosted build are provided
-in the "Working With Services"
-section of the browser SDK guide, including instructions on how to build a
-custom version of the SDK with extra services.
-
-
-The SDK currently supports the following services:
-
-
-
-
Service Name
-
Class Name
-
API Version
-
-
-
Amazon CloudFront
AWS.CloudFront
2014-10-21
-
Amazon CloudSearch
AWS.CloudSearch
2013-01-01
-
Amazon CloudSearch Domain
AWS.CloudSearchDomain
2013-01-01
-
Amazon CloudWatch
AWS.CloudWatch
2010-08-01
-
Amazon CloudWatch Logs
AWS.CloudWatchLogs
2014-03-28
-
Amazon Cognito Identity
AWS.CognitoIdentity
2014-06-30
-
Amazon Cognito Sync
AWS.CognitoSync
2014-06-30
-
Amazon DynamoDB
AWS.DynamoDB
2012-08-10
-
Amazon Elastic Compute Cloud
AWS.EC2
2014-10-01
-
Amazon Elastic MapReduce
AWS.EMR
2009-03-31
-
Amazon Elastic Transcoder
AWS.ElasticTranscoder
2012-09-25
-
Amazon ElastiCache
AWS.ElastiCache
2014-09-30
-
Amazon Glacier
AWS.Glacier
2012-06-01
-
Amazon Kinesis
AWS.Kinesis
2013-12-02
-
Amazon Redshift
AWS.Redshift
2012-12-01
-
Amazon Relational Database Service
AWS.RDS
2014-09-01
-
Amazon Route 53
AWS.Route53
2013-04-01
-
Amazon Route 53 Domains
AWS.Route53Domains
2014-05-15
-
Amazon Simple Email Service
AWS.SES
2010-12-01
-
Amazon Simple Notification Service
AWS.SNS
2010-03-31
-
Amazon Simple Queue Service
AWS.SQS
2012-11-05
-
Amazon Simple Storage Service
AWS.S3
2006-03-01
-
Amazon Simple Workflow Service
AWS.SWF
2012-01-25
-
Amazon SimpleDB
AWS.SimpleDB
2009-04-15
-
Auto Scaling
AWS.AutoScaling
2011-01-01
-
AWS CloudFormation
AWS.CloudFormation
2010-05-15
-
AWS CloudTrail
AWS.CloudTrail
2013-11-01
-
AWS CodeDeploy
AWS.CodeDeploy
2014-10-06
-
AWS Config
AWS.ConfigService
2014-11-12
-
AWS Data Pipeline
AWS.DataPipeline
2012-10-29
-
AWS Direct Connect
AWS.DirectConnect
2012-10-25
-
AWS Elastic Beanstalk
AWS.ElasticBeanstalk
2010-12-01
-
AWS Identity and Access Management
AWS.IAM
2010-05-08
-
AWS Import/Export
AWS.ImportExport
2010-06-01
-
AWS Key Management Service
AWS.KMS
2014-11-01
-
AWS Lambda
AWS.Lambda
2014-11-11
-
AWS OpsWorks
AWS.OpsWorks
2013-02-18
-
AWS Security Token Service
AWS.STS
2011-06-15
-
AWS Storage Gateway
AWS.StorageGateway
2013-06-30
-
AWS Support
AWS.Support
2013-04-15
-
Elastic Load Balancing
AWS.ELB
2012-06-01
-
-
-
-## License
-
-This SDK is distributed under the
-[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0),
-see LICENSE.txt and NOTICE.txt for more information.
diff --git a/public/vendor/aws-sdk/UPGRADING.md b/public/vendor/aws-sdk/UPGRADING.md
deleted file mode 100644
index f67fd91492d..00000000000
--- a/public/vendor/aws-sdk/UPGRADING.md
+++ /dev/null
@@ -1,157 +0,0 @@
-# @!title Upgrading Notes (1.x to 2.0)
-
-# Upgrading Notes (1.x to 2.0)
-
-This document captures breaking changes from 1.x versions to the first
-stable 2.x (non-RC) release of the AWS SDK for JavaScript.
-
-## 1. Automatic Conversion of Base64 and Timestamp Types on Input/Output
-
-The SDK will now automatically encode and decode base64-encoded values, as well
-as timestamp values, on the user's behalf. This change affects any operation
-where Base64 or Timestamp values were sent by a request or returned in a
-response, i.e., `AWS.DynamoDB` and `AWS.SQS`, which allow for Base64
-encoded values.
-
-User code that previously did base64 conversion no longer requires this.
-Furthermore, values encoded as base64 are now returned as Buffer objects
-from server responses (and can also be passed as Buffer input). For
-example, the following 1.x `SQS.sendMessage()` parameters:
-
-```javascript
-var params = {
- MessageBody: 'Some Message',
- MessageAttributes: {
- attrName: {
- DataType: 'Binary',
- BinaryValue: new Buffer('example text').toString('base64')
- }
- }
-};
-```
-
-Can be rewritten as:
-
-```javascript
-var params = {
- MessageBody: 'Some Message',
- MessageAttributes: {
- attrName: {
- DataType: 'Binary',
- BinaryValue: 'example text'
- }
- }
-};
-```
-
-And the message will be read as:
-
-```javascript
-sqs.receiveMessage(params, function(err, data) {
- // buf is
- var buf = data.Messages[0].MessageAttributes.attrName.BinaryValue;
- console.log(buf.toString()); // "example text"
-});
-```
-
-## 2. Moved response.data.RequestId to response.requestId
-
-The SDK now stores request IDs for all services in a consistent place on the
-response object, rather than inside the response.data property. This is to
-improve consistency across services that expose request IDs in different ways.
-Note that this is also a breaking change that renames the
-`response.data.RequestId` property to `response.requestId`
-(or `this.requestId` inside of a callback).
-
-To migrate your code, change:
-
-```javascript
-svc.operation(params, function (err, data) {
- console.log('Request ID:', data.RequestId);
-});
-```
-
-To the following:
-
-```javascript
-svc.operation(params, function () {
- console.log('Request ID:', this.requestId);
-});
-```
-
-## 3. Exposed Wrapper Elements
-
-If you use {AWS.ElastiCache}, {AWS.RDS}, or {AWS.Redshift}, you must now access
-the response through the top-level output property in the response for certain
-operations. This change corrects the SDK to behave according to documentation
-output, which was previously listing this wrapper element.
-
-Example:
-
-`RDS.describeEngineDefaultParameters()` used to return:
-
-```javascript
-{ Parameters: [ ... ] }
-```
-
-This operation now returns:
-
-```javascript
-{ EngineDefaults: { Parameters: [ ... ] } }
-```
-
-The full list of affected operations for each service are:
-
-**AWS.ElastiCache**: authorizeCacheSecurityGroupIngress, createCacheCluster,
-createCacheParameterGroup, createCacheSecurityGroup, createCacheSubnetGroup,
-createReplicationGroup, deleteCacheCluster, deleteReplicationGroup,
-describeEngineDefaultParameters, modifyCacheCluster, modifyCacheSubnetGroup,
-modifyReplicationGroup, purchaseReservedCacheNodesOffering, rebootCacheCluster,
-revokeCacheSecurityGroupIngress
-
-**AWS.RDS**: addSourceIdentifierToSubscription, authorizeDBSecurityGroupIngress,
-copyDBSnapshot, createDBInstance, createDBInstanceReadReplica,
-createDBParameterGroup, createDBSecurityGroup, createDBSnapshot,
-createDBSubnetGroup, createEventSubscription, createOptionGroup,
-deleteDBInstance, deleteDBSnapshot, deleteEventSubscription,
-describeEngineDefaultParameters, modifyDBInstance, modifyDBSubnetGroup,
-modifyEventSubscription, modifyOptionGroup, promoteReadReplica,
-purchaseReservedDBInstancesOffering, rebootDBInstance,
-removeSourceIdentifierFromSubscription, restoreDBInstanceFromDBSnapshot,
-restoreDBInstanceToPointInTime, revokeDBSecurityGroupIngress
-
-**AWS.Redshift**: authorizeClusterSecurityGroupIngress, authorizeSnapshotAccess,
-copyClusterSnapshot, createCluster, createClusterParameterGroup,
-createClusterSecurityGroup, createClusterSnapshot, createClusterSubnetGroup,
-createEventSubscription, createHsmClientCertificate, createHsmConfiguration,
-deleteCluster, deleteClusterSnapshot, describeDefaultClusterParameters,
-disableSnapshotCopy, enableSnapshotCopy, modifyCluster,
-modifyClusterSubnetGroup, modifyEventSubscription,
-modifySnapshotCopyRetentionPeriod, purchaseReservedNodeOffering, rebootCluster,
-restoreFromClusterSnapshot, revokeClusterSecurityGroupIngress,
-revokeSnapshotAccess, rotateEncryptionKey
-
-## 4. Dropped `.Client` and `.client` Properties
-
-The `.Client` and `.client` properties have been removed from Service objects.
-If you are using the `.Client` property on a Service class or a `.client`
-property on an instance of the service, remove these properties from your code.
-
-Upgrading example:
-
-The following 1.x code:
-
-```
-var sts = new AWS.STS.Client();
-// or
-var sts = new AWS.STS();
-
-sts.client.operation(...);
-```
-
-Should be changed to the following:
-
-```
-var sts = new AWS.STS();
-sts.operation(...)
-```
diff --git a/public/vendor/aws-sdk/bower.json b/public/vendor/aws-sdk/bower.json
deleted file mode 100644
index bda489f676a..00000000000
--- a/public/vendor/aws-sdk/bower.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "name": "aws-sdk",
- "ignore": [
- "apis", "doc-src", "dist-tools", "eslint-rules", "features", "lib",
- "scripts", "tasks", "test", "Gemfile*", "configuration*",
- "Rakefile", "package.json", "testem.json", ".*", "index.js"
- ],
- "main": "dist/aws-sdk.js"
-}
diff --git a/public/vendor/aws-sdk/dist/BUNDLE_LICENSE.txt b/public/vendor/aws-sdk/dist/BUNDLE_LICENSE.txt
deleted file mode 100644
index 14e46589be4..00000000000
--- a/public/vendor/aws-sdk/dist/BUNDLE_LICENSE.txt
+++ /dev/null
@@ -1,96 +0,0 @@
-The bundled package of the AWS SDK for JavaScript is available under the
-Apache License, Version 2.0:
-
- Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
-
- Licensed under the Apache License, Version 2.0 (the "License"). You
- may not use this file except in compliance with the License. A copy of
- the License is located at
-
- http://aws.amazon.com/apache2.0/
-
- or in the "license" file accompanying this file. This file is
- distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
- ANY KIND, either express or implied. See the License for the specific
- language governing permissions and limitations under the License.
-
-This product bundles browserify, which is available under a
-"3-clause BSD" license:
-
- Copyright Joyent, Inc. and other Node contributors.
-
- Permission is hereby granted, free of charge, to any person obtaining a
- copy of this software and associated documentation files (the
- "Software"), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to permit
- persons to whom the Software is furnished to do so, subject to the
- following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
- NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-This product bundles crypto-browserify, which is available under
-the MIT license:
-
- Copyright (c) 2013 Dominic Tarr
-
- Permission is hereby granted, free of charge,
- to any person obtaining a copy of this software and
- associated documentation files (the "Software"), to
- deal in the Software without restriction, including
- without limitation the rights to use, copy, modify,
- merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom
- the Software is furnished to do so,
- subject to the following conditions:
-
- The above copyright notice and this permission notice
- shall be included in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
- ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-This product bundles MD5, SHA-1, and SHA-256 hashing algorithm components,
-which are available under a BSD license:
-
- Copyright (c) 1998 - 2009, Paul Johnston & Contributors
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyrightnotice,
- this list of conditions and the following disclaimer. Redistributions
- in binary form must reproduce the above copyright notice, this list of
- conditions and the following disclaimer in the documentation and/or
- other materials provided with the distribution.
-
- Neither the name of the author nor the names of its contributors may
- be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/public/vendor/aws-sdk/dist/aws-sdk.js b/public/vendor/aws-sdk/dist/aws-sdk.js
deleted file mode 100644
index 2da7464d469..00000000000
--- a/public/vendor/aws-sdk/dist/aws-sdk.js
+++ /dev/null
@@ -1,10800 +0,0 @@
-// AWS SDK for JavaScript v2.1.42
-// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
-// License at https://sdk.amazonaws.com/js/BUNDLE_LICENSE.txt
-(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o this.expireTime) {
- return true;
- } else {
- return this.expired || !this.accessKeyId || !this.secretAccessKey;
- }
- },
-
-
- get: function get(callback) {
- var self = this;
- if (this.needsRefresh()) {
- this.refresh(function(err) {
- if (!err) self.expired = false; // reset expired flag
- if (callback) callback(err);
- });
- } else if (callback) {
- callback();
- }
- },
-
-
- refresh: function refresh(callback) {
- this.expired = false;
- callback();
- }
-});
-
-},{"./core":3}],5:[function(require,module,exports){
-var AWS = require('../core');
-
-
-AWS.CognitoIdentityCredentials = AWS.util.inherit(AWS.Credentials, {
-
- localStorageKey: {
- id: 'aws.cognito.identity-id.',
- providers: 'aws.cognito.identity-providers.'
- },
-
-
- constructor: function CognitoIdentityCredentials(params) {
- AWS.Credentials.call(this);
- this.expired = true;
- this.params = params;
- this.data = null;
- this.identityId = null;
- this.loadCachedId();
- },
-
-
- refresh: function refresh(callback) {
- var self = this;
- self.createClients();
- self.data = null;
- self.identityId = null;
- self.getId(function(err) {
- if (!err) {
- if (!self.params.RoleArn) {
- self.getCredentialsForIdentity(callback);
- } else {
- self.getCredentialsFromSTS(callback);
- }
- } else {
- self.clearCachedId();
- callback(err);
- }
- });
- },
-
-
- clearCachedId: function clearCache() {
- this.identityId = null;
- delete this.params.IdentityId;
-
- var poolId = this.params.IdentityPoolId;
- delete this.storage[this.localStorageKey.id + poolId];
- delete this.storage[this.localStorageKey.providers + poolId];
- },
-
-
- getId: function getId(callback) {
- var self = this;
- if (typeof self.params.IdentityId === 'string') {
- return callback(null, self.params.IdentityId);
- }
-
- self.cognito.getId(function(err, data) {
- if (!err && data.IdentityId) {
- self.params.IdentityId = data.IdentityId;
- callback(null, data.IdentityId);
- } else {
- callback(err);
- }
- });
- },
-
-
-
- loadCredentials: function loadCredentials(data, credentials) {
- if (!data || !credentials) return;
- credentials.expired = false;
- credentials.accessKeyId = data.Credentials.AccessKeyId;
- credentials.secretAccessKey = data.Credentials.SecretKey;
- credentials.sessionToken = data.Credentials.SessionToken;
- credentials.expireTime = data.Credentials.Expiration;
- },
-
-
- getCredentialsForIdentity: function getCredentialsForIdentity(callback) {
- var self = this;
- self.cognito.getCredentialsForIdentity(function(err, data) {
- if (!err) {
- self.cacheId(data);
- self.data = data;
- self.loadCredentials(self.data, self);
- } else {
- self.clearCachedId();
- }
- callback(err);
- });
- },
-
-
- getCredentialsFromSTS: function getCredentialsFromSTS(callback) {
- var self = this;
- self.cognito.getOpenIdToken(function(err, data) {
- if (!err) {
- self.cacheId(data);
- self.params.WebIdentityToken = data.Token;
- self.webIdentityCredentials.refresh(function(webErr) {
- if (!webErr) {
- self.data = self.webIdentityCredentials.data;
- self.sts.credentialsFrom(self.data, self);
- } else {
- self.clearCachedId();
- }
- callback(webErr);
- });
- } else {
- self.clearCachedId();
- callback(err);
- }
- });
- },
-
-
- loadCachedId: function loadCachedId() {
- var self = this;
-
- if (AWS.util.isBrowser() && !self.params.IdentityId) {
- var id = self.getStorage('id');
- if (id && self.params.Logins) {
- var actualProviders = Object.keys(self.params.Logins);
- var cachedProviders =
- (self.getStorage('providers') || '').split(',');
-
- var intersect = cachedProviders.filter(function(n) {
- return actualProviders.indexOf(n) !== -1;
- });
- if (intersect.length !== 0) {
- self.params.IdentityId = id;
- }
- } else if (id) {
- self.params.IdentityId = id;
- }
- }
- },
-
-
- createClients: function() {
- this.webIdentityCredentials = this.webIdentityCredentials ||
- new AWS.WebIdentityCredentials(this.params);
- this.cognito = this.cognito ||
- new AWS.CognitoIdentity({params: this.params});
- this.sts = this.sts || new AWS.STS();
- },
-
-
- cacheId: function cacheId(data) {
- this.identityId = data.IdentityId;
- this.params.IdentityId = this.identityId;
-
- if (AWS.util.isBrowser()) {
- this.setStorage('id', data.IdentityId);
-
- if (this.params.Logins) {
- this.setStorage('providers', Object.keys(this.params.Logins).join(','));
- }
- }
- },
-
-
- getStorage: function getStorage(key) {
- return this.storage[this.localStorageKey[key] + this.params.IdentityPoolId];
- },
-
-
- setStorage: function setStorage(key, val) {
- try {
- this.storage[this.localStorageKey[key] + this.params.IdentityPoolId] = val;
- } catch (_) {}
- },
-
-
- storage: (function() {
- try {
- return AWS.util.isBrowser() && typeof window.localStorage === 'object' ?
- window.localStorage : {};
- } catch (_) {
- return {};
- }
- })()
-});
-
-},{"../core":3}],6:[function(require,module,exports){
-var AWS = require('../core');
-
-
-AWS.CredentialProviderChain = AWS.util.inherit(AWS.Credentials, {
-
-
- constructor: function CredentialProviderChain(providers) {
- if (providers) {
- this.providers = providers;
- } else {
- this.providers = AWS.CredentialProviderChain.defaultProviders.slice(0);
- }
- },
-
-
- resolve: function resolve(callback) {
- if (this.providers.length === 0) {
- callback(new Error('No providers'));
- return this;
- }
-
- var index = 0;
- var providers = this.providers.slice(0);
-
- function resolveNext(err, creds) {
- if ((!err && creds) || index === providers.length) {
- callback(err, creds);
- return;
- }
-
- var provider = providers[index++];
- if (typeof provider === 'function') {
- creds = provider.call();
- } else {
- creds = provider;
- }
-
- if (creds.get) {
- creds.get(function(getErr) {
- resolveNext(getErr, getErr ? null : creds);
- });
- } else {
- resolveNext(null, creds);
- }
- }
-
- resolveNext();
- return this;
- }
-
-});
-
-
-AWS.CredentialProviderChain.defaultProviders = [];
-
-},{"../core":3}],7:[function(require,module,exports){
-var AWS = require('../core');
-
-
-AWS.SAMLCredentials = AWS.util.inherit(AWS.Credentials, {
-
- constructor: function SAMLCredentials(params) {
- AWS.Credentials.call(this);
- this.expired = true;
- this.params = params;
- },
-
-
- refresh: function refresh(callback) {
- var self = this;
- self.createClients();
- if (!callback) callback = function(err) { if (err) throw err; };
-
- self.service.assumeRoleWithSAML(function (err, data) {
- if (!err) {
- self.service.credentialsFrom(data, self);
- }
- callback(err);
- });
- },
-
-
- createClients: function() {
- this.service = this.service || new AWS.STS({params: this.params});
- }
-
-});
-
-},{"../core":3}],8:[function(require,module,exports){
-var AWS = require('../core');
-
-
-AWS.TemporaryCredentials = AWS.util.inherit(AWS.Credentials, {
-
- constructor: function TemporaryCredentials(params) {
- AWS.Credentials.call(this);
- this.loadMasterCredentials();
- this.expired = true;
-
- this.params = params || {};
- if (this.params.RoleArn) {
- this.params.RoleSessionName =
- this.params.RoleSessionName || 'temporary-credentials';
- }
- },
-
-
- refresh: function refresh(callback) {
- var self = this;
- self.createClients();
- if (!callback) callback = function(err) { if (err) throw err; };
-
- self.service.config.credentials = self.masterCredentials;
- var operation = self.params.RoleArn ?
- self.service.assumeRole : self.service.getSessionToken;
- operation.call(self.service, function (err, data) {
- if (!err) {
- self.service.credentialsFrom(data, self);
- }
- callback(err);
- });
- },
-
-
- loadMasterCredentials: function loadMasterCredentials() {
- this.masterCredentials = AWS.config.credentials;
- while (this.masterCredentials.masterCredentials) {
- this.masterCredentials = this.masterCredentials.masterCredentials;
- }
- },
-
-
- createClients: function() {
- this.service = this.service || new AWS.STS({params: this.params});
- }
-
-});
-
-},{"../core":3}],9:[function(require,module,exports){
-var AWS = require('../core');
-
-
-AWS.WebIdentityCredentials = AWS.util.inherit(AWS.Credentials, {
-
- constructor: function WebIdentityCredentials(params) {
- AWS.Credentials.call(this);
- this.expired = true;
- this.params = params;
- this.params.RoleSessionName = this.params.RoleSessionName || 'web-identity';
- this.data = null;
- },
-
-
- refresh: function refresh(callback) {
- var self = this;
- self.createClients();
- if (!callback) callback = function(err) { if (err) throw err; };
-
- self.service.assumeRoleWithWebIdentity(function (err, data) {
- self.data = null;
- if (!err) {
- self.data = data;
- self.service.credentialsFrom(data, self);
- }
- callback(err);
- });
- },
-
-
- createClients: function() {
- this.service = this.service || new AWS.STS({params: this.params});
- }
-
-});
-
-},{"../core":3}],10:[function(require,module,exports){
-var AWS = require('./core');
-var SequentialExecutor = require('./sequential_executor');
-
-
-AWS.EventListeners = {
-
- Core: {} /* doc hack */
-};
-
-AWS.EventListeners = {
- Core: new SequentialExecutor().addNamedListeners(function(add, addAsync) {
- addAsync('VALIDATE_CREDENTIALS', 'validate',
- function VALIDATE_CREDENTIALS(req, done) {
- if (!req.service.api.signatureVersion) return done(); // none
- req.service.config.getCredentials(function(err) {
- if (err) {
- req.response.error = AWS.util.error(err,
- {code: 'CredentialsError', message: 'Missing credentials in config'});
- }
- done();
- });
- });
-
- add('VALIDATE_REGION', 'validate', function VALIDATE_REGION(req) {
- if (!req.service.config.region && !req.service.isGlobalEndpoint) {
- req.response.error = AWS.util.error(new Error(),
- {code: 'ConfigError', message: 'Missing region in config'});
- }
- });
-
- add('VALIDATE_PARAMETERS', 'validate', function VALIDATE_PARAMETERS(req) {
- var rules = req.service.api.operations[req.operation].input;
- new AWS.ParamValidator().validate(rules, req.params);
- });
-
- addAsync('COMPUTE_SHA256', 'afterBuild', function COMPUTE_SHA256(req, done) {
- req.haltHandlersOnError();
- if (!req.service.api.signatureVersion) return done(); // none
- if (req.service.getSignerClass(req) === AWS.Signers.V4) {
- var body = req.httpRequest.body || '';
- AWS.util.computeSha256(body, function(err, sha) {
- if (err) {
- done(err);
- }
- else {
- req.httpRequest.headers['X-Amz-Content-Sha256'] = sha;
- done();
- }
- });
- } else {
- done();
- }
- });
-
- add('SET_CONTENT_LENGTH', 'afterBuild', function SET_CONTENT_LENGTH(req) {
- if (req.httpRequest.headers['Content-Length'] === undefined) {
- var length = AWS.util.string.byteLength(req.httpRequest.body);
- req.httpRequest.headers['Content-Length'] = length;
- }
- });
-
- add('SET_HTTP_HOST', 'afterBuild', function SET_HTTP_HOST(req) {
- req.httpRequest.headers['Host'] = req.httpRequest.endpoint.host;
- });
-
- add('RESTART', 'restart', function RESTART() {
- var err = this.response.error;
- if (!err || !err.retryable) return;
-
- this.httpRequest = new AWS.HttpRequest(
- this.service.endpoint,
- this.service.region
- );
-
- if (this.response.retryCount < this.service.config.maxRetries) {
- this.response.retryCount++;
- } else {
- this.response.error = null;
- }
- });
-
- addAsync('SIGN', 'sign', function SIGN(req, done) {
- if (!req.service.api.signatureVersion) return done(); // none
-
- req.service.config.getCredentials(function (err, credentials) {
- if (err) {
- req.response.error = err;
- return done();
- }
-
- try {
- var date = AWS.util.date.getDate();
- var SignerClass = req.service.getSignerClass(req);
- var signer = new SignerClass(req.httpRequest,
- req.service.api.signingName || req.service.api.endpointPrefix);
-
- delete req.httpRequest.headers['Authorization'];
- delete req.httpRequest.headers['Date'];
- delete req.httpRequest.headers['X-Amz-Date'];
-
- signer.addAuthorization(credentials, date);
- req.signedAt = date;
- } catch (e) {
- req.response.error = e;
- }
- done();
- });
- });
-
- add('VALIDATE_RESPONSE', 'validateResponse', function VALIDATE_RESPONSE(resp) {
- if (this.service.successfulResponse(resp, this)) {
- resp.data = {};
- resp.error = null;
- } else {
- resp.data = null;
- resp.error = AWS.util.error(new Error(),
- {code: 'UnknownError', message: 'An unknown error occurred.'});
- }
- });
-
- addAsync('SEND', 'send', function SEND(resp, done) {
- resp.httpResponse._abortCallback = done;
- resp.error = null;
- resp.data = null;
-
- function callback(httpResp) {
- resp.httpResponse.stream = httpResp;
-
- httpResp.on('headers', function onHeaders(statusCode, headers) {
- resp.request.emit('httpHeaders', [statusCode, headers, resp]);
-
- if (!resp.httpResponse.streaming) {
- if (AWS.HttpClient.streamsApiVersion === 2) { // streams2 API check
- httpResp.on('readable', function onReadable() {
- var data = httpResp.read();
- if (data !== null) {
- resp.request.emit('httpData', [data, resp]);
- }
- });
- } else { // legacy streams API
- httpResp.on('data', function onData(data) {
- resp.request.emit('httpData', [data, resp]);
- });
- }
- }
- });
-
- httpResp.on('end', function onEnd() {
- resp.request.emit('httpDone');
- done();
- });
- }
-
- function progress(httpResp) {
- httpResp.on('sendProgress', function onSendProgress(value) {
- resp.request.emit('httpUploadProgress', [value, resp]);
- });
-
- httpResp.on('receiveProgress', function onReceiveProgress(value) {
- resp.request.emit('httpDownloadProgress', [value, resp]);
- });
- }
-
- function error(err) {
- resp.error = AWS.util.error(err, {
- code: 'NetworkingError',
- region: resp.request.httpRequest.region,
- hostname: resp.request.httpRequest.endpoint.hostname,
- retryable: true
- });
- resp.request.emit('httpError', [resp.error, resp], function() {
- done();
- });
- }
-
- function executeSend() {
- var http = AWS.HttpClient.getInstance();
- var httpOptions = resp.request.service.config.httpOptions || {};
- try {
- var stream = http.handleRequest(resp.request.httpRequest, httpOptions,
- callback, error);
- progress(stream);
- } catch (err) {
- error(err);
- }
- }
-
- var timeDiff = (AWS.util.date.getDate() - this.signedAt) / 1000;
- if (timeDiff >= 60 * 10) { // if we signed 10min ago, re-sign
- this.emit('sign', [this], function(err) {
- if (err) done(err);
- else executeSend();
- });
- } else {
- executeSend();
- }
- });
-
- add('HTTP_HEADERS', 'httpHeaders',
- function HTTP_HEADERS(statusCode, headers, resp) {
- resp.httpResponse.statusCode = statusCode;
- resp.httpResponse.headers = headers;
- resp.httpResponse.body = new AWS.util.Buffer('');
- resp.httpResponse.buffers = [];
- resp.httpResponse.numBytes = 0;
- });
-
- add('HTTP_DATA', 'httpData', function HTTP_DATA(chunk, resp) {
- if (chunk) {
- if (AWS.util.isNode()) {
- resp.httpResponse.numBytes += chunk.length;
-
- var total = resp.httpResponse.headers['content-length'];
- var progress = { loaded: resp.httpResponse.numBytes, total: total };
- resp.request.emit('httpDownloadProgress', [progress, resp]);
- }
-
- resp.httpResponse.buffers.push(new AWS.util.Buffer(chunk));
- }
- });
-
- add('HTTP_DONE', 'httpDone', function HTTP_DONE(resp) {
- if (resp.httpResponse.buffers && resp.httpResponse.buffers.length > 0) {
- var body = AWS.util.buffer.concat(resp.httpResponse.buffers);
- resp.httpResponse.body = body;
- }
- delete resp.httpResponse.numBytes;
- delete resp.httpResponse.buffers;
- });
-
- add('FINALIZE_ERROR', 'retry', function FINALIZE_ERROR(resp) {
- if (resp.httpResponse.statusCode) {
- resp.error.statusCode = resp.httpResponse.statusCode;
- if (resp.error.retryable === undefined) {
- resp.error.retryable = this.service.retryableError(resp.error, this);
- }
- }
- });
-
- add('INVALIDATE_CREDENTIALS', 'retry', function INVALIDATE_CREDENTIALS(resp) {
- if (!resp.error) return;
- switch (resp.error.code) {
- case 'RequestExpired': // EC2 only
- case 'ExpiredTokenException':
- case 'ExpiredToken':
- resp.error.retryable = true;
- resp.request.service.config.credentials.expired = true;
- }
- });
-
- add('EXPIRED_SIGNATURE', 'retry', function EXPIRED_SIGNATURE(resp) {
- var err = resp.error;
- if (!err) return;
- if (typeof err.code === 'string' && typeof err.message === 'string') {
- if (err.code.match(/Signature/) && err.message.match(/expired/)) {
- resp.error.retryable = true;
- }
- }
- });
-
- add('REDIRECT', 'retry', function REDIRECT(resp) {
- if (resp.error && resp.error.statusCode >= 300 &&
- resp.error.statusCode < 400 && resp.httpResponse.headers['location']) {
- this.httpRequest.endpoint =
- new AWS.Endpoint(resp.httpResponse.headers['location']);
- this.httpRequest.headers['Host'] = this.httpRequest.endpoint.host;
- resp.error.redirect = true;
- resp.error.retryable = true;
- }
- });
-
- add('RETRY_CHECK', 'retry', function RETRY_CHECK(resp) {
- if (resp.error) {
- if (resp.error.redirect && resp.redirectCount < resp.maxRedirects) {
- resp.error.retryDelay = 0;
- } else if (resp.retryCount < resp.maxRetries) {
- var delays = this.service.retryDelays();
- resp.error.retryDelay = delays[resp.retryCount] || 0;
- }
- }
- });
-
- addAsync('RESET_RETRY_STATE', 'afterRetry', function RESET_RETRY_STATE(resp, done) {
- var delay, willRetry = false;
-
- if (resp.error) {
- delay = resp.error.retryDelay || 0;
- if (resp.error.retryable && resp.retryCount < resp.maxRetries) {
- resp.retryCount++;
- willRetry = true;
- } else if (resp.error.redirect && resp.redirectCount < resp.maxRedirects) {
- resp.redirectCount++;
- willRetry = true;
- }
- }
-
- if (willRetry) {
- resp.error = null;
- setTimeout(done, delay);
- } else {
- done();
- }
- });
- }),
-
- CorePost: new SequentialExecutor().addNamedListeners(function(add) {
- add('EXTRACT_REQUEST_ID', 'extractData', function EXTRACT_REQUEST_ID(resp) {
-
- if (!resp.requestId) {
- resp.requestId = resp.httpResponse.headers['x-amz-request-id'] ||
- resp.httpResponse.headers['x-amzn-requestid'];
- }
-
- if (!resp.requestId && resp.data && resp.data.ResponseMetadata) {
- resp.requestId = resp.data.ResponseMetadata.RequestId;
- }
- });
-
- add('ENOTFOUND_ERROR', 'httpError', function ENOTFOUND_ERROR(err) {
- if (err.code === 'NetworkingError' && err.errno === 'ENOTFOUND') {
- var message = 'Inaccessible host: `' + err.hostname +
- '\'. This service may not be available in the `' + err.region +
- '\' region.';
- this.response.error = AWS.util.error(new Error(message), {
- code: 'UnknownEndpoint',
- region: err.region,
- hostname: err.hostname,
- retryable: true,
- originalError: err
- });
- }
- });
- }),
-
- Logger: new SequentialExecutor().addNamedListeners(function(add) {
- add('LOG_REQUEST', 'complete', function LOG_REQUEST(resp) {
- var req = resp.request;
- var logger = req.service.config.logger;
- if (!logger) return;
-
- function buildMessage() {
- var time = AWS.util.date.getDate().getTime();
- var delta = (time - req.startTime.getTime()) / 1000;
- var ansi = logger.isTTY ? true : false;
- var status = resp.httpResponse.statusCode;
- var params = require('util').inspect(req.params, true, null);
-
- var message = '';
- if (ansi) message += '\x1B[33m';
- message += '[AWS ' + req.service.serviceIdentifier + ' ' + status;
- message += ' ' + delta.toString() + 's ' + resp.retryCount + ' retries]';
- if (ansi) message += '\x1B[0;1m';
- message += ' ' + AWS.util.string.lowerFirst(req.operation);
- message += '(' + params + ')';
- if (ansi) message += '\x1B[0m';
- return message;
- }
-
- var line = buildMessage();
- if (typeof logger.log === 'function') {
- logger.log(line);
- } else if (typeof logger.write === 'function') {
- logger.write(line + '\n');
- }
- });
- }),
-
- Json: new SequentialExecutor().addNamedListeners(function(add) {
- var svc = require('./protocol/json');
- add('BUILD', 'build', svc.buildRequest);
- add('EXTRACT_DATA', 'extractData', svc.extractData);
- add('EXTRACT_ERROR', 'extractError', svc.extractError);
- }),
-
- Rest: new SequentialExecutor().addNamedListeners(function(add) {
- var svc = require('./protocol/rest');
- add('BUILD', 'build', svc.buildRequest);
- add('EXTRACT_DATA', 'extractData', svc.extractData);
- add('EXTRACT_ERROR', 'extractError', svc.extractError);
- }),
-
- RestJson: new SequentialExecutor().addNamedListeners(function(add) {
- var svc = require('./protocol/rest_json');
- add('BUILD', 'build', svc.buildRequest);
- add('EXTRACT_DATA', 'extractData', svc.extractData);
- add('EXTRACT_ERROR', 'extractError', svc.extractError);
- }),
-
- RestXml: new SequentialExecutor().addNamedListeners(function(add) {
- var svc = require('./protocol/rest_xml');
- add('BUILD', 'build', svc.buildRequest);
- add('EXTRACT_DATA', 'extractData', svc.extractData);
- add('EXTRACT_ERROR', 'extractError', svc.extractError);
- }),
-
- Query: new SequentialExecutor().addNamedListeners(function(add) {
- var svc = require('./protocol/query');
- add('BUILD', 'build', svc.buildRequest);
- add('EXTRACT_DATA', 'extractData', svc.extractData);
- add('EXTRACT_ERROR', 'extractError', svc.extractError);
- })
-};
-
-},{"./core":3,"./protocol/json":22,"./protocol/query":23,"./protocol/rest":24,"./protocol/rest_json":25,"./protocol/rest_xml":26,"./sequential_executor":34,"util":72}],11:[function(require,module,exports){
-var AWS = require('./core');
-var inherit = AWS.util.inherit;
-
-
-AWS.Endpoint = inherit({
-
-
- constructor: function Endpoint(endpoint, config) {
- AWS.util.hideProperties(this, ['slashes', 'auth', 'hash', 'search', 'query']);
-
- if (typeof endpoint === 'undefined' || endpoint === null) {
- throw new Error('Invalid endpoint: ' + endpoint);
- } else if (typeof endpoint !== 'string') {
- return AWS.util.copy(endpoint);
- }
-
- if (!endpoint.match(/^http/)) {
- var useSSL = config && config.sslEnabled !== undefined ?
- config.sslEnabled : AWS.config.sslEnabled;
- endpoint = (useSSL ? 'https' : 'http') + '://' + endpoint;
- }
-
- AWS.util.update(this, AWS.util.urlParse(endpoint));
-
- if (this.port) {
- this.port = parseInt(this.port, 10);
- } else {
- this.port = this.protocol === 'https:' ? 443 : 80;
- }
- }
-
-});
-
-
-AWS.HttpRequest = inherit({
-
-
- constructor: function HttpRequest(endpoint, region) {
- endpoint = new AWS.Endpoint(endpoint);
- this.method = 'POST';
- this.path = endpoint.path || '/';
- this.headers = {};
- this.body = '';
- this.endpoint = endpoint;
- this.region = region;
- this.setUserAgent();
- },
-
-
- setUserAgent: function setUserAgent() {
- var prefix = AWS.util.isBrowser() ? 'X-Amz-' : '';
- this.headers[prefix + 'User-Agent'] = AWS.util.userAgent();
- },
-
-
- pathname: function pathname() {
- return this.path.split('?', 1)[0];
- },
-
-
- search: function search() {
- var query = this.path.split('?', 2)[1];
- if (query) {
- query = AWS.util.queryStringParse(query);
- return AWS.util.queryParamsToString(query);
- }
- return '';
- }
-
-});
-
-
-AWS.HttpResponse = inherit({
-
-
- constructor: function HttpResponse() {
- this.statusCode = undefined;
- this.headers = {};
- this.body = undefined;
- this.streaming = false;
- this.stream = null;
- },
-
-
- createUnbufferedStream: function createUnbufferedStream() {
- this.streaming = true;
- return this.stream;
- }
-});
-
-
-AWS.HttpClient = inherit({});
-
-
-AWS.HttpClient.getInstance = function getInstance() {
- if (this.singleton === undefined) {
- this.singleton = new this();
- }
- return this.singleton;
-};
-
-},{"./core":3}],12:[function(require,module,exports){
-var AWS = require('../core');
-var EventEmitter = require('events').EventEmitter;
-require('../http');
-
-
-AWS.XHRClient = AWS.util.inherit({
- handleRequest: function handleRequest(httpRequest, httpOptions, callback, errCallback) {
- var self = this;
- var endpoint = httpRequest.endpoint;
- var emitter = new EventEmitter();
- var href = endpoint.protocol + '//' + endpoint.hostname;
- if (endpoint.port !== 80 && endpoint.port !== 443) {
- href += ':' + endpoint.port;
- }
- href += httpRequest.path;
-
- var xhr = new XMLHttpRequest(), headersEmitted = false;
- httpRequest.stream = xhr;
-
- xhr.addEventListener('readystatechange', function() {
- try {
- if (xhr.status === 0) return; // 0 code is invalid
- } catch (e) { return; }
-
- if (this.readyState >= this.HEADERS_RECEIVED && !headersEmitted) {
- try { xhr.responseType = 'arraybuffer'; } catch (e) {}
- emitter.statusCode = xhr.status;
- emitter.headers = self.parseHeaders(xhr.getAllResponseHeaders());
- emitter.emit('headers', emitter.statusCode, emitter.headers);
- headersEmitted = true;
- }
- if (this.readyState === this.DONE) {
- self.finishRequest(xhr, emitter);
- }
- }, false);
- xhr.upload.addEventListener('progress', function (evt) {
- emitter.emit('sendProgress', evt);
- });
- xhr.addEventListener('progress', function (evt) {
- emitter.emit('receiveProgress', evt);
- }, false);
- xhr.addEventListener('timeout', function () {
- errCallback(AWS.util.error(new Error('Timeout'), {code: 'TimeoutError'}));
- }, false);
- xhr.addEventListener('error', function () {
- errCallback(AWS.util.error(new Error('Network Failure'), {
- code: 'NetworkingError'
- }));
- }, false);
-
- callback(emitter);
- xhr.open(httpRequest.method, href, httpOptions.xhrAsync !== false);
- AWS.util.each(httpRequest.headers, function (key, value) {
- if (key !== 'Content-Length' && key !== 'User-Agent' && key !== 'Host') {
- xhr.setRequestHeader(key, value);
- }
- });
-
- if (httpOptions.timeout && httpOptions.xhrAsync !== false) {
- xhr.timeout = httpOptions.timeout;
- }
-
- if (httpOptions.xhrWithCredentials) {
- xhr.withCredentials = true;
- }
-
- try {
- xhr.send(httpRequest.body);
- } catch (err) {
- if (httpRequest.body && typeof httpRequest.body.buffer === 'object') {
- xhr.send(httpRequest.body.buffer); // send ArrayBuffer directly
- } else {
- throw err;
- }
- }
-
- return emitter;
- },
-
- parseHeaders: function parseHeaders(rawHeaders) {
- var headers = {};
- AWS.util.arrayEach(rawHeaders.split(/\r?\n/), function (line) {
- var key = line.split(':', 1)[0];
- var value = line.substring(key.length + 2);
- if (key.length > 0) headers[key.toLowerCase()] = value;
- });
- return headers;
- },
-
- finishRequest: function finishRequest(xhr, emitter) {
- var buffer;
- if (xhr.responseType === 'arraybuffer' && xhr.response) {
- var ab = xhr.response;
- buffer = new AWS.util.Buffer(ab.byteLength);
- var view = new Uint8Array(ab);
- for (var i = 0; i < buffer.length; ++i) {
- buffer[i] = view[i];
- }
- }
-
- try {
- if (!buffer && typeof xhr.responseText === 'string') {
- buffer = new AWS.util.Buffer(xhr.responseText);
- }
- } catch (e) {}
-
- if (buffer) emitter.emit('data', buffer);
- emitter.emit('end');
- }
-});
-
-
-AWS.HttpClient.prototype = AWS.XHRClient.prototype;
-
-
-AWS.HttpClient.streamsApiVersion = 1;
-
-},{"../core":3,"../http":11,"events":63}],13:[function(require,module,exports){
-var util = require('../util');
-
-function JsonBuilder() { }
-
-JsonBuilder.prototype.build = function(value, shape) {
- return JSON.stringify(translate(value, shape));
-};
-
-function translate(value, shape) {
- if (!shape || value === undefined || value === null) return undefined;
-
- switch (shape.type) {
- case 'structure': return translateStructure(value, shape);
- case 'map': return translateMap(value, shape);
- case 'list': return translateList(value, shape);
- default: return translateScalar(value, shape);
- }
-}
-
-function translateStructure(structure, shape) {
- var struct = {};
- util.each(structure, function(name, value) {
- var memberShape = shape.members[name];
- if (memberShape) {
- if (memberShape.location !== 'body') return;
-
- var result = translate(value, memberShape);
- if (result !== undefined) struct[name] = result;
- }
- });
- return struct;
-}
-
-function translateList(list, shape) {
- var out = [];
- util.arrayEach(list, function(value) {
- var result = translate(value, shape.member);
- if (result !== undefined) out.push(result);
- });
- return out;
-}
-
-function translateMap(map, shape) {
- var out = {};
- util.each(map, function(key, value) {
- var result = translate(value, shape.value);
- if (result !== undefined) out[key] = result;
- });
- return out;
-}
-
-function translateScalar(value, shape) {
- return shape.toWireFormat(value);
-}
-
-module.exports = JsonBuilder;
-
-},{"../util":51}],14:[function(require,module,exports){
-var util = require('../util');
-
-function JsonParser() { }
-
-JsonParser.prototype.parse = function(value, shape) {
- return translate(JSON.parse(value), shape);
-};
-
-function translate(value, shape) {
- if (!shape || value === undefined) return undefined;
-
- switch (shape.type) {
- case 'structure': return translateStructure(value, shape);
- case 'map': return translateMap(value, shape);
- case 'list': return translateList(value, shape);
- default: return translateScalar(value, shape);
- }
-}
-
-function translateStructure(structure, shape) {
- if (structure == null) return undefined;
-
- var struct = {};
- util.each(structure, function(name, value) {
- var memberShape = shape.members[name];
- if (memberShape) {
- var result = translate(value, memberShape);
- if (result !== undefined) struct[name] = result;
- }
- });
- return struct;
-}
-
-function translateList(list, shape) {
- if (list == null) return undefined;
-
- var out = [];
- util.arrayEach(list, function(value) {
- var result = translate(value, shape.member);
- if (result === undefined) out.push(null);
- else out.push(result);
- });
- return out;
-}
-
-function translateMap(map, shape) {
- if (map == null) return undefined;
-
- var out = {};
- util.each(map, function(key, value) {
- var result = translate(value, shape.value);
- if (result === undefined) out[key] = null;
- else out[key] = result;
- });
- return out;
-}
-
-function translateScalar(value, shape) {
- return shape.toType(value);
-}
-
-module.exports = JsonParser;
-
-},{"../util":51}],15:[function(require,module,exports){
-var Collection = require('./collection');
-var Operation = require('./operation');
-var Shape = require('./shape');
-var Paginator = require('./paginator');
-var ResourceWaiter = require('./resource_waiter');
-
-var util = require('../util');
-var property = util.property;
-var memoizedProperty = util.memoizedProperty;
-
-function Api(api, options) {
- api = api || {};
- options = options || {};
- options.api = this;
-
- api.metadata = api.metadata || {};
-
- property(this, 'isApi', true, false);
- property(this, 'apiVersion', api.metadata.apiVersion);
- property(this, 'endpointPrefix', api.metadata.endpointPrefix);
- property(this, 'signingName', api.metadata.signingName);
- property(this, 'globalEndpoint', api.metadata.globalEndpoint);
- property(this, 'signatureVersion', api.metadata.signatureVersion);
- property(this, 'jsonVersion', api.metadata.jsonVersion);
- property(this, 'targetPrefix', api.metadata.targetPrefix);
- property(this, 'protocol', api.metadata.protocol);
- property(this, 'timestampFormat', api.metadata.timestampFormat);
- property(this, 'xmlNamespaceUri', api.metadata.xmlNamespace);
- property(this, 'abbreviation', api.metadata.serviceAbbreviation);
- property(this, 'fullName', api.metadata.serviceFullName);
-
- memoizedProperty(this, 'className', function() {
- var name = api.metadata.serviceAbbreviation || api.metadata.serviceFullName;
- if (!name) return null;
-
- name = name.replace(/^Amazon|AWS\s*|\(.*|\s+|\W+/g, '');
- if (name === 'ElasticLoadBalancing') name = 'ELB';
- return name;
- });
-
- property(this, 'operations', new Collection(api.operations, options, function(name, operation) {
- return new Operation(name, operation, options);
- }, util.string.lowerFirst));
-
- property(this, 'shapes', new Collection(api.shapes, options, function(name, shape) {
- return Shape.create(shape, options);
- }));
-
- property(this, 'paginators', new Collection(api.paginators, options, function(name, paginator) {
- return new Paginator(name, paginator, options);
- }));
-
- property(this, 'waiters', new Collection(api.waiters, options, function(name, waiter) {
- return new ResourceWaiter(name, waiter, options);
- }, util.string.lowerFirst));
-
- if (options.documentation) {
- property(this, 'documentation', api.documentation);
- property(this, 'documentationUrl', api.documentationUrl);
- }
-}
-
-module.exports = Api;
-
-},{"../util":51,"./collection":16,"./operation":17,"./paginator":18,"./resource_waiter":19,"./shape":20}],16:[function(require,module,exports){
-var memoizedProperty = require('../util').memoizedProperty;
-
-function memoize(name, value, fn, nameTr) {
- memoizedProperty(this, nameTr(name), function() {
- return fn(name, value);
- });
-}
-
-function Collection(iterable, options, fn, nameTr) {
- nameTr = nameTr || String;
- var self = this;
-
- for (var id in iterable) {
- if (iterable.hasOwnProperty(id)) {
- memoize.call(self, id, iterable[id], fn, nameTr);
- }
- }
-}
-
-module.exports = Collection;
-
-},{"../util":51}],17:[function(require,module,exports){
-var Shape = require('./shape');
-
-var util = require('../util');
-var property = util.property;
-var memoizedProperty = util.memoizedProperty;
-
-function Operation(name, operation, options) {
- options = options || {};
-
- property(this, 'name', operation.name || name);
- property(this, 'api', options.api, false);
-
- operation.http = operation.http || {};
- property(this, 'httpMethod', operation.http.method || 'POST');
- property(this, 'httpPath', operation.http.requestUri || '/');
-
- memoizedProperty(this, 'input', function() {
- if (!operation.input) {
- return new Shape.create({type: 'structure'}, options);
- }
- return Shape.create(operation.input, options);
- });
-
- memoizedProperty(this, 'output', function() {
- if (!operation.output) {
- return new Shape.create({type: 'structure'}, options);
- }
- return Shape.create(operation.output, options);
- });
-
- memoizedProperty(this, 'errors', function() {
- var list = [];
- if (!operation.errors) return null;
-
- for (var i = 0; i < operation.errors.length; i++) {
- list.push(Shape.create(operation.errors[i], options));
- }
-
- return list;
- });
-
- memoizedProperty(this, 'paginator', function() {
- return options.api.paginators[name];
- });
-
- if (options.documentation) {
- property(this, 'documentation', operation.documentation);
- property(this, 'documentationUrl', operation.documentationUrl);
- }
-}
-
-module.exports = Operation;
-
-},{"../util":51,"./shape":20}],18:[function(require,module,exports){
-var property = require('../util').property;
-
-function Paginator(name, paginator) {
- property(this, 'inputToken', paginator.input_token);
- property(this, 'limitKey', paginator.limit_key);
- property(this, 'moreResults', paginator.more_results);
- property(this, 'outputToken', paginator.output_token);
- property(this, 'resultKey', paginator.result_key);
-}
-
-module.exports = Paginator;
-
-},{"../util":51}],19:[function(require,module,exports){
-var util = require('../util');
-var property = util.property;
-
-function ResourceWaiter(name, waiter, options) {
- options = options || {};
-
- function InnerResourceWaiter() {
- property(this, 'name', name);
- property(this, 'api', options.api, false);
-
- if (waiter.operation) {
- property(this, 'operation', util.string.lowerFirst(waiter.operation));
- }
-
- var self = this, map = {
- ignoreErrors: 'ignore_errors',
- successType: 'success_type',
- successValue: 'success_value',
- successPath: 'success_path',
- acceptorType: 'acceptor_type',
- acceptorValue: 'acceptor_value',
- acceptorPath: 'acceptor_path',
- failureType: 'failure_type',
- failureValue: 'failure_value',
- failurePath: 'success_path',
- interval: 'interval',
- maxAttempts: 'max_attempts'
- };
- Object.keys(map).forEach(function(key) {
- var value = waiter[map[key]];
- if (value) property(self, key, value);
- });
- }
-
- if (options.api) {
- var proto = null;
- if (waiter['extends']) {
- proto = options.api.waiters[waiter['extends']];
- } else if (name !== '__default__') {
- proto = options.api.waiters['__default__'];
- }
-
- if (proto) InnerResourceWaiter.prototype = proto;
- }
-
- return new InnerResourceWaiter();
-}
-
-module.exports = ResourceWaiter;
-
-},{"../util":51}],20:[function(require,module,exports){
-var Collection = require('./collection');
-
-var util = require('../util');
-
-function property(obj, name, value) {
- if (value !== null && value !== undefined) {
- util.property.apply(this, arguments);
- }
-}
-
-function memoizedProperty(obj, name) {
- if (!obj.constructor.prototype[name]) {
- util.memoizedProperty.apply(this, arguments);
- }
-}
-
-function Shape(shape, options, memberName) {
- options = options || {};
-
- property(this, 'shape', shape.shape);
- property(this, 'api', options.api, false);
- property(this, 'type', shape.type);
- property(this, 'location', shape.location || this.location || 'body');
- property(this, 'name', this.name || shape.xmlName || shape.queryName ||
- shape.locationName || memberName);
- property(this, 'isStreaming', shape.streaming || this.isStreaming || false);
- property(this, 'isComposite', shape.isComposite || false);
- property(this, 'isShape', true, false);
- property(this, 'isQueryName', shape.queryName ? true : false, false);
- property(this, 'isLocationName', shape.locationName ? true : false, false);
-
- if (options.documentation) {
- property(this, 'documentation', shape.documentation);
- property(this, 'documentationUrl', shape.documentationUrl);
- }
-
- if (shape.xmlAttribute) {
- property(this, 'isXmlAttribute', shape.xmlAttribute || false);
- }
-
- property(this, 'defaultValue', null);
- this.toWireFormat = function(value) {
- if (value === null || value === undefined) return '';
- return value;
- };
- this.toType = function(value) { return value; };
-}
-
-
-Shape.normalizedTypes = {
- character: 'string',
- double: 'float',
- long: 'integer',
- short: 'integer',
- biginteger: 'integer',
- bigdecimal: 'float',
- blob: 'binary'
-};
-
-
-Shape.types = {
- 'structure': StructureShape,
- 'list': ListShape,
- 'map': MapShape,
- 'boolean': BooleanShape,
- 'timestamp': TimestampShape,
- 'float': FloatShape,
- 'integer': IntegerShape,
- 'string': StringShape,
- 'base64': Base64Shape,
- 'binary': BinaryShape
-};
-
-Shape.resolve = function resolve(shape, options) {
- if (shape.shape) {
- var refShape = options.api.shapes[shape.shape];
- if (!refShape) {
- throw new Error('Cannot find shape reference: ' + shape.shape);
- }
-
- return refShape;
- } else {
- return null;
- }
-};
-
-Shape.create = function create(shape, options, memberName) {
- if (shape.isShape) return shape;
-
- var refShape = Shape.resolve(shape, options);
- if (refShape) {
- var filteredKeys = Object.keys(shape);
- if (!options.documentation) {
- filteredKeys = filteredKeys.filter(function(name) {
- return !name.match(/documentation/);
- });
- }
- if (filteredKeys === ['shape']) { // no inline customizations
- return refShape;
- }
-
- var InlineShape = function() {
- refShape.constructor.call(this, shape, options, memberName);
- };
- InlineShape.prototype = refShape;
- return new InlineShape();
- } else {
- if (!shape.type) {
- if (shape.members) shape.type = 'structure';
- else if (shape.member) shape.type = 'list';
- else if (shape.key) shape.type = 'map';
- else shape.type = 'string';
- }
-
- var origType = shape.type;
- if (Shape.normalizedTypes[shape.type]) {
- shape.type = Shape.normalizedTypes[shape.type];
- }
-
- if (Shape.types[shape.type]) {
- return new Shape.types[shape.type](shape, options, memberName);
- } else {
- throw new Error('Unrecognized shape type: ' + origType);
- }
- }
-};
-
-function CompositeShape(shape) {
- Shape.apply(this, arguments);
- property(this, 'isComposite', true);
-
- if (shape.flattened) {
- property(this, 'flattened', shape.flattened || false);
- }
-}
-
-function StructureShape(shape, options) {
- var requiredMap = null, firstInit = !this.isShape;
-
- CompositeShape.apply(this, arguments);
-
- if (firstInit) {
- property(this, 'defaultValue', function() { return {}; });
- property(this, 'members', {});
- property(this, 'memberNames', []);
- property(this, 'required', []);
- property(this, 'isRequired', function() { return false; });
- }
-
- if (shape.members) {
- property(this, 'members', new Collection(shape.members, options, function(name, member) {
- return Shape.create(member, options, name);
- }));
- memoizedProperty(this, 'memberNames', function() {
- return shape.xmlOrder || Object.keys(shape.members);
- });
- }
-
- if (shape.required) {
- property(this, 'required', shape.required);
- property(this, 'isRequired', function(name) {
- if (!requiredMap) {
- requiredMap = {};
- for (var i = 0; i < shape.required.length; i++) {
- requiredMap[shape.required[i]] = true;
- }
- }
-
- return requiredMap[name];
- }, false, true);
- }
-
- property(this, 'resultWrapper', shape.resultWrapper || null);
-
- if (shape.payload) {
- property(this, 'payload', shape.payload);
- }
-
- if (typeof shape.xmlNamespace === 'string') {
- property(this, 'xmlNamespaceUri', shape.xmlNamespace);
- } else if (typeof shape.xmlNamespace === 'object') {
- property(this, 'xmlNamespacePrefix', shape.xmlNamespace.prefix);
- property(this, 'xmlNamespaceUri', shape.xmlNamespace.uri);
- }
-}
-
-function ListShape(shape, options) {
- var self = this, firstInit = !this.isShape;
- CompositeShape.apply(this, arguments);
-
- if (firstInit) {
- property(this, 'defaultValue', function() { return []; });
- }
-
- if (shape.member) {
- memoizedProperty(this, 'member', function() {
- return Shape.create(shape.member, options);
- });
- }
-
- if (this.flattened) {
- var oldName = this.name;
- memoizedProperty(this, 'name', function() {
- return self.member.name || oldName;
- });
- }
-}
-
-function MapShape(shape, options) {
- var firstInit = !this.isShape;
- CompositeShape.apply(this, arguments);
-
- if (firstInit) {
- property(this, 'defaultValue', function() { return {}; });
- property(this, 'key', Shape.create({type: 'string'}, options));
- property(this, 'value', Shape.create({type: 'string'}, options));
- }
-
- if (shape.key) {
- memoizedProperty(this, 'key', function() {
- return Shape.create(shape.key, options);
- });
- }
- if (shape.value) {
- memoizedProperty(this, 'value', function() {
- return Shape.create(shape.value, options);
- });
- }
-}
-
-function TimestampShape(shape) {
- var self = this;
- Shape.apply(this, arguments);
-
- if (this.location === 'header') {
- property(this, 'timestampFormat', 'rfc822');
- } else if (shape.timestampFormat) {
- property(this, 'timestampFormat', shape.timestampFormat);
- } else if (this.api) {
- if (this.api.timestampFormat) {
- property(this, 'timestampFormat', this.api.timestampFormat);
- } else {
- switch (this.api.protocol) {
- case 'json':
- case 'rest-json':
- property(this, 'timestampFormat', 'unixTimestamp');
- break;
- case 'rest-xml':
- case 'query':
- case 'ec2':
- property(this, 'timestampFormat', 'iso8601');
- break;
- }
- }
- }
-
- this.toType = function(value) {
- if (value === null || value === undefined) return null;
- if (typeof value.toUTCString === 'function') return value;
- return typeof value === 'string' || typeof value === 'number' ?
- util.date.parseTimestamp(value) : null;
- };
-
- this.toWireFormat = function(value) {
- return util.date.format(value, self.timestampFormat);
- };
-}
-
-function StringShape() {
- Shape.apply(this, arguments);
-
- if (this.api) {
- switch (this.api.protocol) {
- case 'rest-xml':
- case 'query':
- case 'ec2':
- this.toType = function(value) { return value || ''; };
- }
- }
-}
-
-function FloatShape() {
- Shape.apply(this, arguments);
-
- this.toType = function(value) {
- if (value === null || value === undefined) return null;
- return parseFloat(value);
- };
- this.toWireFormat = this.toType;
-}
-
-function IntegerShape() {
- Shape.apply(this, arguments);
-
- this.toType = function(value) {
- if (value === null || value === undefined) return null;
- return parseInt(value, 10);
- };
- this.toWireFormat = this.toType;
-}
-
-function BinaryShape() {
- Shape.apply(this, arguments);
- this.toType = util.base64.decode;
- this.toWireFormat = util.base64.encode;
-}
-
-function Base64Shape() {
- BinaryShape.apply(this, arguments);
-}
-
-function BooleanShape() {
- Shape.apply(this, arguments);
-
- this.toType = function(value) {
- if (typeof value === 'boolean') return value;
- if (value === null || value === undefined) return null;
- return value === 'true';
- };
-}
-
-
-Shape.shapes = {
- StructureShape: StructureShape,
- ListShape: ListShape,
- MapShape: MapShape,
- StringShape: StringShape,
- BooleanShape: BooleanShape,
- Base64Shape: Base64Shape
-};
-
-module.exports = Shape;
-
-},{"../util":51,"./collection":16}],21:[function(require,module,exports){
-var AWS = require('./core');
-
-
-AWS.ParamValidator = AWS.util.inherit({
- validate: function validate(shape, params, context) {
- this.errors = [];
- this.validateMember(shape, params || {}, context || 'params');
-
- if (this.errors.length > 1) {
- var msg = this.errors.join('\n* ');
- if (this.errors.length > 1) {
- msg = 'There were ' + this.errors.length +
- ' validation errors:\n* ' + msg;
- throw AWS.util.error(new Error(msg),
- {code: 'MultipleValidationErrors', errors: this.errors});
- }
- } else if (this.errors.length === 1) {
- throw this.errors[0];
- } else {
- return true;
- }
- },
-
- validateStructure: function validateStructure(shape, params, context) {
- this.validateType(context, params, ['object'], 'structure');
-
- var paramName;
- for (var i = 0; shape.required && i < shape.required.length; i++) {
- paramName = shape.required[i];
- var value = params[paramName];
- if (value === undefined || value === null) {
- this.fail('MissingRequiredParameter',
- 'Missing required key \'' + paramName + '\' in ' + context);
- }
- }
-
- for (paramName in params) {
- if (!params.hasOwnProperty(paramName)) continue;
-
- var paramValue = params[paramName],
- memberShape = shape.members[paramName];
-
- if (memberShape !== undefined) {
- var memberContext = [context, paramName].join('.');
- this.validateMember(memberShape, paramValue, memberContext);
- } else {
- this.fail('UnexpectedParameter',
- 'Unexpected key \'' + paramName + '\' found in ' + context);
- }
- }
-
- return true;
- },
-
- validateMember: function validateMember(shape, param, context) {
- switch (shape.type) {
- case 'structure':
- return this.validateStructure(shape, param, context);
- case 'list':
- return this.validateList(shape, param, context);
- case 'map':
- return this.validateMap(shape, param, context);
- default:
- return this.validateScalar(shape, param, context);
- }
- },
-
- validateList: function validateList(shape, params, context) {
- this.validateType(context, params, [Array]);
-
- for (var i = 0; i < params.length; i++) {
- this.validateMember(shape.member, params[i], context + '[' + i + ']');
- }
- },
-
- validateMap: function validateMap(shape, params, context) {
- this.validateType(context, params, ['object'], 'map');
-
- for (var param in params) {
- if (!params.hasOwnProperty(param)) continue;
- this.validateMember(shape.value, params[param],
- context + '[\'' + param + '\']');
- }
- },
-
- validateScalar: function validateScalar(shape, value, context) {
- switch (shape.type) {
- case null:
- case undefined:
- case 'string':
- return this.validateType(context, value, ['string']);
- case 'base64':
- case 'binary':
- return this.validatePayload(context, value);
- case 'integer':
- case 'float':
- return this.validateNumber(context, value);
- case 'boolean':
- return this.validateType(context, value, ['boolean']);
- case 'timestamp':
- return this.validateType(context, value, [Date,
- /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$/, 'number'],
- 'Date object, ISO-8601 string, or a UNIX timestamp');
- default:
- return this.fail('UnkownType', 'Unhandled type ' +
- shape.type + ' for ' + context);
- }
- },
-
- fail: function fail(code, message) {
- this.errors.push(AWS.util.error(new Error(message), {code: code}));
- },
-
- validateType: function validateType(context, value, acceptedTypes, type) {
- if (value === null || value === undefined) return;
-
- var foundInvalidType = false;
- for (var i = 0; i < acceptedTypes.length; i++) {
- if (typeof acceptedTypes[i] === 'string') {
- if (typeof value === acceptedTypes[i]) return;
- } else if (acceptedTypes[i] instanceof RegExp) {
- if ((value || '').toString().match(acceptedTypes[i])) return;
- } else {
- if (value instanceof acceptedTypes[i]) return;
- if (AWS.util.isType(value, acceptedTypes[i])) return;
- if (!type && !foundInvalidType) acceptedTypes = acceptedTypes.slice();
- acceptedTypes[i] = AWS.util.typeName(acceptedTypes[i]);
- }
- foundInvalidType = true;
- }
-
- var acceptedType = type;
- if (!acceptedType) {
- acceptedType = acceptedTypes.join(', ').replace(/,([^,]+)$/, ', or$1');
- }
-
- var vowel = acceptedType.match(/^[aeiou]/i) ? 'n' : '';
- this.fail('InvalidParameterType', 'Expected ' + context + ' to be a' +
- vowel + ' ' + acceptedType);
- },
-
- validateNumber: function validateNumber(context, value) {
- if (value === null || value === undefined) return;
- if (typeof value === 'string') {
- var castedValue = parseFloat(value);
- if (castedValue.toString() === value) value = castedValue;
- }
- this.validateType(context, value, ['number']);
- },
-
- validatePayload: function validatePayload(context, value) {
- if (value === null || value === undefined) return;
- if (typeof value === 'string') return;
- if (value && typeof value.byteLength === 'number') return; // typed arrays
- if (AWS.util.isNode()) { // special check for buffer/stream in Node.js
- var Stream = AWS.util.nodeRequire('stream').Stream;
- if (AWS.util.Buffer.isBuffer(value) || value instanceof Stream) return;
- }
-
- var types = ['Buffer', 'Stream', 'File', 'Blob', 'ArrayBuffer', 'DataView'];
- if (value) {
- for (var i = 0; i < types.length; i++) {
- if (AWS.util.isType(value, types[i])) return;
- if (AWS.util.typeName(value.constructor) === types[i]) return;
- }
- }
-
- this.fail('InvalidParameterType', 'Expected ' + context + ' to be a ' +
- 'string, Buffer, Stream, Blob, or typed array object');
- }
-});
-
-},{"./core":3}],22:[function(require,module,exports){
-var util = require('../util');
-var JsonBuilder = require('../json/builder');
-var JsonParser = require('../json/parser');
-
-function buildRequest(req) {
- var httpRequest = req.httpRequest;
- var api = req.service.api;
- var target = api.targetPrefix + '.' + api.operations[req.operation].name;
- var version = api.jsonVersion || '1.0';
- var input = api.operations[req.operation].input;
- var builder = new JsonBuilder();
-
- if (version === 1) version = '1.0';
- httpRequest.body = builder.build(req.params || {}, input);
- httpRequest.headers['Content-Type'] = 'application/x-amz-json-' + version;
- httpRequest.headers['X-Amz-Target'] = target;
-}
-
-function extractError(resp) {
- var error = {};
- var httpResponse = resp.httpResponse;
-
- error.code = httpResponse.headers['x-amzn-errortype'] || 'UnknownError';
- if (typeof error.code === 'string') {
- error.code = error.code.split(':')[0];
- }
-
- if (httpResponse.body.length > 0) {
- var e = JSON.parse(httpResponse.body.toString());
- if (e.__type || e.code) {
- error.code = (e.__type || e.code).split('#').pop();
- }
- if (error.code === 'RequestEntityTooLarge') {
- error.message = 'Request body must be less than 1 MB';
- } else {
- error.message = (e.message || e.Message || null);
- }
- } else {
- error.statusCode = httpResponse.statusCode;
- error.message = httpResponse.statusCode.toString();
- }
-
- resp.error = util.error(new Error(), error);
-}
-
-function extractData(resp) {
- var body = resp.httpResponse.body.toString() || '{}';
- if (resp.request.service.config.convertResponseTypes === false) {
- resp.data = JSON.parse(body);
- } else {
- var operation = resp.request.service.api.operations[resp.request.operation];
- var shape = operation.output || {};
- var parser = new JsonParser();
- resp.data = parser.parse(body, shape);
- }
-}
-
-module.exports = {
- buildRequest: buildRequest,
- extractError: extractError,
- extractData: extractData
-};
-
-},{"../json/builder":13,"../json/parser":14,"../util":51}],23:[function(require,module,exports){
-var AWS = require('../core');
-var util = require('../util');
-var QueryParamSerializer = require('../query/query_param_serializer');
-var Shape = require('../model/shape');
-
-function buildRequest(req) {
- var operation = req.service.api.operations[req.operation];
- var httpRequest = req.httpRequest;
- httpRequest.headers['Content-Type'] =
- 'application/x-www-form-urlencoded; charset=utf-8';
- httpRequest.params = {
- Version: req.service.api.apiVersion,
- Action: operation.name
- };
-
- var builder = new QueryParamSerializer();
- builder.serialize(req.params, operation.input, function(name, value) {
- httpRequest.params[name] = value;
- });
- httpRequest.body = util.queryParamsToString(httpRequest.params);
-}
-
-function extractError(resp) {
- var data, body = resp.httpResponse.body.toString();
- if (body.match('= 0 ? '&' : '?');
- var parts = [];
- util.arrayEach(Object.keys(queryString).sort(), function(key) {
- if (!Array.isArray(queryString[key])) {
- queryString[key] = [queryString[key]];
- }
- for (var i = 0; i < queryString[key].length; i++) {
- parts.push(util.uriEscape(String(key)) + '=' + queryString[key][i]);
- }
- });
- uri += parts.join('&');
- }
-
- req.httpRequest.path = uri;
-}
-
-function populateHeaders(req) {
- var operation = req.service.api.operations[req.operation];
- util.each(operation.input.members, function (name, member) {
- var value = req.params[name];
- if (value === null || value === undefined) return;
-
- if (member.location === 'headers' && member.type === 'map') {
- util.each(value, function(key, memberValue) {
- req.httpRequest.headers[member.name + key] = memberValue;
- });
- } else if (member.location === 'header') {
- value = member.toWireFormat(value).toString();
- req.httpRequest.headers[member.name] = value;
- }
- });
-}
-
-function buildRequest(req) {
- populateMethod(req);
- populateURI(req);
- populateHeaders(req);
-}
-
-function extractError() {
-}
-
-function extractData(resp) {
- var req = resp.request;
- var data = {};
- var r = resp.httpResponse;
- var operation = req.service.api.operations[req.operation];
- var output = operation.output;
-
- var headers = {};
- util.each(r.headers, function (k, v) {
- headers[k.toLowerCase()] = v;
- });
-
- util.each(output.members, function(name, member) {
- var header = (member.name || name).toLowerCase();
- if (member.location === 'headers' && member.type === 'map') {
- data[name] = {};
- var location = member.isLocationName ? member.name : '';
- var pattern = new RegExp('^' + location + '(.+)', 'i');
- util.each(r.headers, function (k, v) {
- var result = k.match(pattern);
- if (result !== null) {
- data[name][result[1]] = v;
- }
- });
- } else if (member.location === 'header') {
- if (headers[header] !== undefined) {
- data[name] = headers[header];
- }
- } else if (member.location === 'statusCode') {
- data[name] = parseInt(r.statusCode, 10);
- }
- });
-
- resp.data = data;
-}
-
-module.exports = {
- buildRequest: buildRequest,
- extractError: extractError,
- extractData: extractData
-};
-
-},{"../util":51}],25:[function(require,module,exports){
-var util = require('../util');
-var Rest = require('./rest');
-var Json = require('./json');
-var JsonBuilder = require('../json/builder');
-var JsonParser = require('../json/parser');
-
-function populateBody(req) {
- var builder = new JsonBuilder();
- var input = req.service.api.operations[req.operation].input;
-
- if (input.payload) {
- var params = {};
- var payloadShape = input.members[input.payload];
- params = req.params[input.payload];
- if (params === undefined) return;
-
- if (payloadShape.type === 'structure') {
- req.httpRequest.body = builder.build(params, payloadShape);
- } else { // non-JSON payload
- req.httpRequest.body = params;
- }
- } else {
- req.httpRequest.body = builder.build(req.params, input);
- }
-}
-
-function buildRequest(req) {
- Rest.buildRequest(req);
-
- if (['GET', 'HEAD'].indexOf(req.httpRequest.method) < 0) {
- populateBody(req);
- }
-}
-
-function extractError(resp) {
- Json.extractError(resp);
-}
-
-function extractData(resp) {
- Rest.extractData(resp);
-
- var req = resp.request;
- var rules = req.service.api.operations[req.operation].output || {};
- if (rules.payload) {
- var payloadMember = rules.members[rules.payload];
- var body = resp.httpResponse.body;
- if (payloadMember.isStreaming) {
- resp.data[rules.payload] = body;
- } else if (payloadMember.type === 'structure') {
- var parser = new JsonParser();
- resp.data[rules.payload] = parser.parse(body, payloadMember);
- } else {
- resp.data[rules.payload] = body.toString();
- }
- } else {
- var data = resp.data;
- Json.extractData(resp);
- resp.data = util.merge(data, resp.data);
- }
-}
-
-module.exports = {
- buildRequest: buildRequest,
- extractError: extractError,
- extractData: extractData
-};
-
-},{"../json/builder":13,"../json/parser":14,"../util":51,"./json":22,"./rest":24}],26:[function(require,module,exports){
-var AWS = require('../core');
-var util = require('../util');
-var Rest = require('./rest');
-
-function populateBody(req) {
- var input = req.service.api.operations[req.operation].input;
- var builder = new AWS.XML.Builder();
- var params = req.params;
-
- var payload = input.payload;
- if (payload) {
- var payloadMember = input.members[payload];
- params = params[payload];
- if (params === undefined) return;
-
- if (payloadMember.type === 'structure') {
- var rootElement = payloadMember.name;
- req.httpRequest.body = builder.toXML(params, payloadMember, rootElement, true);
- } else { // non-xml payload
- req.httpRequest.body = params;
- }
- } else {
- req.httpRequest.body = builder.toXML(params, input, input.name ||
- input.shape || util.string.upperFirst(req.operation) + 'Request');
- }
-}
-
-function buildRequest(req) {
- Rest.buildRequest(req);
-
- if (['GET', 'HEAD'].indexOf(req.httpRequest.method) < 0) {
- populateBody(req);
- }
-}
-
-function extractError(resp) {
- Rest.extractError(resp);
-
- var data = new AWS.XML.Parser().parse(resp.httpResponse.body.toString());
- if (data.Errors) data = data.Errors;
- if (data.Error) data = data.Error;
- if (data.Code) {
- resp.error = util.error(new Error(), {
- code: data.Code,
- message: data.Message
- });
- } else {
- resp.error = util.error(new Error(), {
- code: resp.httpResponse.statusCode,
- message: null
- });
- }
-}
-
-function extractData(resp) {
- Rest.extractData(resp);
-
- var parser;
- var req = resp.request;
- var body = resp.httpResponse.body;
- var operation = req.service.api.operations[req.operation];
- var output = operation.output;
-
- var payload = output.payload;
- if (payload) {
- var payloadMember = output.members[payload];
- if (payloadMember.isStreaming) {
- resp.data[payload] = body;
- } else if (payloadMember.type === 'structure') {
- parser = new AWS.XML.Parser();
- resp.data[payload] = parser.parse(body.toString(), payloadMember);
- } else {
- resp.data[payload] = body.toString();
- }
- } else if (body.length > 0) {
- parser = new AWS.XML.Parser();
- var data = parser.parse(body.toString(), output);
- util.update(resp.data, data);
- }
-}
-
-module.exports = {
- buildRequest: buildRequest,
- extractError: extractError,
- extractData: extractData
-};
-
-},{"../core":3,"../util":51,"./rest":24}],27:[function(require,module,exports){
-var util = require('../util');
-
-function QueryParamSerializer() {
-}
-
-QueryParamSerializer.prototype.serialize = function(params, shape, fn) {
- serializeStructure('', params, shape, fn);
-};
-
-function ucfirst(shape) {
- if (shape.isQueryName || shape.api.protocol !== 'ec2') {
- return shape.name;
- } else {
- return shape.name[0].toUpperCase() + shape.name.substr(1);
- }
-}
-
-function serializeStructure(prefix, struct, rules, fn) {
- util.each(rules.members, function(name, member) {
- var value = struct[name];
- if (value === null || value === undefined) return;
-
- var memberName = ucfirst(member);
- memberName = prefix ? prefix + '.' + memberName : memberName;
- serializeMember(memberName, value, member, fn);
- });
-}
-
-function serializeMap(name, map, rules, fn) {
- var i = 1;
- util.each(map, function (key, value) {
- var prefix = rules.flattened ? '.' : '.entry.';
- var position = prefix + (i++) + '.';
- var keyName = position + (rules.key.name || 'key');
- var valueName = position + (rules.value.name || 'value');
- serializeMember(name + keyName, key, rules.key, fn);
- serializeMember(name + valueName, value, rules.value, fn);
- });
-}
-
-function serializeList(name, list, rules, fn) {
- var memberRules = rules.member || {};
-
- if (list.length === 0) {
- fn.call(this, name, null);
- return;
- }
-
- util.arrayEach(list, function (v, n) {
- var suffix = '.' + (n + 1);
- if (rules.api.protocol === 'ec2') {
- suffix = suffix + ''; // make linter happy
- } else if (rules.flattened) {
- if (memberRules.name) {
- var parts = name.split('.');
- parts.pop();
- parts.push(ucfirst(memberRules));
- name = parts.join('.');
- }
- } else {
- suffix = '.member' + suffix;
- }
- serializeMember(name + suffix, v, memberRules, fn);
- });
-}
-
-function serializeMember(name, value, rules, fn) {
- if (value === null || value === undefined) return;
- if (rules.type === 'structure') {
- serializeStructure(name, value, rules, fn);
- } else if (rules.type === 'list') {
- serializeList(name, value, rules, fn);
- } else if (rules.type === 'map') {
- serializeMap(name, value, rules, fn);
- } else {
- fn(name, rules.toWireFormat(value).toString());
- }
-}
-
-module.exports = QueryParamSerializer;
-
-},{"../util":51}],28:[function(require,module,exports){
-var util = require('./util');
-var regionConfig = require('./region_config.json');
-
-function generateRegionPrefix(region) {
- if (!region) return null;
-
- var parts = region.split('-');
- if (parts.length < 3) return null;
- return parts.slice(0, parts.length - 2).join('-') + '-*';
-}
-
-function derivedKeys(service) {
- var region = service.config.region;
- var regionPrefix = generateRegionPrefix(region);
- var endpointPrefix = service.api.endpointPrefix;
-
- return [
- [region, endpointPrefix],
- [regionPrefix, endpointPrefix],
- [region, '*'],
- [regionPrefix, '*'],
- ['*', endpointPrefix],
- ['*', '*']
- ].map(function(item) {
- return item[0] && item[1] ? item.join('/') : null;
- });
-}
-
-function applyConfig(service, config) {
- util.each(config, function(key, value) {
- if (key === 'globalEndpoint') return;
- if (service.config[key] === undefined || service.config[key] === null) {
- service.config[key] = value;
- }
- });
-}
-
-function configureEndpoint(service) {
- var keys = derivedKeys(service);
- for (var i = 0; i < keys.length; i++) {
- var key = keys[i];
- if (!key) continue;
-
- if (regionConfig.rules.hasOwnProperty(key)) {
- var config = regionConfig.rules[key];
- if (typeof config === 'string') {
- config = regionConfig.patterns[config];
- }
-
- service.isGlobalEndpoint = !!config.globalEndpoint;
-
- if (!config.signatureVersion) config.signatureVersion = 'v4';
-
- applyConfig(service, config);
- return;
- }
- }
-}
-
-module.exports = configureEndpoint;
-
-},{"./region_config.json":29,"./util":51}],29:[function(require,module,exports){
-module.exports={
- "rules": {
- "*/*": {
- "endpoint": "{service}.{region}.amazonaws.com"
- },
- "cn-*/*": {
- "endpoint": "{service}.{region}.amazonaws.com.cn"
- },
- "*/cloudfront": "globalSSL",
- "*/iam": "globalSSL",
- "*/sts": "globalSSL",
- "*/importexport": {
- "endpoint": "{service}.amazonaws.com",
- "signatureVersion": "v2",
- "globalEndpoint": true
- },
- "*/route53": {
- "endpoint": "https://{service}.amazonaws.com",
- "signatureVersion": "v3https",
- "globalEndpoint": true
- },
- "us-gov-*/iam": "globalGovCloud",
- "us-gov-*/sts": {
- "endpoint": "{service}.{region}.amazonaws.com"
- },
- "us-gov-west-1/s3": "s3dash",
- "us-west-1/s3": "s3dash",
- "us-west-2/s3": "s3dash",
- "eu-west-1/s3": "s3dash",
- "ap-southeast-1/s3": "s3dash",
- "ap-southeast-2/s3": "s3dash",
- "ap-northeast-1/s3": "s3dash",
- "sa-east-1/s3": "s3dash",
- "us-east-1/s3": {
- "endpoint": "{service}.amazonaws.com",
- "signatureVersion": "s3"
- },
- "us-east-1/sdb": {
- "endpoint": "{service}.amazonaws.com",
- "signatureVersion": "v2"
- },
- "*/sdb": {
- "endpoint": "{service}.{region}.amazonaws.com",
- "signatureVersion": "v2"
- }
- },
-
- "patterns": {
- "globalSSL": {
- "endpoint": "https://{service}.amazonaws.com",
- "globalEndpoint": true
- },
- "globalGovCloud": {
- "endpoint": "{service}.us-gov.amazonaws.com"
- },
- "s3dash": {
- "endpoint": "{service}-{region}.amazonaws.com",
- "signatureVersion": "s3"
- }
- }
-}
-
-},{}],30:[function(require,module,exports){
-(function (process){
-var AWS = require('./core');
-var AcceptorStateMachine = require('./state_machine');
-var inherit = AWS.util.inherit;
-var domain = AWS.util.nodeRequire('domain');
-
-
-var hardErrorStates = {success: 1, error: 1, complete: 1};
-
-function isTerminalState(machine) {
- return hardErrorStates.hasOwnProperty(machine._asm.currentState);
-}
-
-var fsm = new AcceptorStateMachine();
-fsm.setupStates = function() {
- var transition = function(_, done) {
- var self = this;
- self._haltHandlersOnError = false;
-
- self.emit(self._asm.currentState, function(err) {
- if (err) {
- if (isTerminalState(self)) {
- if (domain && self.domain instanceof domain.Domain) {
- err.domainEmitter = self;
- err.domain = self.domain;
- err.domainThrown = false;
- self.domain.emit('error', err);
- } else {
- throw err;
- }
- } else {
- self.response.error = err;
- done(err);
- }
- } else {
- done(self.response.error);
- }
- });
-
- };
-
- this.addState('validate', 'build', 'error', transition);
- this.addState('build', 'afterBuild', 'restart', transition);
- this.addState('afterBuild', 'sign', 'restart', transition);
- this.addState('sign', 'send', 'retry', transition);
- this.addState('retry', 'afterRetry', 'afterRetry', transition);
- this.addState('afterRetry', 'sign', 'error', transition);
- this.addState('send', 'validateResponse', 'retry', transition);
- this.addState('validateResponse', 'extractData', 'extractError', transition);
- this.addState('extractError', 'extractData', 'retry', transition);
- this.addState('extractData', 'success', 'retry', transition);
- this.addState('restart', 'build', 'error', transition);
- this.addState('success', 'complete', 'complete', transition);
- this.addState('error', 'complete', 'complete', transition);
- this.addState('complete', null, null, transition);
-};
-fsm.setupStates();
-
-
-AWS.Request = inherit({
-
-
- constructor: function Request(service, operation, params) {
- var endpoint = service.endpoint;
- var region = service.config.region;
-
- if (service.isGlobalEndpoint) region = 'us-east-1';
-
- this.domain = domain && domain.active;
- this.service = service;
- this.operation = operation;
- this.params = params || {};
- this.httpRequest = new AWS.HttpRequest(endpoint, region);
- this.startTime = AWS.util.date.getDate();
-
- this.response = new AWS.Response(this);
- this._asm = new AcceptorStateMachine(fsm.states, 'validate');
- this._haltHandlersOnError = false;
-
- AWS.SequentialExecutor.call(this);
- this.emit = this.emitEvent;
- },
-
-
-
-
- send: function send(callback) {
- if (callback) {
- this.on('complete', function (resp) {
- callback.call(resp, resp.error, resp.data);
- });
- }
- this.runTo();
-
- return this.response;
- },
-
-
- build: function build(callback) {
- return this.runTo('send', callback);
- },
-
-
- runTo: function runTo(state, done) {
- this._asm.runTo(state, done, this);
- return this;
- },
-
-
- abort: function abort() {
- this.removeAllListeners('validateResponse');
- this.removeAllListeners('extractError');
- this.on('validateResponse', function addAbortedError(resp) {
- resp.error = AWS.util.error(new Error('Request aborted by user'), {
- code: 'RequestAbortedError', retryable: false
- });
- });
-
- if (this.httpRequest.stream) { // abort HTTP stream
- this.httpRequest.stream.abort();
- if (this.httpRequest._abortCallback) {
- this.httpRequest._abortCallback();
- } else {
- this.removeAllListeners('send'); // haven't sent yet, so let's not
- }
- }
-
- return this;
- },
-
-
- eachPage: function eachPage(callback) {
- callback = AWS.util.fn.makeAsync(callback, 3);
-
- function wrappedCallback(response) {
- callback.call(response, response.error, response.data, function (result) {
- if (result === false) return;
-
- if (response.hasNextPage()) {
- response.nextPage().on('complete', wrappedCallback).send();
- } else {
- callback.call(response, null, null, AWS.util.fn.noop);
- }
- });
- }
-
- this.on('complete', wrappedCallback).send();
- },
-
-
- eachItem: function eachItem(callback) {
- var self = this;
- function wrappedCallback(err, data) {
- if (err) return callback(err, null);
- if (data === null) return callback(null, null);
-
- var config = self.service.paginationConfig(self.operation);
- var resultKey = config.resultKey;
- if (Array.isArray(resultKey)) resultKey = resultKey[0];
- var results = AWS.util.jamespath.query(resultKey, data);
- AWS.util.arrayEach(results, function(result) {
- AWS.util.arrayEach(result, function(item) { callback(null, item); });
- });
- }
-
- this.eachPage(wrappedCallback);
- },
-
-
- isPageable: function isPageable() {
- return this.service.paginationConfig(this.operation) ? true : false;
- },
-
-
- createReadStream: function createReadStream() {
- var streams = AWS.util.nodeRequire('stream');
- var req = this;
- var stream = null;
-
- if (AWS.HttpClient.streamsApiVersion === 2) {
- stream = new streams.PassThrough();
- req.send();
- } else {
- stream = new streams.Stream();
- stream.readable = true;
-
- stream.sent = false;
- stream.on('newListener', function(event) {
- if (!stream.sent && event === 'data') {
- stream.sent = true;
- process.nextTick(function() { req.send(); });
- }
- });
- }
-
- this.on('httpHeaders', function streamHeaders(statusCode, headers, resp) {
- if (statusCode < 300) {
- req.removeListener('httpData', AWS.EventListeners.Core.HTTP_DATA);
- req.removeListener('httpError', AWS.EventListeners.Core.HTTP_ERROR);
- req.on('httpError', function streamHttpError(error) {
- resp.error = error;
- resp.error.retryable = false;
- });
-
- var httpStream = resp.httpResponse.createUnbufferedStream();
- if (AWS.HttpClient.streamsApiVersion === 2) {
- httpStream.pipe(stream);
- } else {
- httpStream.on('data', function(arg) {
- stream.emit('data', arg);
- });
- httpStream.on('end', function() {
- stream.emit('end');
- });
- }
-
- httpStream.on('error', function(err) {
- stream.emit('error', err);
- });
- }
- });
-
- this.on('error', function(err) {
- stream.emit('error', err);
- });
-
- return stream;
- },
-
-
- emitEvent: function emit(eventName, args, done) {
- if (typeof args === 'function') { done = args; args = null; }
- if (!done) done = function() { };
- if (!args) args = this.eventParameters(eventName, this.response);
-
- var origEmit = AWS.SequentialExecutor.prototype.emit;
- origEmit.call(this, eventName, args, function (err) {
- if (err) this.response.error = err;
- done.call(this, err);
- });
- },
-
-
- eventParameters: function eventParameters(eventName) {
- switch (eventName) {
- case 'restart':
- case 'validate':
- case 'sign':
- case 'build':
- case 'afterValidate':
- case 'afterBuild':
- return [this];
- case 'error':
- return [this.response.error, this.response];
- default:
- return [this.response];
- }
- },
-
-
- presign: function presign(expires, callback) {
- if (!callback && typeof expires === 'function') {
- callback = expires;
- expires = null;
- }
- return new AWS.Signers.Presign().sign(this.toGet(), expires, callback);
- },
-
-
- toUnauthenticated: function toUnauthenticated() {
- this.removeListener('validate', AWS.EventListeners.Core.VALIDATE_CREDENTIALS);
- this.removeListener('sign', AWS.EventListeners.Core.SIGN);
- return this.toGet();
- },
-
-
- toGet: function toGet() {
- if (this.service.api.protocol === 'query' ||
- this.service.api.protocol === 'ec2') {
- this.removeListener('build', this.buildAsGet);
- this.addListener('build', this.buildAsGet);
- }
- return this;
- },
-
-
- buildAsGet: function buildAsGet(request) {
- request.httpRequest.method = 'GET';
- request.httpRequest.path = request.service.endpoint.path +
- '?' + request.httpRequest.body;
- request.httpRequest.body = '';
-
- delete request.httpRequest.headers['Content-Length'];
- delete request.httpRequest.headers['Content-Type'];
- },
-
-
- haltHandlersOnError: function haltHandlersOnError() {
- this._haltHandlersOnError = true;
- }
-});
-
-AWS.util.mixin(AWS.Request, AWS.SequentialExecutor);
-
-}).call(this,require("FWaASH"))
-},{"./core":3,"./state_machine":50,"FWaASH":65}],31:[function(require,module,exports){
-
-
-var AWS = require('./core');
-var inherit = AWS.util.inherit;
-
-
-AWS.ResourceWaiter = inherit({
-
- constructor: function constructor(service, state) {
- this.service = service;
- this.state = state;
-
- if (typeof this.state === 'object') {
- AWS.util.each.call(this, this.state, function (key, value) {
- this.state = key;
- this.expectedValue = value;
- });
- }
-
- this.loadWaiterConfig(this.state);
- if (!this.expectedValue) {
- this.expectedValue = this.config.successValue;
- }
- },
-
- service: null,
-
- state: null,
-
- expectedValue: null,
-
- config: null,
-
- waitDone: false,
-
- Listeners: {
- retry: new AWS.SequentialExecutor().addNamedListeners(function(add) {
- add('RETRY_CHECK', 'retry', function(resp) {
- var waiter = resp.request._waiter;
- if (resp.error && resp.error.code === 'ResourceNotReady') {
- resp.error.retryDelay = waiter.config.interval * 1000;
- }
- });
- }),
-
- output: new AWS.SequentialExecutor().addNamedListeners(function(add) {
- add('CHECK_OUT_ERROR', 'extractError', function CHECK_OUT_ERROR(resp) {
- if (resp.error) {
- resp.request._waiter.setError(resp, true);
- }
- });
-
- add('CHECK_OUTPUT', 'extractData', function CHECK_OUTPUT(resp) {
- var waiter = resp.request._waiter;
- var success = waiter.checkSuccess(resp);
- if (!success) {
- waiter.setError(resp, success === null ? false : true);
- } else {
- resp.error = null;
- }
- });
- }),
-
- error: new AWS.SequentialExecutor().addNamedListeners(function(add) {
- add('CHECK_ERROR', 'extractError', function CHECK_ERROR(resp) {
- var waiter = resp.request._waiter;
- var success = waiter.checkError(resp);
- if (!success) {
- waiter.setError(resp, success === null ? false : true);
- } else {
- resp.error = null;
- resp.data = {};
- resp.request.removeAllListeners('extractData');
- }
- });
-
- add('CHECK_ERR_OUTPUT', 'extractData', function CHECK_ERR_OUTPUT(resp) {
- resp.request._waiter.setError(resp, true);
- });
- })
- },
-
-
- wait: function wait(params, callback) {
- if (typeof params === 'function') {
- callback = params; params = undefined;
- }
-
- var request = this.service.makeRequest(this.config.operation, params);
- var listeners = this.Listeners[this.config.successType];
- request._waiter = this;
- request.response.maxRetries = this.config.maxAttempts;
- request.addListeners(this.Listeners.retry);
- if (listeners) request.addListeners(listeners);
-
- if (callback) request.send(callback);
- return request;
- },
-
- setError: function setError(resp, retryable) {
- resp.data = null;
- resp.error = AWS.util.error(resp.error || new Error(), {
- code: 'ResourceNotReady',
- message: 'Resource is not in the state ' + this.state,
- retryable: retryable
- });
- },
-
-
- checkSuccess: function checkSuccess(resp) {
- if (!this.config.successPath) {
- return resp.httpResponse.statusCode < 300;
- }
-
- var r = AWS.util.jamespath.find(this.config.successPath, resp.data);
-
- if (this.config.failureValue &&
- this.config.failureValue.indexOf(r) >= 0) {
- return null; // fast fail
- }
-
- if (this.expectedValue) {
- return r === this.expectedValue;
- } else {
- return r ? true : false;
- }
- },
-
-
- checkError: function checkError(resp) {
- var value = this.config.successValue;
- if (typeof value === 'number') {
- return resp.httpResponse.statusCode === value;
- } else {
- return resp.error && resp.error.code === value;
- }
- },
-
-
- loadWaiterConfig: function loadWaiterConfig(state, noException) {
- if (!this.service.api.waiters[state]) {
- if (noException) return;
- throw new AWS.util.error(new Error(), {
- code: 'StateNotFoundError',
- message: 'State ' + state + ' not found.'
- });
- }
-
- this.config = this.service.api.waiters[state];
- var config = this.config;
-
- (function () { // anonymous function to avoid max complexity count
- config.successType = config.successType || config.acceptorType;
- config.successPath = config.successPath || config.acceptorPath;
- config.successValue = config.successValue || config.acceptorValue;
- config.failureType = config.failureType || config.acceptorType;
- config.failurePath = config.failurePath || config.acceptorPath;
- config.failureValue = config.failureValue || config.acceptorValue;
- })();
- }
-});
-
-},{"./core":3}],32:[function(require,module,exports){
-var AWS = require('./core');
-var inherit = AWS.util.inherit;
-
-
-AWS.Response = inherit({
-
-
- constructor: function Response(request) {
- this.request = request;
- this.data = null;
- this.error = null;
- this.retryCount = 0;
- this.redirectCount = 0;
- this.httpResponse = new AWS.HttpResponse();
- if (request) {
- this.maxRetries = request.service.numRetries();
- this.maxRedirects = request.service.config.maxRedirects;
- }
- },
-
-
- nextPage: function nextPage(callback) {
- var config;
- var service = this.request.service;
- var operation = this.request.operation;
- try {
- config = service.paginationConfig(operation, true);
- } catch (e) { this.error = e; }
-
- if (!this.hasNextPage()) {
- if (callback) callback(this.error, null);
- else if (this.error) throw this.error;
- return null;
- }
-
- var params = AWS.util.copy(this.request.params);
- if (!this.nextPageTokens) {
- return callback ? callback(null, null) : null;
- } else {
- var inputTokens = config.inputToken;
- if (typeof inputTokens === 'string') inputTokens = [inputTokens];
- for (var i = 0; i < inputTokens.length; i++) {
- params[inputTokens[i]] = this.nextPageTokens[i];
- }
- return service.makeRequest(this.request.operation, params, callback);
- }
- },
-
-
- hasNextPage: function hasNextPage() {
- this.cacheNextPageTokens();
- if (this.nextPageTokens) return true;
- if (this.nextPageTokens === undefined) return undefined;
- else return false;
- },
-
-
- cacheNextPageTokens: function cacheNextPageTokens() {
- if (this.hasOwnProperty('nextPageTokens')) return this.nextPageTokens;
- this.nextPageTokens = undefined;
-
- var config = this.request.service.paginationConfig(this.request.operation);
- if (!config) return this.nextPageTokens;
-
- this.nextPageTokens = null;
- if (config.moreResults) {
- if (!AWS.util.jamespath.find(config.moreResults, this.data)) {
- return this.nextPageTokens;
- }
- }
-
- var exprs = config.outputToken;
- if (typeof exprs === 'string') exprs = [exprs];
- AWS.util.arrayEach.call(this, exprs, function (expr) {
- var output = AWS.util.jamespath.find(expr, this.data);
- if (output) {
- this.nextPageTokens = this.nextPageTokens || [];
- this.nextPageTokens.push(output);
- }
- });
-
- return this.nextPageTokens;
- }
-
-});
-
-},{"./core":3}],33:[function(require,module,exports){
-(function (Buffer){
-var AWS = require('../core');
-var byteLength = AWS.util.string.byteLength;
-
-
-AWS.S3.ManagedUpload = AWS.util.inherit({
-
- constructor: function ManagedUpload(options) {
- var self = this;
- AWS.SequentialExecutor.call(self);
- self.body = null;
- self.sliceFn = null;
- self.callback = null;
- self.parts = {};
- self.completeInfo = [];
- self.fillQueue = function() {
- self.callback(new Error('Unsupported body payload ' + typeof self.body));
- };
-
- self.configure(options);
- },
-
-
- configure: function configure(options) {
- options = options || {};
- this.partSize = this.minPartSize;
-
- if (options.queueSize) this.queueSize = options.queueSize;
- if (options.partSize) this.partSize = options.partSize;
- if (options.leavePartsOnError) this.leavePartsOnError = true;
-
- if (this.partSize < this.minPartSize) {
- throw new Error('partSize must be greater than ' +
- this.minPartSize);
- }
-
- this.service = options.service;
- this.bindServiceObject(options.params);
- this.validateBody();
- this.adjustTotalBytes();
- },
-
-
- leavePartsOnError: false,
-
-
- queueSize: 4,
-
-
- partSize: null,
-
-
- minPartSize: 1024 * 1024 * 5,
-
-
- maxTotalParts: 10000,
-
-
- send: function(callback) {
- var self = this;
- self.callback = callback || function(err) { if (err) throw err; };
-
- var runFill = true;
- if (self.sliceFn) {
- self.fillQueue = self.fillBuffer;
- } else if (AWS.util.isNode()) {
- var Stream = AWS.util.nodeRequire('stream').Stream;
- if (self.body instanceof Stream) {
- runFill = false;
- self.fillQueue = self.fillStream;
- self.partBuffers = [];
- self.body.
- on('readable', function() { self.fillQueue(); }).
- on('end', function() {
- self.isDoneChunking = true;
- self.numParts = self.totalPartNumbers;
- self.fillQueue.call(self);
- });
- }
- }
-
- if (runFill) self.fillQueue.call(self);
- },
-
-
- abort: function() {
- this.cleanup(AWS.util.error(new Error('Request aborted by user'), {
- code: 'RequestAbortedError', retryable: false
- }));
- },
-
-
- validateBody: function validateBody() {
- var self = this;
- self.body = self.service.config.params.Body;
- if (!self.body) throw new Error('params.Body is required');
- if (typeof self.body === 'string') {
- self.body = new AWS.util.Buffer(self.body);
- }
- self.sliceFn = AWS.util.arraySliceFn(self.body);
- },
-
-
- bindServiceObject: function bindServiceObject(params) {
- params = params || {};
- var self = this;
-
- if (!self.service) {
- self.service = new AWS.S3({params: params});
- } else {
- var config = AWS.util.copy(self.service.config);
- self.service = new self.service.constructor.__super__(config);
- self.service.config.params =
- AWS.util.merge(self.service.config.params || {}, params);
- }
- },
-
-
- adjustTotalBytes: function adjustTotalBytes() {
- var self = this;
- try { // try to get totalBytes
- self.totalBytes = byteLength(self.body);
- } catch (e) { }
-
- if (self.totalBytes) {
- var newPartSize = Math.ceil(self.totalBytes / self.maxTotalParts);
- if (newPartSize > self.partSize) self.partSize = newPartSize;
- } else {
- self.totalBytes = undefined;
- }
- },
-
-
- isDoneChunking: false,
-
-
- partPos: 0,
-
-
- totalChunkedBytes: 0,
-
-
- totalUploadedBytes: 0,
-
-
- totalBytes: undefined,
-
-
- numParts: 0,
-
-
- totalPartNumbers: 0,
-
-
- activeParts: 0,
-
-
- doneParts: 0,
-
-
- parts: null,
-
-
- completeInfo: null,
-
-
- failed: false,
-
-
- multipartReq: null,
-
-
- partBuffers: null,
-
-
- partBufferLength: 0,
-
-
- fillBuffer: function fillBuffer() {
- var self = this;
- var bodyLen = byteLength(self.body);
-
- if (bodyLen === 0) {
- self.isDoneChunking = true;
- self.numParts = 1;
- self.nextChunk(self.body);
- return;
- }
-
- while (self.activeParts < self.queueSize && self.partPos < bodyLen) {
- var endPos = Math.min(self.partPos + self.partSize, bodyLen);
- var buf = self.sliceFn.call(self.body, self.partPos, endPos);
- self.partPos += self.partSize;
-
- if (byteLength(buf) < self.partSize || self.partPos === bodyLen) {
- self.isDoneChunking = true;
- self.numParts = self.totalPartNumbers + 1;
- }
- self.nextChunk(buf);
- }
- },
-
-
- fillStream: function fillStream() {
- var self = this;
- if (self.activeParts >= self.queueSize) return;
-
- var buf = self.body.read(self.partSize - self.partBufferLength) ||
- self.body.read();
- if (buf) {
- self.partBuffers.push(buf);
- self.partBufferLength += buf.length;
- self.totalChunkedBytes += buf.length;
- }
-
- if (self.partBufferLength >= self.partSize) {
- var pbuf = Buffer.concat(self.partBuffers);
- self.partBuffers = [];
- self.partBufferLength = 0;
-
- if (pbuf.length > self.partSize) {
- var rest = pbuf.slice(self.partSize);
- self.partBuffers.push(rest);
- self.partBufferLength += rest.length;
- pbuf = pbuf.slice(0, self.partSize);
- }
-
- self.nextChunk(pbuf);
- }
-
- if (self.isDoneChunking && !self.isDoneSending) {
- pbuf = Buffer.concat(self.partBuffers);
- self.partBuffers = [];
- self.partBufferLength = 0;
- self.totalBytes = self.totalChunkedBytes;
- self.isDoneSending = true;
-
- if (self.numParts === 0 || pbuf.length > 0) {
- self.numParts++;
- self.nextChunk(pbuf);
- }
- }
-
- self.body.read(0);
- },
-
-
- nextChunk: function nextChunk(chunk) {
- var self = this;
- if (self.failed) return null;
-
- var partNumber = ++self.totalPartNumbers;
- if (self.isDoneChunking && partNumber === 1) {
- var req = self.service.putObject({Body: chunk});
- req._managedUpload = self;
- req.on('httpUploadProgress', self.progress).send(self.finishSinglePart);
- return null;
- }
-
- self.activeParts++;
- if (!self.service.config.params.UploadId) {
-
- if (!self.multipartReq) { // create multipart
- self.multipartReq = self.service.createMultipartUpload();
- self.multipartReq.on('success', function(resp) {
- self.service.config.params.UploadId = resp.data.UploadId;
- self.multipartReq = null;
- });
- self.queueChunks(chunk, partNumber);
- self.multipartReq.on('error', function(err) {
- self.cleanup(err);
- });
- self.multipartReq.send();
- } else {
- self.queueChunks(chunk, partNumber);
- }
- } else { // multipart is created, just send
- self.uploadPart(chunk, partNumber);
- }
- },
-
-
- uploadPart: function uploadPart(chunk, partNumber) {
- var self = this;
- var partParams = {
- Body: chunk,
- ContentLength: AWS.util.string.byteLength(chunk),
- PartNumber: partNumber
- };
-
- var partInfo = {ETag: null, PartNumber: partNumber};
- self.completeInfo.push(partInfo);
-
- var req = self.service.uploadPart(partParams);
- self.parts[partNumber] = req;
- req._lastUploadedBytes = 0;
- req._managedUpload = self;
- req.on('httpUploadProgress', self.progress);
- req.send(function(err, data) {
- delete self.parts[partParams.PartNumber];
- self.activeParts--;
-
- if (!err && (!data || !data.ETag)) {
- var message = 'No access to ETag property on response.';
- if (AWS.util.isBrowser()) {
- message += ' Check CORS configuration to expose ETag header.';
- }
-
- err = AWS.util.error(new Error(message), {
- code: 'ETagMissing', retryable: false
- });
- }
- if (err) return self.cleanup(err);
-
- partInfo.ETag = data.ETag;
- self.doneParts++;
- if (self.isDoneChunking && self.doneParts === self.numParts) {
- self.finishMultiPart();
- } else {
- self.fillQueue.call(self);
- }
- });
- },
-
-
- queueChunks: function queueChunks(chunk, partNumber) {
- var self = this;
- self.multipartReq.on('success', function() {
- self.uploadPart(chunk, partNumber);
- });
- },
-
-
- cleanup: function cleanup(err) {
- var self = this;
- if (self.failed) return;
-
- if (typeof self.body.removeAllListeners === 'function' &&
- typeof self.body.resume === 'function') {
- self.body.removeAllListeners('readable');
- self.body.removeAllListeners('end');
- self.body.resume();
- }
-
- if (self.service.config.params.UploadId && !self.leavePartsOnError) {
- self.service.abortMultipartUpload().send();
- }
-
- AWS.util.each(self.parts, function(partNumber, part) {
- part.removeAllListeners('complete');
- part.abort();
- });
-
- self.parts = {};
- self.callback(err);
- self.failed = true;
- },
-
-
- finishMultiPart: function finishMultiPart() {
- var self = this;
- var completeParams = { MultipartUpload: { Parts: self.completeInfo } };
- self.service.completeMultipartUpload(completeParams, function(err, data) {
- if (err) return self.cleanup(err);
- else self.callback(err, data);
- });
- },
-
-
- finishSinglePart: function finishSinglePart(err, data) {
- var upload = this.request._managedUpload;
- var httpReq = this.request.httpRequest;
- var url = AWS.util.urlFormat(httpReq.endpoint);
- if (err) return upload.callback(err);
- data.Location = url.substr(0, url.length - 1) + httpReq.path;
- upload.callback(err, data);
- },
-
-
- progress: function progress(info) {
- var upload = this._managedUpload;
- if (this.operation === 'putObject') {
- info.part = 1;
- } else {
- upload.totalUploadedBytes += info.loaded - this._lastUploadedBytes;
- this._lastUploadedBytes = info.loaded;
- info = {
- loaded: upload.totalUploadedBytes,
- total: upload.totalBytes,
- part: this.params.PartNumber
- };
- }
- upload.emit('httpUploadProgress', [info]);
- }
-});
-
-AWS.util.mixin(AWS.S3.ManagedUpload, AWS.SequentialExecutor);
-module.exports = AWS.S3.ManagedUpload;
-
-}).call(this,require("buffer").Buffer)
-},{"../core":3,"buffer":54}],34:[function(require,module,exports){
-var AWS = require('./core');
-
-
-AWS.SequentialExecutor = AWS.util.inherit({
-
- constructor: function SequentialExecutor() {
- this._events = {};
- },
-
-
- listeners: function listeners(eventName) {
- return this._events[eventName] ? this._events[eventName].slice(0) : [];
- },
-
- on: function on(eventName, listener) {
- if (this._events[eventName]) {
- this._events[eventName].push(listener);
- } else {
- this._events[eventName] = [listener];
- }
- return this;
- },
-
-
- onAsync: function onAsync(eventName, listener) {
- listener._isAsync = true;
- return this.on(eventName, listener);
- },
-
- removeListener: function removeListener(eventName, listener) {
- var listeners = this._events[eventName];
- if (listeners) {
- var length = listeners.length;
- var position = -1;
- for (var i = 0; i < length; ++i) {
- if (listeners[i] === listener) {
- position = i;
- }
- }
- if (position > -1) {
- listeners.splice(position, 1);
- }
- }
- return this;
- },
-
- removeAllListeners: function removeAllListeners(eventName) {
- if (eventName) {
- delete this._events[eventName];
- } else {
- this._events = {};
- }
- return this;
- },
-
-
- emit: function emit(eventName, eventArgs, doneCallback) {
- if (!doneCallback) doneCallback = function() { };
- var listeners = this.listeners(eventName);
- var count = listeners.length;
- this.callListeners(listeners, eventArgs, doneCallback);
- return count > 0;
- },
-
-
- callListeners: function callListeners(listeners, args, doneCallback, prevError) {
- var self = this;
- var error = prevError || null;
-
- function callNextListener(err) {
- if (err) {
- error = AWS.util.error(error || new Error(), err);
- if (self._haltHandlersOnError) {
- return doneCallback.call(self, error);
- }
- }
- self.callListeners(listeners, args, doneCallback, error);
- }
-
- while (listeners.length > 0) {
- var listener = listeners.shift();
- if (listener._isAsync) { // asynchronous listener
- listener.apply(self, args.concat([callNextListener]));
- return; // stop here, callNextListener will continue
- } else { // synchronous listener
- try {
- listener.apply(self, args);
- } catch (err) {
- error = AWS.util.error(error || new Error(), err);
- }
- if (error && self._haltHandlersOnError) {
- doneCallback.call(self, error);
- return;
- }
- }
- }
- doneCallback.call(self, error);
- },
-
-
- addListeners: function addListeners(listeners) {
- var self = this;
-
- if (listeners._events) listeners = listeners._events;
-
- AWS.util.each(listeners, function(event, callbacks) {
- if (typeof callbacks === 'function') callbacks = [callbacks];
- AWS.util.arrayEach(callbacks, function(callback) {
- self.on(event, callback);
- });
- });
-
- return self;
- },
-
-
- addNamedListener: function addNamedListener(name, eventName, callback) {
- this[name] = callback;
- this.addListener(eventName, callback);
- return this;
- },
-
-
- addNamedAsyncListener: function addNamedAsyncListener(name, eventName, callback) {
- callback._isAsync = true;
- return this.addNamedListener(name, eventName, callback);
- },
-
-
- addNamedListeners: function addNamedListeners(callback) {
- var self = this;
- callback(
- function() {
- self.addNamedListener.apply(self, arguments);
- },
- function() {
- self.addNamedAsyncListener.apply(self, arguments);
- }
- );
- return this;
- }
-});
-
-
-AWS.SequentialExecutor.prototype.addListener = AWS.SequentialExecutor.prototype.on;
-
-module.exports = AWS.SequentialExecutor;
-
-},{"./core":3}],35:[function(require,module,exports){
-var AWS = require('./core');
-var Api = require('./model/api');
-var regionConfig = require('./region_config');
-var inherit = AWS.util.inherit;
-
-
-AWS.Service = inherit({
-
- constructor: function Service(config) {
- if (!this.loadServiceClass) {
- throw AWS.util.error(new Error(),
- 'Service must be constructed with `new\' operator');
- }
- var ServiceClass = this.loadServiceClass(config || {});
- if (ServiceClass) return new ServiceClass(config);
- this.initialize(config);
- },
-
-
- initialize: function initialize(config) {
- var svcConfig = AWS.config[this.serviceIdentifier];
-
- this.config = new AWS.Config(AWS.config);
- if (svcConfig) this.config.update(svcConfig, true);
- if (config) this.config.update(config, true);
-
- this.validateService();
- if (!this.config.endpoint) regionConfig(this);
-
- this.config.endpoint = this.endpointFromTemplate(this.config.endpoint);
- this.setEndpoint(this.config.endpoint);
- },
-
-
- validateService: function validateService() {
- },
-
-
- loadServiceClass: function loadServiceClass(serviceConfig) {
- var config = serviceConfig;
- if (!AWS.util.isEmpty(this.api)) {
- return null;
- } else if (config.apiConfig) {
- return AWS.Service.defineServiceApi(this.constructor, config.apiConfig);
- } else if (!this.constructor.services) {
- return null;
- } else {
- config = new AWS.Config(AWS.config);
- config.update(serviceConfig, true);
- var version = config.apiVersions[this.constructor.serviceIdentifier];
- version = version || config.apiVersion;
- return this.getLatestServiceClass(version);
- }
- },
-
-
- getLatestServiceClass: function getLatestServiceClass(version) {
- version = this.getLatestServiceVersion(version);
- if (this.constructor.services[version] === null) {
- AWS.Service.defineServiceApi(this.constructor, version);
- }
-
- return this.constructor.services[version];
- },
-
-
- getLatestServiceVersion: function getLatestServiceVersion(version) {
- if (!this.constructor.services || this.constructor.services.length === 0) {
- throw new Error('No services defined on ' +
- this.constructor.serviceIdentifier);
- }
-
- if (!version) {
- version = 'latest';
- } else if (AWS.util.isType(version, Date)) {
- version = AWS.util.date.iso8601(version).split('T')[0];
- }
-
- if (Object.hasOwnProperty(this.constructor.services, version)) {
- return version;
- }
-
- var keys = Object.keys(this.constructor.services).sort();
- var selectedVersion = null;
- for (var i = keys.length - 1; i >= 0; i--) {
- if (keys[i][keys[i].length - 1] !== '*') {
- selectedVersion = keys[i];
- }
- if (keys[i].substr(0, 10) <= version) {
- return selectedVersion;
- }
- }
-
- throw new Error('Could not find ' + this.constructor.serviceIdentifier +
- ' API to satisfy version constraint `' + version + '\'');
- },
-
-
- api: {},
-
-
- defaultRetryCount: 3,
-
-
- makeRequest: function makeRequest(operation, params, callback) {
- if (typeof params === 'function') {
- callback = params;
- params = null;
- }
-
- params = params || {};
- if (this.config.params) { // copy only toplevel bound params
- var rules = this.api.operations[operation];
- if (rules) {
- params = AWS.util.copy(params);
- AWS.util.each(this.config.params, function(key, value) {
- if (rules.input.members[key]) {
- if (params[key] === undefined || params[key] === null) {
- params[key] = value;
- }
- }
- });
- }
- }
-
- var request = new AWS.Request(this, operation, params);
- this.addAllRequestListeners(request);
-
- if (callback) request.send(callback);
- return request;
- },
-
-
- makeUnauthenticatedRequest: function makeUnauthenticatedRequest(operation, params, callback) {
- if (typeof params === 'function') {
- callback = params;
- params = {};
- }
-
- var request = this.makeRequest(operation, params).toUnauthenticated();
- return callback ? request.send(callback) : request;
- },
-
-
- waitFor: function waitFor(state, params, callback) {
- var waiter = new AWS.ResourceWaiter(this, state);
- return waiter.wait(params, callback);
- },
-
-
- addAllRequestListeners: function addAllRequestListeners(request) {
- var list = [AWS.events, AWS.EventListeners.Core, this.serviceInterface(),
- AWS.EventListeners.CorePost];
- for (var i = 0; i < list.length; i++) {
- if (list[i]) request.addListeners(list[i]);
- }
-
- if (!this.config.paramValidation) {
- request.removeListener('validate',
- AWS.EventListeners.Core.VALIDATE_PARAMETERS);
- }
-
- if (this.config.logger) { // add logging events
- request.addListeners(AWS.EventListeners.Logger);
- }
-
- this.setupRequestListeners(request);
- },
-
-
- setupRequestListeners: function setupRequestListeners() {
- },
-
-
- getSignerClass: function getSignerClass() {
- var version;
- if (this.config.signatureVersion) {
- version = this.config.signatureVersion;
- } else {
- version = this.api.signatureVersion;
- }
- return AWS.Signers.RequestSigner.getVersion(version);
- },
-
-
- serviceInterface: function serviceInterface() {
- switch (this.api.protocol) {
- case 'ec2': return AWS.EventListeners.Query;
- case 'query': return AWS.EventListeners.Query;
- case 'json': return AWS.EventListeners.Json;
- case 'rest-json': return AWS.EventListeners.RestJson;
- case 'rest-xml': return AWS.EventListeners.RestXml;
- }
- if (this.api.protocol) {
- throw new Error('Invalid service `protocol\' ' +
- this.api.protocol + ' in API config');
- }
- },
-
-
- successfulResponse: function successfulResponse(resp) {
- return resp.httpResponse.statusCode < 300;
- },
-
-
- numRetries: function numRetries() {
- if (this.config.maxRetries !== undefined) {
- return this.config.maxRetries;
- } else {
- return this.defaultRetryCount;
- }
- },
-
-
- retryDelays: function retryDelays() {
- var retryCount = this.numRetries();
- var delays = [];
- for (var i = 0; i < retryCount; ++i) {
- delays[i] = Math.pow(2, i) * 30;
- }
- return delays;
- },
-
-
- retryableError: function retryableError(error) {
- if (this.networkingError(error)) return true;
- if (this.expiredCredentialsError(error)) return true;
- if (this.throttledError(error)) return true;
- if (error.statusCode >= 500) return true;
- return false;
- },
-
-
- networkingError: function networkingError(error) {
- return error.code === 'NetworkingError';
- },
-
-
- expiredCredentialsError: function expiredCredentialsError(error) {
- return (error.code === 'ExpiredTokenException');
- },
-
-
- throttledError: function throttledError(error) {
- switch (error.code) {
- case 'ProvisionedThroughputExceededException':
- case 'Throttling':
- case 'ThrottlingException':
- case 'RequestLimitExceeded':
- case 'RequestThrottled':
- return true;
- default:
- return false;
- }
- },
-
-
- endpointFromTemplate: function endpointFromTemplate(endpoint) {
- if (typeof endpoint !== 'string') return endpoint;
-
- var e = endpoint;
- e = e.replace(/\{service\}/g, this.api.endpointPrefix);
- e = e.replace(/\{region\}/g, this.config.region);
- e = e.replace(/\{scheme\}/g, this.config.sslEnabled ? 'https' : 'http');
- return e;
- },
-
-
- setEndpoint: function setEndpoint(endpoint) {
- this.endpoint = new AWS.Endpoint(endpoint, this.config);
- },
-
-
- paginationConfig: function paginationConfig(operation, throwException) {
- var paginator = this.api.operations[operation].paginator;
- if (!paginator) {
- if (throwException) {
- var e = new Error();
- throw AWS.util.error(e, 'No pagination configuration for ' + operation);
- }
- return null;
- }
-
- return paginator;
- }
-});
-
-AWS.util.update(AWS.Service, {
-
-
- defineMethods: function defineMethods(svc) {
- AWS.util.each(svc.prototype.api.operations, function iterator(method) {
- if (svc.prototype[method]) return;
- svc.prototype[method] = function (params, callback) {
- return this.makeRequest(method, params, callback);
- };
- });
- },
-
-
- defineService: function defineService(serviceIdentifier, versions, features) {
- AWS.Service._serviceMap[serviceIdentifier] = true;
- if (!Array.isArray(versions)) {
- features = versions;
- versions = [];
- }
-
- var svc = inherit(AWS.Service, features || {});
-
- if (typeof serviceIdentifier === 'string') {
- AWS.Service.addVersions(svc, versions);
-
- var identifier = svc.serviceIdentifier || serviceIdentifier;
- svc.serviceIdentifier = identifier;
- } else { // defineService called with an API
- svc.prototype.api = serviceIdentifier;
- AWS.Service.defineMethods(svc);
- }
-
- return svc;
- },
-
-
- addVersions: function addVersions(svc, versions) {
- if (!Array.isArray(versions)) versions = [versions];
-
- svc.services = svc.services || {};
- for (var i = 0; i < versions.length; i++) {
- if (svc.services[versions[i]] === undefined) {
- svc.services[versions[i]] = null;
- }
- }
-
- svc.apiVersions = Object.keys(svc.services).sort();
- },
-
-
- defineServiceApi: function defineServiceApi(superclass, version, apiConfig) {
- var svc = inherit(superclass, {
- serviceIdentifier: superclass.serviceIdentifier
- });
-
- function setApi(api) {
- if (api.isApi) {
- svc.prototype.api = api;
- } else {
- svc.prototype.api = new Api(api);
- }
- }
-
- if (typeof version === 'string') {
- if (apiConfig) {
- setApi(apiConfig);
- } else {
- try {
- setApi(AWS.apiLoader(superclass.serviceIdentifier, version));
- } catch (err) {
- throw AWS.util.error(err, {
- message: 'Could not find API configuration ' +
- superclass.serviceIdentifier + '-' + version
- });
- }
- }
- if (!superclass.services.hasOwnProperty(version)) {
- superclass.apiVersions = superclass.apiVersions.concat(version).sort();
- }
- superclass.services[version] = svc;
- } else {
- setApi(version);
- }
-
- AWS.Service.defineMethods(svc);
- return svc;
- },
-
-
- hasService: function(identifier) {
- return AWS.Service._serviceMap.hasOwnProperty(identifier);
- },
-
-
- _serviceMap: {}
-});
-
-},{"./core":3,"./model/api":15,"./region_config":28}],36:[function(require,module,exports){
-var AWS = require('../core');
-
-AWS.util.update(AWS.CognitoIdentity.prototype, {
- getOpenIdToken: function getOpenIdToken(params, callback) {
- return this.makeUnauthenticatedRequest('getOpenIdToken', params, callback);
- },
-
- getId: function getId(params, callback) {
- return this.makeUnauthenticatedRequest('getId', params, callback);
- },
-
- getCredentialsForIdentity: function getCredentialsForIdentity(params, callback) {
- return this.makeUnauthenticatedRequest('getCredentialsForIdentity', params, callback);
- }
-});
-
-},{"../core":3}],37:[function(require,module,exports){
-var AWS = require('../core');
-
-AWS.util.update(AWS.DynamoDB.prototype, {
-
- setupRequestListeners: function setupRequestListeners(request) {
- if (request.service.config.dynamoDbCrc32) {
- request.addListener('extractData', this.checkCrc32);
- }
- },
-
-
- checkCrc32: function checkCrc32(resp) {
- if (!resp.httpResponse.streaming && !resp.request.service.crc32IsValid(resp)) {
- resp.error = AWS.util.error(new Error(), {
- code: 'CRC32CheckFailed',
- message: 'CRC32 integrity check failed',
- retryable: true
- });
- }
- },
-
-
- crc32IsValid: function crc32IsValid(resp) {
- var crc = resp.httpResponse.headers['x-amz-crc32'];
- if (!crc) return true; // no (valid) CRC32 header
- return parseInt(crc, 10) === AWS.util.crypto.crc32(resp.httpResponse.body);
- },
-
-
- defaultRetryCount: 10,
-
-
- retryDelays: function retryDelays() {
- var retryCount = this.numRetries();
- var delays = [];
- for (var i = 0; i < retryCount; ++i) {
- if (i === 0) {
- delays.push(0);
- } else {
- delays.push(50 * Math.pow(2, i - 1));
- }
- }
- return delays;
- }
-});
-
-},{"../core":3}],38:[function(require,module,exports){
-var AWS = require('../core');
-
-AWS.util.update(AWS.EC2.prototype, {
-
- setupRequestListeners: function setupRequestListeners(request) {
- request.removeListener('extractError', AWS.EventListeners.Query.EXTRACT_ERROR);
- request.addListener('extractError', this.extractError);
-
- if (request.operation === 'copySnapshot') {
- request.onAsync('validate', this.buildCopySnapshotPresignedUrl);
- }
- },
-
-
- buildCopySnapshotPresignedUrl: function buildCopySnapshotPresignedUrl(req, done) {
- if (req.params.PresignedUrl || req._subRequest) {
- return done();
- }
-
- req.params = AWS.util.copy(req.params);
- req.params.DestinationRegion = req.service.config.region;
-
- var config = AWS.util.copy(req.service.config);
- delete config.endpoint;
- config.region = req.params.SourceRegion;
- var svc = new req.service.constructor(config);
- var newReq = svc[req.operation](req.params);
- newReq._subRequest = true;
- newReq.presign(function(err, url) {
- if (err) done(err);
- else {
- req.params.PresignedUrl = url;
- done();
- }
- });
- },
-
-
- extractError: function extractError(resp) {
- var httpResponse = resp.httpResponse;
- var data = new AWS.XML.Parser().parse(httpResponse.body.toString() || '');
- if (data.Errors)
- resp.error = AWS.util.error(new Error(), {
- code: data.Errors.Error.Code,
- message: data.Errors.Error.Message
- });
- else
- resp.error = AWS.util.error(new Error(), {
- code: httpResponse.statusCode,
- message: null
- });
- }
-});
-
-},{"../core":3}],39:[function(require,module,exports){
-var AWS = require('../core');
-
-AWS.util.update(AWS.MachineLearning.prototype, {
-
- setupRequestListeners: function setupRequestListeners(request) {
- if (request.operation === 'predict') {
- request.addListener('build', this.buildEndpoint);
- }
- },
-
-
- buildEndpoint: function buildEndpoint(request) {
- var url = request.params.PredictEndpoint;
- if (url) {
- request.httpRequest.endpoint = new AWS.Endpoint(url);
- }
- }
-
-});
-
-},{"../core":3}],40:[function(require,module,exports){
-var AWS = require('../core');
-
-require('../s3/managed_upload');
-
-AWS.util.update(AWS.S3.prototype, {
-
- validateService: function validateService() {
- if (!this.config.region) this.config.region = 'us-east-1';
-
- if (!this.config.endpoint && this.config.s3BucketEndpoint) {
- var msg = 'An endpoint must be provided when configuring ' +
- '`s3BucketEndpoint` to true.';
- throw AWS.util.error(new Error(),
- {name: 'InvalidEndpoint', message: msg});
- }
- },
-
-
- setupRequestListeners: function setupRequestListeners(request) {
- request.addListener('validate', this.validateScheme);
- request.addListener('validate', this.validateBucketEndpoint);
- request.addListener('build', this.addContentType);
- request.addListener('build', this.populateURI);
- request.addListener('build', this.computeContentMd5);
- request.addListener('build', this.computeSseCustomerKeyMd5);
- request.addListener('afterBuild', this.addExpect100Continue);
- request.removeListener('validate',
- AWS.EventListeners.Core.VALIDATE_REGION);
- request.addListener('extractError', this.extractError);
- request.addListener('extractData', this.extractData);
- request.addListener('extractData', AWS.util.hoistPayloadMember);
- request.addListener('beforePresign', this.prepareSignedUrl);
- },
-
-
- validateScheme: function(req) {
- var params = req.params,
- scheme = req.httpRequest.endpoint.protocol,
- sensitive = params.SSECustomerKey || params.CopySourceSSECustomerKey;
- if (sensitive && scheme !== 'https:') {
- var msg = 'Cannot send SSE keys over HTTP. Set \'sslEnabled\'' +
- 'to \'true\' in your configuration';
- throw AWS.util.error(new Error(),
- { code: 'ConfigError', message: msg });
- }
- },
-
-
- validateBucketEndpoint: function(req) {
- if (!req.params.Bucket && req.service.config.s3BucketEndpoint) {
- var msg = 'Cannot send requests to root API with `s3BucketEndpoint` set.';
- throw AWS.util.error(new Error(),
- { code: 'ConfigError', message: msg });
- }
- },
-
-
- populateURI: function populateURI(req) {
- var httpRequest = req.httpRequest;
- var b = req.params.Bucket;
-
- if (b) {
- if (!req.service.pathStyleBucketName(b)) {
- if (!req.service.config.s3BucketEndpoint) {
- httpRequest.endpoint.hostname =
- b + '.' + httpRequest.endpoint.hostname;
-
- var port = httpRequest.endpoint.port;
- if (port !== 80 && port !== 443) {
- httpRequest.endpoint.host = httpRequest.endpoint.hostname + ':' +
- httpRequest.endpoint.port;
- } else {
- httpRequest.endpoint.host = httpRequest.endpoint.hostname;
- }
- }
-
- httpRequest.virtualHostedBucket = b; // needed for signing the request
- httpRequest.path = httpRequest.path.replace(new RegExp('/' + b), '');
- if (httpRequest.path[0] !== '/') {
- httpRequest.path = '/' + httpRequest.path;
- }
- }
- }
- },
-
-
- addExpect100Continue: function addExpect100Continue(req) {
- var len = req.httpRequest.headers['Content-Length'];
- if (AWS.util.isNode() && len >= 1024 * 1024) {
- req.httpRequest.headers['Expect'] = '100-continue';
- }
- },
-
-
- addContentType: function addContentType(req) {
- var httpRequest = req.httpRequest;
- if (httpRequest.method === 'GET' || httpRequest.method === 'HEAD') {
- delete httpRequest.headers['Content-Type'];
- return;
- }
-
- if (!httpRequest.headers['Content-Type']) { // always have a Content-Type
- httpRequest.headers['Content-Type'] = 'application/octet-stream';
- }
-
- var contentType = httpRequest.headers['Content-Type'];
- if (AWS.util.isBrowser()) {
- if (typeof httpRequest.body === 'string' && !contentType.match(/;\s*charset=/)) {
- var charset = '; charset=UTF-8';
- httpRequest.headers['Content-Type'] += charset;
- } else {
- var replaceFn = function(_, prefix, charsetName) {
- return prefix + charsetName.toUpperCase();
- };
-
- httpRequest.headers['Content-Type'] =
- contentType.replace(/(;\s*charset=)(.+)$/, replaceFn);
- }
- }
- },
-
-
- computableChecksumOperations: {
- putBucketCors: true,
- putBucketLifecycle: true,
- putBucketTagging: true,
- deleteObjects: true
- },
-
-
- willComputeChecksums: function willComputeChecksums(req) {
- if (this.computableChecksumOperations[req.operation]) return true;
- if (!this.config.computeChecksums) return false;
-
- if (!AWS.util.Buffer.isBuffer(req.httpRequest.body) &&
- typeof req.httpRequest.body !== 'string') {
- return false;
- }
-
- var rules = req.service.api.operations[req.operation].input.members;
-
- if (req.service.getSignerClass(req) === AWS.Signers.V4) {
- if (rules.ContentMD5 && !rules.ContentMD5.required) return false;
- }
-
- if (rules.ContentMD5 && !req.params.ContentMD5) return true;
- },
-
-
- computeContentMd5: function computeContentMd5(req) {
- if (req.service.willComputeChecksums(req)) {
- var md5 = AWS.util.crypto.md5(req.httpRequest.body, 'base64');
- req.httpRequest.headers['Content-MD5'] = md5;
- }
- },
-
-
- computeSseCustomerKeyMd5: function computeSseCustomerKeyMd5(req) {
- var keys = {
- SSECustomerKey: 'x-amz-server-side-encryption-customer-key-MD5',
- CopySourceSSECustomerKey: 'x-amz-copy-source-server-side-encryption-customer-key-MD5'
- };
- AWS.util.each(keys, function(key, header) {
- if (req.params[key]) {
- var value = AWS.util.crypto.md5(req.params[key], 'base64');
- req.httpRequest.headers[header] = value;
- }
- });
- },
-
-
- pathStyleBucketName: function pathStyleBucketName(bucketName) {
- if (this.config.s3ForcePathStyle) return true;
- if (this.config.s3BucketEndpoint) return false;
-
- if (this.dnsCompatibleBucketName(bucketName)) {
- return (this.config.sslEnabled && bucketName.match(/\./)) ? true : false;
- } else {
- return true; // not dns compatible names must always use path style
- }
- },
-
-
- dnsCompatibleBucketName: function dnsCompatibleBucketName(bucketName) {
- var b = bucketName;
- var domain = new RegExp(/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/);
- var ipAddress = new RegExp(/(\d+\.){3}\d+/);
- var dots = new RegExp(/\.\./);
- return (b.match(domain) && !b.match(ipAddress) && !b.match(dots)) ? true : false;
- },
-
-
- successfulResponse: function successfulResponse(resp) {
- var req = resp.request;
- var httpResponse = resp.httpResponse;
- if (req.operation === 'completeMultipartUpload' &&
- httpResponse.body.toString().match(''))
- return false;
- else
- return httpResponse.statusCode < 300;
- },
-
-
- retryableError: function retryableError(error, request) {
- if (request.operation === 'completeMultipartUpload' &&
- error.statusCode === 200) {
- return true;
- } else if (error && error.code === 'RequestTimeout') {
- return true;
- } else {
- var _super = AWS.Service.prototype.retryableError;
- return _super.call(this, error, request);
- }
- },
-
-
- extractData: function extractData(resp) {
- var req = resp.request;
- if (req.operation === 'getBucketLocation') {
- var match = resp.httpResponse.body.toString().match(/>(.+)<\/Location/);
- delete resp.data['_'];
- if (match) {
- resp.data.LocationConstraint = match[1];
- } else {
- resp.data.LocationConstraint = '';
- }
- }
- },
-
-
- extractError: function extractError(resp) {
- var codes = {
- 304: 'NotModified',
- 403: 'Forbidden',
- 400: 'BadRequest',
- 404: 'NotFound'
- };
-
- var code = resp.httpResponse.statusCode;
- var body = resp.httpResponse.body || '';
- if (codes[code] && body.length === 0) {
- resp.error = AWS.util.error(new Error(), {
- code: codes[resp.httpResponse.statusCode],
- message: null
- });
- } else {
- var data = new AWS.XML.Parser().parse(body.toString());
- resp.error = AWS.util.error(new Error(), {
- code: data.Code || code,
- message: data.Message || null
- });
- }
- },
-
-
- getSignedUrl: function getSignedUrl(operation, params, callback) {
- params = AWS.util.copy(params || {});
- var expires = params.Expires || 900;
- delete params.Expires; // we can't validate this
- var request = this.makeRequest(operation, params);
- return request.presign(expires, callback);
- },
-
-
- prepareSignedUrl: function prepareSignedUrl(request) {
- request.addListener('validate', request.service.noPresignedContentLength);
- request.removeListener('build', request.service.addContentType);
- if (!request.params.Body) {
- request.removeListener('build', request.service.computeContentMd5);
- } else {
- request.addListener('afterBuild', AWS.EventListeners.Core.COMPUTE_SHA256);
- }
- },
-
- noPresignedContentLength: function noPresignedContentLength(request) {
- if (request.params.ContentLength !== undefined) {
- throw AWS.util.error(new Error(), {code: 'UnexpectedParameter',
- message: 'ContentLength is not supported in pre-signed URLs.'});
- }
- },
-
- createBucket: function createBucket(params, callback) {
- if (!params) params = {};
- var hostname = this.endpoint.hostname;
- if (hostname !== this.api.globalEndpoint && !params.CreateBucketConfiguration) {
- params.CreateBucketConfiguration = { LocationConstraint: this.config.region };
- }
- return this.makeRequest('createBucket', params, callback);
- },
-
-
- upload: function upload(params, options, callback) {
- if (typeof options === 'function' && callback === undefined) {
- callback = options;
- options = null;
- }
-
- options = options || {};
- options = AWS.util.merge(options || {}, {service: this, params: params});
-
- var uploader = new AWS.S3.ManagedUpload(options);
- if (typeof callback === 'function') uploader.send(callback);
- return uploader;
- }
-});
-
-},{"../core":3,"../s3/managed_upload":33}],41:[function(require,module,exports){
-var AWS = require('../core');
-
-AWS.util.update(AWS.SQS.prototype, {
-
- setupRequestListeners: function setupRequestListeners(request) {
- request.addListener('build', this.buildEndpoint);
-
- if (request.service.config.computeChecksums) {
- if (request.operation === 'sendMessage') {
- request.addListener('extractData', this.verifySendMessageChecksum);
- } else if (request.operation === 'sendMessageBatch') {
- request.addListener('extractData', this.verifySendMessageBatchChecksum);
- } else if (request.operation === 'receiveMessage') {
- request.addListener('extractData', this.verifyReceiveMessageChecksum);
- }
- }
- },
-
-
- verifySendMessageChecksum: function verifySendMessageChecksum(response) {
- if (!response.data) return;
-
- var md5 = response.data.MD5OfMessageBody;
- var body = this.params.MessageBody;
- var calculatedMd5 = this.service.calculateChecksum(body);
- if (calculatedMd5 !== md5) {
- var msg = 'Got "' + response.data.MD5OfMessageBody +
- '", expecting "' + calculatedMd5 + '".';
- this.service.throwInvalidChecksumError(response,
- [response.data.MessageId], msg);
- }
- },
-
-
- verifySendMessageBatchChecksum: function verifySendMessageBatchChecksum(response) {
- if (!response.data) return;
-
- var service = this.service;
- var entries = {};
- var errors = [];
- var messageIds = [];
- AWS.util.arrayEach(response.data.Successful, function (entry) {
- entries[entry.Id] = entry;
- });
- AWS.util.arrayEach(this.params.Entries, function (entry) {
- if (entries[entry.Id]) {
- var md5 = entries[entry.Id].MD5OfMessageBody;
- var body = entry.MessageBody;
- if (!service.isChecksumValid(md5, body)) {
- errors.push(entry.Id);
- messageIds.push(entries[entry.Id].MessageId);
- }
- }
- });
-
- if (errors.length > 0) {
- service.throwInvalidChecksumError(response, messageIds,
- 'Invalid messages: ' + errors.join(', '));
- }
- },
-
-
- verifyReceiveMessageChecksum: function verifyReceiveMessageChecksum(response) {
- if (!response.data) return;
-
- var service = this.service;
- var messageIds = [];
- AWS.util.arrayEach(response.data.Messages, function(message) {
- var md5 = message.MD5OfBody;
- var body = message.Body;
- if (!service.isChecksumValid(md5, body)) {
- messageIds.push(message.MessageId);
- }
- });
-
- if (messageIds.length > 0) {
- service.throwInvalidChecksumError(response, messageIds,
- 'Invalid messages: ' + messageIds.join(', '));
- }
- },
-
-
- throwInvalidChecksumError: function throwInvalidChecksumError(response, ids, message) {
- response.error = AWS.util.error(new Error(), {
- retryable: true,
- code: 'InvalidChecksum',
- messageIds: ids,
- message: response.request.operation +
- ' returned an invalid MD5 response. ' + message
- });
- },
-
-
- isChecksumValid: function isChecksumValid(checksum, data) {
- return this.calculateChecksum(data) === checksum;
- },
-
-
- calculateChecksum: function calculateChecksum(data) {
- return AWS.util.crypto.md5(data, 'hex');
- },
-
-
- buildEndpoint: function buildEndpoint(request) {
- var url = request.httpRequest.params.QueueUrl;
- if (url) {
- request.httpRequest.endpoint = new AWS.Endpoint(url);
-
- var matches = request.httpRequest.endpoint.host.match(/^sqs\.(.+?)\./);
- if (matches) request.httpRequest.region = matches[1];
- }
- }
-});
-
-},{"../core":3}],42:[function(require,module,exports){
-var AWS = require('../core');
-
-AWS.util.update(AWS.STS.prototype, {
-
- credentialsFrom: function credentialsFrom(data, credentials) {
- if (!data) return null;
- if (!credentials) credentials = new AWS.TemporaryCredentials();
- credentials.expired = false;
- credentials.accessKeyId = data.Credentials.AccessKeyId;
- credentials.secretAccessKey = data.Credentials.SecretAccessKey;
- credentials.sessionToken = data.Credentials.SessionToken;
- credentials.expireTime = data.Credentials.Expiration;
- return credentials;
- },
-
- assumeRoleWithWebIdentity: function assumeRoleWithWebIdentity(params, callback) {
- return this.makeUnauthenticatedRequest('assumeRoleWithWebIdentity', params, callback);
- },
-
- assumeRoleWithSAML: function assumeRoleWithSAML(params, callback) {
- return this.makeUnauthenticatedRequest('assumeRoleWithSAML', params, callback);
- }
-});
-
-},{"../core":3}],43:[function(require,module,exports){
-var AWS = require('../core');
-var inherit = AWS.util.inherit;
-
-
-var expiresHeader = 'presigned-expires';
-
-
-function signedUrlBuilder(request) {
- var expires = request.httpRequest.headers[expiresHeader];
-
- delete request.httpRequest.headers['User-Agent'];
- delete request.httpRequest.headers['X-Amz-User-Agent'];
-
- if (request.service.getSignerClass() === AWS.Signers.V4) {
- if (expires > 604800) { // one week expiry is invalid
- var message = 'Presigning does not support expiry time greater ' +
- 'than a week with SigV4 signing.';
- throw AWS.util.error(new Error(), {
- code: 'InvalidExpiryTime', message: message, retryable: false
- });
- }
- request.httpRequest.headers[expiresHeader] = expires;
- } else if (request.service.getSignerClass() === AWS.Signers.S3) {
- request.httpRequest.headers[expiresHeader] = parseInt(
- AWS.util.date.unixTimestamp() + expires, 10).toString();
- } else {
- throw AWS.util.error(new Error(), {
- message: 'Presigning only supports S3 or SigV4 signing.',
- code: 'UnsupportedSigner', retryable: false
- });
- }
-}
-
-
-function signedUrlSigner(request) {
- var endpoint = request.httpRequest.endpoint;
- var parsedUrl = AWS.util.urlParse(request.httpRequest.path);
- var queryParams = {};
-
- if (parsedUrl.search) {
- queryParams = AWS.util.queryStringParse(parsedUrl.search.substr(1));
- }
-
- AWS.util.each(request.httpRequest.headers, function (key, value) {
- if (key === expiresHeader) key = 'Expires';
- queryParams[key] = value;
- });
- delete request.httpRequest.headers[expiresHeader];
-
- var auth = queryParams['Authorization'].split(' ');
- if (auth[0] === 'AWS') {
- auth = auth[1].split(':');
- queryParams['AWSAccessKeyId'] = auth[0];
- queryParams['Signature'] = auth[1];
- } else if (auth[0] === 'AWS4-HMAC-SHA256') { // SigV4 signing
- auth.shift();
- var rest = auth.join(' ');
- var signature = rest.match(/Signature=(.*?)(?:,|\s|\r?\n|$)/)[1];
- queryParams['X-Amz-Signature'] = signature;
- delete queryParams['Expires'];
- }
- delete queryParams['Authorization'];
- delete queryParams['Host'];
-
- endpoint.pathname = parsedUrl.pathname;
- endpoint.search = AWS.util.queryParamsToString(queryParams);
-}
-
-
-AWS.Signers.Presign = inherit({
-
- sign: function sign(request, expireTime, callback) {
- request.httpRequest.headers[expiresHeader] = expireTime || 3600;
- request.on('build', signedUrlBuilder);
- request.on('sign', signedUrlSigner);
- request.removeListener('afterBuild',
- AWS.EventListeners.Core.SET_CONTENT_LENGTH);
- request.removeListener('afterBuild',
- AWS.EventListeners.Core.COMPUTE_SHA256);
-
- request.emit('beforePresign', [request]);
-
- if (callback) {
- request.build(function() {
- if (this.response.error) callback(this.response.error);
- else {
- callback(null, AWS.util.urlFormat(request.httpRequest.endpoint));
- }
- });
- } else {
- request.build();
- if (request.response.error) throw request.response.error;
- return AWS.util.urlFormat(request.httpRequest.endpoint);
- }
- }
-});
-
-module.exports = AWS.Signers.Presign;
-
-},{"../core":3}],44:[function(require,module,exports){
-var AWS = require('../core');
-var inherit = AWS.util.inherit;
-
-
-AWS.Signers.RequestSigner = inherit({
- constructor: function RequestSigner(request) {
- this.request = request;
- }
-});
-
-AWS.Signers.RequestSigner.getVersion = function getVersion(version) {
- switch (version) {
- case 'v2': return AWS.Signers.V2;
- case 'v3': return AWS.Signers.V3;
- case 'v4': return AWS.Signers.V4;
- case 's3': return AWS.Signers.S3;
- case 'v3https': return AWS.Signers.V3Https;
- }
- throw new Error('Unknown signing version ' + version);
-};
-
-require('./v2');
-require('./v3');
-require('./v3https');
-require('./v4');
-require('./s3');
-require('./presign');
-
-},{"../core":3,"./presign":43,"./s3":45,"./v2":46,"./v3":47,"./v3https":48,"./v4":49}],45:[function(require,module,exports){
-var AWS = require('../core');
-var inherit = AWS.util.inherit;
-
-
-AWS.Signers.S3 = inherit(AWS.Signers.RequestSigner, {
-
- subResources: {
- 'acl': 1,
- 'cors': 1,
- 'lifecycle': 1,
- 'delete': 1,
- 'location': 1,
- 'logging': 1,
- 'notification': 1,
- 'partNumber': 1,
- 'policy': 1,
- 'requestPayment': 1,
- 'restore': 1,
- 'tagging': 1,
- 'torrent': 1,
- 'uploadId': 1,
- 'uploads': 1,
- 'versionId': 1,
- 'versioning': 1,
- 'versions': 1,
- 'website': 1
- },
-
- responseHeaders: {
- 'response-content-type': 1,
- 'response-content-language': 1,
- 'response-expires': 1,
- 'response-cache-control': 1,
- 'response-content-disposition': 1,
- 'response-content-encoding': 1
- },
-
- addAuthorization: function addAuthorization(credentials, date) {
- if (!this.request.headers['presigned-expires']) {
- this.request.headers['X-Amz-Date'] = AWS.util.date.rfc822(date);
- }
-
- if (credentials.sessionToken) {
- this.request.headers['x-amz-security-token'] = credentials.sessionToken;
- }
-
- var signature = this.sign(credentials.secretAccessKey, this.stringToSign());
- var auth = 'AWS ' + credentials.accessKeyId + ':' + signature;
-
- this.request.headers['Authorization'] = auth;
- },
-
- stringToSign: function stringToSign() {
- var r = this.request;
-
- var parts = [];
- parts.push(r.method);
- parts.push(r.headers['Content-MD5'] || '');
- parts.push(r.headers['Content-Type'] || '');
-
- parts.push(r.headers['presigned-expires'] || '');
-
- var headers = this.canonicalizedAmzHeaders();
- if (headers) parts.push(headers);
- parts.push(this.canonicalizedResource());
-
- return parts.join('\n');
-
- },
-
- canonicalizedAmzHeaders: function canonicalizedAmzHeaders() {
-
- var amzHeaders = [];
-
- AWS.util.each(this.request.headers, function (name) {
- if (name.match(/^x-amz-/i))
- amzHeaders.push(name);
- });
-
- amzHeaders.sort(function (a, b) {
- return a.toLowerCase() < b.toLowerCase() ? -1 : 1;
- });
-
- var parts = [];
- AWS.util.arrayEach.call(this, amzHeaders, function (name) {
- parts.push(name.toLowerCase() + ':' + String(this.request.headers[name]));
- });
-
- return parts.join('\n');
-
- },
-
- canonicalizedResource: function canonicalizedResource() {
-
- var r = this.request;
-
- var parts = r.path.split('?');
- var path = parts[0];
- var querystring = parts[1];
-
- var resource = '';
-
- if (r.virtualHostedBucket)
- resource += '/' + r.virtualHostedBucket;
-
- resource += path;
-
- if (querystring) {
-
- var resources = [];
-
- AWS.util.arrayEach.call(this, querystring.split('&'), function (param) {
- var name = param.split('=')[0];
- var value = param.split('=')[1];
- if (this.subResources[name] || this.responseHeaders[name]) {
- var subresource = { name: name };
- if (value !== undefined) {
- if (this.subResources[name]) {
- subresource.value = value;
- } else {
- subresource.value = decodeURIComponent(value);
- }
- }
- resources.push(subresource);
- }
- });
-
- resources.sort(function (a, b) { return a.name < b.name ? -1 : 1; });
-
- if (resources.length) {
-
- querystring = [];
- AWS.util.arrayEach(resources, function (res) {
- if (res.value === undefined)
- querystring.push(res.name);
- else
- querystring.push(res.name + '=' + res.value);
- });
-
- resource += '?' + querystring.join('&');
- }
-
- }
-
- return resource;
-
- },
-
- sign: function sign(secret, string) {
- return AWS.util.crypto.hmac(secret, string, 'base64', 'sha1');
- }
-});
-
-module.exports = AWS.Signers.S3;
-
-},{"../core":3}],46:[function(require,module,exports){
-var AWS = require('../core');
-var inherit = AWS.util.inherit;
-
-
-AWS.Signers.V2 = inherit(AWS.Signers.RequestSigner, {
- addAuthorization: function addAuthorization(credentials, date) {
-
- if (!date) date = AWS.util.date.getDate();
-
- var r = this.request;
-
- r.params.Timestamp = AWS.util.date.iso8601(date);
- r.params.SignatureVersion = '2';
- r.params.SignatureMethod = 'HmacSHA256';
- r.params.AWSAccessKeyId = credentials.accessKeyId;
-
- if (credentials.sessionToken) {
- r.params.SecurityToken = credentials.sessionToken;
- }
-
- delete r.params.Signature; // delete old Signature for re-signing
- r.params.Signature = this.signature(credentials);
-
- r.body = AWS.util.queryParamsToString(r.params);
- r.headers['Content-Length'] = r.body.length;
- },
-
- signature: function signature(credentials) {
- return AWS.util.crypto.hmac(credentials.secretAccessKey, this.stringToSign(), 'base64');
- },
-
- stringToSign: function stringToSign() {
- var parts = [];
- parts.push(this.request.method);
- parts.push(this.request.endpoint.host.toLowerCase());
- parts.push(this.request.pathname());
- parts.push(AWS.util.queryParamsToString(this.request.params));
- return parts.join('\n');
- }
-
-});
-
-module.exports = AWS.Signers.V2;
-
-},{"../core":3}],47:[function(require,module,exports){
-var AWS = require('../core');
-var inherit = AWS.util.inherit;
-
-
-AWS.Signers.V3 = inherit(AWS.Signers.RequestSigner, {
- addAuthorization: function addAuthorization(credentials, date) {
-
- var datetime = AWS.util.date.rfc822(date);
-
- this.request.headers['X-Amz-Date'] = datetime;
-
- if (credentials.sessionToken) {
- this.request.headers['x-amz-security-token'] = credentials.sessionToken;
- }
-
- this.request.headers['X-Amzn-Authorization'] =
- this.authorization(credentials, datetime);
-
- },
-
- authorization: function authorization(credentials) {
- return 'AWS3 ' +
- 'AWSAccessKeyId=' + credentials.accessKeyId + ',' +
- 'Algorithm=HmacSHA256,' +
- 'SignedHeaders=' + this.signedHeaders() + ',' +
- 'Signature=' + this.signature(credentials);
- },
-
- signedHeaders: function signedHeaders() {
- var headers = [];
- AWS.util.arrayEach(this.headersToSign(), function iterator(h) {
- headers.push(h.toLowerCase());
- });
- return headers.sort().join(';');
- },
-
- canonicalHeaders: function canonicalHeaders() {
- var headers = this.request.headers;
- var parts = [];
- AWS.util.arrayEach(this.headersToSign(), function iterator(h) {
- parts.push(h.toLowerCase().trim() + ':' + String(headers[h]).trim());
- });
- return parts.sort().join('\n') + '\n';
- },
-
- headersToSign: function headersToSign() {
- var headers = [];
- AWS.util.each(this.request.headers, function iterator(k) {
- if (k === 'Host' || k === 'Content-Encoding' || k.match(/^X-Amz/i)) {
- headers.push(k);
- }
- });
- return headers;
- },
-
- signature: function signature(credentials) {
- return AWS.util.crypto.hmac(credentials.secretAccessKey, this.stringToSign(), 'base64');
- },
-
- stringToSign: function stringToSign() {
- var parts = [];
- parts.push(this.request.method);
- parts.push('/');
- parts.push('');
- parts.push(this.canonicalHeaders());
- parts.push(this.request.body);
- return AWS.util.crypto.sha256(parts.join('\n'));
- }
-
-});
-
-module.exports = AWS.Signers.V3;
-
-},{"../core":3}],48:[function(require,module,exports){
-var AWS = require('../core');
-var inherit = AWS.util.inherit;
-
-require('./v3');
-
-
-AWS.Signers.V3Https = inherit(AWS.Signers.V3, {
- authorization: function authorization(credentials) {
- return 'AWS3-HTTPS ' +
- 'AWSAccessKeyId=' + credentials.accessKeyId + ',' +
- 'Algorithm=HmacSHA256,' +
- 'Signature=' + this.signature(credentials);
- },
-
- stringToSign: function stringToSign() {
- return this.request.headers['X-Amz-Date'];
- }
-});
-
-module.exports = AWS.Signers.V3Https;
-
-},{"../core":3,"./v3":47}],49:[function(require,module,exports){
-var AWS = require('../core');
-var inherit = AWS.util.inherit;
-
-
-var cachedSecret = {};
-
-
-var expiresHeader = 'presigned-expires';
-
-
-AWS.Signers.V4 = inherit(AWS.Signers.RequestSigner, {
- constructor: function V4(request, serviceName) {
- AWS.Signers.RequestSigner.call(this, request);
- this.serviceName = serviceName;
- },
-
- algorithm: 'AWS4-HMAC-SHA256',
-
- addAuthorization: function addAuthorization(credentials, date) {
- var datetime = AWS.util.date.iso8601(date).replace(/[:\-]|\.\d{3}/g, '');
-
- if (this.isPresigned()) {
- this.updateForPresigned(credentials, datetime);
- } else {
- this.addHeaders(credentials, datetime);
- }
-
- this.request.headers['Authorization'] =
- this.authorization(credentials, datetime);
- },
-
- addHeaders: function addHeaders(credentials, datetime) {
- this.request.headers['X-Amz-Date'] = datetime;
- if (credentials.sessionToken) {
- this.request.headers['x-amz-security-token'] = credentials.sessionToken;
- }
- },
-
- updateForPresigned: function updateForPresigned(credentials, datetime) {
- var credString = this.credentialString(datetime);
- var qs = {
- 'X-Amz-Date': datetime,
- 'X-Amz-Algorithm': this.algorithm,
- 'X-Amz-Credential': credentials.accessKeyId + '/' + credString,
- 'X-Amz-Expires': this.request.headers[expiresHeader],
- 'X-Amz-SignedHeaders': this.signedHeaders()
- };
-
- if (credentials.sessionToken) {
- qs['X-Amz-Security-Token'] = credentials.sessionToken;
- }
-
- if (this.request.headers['Content-Type']) {
- qs['Content-Type'] = this.request.headers['Content-Type'];
- }
-
- AWS.util.each.call(this, this.request.headers, function(key, value) {
- if (key === expiresHeader) return;
- if (this.isSignableHeader(key) &&
- key.toLowerCase().indexOf('x-amz-') === 0) {
- qs[key] = value;
- }
- });
-
- var sep = this.request.path.indexOf('?') >= 0 ? '&' : '?';
- this.request.path += sep + AWS.util.queryParamsToString(qs);
- },
-
- authorization: function authorization(credentials, datetime) {
- var parts = [];
- var credString = this.credentialString(datetime);
- parts.push(this.algorithm + ' Credential=' +
- credentials.accessKeyId + '/' + credString);
- parts.push('SignedHeaders=' + this.signedHeaders());
- parts.push('Signature=' + this.signature(credentials, datetime));
- return parts.join(', ');
- },
-
- signature: function signature(credentials, datetime) {
- var cache = cachedSecret[this.serviceName];
- var date = datetime.substr(0, 8);
- if (!cache ||
- cache.akid !== credentials.accessKeyId ||
- cache.region !== this.request.region ||
- cache.date !== date) {
- var kSecret = credentials.secretAccessKey;
- var kDate = AWS.util.crypto.hmac('AWS4' + kSecret, date, 'buffer');
- var kRegion = AWS.util.crypto.hmac(kDate, this.request.region, 'buffer');
- var kService = AWS.util.crypto.hmac(kRegion, this.serviceName, 'buffer');
- var kCredentials = AWS.util.crypto.hmac(kService, 'aws4_request', 'buffer');
- cachedSecret[this.serviceName] = {
- region: this.request.region, date: date,
- key: kCredentials, akid: credentials.accessKeyId
- };
- }
-
- var key = cachedSecret[this.serviceName].key;
- return AWS.util.crypto.hmac(key, this.stringToSign(datetime), 'hex');
- },
-
- stringToSign: function stringToSign(datetime) {
- var parts = [];
- parts.push('AWS4-HMAC-SHA256');
- parts.push(datetime);
- parts.push(this.credentialString(datetime));
- parts.push(this.hexEncodedHash(this.canonicalString()));
- return parts.join('\n');
- },
-
- canonicalString: function canonicalString() {
- var parts = [], pathname = this.request.pathname();
- if (this.serviceName !== 's3') pathname = AWS.util.uriEscapePath(pathname);
-
- parts.push(this.request.method);
- parts.push(pathname);
- parts.push(this.request.search());
- parts.push(this.canonicalHeaders() + '\n');
- parts.push(this.signedHeaders());
- parts.push(this.hexEncodedBodyHash());
- return parts.join('\n');
- },
-
- canonicalHeaders: function canonicalHeaders() {
- var headers = [];
- AWS.util.each.call(this, this.request.headers, function (key, item) {
- headers.push([key, item]);
- });
- headers.sort(function (a, b) {
- return a[0].toLowerCase() < b[0].toLowerCase() ? -1 : 1;
- });
- var parts = [];
- AWS.util.arrayEach.call(this, headers, function (item) {
- var key = item[0].toLowerCase();
- if (this.isSignableHeader(key)) {
- parts.push(key + ':' +
- this.canonicalHeaderValues(item[1].toString()));
- }
- });
- return parts.join('\n');
- },
-
- canonicalHeaderValues: function canonicalHeaderValues(values) {
- return values.replace(/\s+/g, ' ').replace(/^\s+|\s+$/g, '');
- },
-
- signedHeaders: function signedHeaders() {
- var keys = [];
- AWS.util.each.call(this, this.request.headers, function (key) {
- key = key.toLowerCase();
- if (this.isSignableHeader(key)) keys.push(key);
- });
- return keys.sort().join(';');
- },
-
- credentialString: function credentialString(datetime) {
- var parts = [];
- parts.push(datetime.substr(0, 8));
- parts.push(this.request.region);
- parts.push(this.serviceName);
- parts.push('aws4_request');
- return parts.join('/');
- },
-
- hexEncodedHash: function hash(string) {
- return AWS.util.crypto.sha256(string, 'hex');
- },
-
- hexEncodedBodyHash: function hexEncodedBodyHash() {
- if (this.isPresigned() && this.serviceName === 's3') {
- return 'UNSIGNED-PAYLOAD';
- } else if (this.request.headers['X-Amz-Content-Sha256']) {
- return this.request.headers['X-Amz-Content-Sha256'];
- } else {
- return this.hexEncodedHash(this.request.body || '');
- }
- },
-
- unsignableHeaders: ['authorization', 'content-type', 'content-length',
- 'user-agent', expiresHeader],
-
- isSignableHeader: function isSignableHeader(key) {
- if (key.toLowerCase().indexOf('x-amz-') === 0) return true;
- return this.unsignableHeaders.indexOf(key) < 0;
- },
-
- isPresigned: function isPresigned() {
- return this.request.headers[expiresHeader] ? true : false;
- }
-
-});
-
-module.exports = AWS.Signers.V4;
-
-},{"../core":3}],50:[function(require,module,exports){
-function AcceptorStateMachine(states, state) {
- this.currentState = state || null;
- this.states = states || {};
-}
-
-AcceptorStateMachine.prototype.runTo = function runTo(finalState, done, bindObject, inputError) {
- if (typeof finalState === 'function') {
- inputError = bindObject; bindObject = done;
- done = finalState; finalState = null;
- }
-
- var self = this;
- var state = self.states[self.currentState];
- state.fn.call(bindObject || self, inputError, function(err) {
- if (err) {
- if (state.fail) self.currentState = state.fail;
- else return done ? done.call(bindObject, err) : null;
- } else {
- if (state.accept) self.currentState = state.accept;
- else return done ? done.call(bindObject) : null;
- }
- if (self.currentState === finalState) {
- return done ? done.call(bindObject, err) : null;
- }
-
- self.runTo(finalState, done, bindObject, err);
- });
-};
-
-AcceptorStateMachine.prototype.addState = function addState(name, acceptState, failState, fn) {
- if (typeof acceptState === 'function') {
- fn = acceptState; acceptState = null; failState = null;
- } else if (typeof failState === 'function') {
- fn = failState; failState = null;
- }
-
- if (!this.currentState) this.currentState = name;
- this.states[name] = { accept: acceptState, fail: failState, fn: fn };
- return this;
-};
-
-module.exports = AcceptorStateMachine;
-
-},{}],51:[function(require,module,exports){
-(function (process){
-
-
-var cryptoLib = require('crypto');
-var Buffer = require('buffer').Buffer;
-var AWS;
-
-
-var util = {
- engine: function engine() {
- if (util.isBrowser() && typeof navigator !== 'undefined') {
- return navigator.userAgent;
- } else {
- return process.platform + '/' + process.version;
- }
- },
-
- userAgent: function userAgent() {
- var name = util.isBrowser() ? 'js' : 'nodejs';
- var agent = 'aws-sdk-' + name + '/' + require('./core').VERSION;
- if (name === 'nodejs') agent += ' ' + util.engine();
- return agent;
- },
-
- isBrowser: function isBrowser() { return process && process.browser; },
- isNode: function isNode() { return !util.isBrowser(); },
- nodeRequire: function nodeRequire(module) {
- if (util.isNode()) return require(module);
- },
- multiRequire: function multiRequire(module1, module2) {
- return require(util.isNode() ? module1 : module2);
- },
-
- uriEscape: function uriEscape(string) {
- var output = encodeURIComponent(string);
- output = output.replace(/[^A-Za-z0-9_.~\-%]+/g, escape);
-
- output = output.replace(/[*]/g, function(ch) {
- return '%' + ch.charCodeAt(0).toString(16).toUpperCase();
- });
-
- return output;
- },
-
- uriEscapePath: function uriEscapePath(string) {
- var parts = [];
- util.arrayEach(string.split('/'), function (part) {
- parts.push(util.uriEscape(part));
- });
- return parts.join('/');
- },
-
- urlParse: function urlParse(url) {
- return require('url').parse(url);
- },
-
- urlFormat: function urlFormat(url) {
- return require('url').format(url);
- },
-
- queryStringParse: function queryStringParse(qs) {
- return require('querystring').parse(qs);
- },
-
- queryParamsToString: function queryParamsToString(params) {
- var items = [];
- var escape = util.uriEscape;
- var sortedKeys = Object.keys(params).sort();
-
- util.arrayEach(sortedKeys, function(name) {
- var value = params[name];
- var ename = escape(name);
- var result = ename + '=';
- if (Array.isArray(value)) {
- var vals = [];
- util.arrayEach(value, function(item) { vals.push(escape(item)); });
- result = ename + '=' + vals.sort().join('&' + ename + '=');
- } else if (value !== undefined && value !== null) {
- result = ename + '=' + escape(value);
- }
- items.push(result);
- });
-
- return items.join('&');
- },
-
- readFileSync: function readFileSync(path) {
- if (typeof window !== 'undefined') return null;
- return util.nodeRequire('fs').readFileSync(path, 'utf-8');
- },
-
- base64: {
-
- encode: function encode64(string) {
- return new Buffer(string).toString('base64');
- },
-
- decode: function decode64(string) {
- return new Buffer(string, 'base64');
- }
-
- },
-
- Buffer: Buffer,
-
- buffer: {
- toStream: function toStream(buffer) {
- if (!util.Buffer.isBuffer(buffer)) buffer = new util.Buffer(buffer);
-
- var readable = new (util.nodeRequire('stream').Readable)();
- var pos = 0;
- readable._read = function(size) {
- if (pos >= buffer.length) return readable.push(null);
-
- var end = pos + size;
- if (end > buffer.length) end = buffer.length;
- readable.push(buffer.slice(pos, end));
- pos = end;
- };
-
- return readable;
- },
-
-
- concat: function(buffers) {
- var length = 0,
- offset = 0,
- buffer = null, i;
-
- for (i = 0; i < buffers.length; i++) {
- length += buffers[i].length;
- }
-
- buffer = new Buffer(length);
-
- for (i = 0; i < buffers.length; i++) {
- buffers[i].copy(buffer, offset);
- offset += buffers[i].length;
- }
-
- return buffer;
- }
- },
-
- string: {
- byteLength: function byteLength(string) {
- if (string === null || string === undefined) return 0;
- if (typeof string === 'string') string = new Buffer(string);
-
- if (typeof string.byteLength === 'number') {
- return string.byteLength;
- } else if (typeof string.length === 'number') {
- return string.length;
- } else if (typeof string.size === 'number') {
- return string.size;
- } else if (typeof string.path === 'string') {
- return util.nodeRequire('fs').lstatSync(string.path).size;
- } else {
- throw util.error(new Error('Cannot determine length of ' + string),
- { object: string });
- }
- },
-
- upperFirst: function upperFirst(string) {
- return string[0].toUpperCase() + string.substr(1);
- },
-
- lowerFirst: function lowerFirst(string) {
- return string[0].toLowerCase() + string.substr(1);
- }
- },
-
- ini: {
- parse: function string(ini) {
- var currentSection, map = {};
- util.arrayEach(ini.split(/\r?\n/), function(line) {
- line = line.split(/(^|\s);/)[0]; // remove comments
- var section = line.match(/^\s*\[([^\[\]]+)\]\s*$/);
- if (section) {
- currentSection = section[1];
- } else if (currentSection) {
- var item = line.match(/^\s*(.+?)\s*=\s*(.+?)\s*$/);
- if (item) {
- map[currentSection] = map[currentSection] || {};
- map[currentSection][item[1]] = item[2];
- }
- }
- });
-
- return map;
- }
- },
-
- fn: {
- noop: function() {},
-
-
- makeAsync: function makeAsync(fn, expectedArgs) {
- if (expectedArgs && expectedArgs <= fn.length) {
- return fn;
- }
-
- return function() {
- var args = Array.prototype.slice.call(arguments, 0);
- var callback = args.pop();
- var result = fn.apply(null, args);
- callback(result);
- };
- }
- },
-
- jamespath: {
- query: function query(expression, data) {
- if (!data) return [];
-
- var results = [];
- var expressions = expression.split(/\s+\|\|\s+/);
- util.arrayEach.call(this, expressions, function (expr) {
- var objects = [data];
- var tokens = expr.split('.');
- util.arrayEach.call(this, tokens, function (token) {
- var match = token.match('^(.+?)(?:\\[(-?\\d+|\\*|)\\])?$');
- var newObjects = [];
- util.arrayEach.call(this, objects, function (obj) {
- if (match[1] === '*') {
- util.arrayEach.call(this, obj, function (value) {
- newObjects.push(value);
- });
- } else if (obj.hasOwnProperty(match[1])) {
- newObjects.push(obj[match[1]]);
- }
- });
- objects = newObjects;
-
- if (match[2] !== undefined) {
- newObjects = [];
- util.arrayEach.call(this, objects, function (obj) {
- if (Array.isArray(obj)) {
- if (match[2] === '*' || match[2] === '') {
- newObjects = newObjects.concat(obj);
- } else {
- var idx = parseInt(match[2], 10);
- if (idx < 0) idx = obj.length + idx; // negative indexing
- newObjects.push(obj[idx]);
- }
- }
- });
- objects = newObjects;
- }
-
- if (objects.length === 0) return util.abort;
- });
-
- if (objects.length > 0) {
- results = objects;
- return util.abort;
- }
- });
-
- return results;
- },
-
- find: function find(expression, data) {
- return util.jamespath.query(expression, data)[0];
- }
- },
-
-
- date: {
-
-
- getDate: function getDate() {
- if (!AWS) AWS = require('./core');
- if (AWS.config.systemClockOffset) { // use offset when non-zero
- return new Date(new Date().getTime() + AWS.config.systemClockOffset);
- } else {
- return new Date();
- }
- },
-
-
- iso8601: function iso8601(date) {
- if (date === undefined) { date = util.date.getDate(); }
- return date.toISOString().replace(/\.\d{3}Z$/, 'Z');
- },
-
-
- rfc822: function rfc822(date) {
- if (date === undefined) { date = util.date.getDate(); }
- return date.toUTCString();
- },
-
-
- unixTimestamp: function unixTimestamp(date) {
- if (date === undefined) { date = util.date.getDate(); }
- return date.getTime() / 1000;
- },
-
-
- from: function format(date) {
- if (typeof date === 'number') {
- return new Date(date * 1000); // unix timestamp
- } else {
- return new Date(date);
- }
- },
-
-
- format: function format(date, formatter) {
- if (!formatter) formatter = 'iso8601';
- return util.date[formatter](util.date.from(date));
- },
-
- parseTimestamp: function parseTimestamp(value) {
- if (typeof value === 'number') { // unix timestamp (number)
- return new Date(value * 1000);
- } else if (value.match(/^\d+$/)) { // unix timestamp
- return new Date(value * 1000);
- } else if (value.match(/^\d{4}/)) { // iso8601
- return new Date(value);
- } else if (value.match(/^\w{3},/)) { // rfc822
- return new Date(value);
- } else {
- throw util.error(
- new Error('unhandled timestamp format: ' + value),
- {code: 'TimestampParserError'});
- }
- }
-
- },
-
- crypto: {
- crc32Table: [
- 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419,
- 0x706AF48F, 0xE963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4,
- 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07,
- 0x90BF1D91, 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,
- 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, 0x136C9856,
- 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9,
- 0xFA0F3D63, 0x8D080DF5, 0x3B6E20C8, 0x4C69105E, 0xD56041E4,
- 0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
- 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3,
- 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, 0x26D930AC, 0x51DE003A,
- 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 0xCFBA9599,
- 0xB8BDA50F, 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,
- 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, 0x76DC4190,
- 0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F,
- 0x9FBFE4A5, 0xE8B8D433, 0x7807C9A2, 0x0F00F934, 0x9609A88E,
- 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
- 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED,
- 0x1B01A57B, 0x8208F4C1, 0xF50FC457, 0x65B0D9C6, 0x12B7E950,
- 0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3,
- 0xFBD44C65, 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,
- 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, 0x4369E96A,
- 0x346ED9FC, 0xAD678846, 0xDA60B8D0, 0x44042D73, 0x33031DE5,
- 0xAA0A4C5F, 0xDD0D7CC9, 0x5005713C, 0x270241AA, 0xBE0B1010,
- 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
- 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17,
- 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, 0xEDB88320, 0x9ABFB3B6,
- 0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615,
- 0x73DC1683, 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,
- 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, 0xF00F9344,
- 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB,
- 0x196C3671, 0x6E6B06E7, 0xFED41B76, 0x89D32BE0, 0x10DA7A5A,
- 0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
- 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1,
- 0xA6BC5767, 0x3FB506DD, 0x48B2364B, 0xD80D2BDA, 0xAF0A1B4C,
- 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF,
- 0x4669BE79, 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,
- 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, 0xC5BA3BBE,
- 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31,
- 0x2CD99E8B, 0x5BDEAE1D, 0x9B64C2B0, 0xEC63F226, 0x756AA39C,
- 0x026D930A, 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
- 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B,
- 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, 0x86D3D2D4, 0xF1D4E242,
- 0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1,
- 0x18B74777, 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,
- 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, 0xA00AE278,
- 0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7,
- 0x4969474D, 0x3E6E77DB, 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66,
- 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
- 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605,
- 0xCDD70693, 0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8,
- 0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B,
- 0x2D02EF8D],
-
- crc32: function crc32(data) {
- var tbl = util.crypto.crc32Table;
- var crc = 0 ^ -1;
-
- if (typeof data === 'string') {
- data = new Buffer(data);
- }
-
- for (var i = 0; i < data.length; i++) {
- var code = data.readUInt8(i);
- crc = (crc >>> 8) ^ tbl[(crc ^ code) & 0xFF];
- }
- return (crc ^ -1) >>> 0;
- },
-
- hmac: function hmac(key, string, digest, fn) {
- if (!digest) digest = 'binary';
- if (digest === 'buffer') { digest = undefined; }
- if (!fn) fn = 'sha256';
- if (typeof string === 'string') string = new Buffer(string);
- return cryptoLib.createHmac(fn, key).update(string).digest(digest);
- },
-
- md5: function md5(data, digest, callback) {
- return util.crypto.hash('md5', data, digest, callback);
- },
-
- sha256: function sha256(data, digest, callback) {
- return util.crypto.hash('sha256', data, digest, callback);
- },
-
- hash: function(algorithm, data, digest, callback) {
- var hash = util.crypto.createHash(algorithm);
- if (!digest) { digest = 'binary'; }
- if (digest === 'buffer') { digest = undefined; }
- if (typeof data === 'string') data = new Buffer(data);
- var sliceFn = util.arraySliceFn(data);
- var isBuffer = Buffer.isBuffer(data);
-
- if (callback && typeof data === 'object' &&
- typeof data.on === 'function' && !isBuffer) {
- data.on('data', function(chunk) { hash.update(chunk); });
- data.on('error', function(err) { callback(err); });
- data.on('end', function() { callback(null, hash.digest(digest)); });
- } else if (callback && sliceFn && !isBuffer &&
- typeof FileReader !== 'undefined') {
- var index = 0, size = 1024 * 512;
- var reader = new FileReader();
- reader.onerror = function() {
- callback(new Error('Failed to read data.'));
- };
- reader.onload = function() {
- var buf = new Buffer(new Uint8Array(reader.result));
- hash.update(buf);
- index += buf.length;
- reader._continueReading();
- };
- reader._continueReading = function() {
- if (index >= data.size) {
- callback(null, hash.digest(digest));
- return;
- }
-
- var back = index + size;
- if (back > data.size) back = data.size;
- reader.readAsArrayBuffer(sliceFn.call(data, index, back));
- };
-
- reader._continueReading();
- } else {
- if (util.isBrowser() && typeof data === 'object' && !isBuffer) {
- data = new Buffer(new Uint8Array(data));
- }
- var out = hash.update(data).digest(digest);
- if (callback) callback(null, out);
- return out;
- }
- },
-
- toHex: function toHex(data) {
- var out = [];
- for (var i = 0; i < data.length; i++) {
- out.push(('0' + data.charCodeAt(i).toString(16)).substr(-2, 2));
- }
- return out.join('');
- },
-
- createHash: function createHash(algorithm) {
- return cryptoLib.createHash(algorithm);
- }
-
- },
-
-
-
-
- abort: {},
-
- each: function each(object, iterFunction) {
- for (var key in object) {
- if (object.hasOwnProperty(key)) {
- var ret = iterFunction.call(this, key, object[key]);
- if (ret === util.abort) break;
- }
- }
- },
-
- arrayEach: function arrayEach(array, iterFunction) {
- for (var idx in array) {
- if (array.hasOwnProperty(idx)) {
- var ret = iterFunction.call(this, array[idx], parseInt(idx, 10));
- if (ret === util.abort) break;
- }
- }
- },
-
- update: function update(obj1, obj2) {
- util.each(obj2, function iterator(key, item) {
- obj1[key] = item;
- });
- return obj1;
- },
-
- merge: function merge(obj1, obj2) {
- return util.update(util.copy(obj1), obj2);
- },
-
- copy: function copy(object) {
- if (object === null || object === undefined) return object;
- var dupe = {};
- for (var key in object) {
- dupe[key] = object[key];
- }
- return dupe;
- },
-
- isEmpty: function isEmpty(obj) {
- for (var prop in obj) {
- if (obj.hasOwnProperty(prop)) {
- return false;
- }
- }
- return true;
- },
-
- arraySliceFn: function arraySliceFn(obj) {
- var fn = obj.slice || obj.webkitSlice || obj.mozSlice;
- return typeof fn === 'function' ? fn : null;
- },
-
- isType: function isType(obj, type) {
- if (typeof type === 'function') type = util.typeName(type);
- return Object.prototype.toString.call(obj) === '[object ' + type + ']';
- },
-
- typeName: function typeName(type) {
- if (type.hasOwnProperty('name')) return type.name;
- var str = type.toString();
- var match = str.match(/^\s*function (.+)\(/);
- return match ? match[1] : str;
- },
-
- error: function error(err, options) {
- var originalError = null;
- if (typeof err.message === 'string' && err.message !== '') {
- if (typeof options === 'string' || (options && options.message)) {
- originalError = util.copy(err);
- originalError.message = err.message;
- }
- }
- err.message = err.message || null;
-
- if (typeof options === 'string') {
- err.message = options;
- } else if (typeof options === 'object') {
- util.update(err, options);
- if (options.message)
- err.message = options.message;
- if (options.code || options.name)
- err.code = options.code || options.name;
- if (options.stack)
- err.stack = options.stack;
- }
-
- if (typeof Object.defineProperty === 'function') {
- Object.defineProperty(err, 'name', {writable: true, enumerable: false});
- Object.defineProperty(err, 'message', {enumerable: true});
- }
-
- err.name = options && options.name || err.name || err.code || 'Error';
- err.time = new Date();
-
- if (originalError) err.originalError = originalError;
-
- return err;
- },
-
-
- inherit: function inherit(klass, features) {
- var newObject = null;
- if (features === undefined) {
- features = klass;
- klass = Object;
- newObject = {};
- } else {
- var ctor = function ConstructorWrapper() {};
- ctor.prototype = klass.prototype;
- newObject = new ctor();
- }
-
- if (features.constructor === Object) {
- features.constructor = function() {
- if (klass !== Object) {
- return klass.apply(this, arguments);
- }
- };
- }
-
- features.constructor.prototype = newObject;
- util.update(features.constructor.prototype, features);
- features.constructor.__super__ = klass;
- return features.constructor;
- },
-
-
- mixin: function mixin() {
- var klass = arguments[0];
- for (var i = 1; i < arguments.length; i++) {
- for (var prop in arguments[i].prototype) {
- var fn = arguments[i].prototype[prop];
- if (prop !== 'constructor') {
- klass.prototype[prop] = fn;
- }
- }
- }
- return klass;
- },
-
-
- hideProperties: function hideProperties(obj, props) {
- if (typeof Object.defineProperty !== 'function') return;
-
- util.arrayEach(props, function (key) {
- Object.defineProperty(obj, key, {
- enumerable: false, writable: true, configurable: true });
- });
- },
-
-
- property: function property(obj, name, value, enumerable, isValue) {
- var opts = {
- configurable: true,
- enumerable: enumerable !== undefined ? enumerable : true
- };
- if (typeof value === 'function' && !isValue) {
- opts.get = value;
- }
- else {
- opts.value = value; opts.writable = true;
- }
-
- Object.defineProperty(obj, name, opts);
- },
-
-
- memoizedProperty: function memoizedProperty(obj, name, get, enumerable) {
- var cachedValue = null;
-
- util.property(obj, name, function() {
- if (cachedValue === null) {
- cachedValue = get();
- }
- return cachedValue;
- }, enumerable);
- },
-
-
- hoistPayloadMember: function hoistPayloadMember(resp) {
- var req = resp.request;
- var operation = req.operation;
- var output = req.service.api.operations[operation].output;
- if (output.payload) {
- var payloadMember = output.members[output.payload];
- var responsePayload = resp.data[output.payload];
- if (payloadMember.type === 'structure') {
- util.each(responsePayload, function(key, value) {
- util.property(resp.data, key, value, false);
- });
- }
- }
- },
-
-
- computeSha256: function computeSha256(body, done) {
- if (util.isNode()) {
- var Stream = util.nodeRequire('stream').Stream;
- var fs = util.nodeRequire('fs');
- if (body instanceof Stream) {
- if (typeof body.path === 'string') { // assume file object
- body = fs.createReadStream(body.path);
- } else { // TODO support other stream types
- return done(new Error('Non-file stream objects are ' +
- 'not supported with SigV4'));
- }
- }
- }
-
- util.crypto.sha256(body, 'hex', function(err, sha) {
- if (err) done(err);
- else done(null, sha);
- });
- }
-
-};
-
-module.exports = util;
-
-}).call(this,require("FWaASH"))
-},{"./core":3,"FWaASH":65,"buffer":54,"crypto":58,"querystring":69,"url":70}],52:[function(require,module,exports){
-var util = require('../util');
-var Shape = require('../model/shape');
-
-function DomXmlParser() { }
-
-DomXmlParser.prototype.parse = function(xml, shape) {
- if (xml.replace(/^\s+/, '') === '') return {};
-
- var result, error;
- try {
- if (window.DOMParser) {
- try {
- var parser = new DOMParser();
- result = parser.parseFromString(xml, 'text/xml');
- } catch (syntaxError) {
- throw util.error(new Error('Parse error in document'),
- {originalError: syntaxError});
- }
-
- if (result.documentElement === null) {
- throw new Error('Cannot parse empty document.');
- }
-
- var isError = result.getElementsByTagName('parsererror')[0];
- if (isError && (isError.parentNode === result ||
- isError.parentNode.nodeName === 'body')) {
- throw new Error(isError.getElementsByTagName('div')[0].textContent);
- }
- } else if (window.ActiveXObject) {
- result = new window.ActiveXObject('Microsoft.XMLDOM');
- result.async = false;
-
- if (!result.loadXML(xml)) {
- throw new Error('Parse error in document');
- }
- } else {
- throw new Error('Cannot load XML parser');
- }
- } catch (e) {
- error = e;
- }
-
- if (result && result.documentElement && !error) {
- var data = parseXml(result.documentElement, shape);
- var metadata = result.getElementsByTagName('ResponseMetadata')[0];
- if (metadata) {
- data.ResponseMetadata = parseXml(metadata, {});
- }
- return data;
- } else if (error) {
- throw util.error(error || new Error(), {code: 'XMLParserError'});
- } else { // empty xml document
- return {};
- }
-};
-
-function parseXml(xml, shape) {
- if (!shape) shape = {};
- switch (shape.type) {
- case 'structure': return parseStructure(xml, shape);
- case 'map': return parseMap(xml, shape);
- case 'list': return parseList(xml, shape);
- case undefined: case null: return parseUnknown(xml);
- default: return parseScalar(xml, shape);
- }
-}
-
-function parseStructure(xml, shape) {
- var data = {};
- if (xml === null) return data;
-
- util.each(shape.members, function(memberName, memberShape) {
- if (memberShape.isXmlAttribute) {
- if (xml.attributes.hasOwnProperty(memberShape.name)) {
- var value = xml.attributes[memberShape.name].value;
- data[memberName] = parseXml({textContent: value}, memberShape);
- }
- } else {
- var xmlChild = memberShape.flattened ? xml :
- xml.getElementsByTagName(memberShape.name)[0];
- if (xmlChild) {
- data[memberName] = parseXml(xmlChild, memberShape);
- } else if (!memberShape.flattened && memberShape.type === 'list') {
- data[memberName] = memberShape.defaultValue;
- }
- }
- });
-
- return data;
-}
-
-function parseMap(xml, shape) {
- var data = {};
- var xmlKey = shape.key.name || 'key';
- var xmlValue = shape.value.name || 'value';
- var tagName = shape.flattened ? shape.name : 'entry';
-
- var child = xml.firstElementChild;
- while (child) {
- if (child.nodeName === tagName) {
- var key = child.getElementsByTagName(xmlKey)[0].textContent;
- var value = child.getElementsByTagName(xmlValue)[0];
- data[key] = parseXml(value, shape.value);
- }
- child = child.nextElementSibling;
- }
- return data;
-}
-
-function parseList(xml, shape) {
- var data = [];
- var tagName = shape.flattened ? shape.name : (shape.member.name || 'member');
-
- var child = xml.firstElementChild;
- while (child) {
- if (child.nodeName === tagName) {
- data.push(parseXml(child, shape.member));
- }
- child = child.nextElementSibling;
- }
- return data;
-}
-
-function parseScalar(xml, shape) {
- if (xml.getAttribute) {
- var encoding = xml.getAttribute('encoding');
- if (encoding === 'base64') {
- shape = new Shape.create({type: encoding});
- }
- }
-
- var text = xml.textContent;
- if (text === '') text = null;
- if (typeof shape.toType === 'function') {
- return shape.toType(text);
- } else {
- return text;
- }
-}
-
-function parseUnknown(xml) {
- if (xml === undefined || xml === null) return '';
-
- if (!xml.firstElementChild) {
- if (xml.parentNode.parentNode === null) return {};
- if (xml.childNodes.length === 0) return '';
- else return xml.textContent;
- }
-
- var shape = {type: 'structure', members: {}};
- var child = xml.firstElementChild;
- while (child) {
- var tag = child.nodeName;
- if (shape.members.hasOwnProperty(tag)) {
- shape.members[tag].type = 'list';
- } else {
- shape.members[tag] = {name: tag};
- }
- child = child.nextElementSibling;
- }
- return parseStructure(xml, shape);
-}
-
-module.exports = DomXmlParser;
-
-},{"../model/shape":20,"../util":51}],53:[function(require,module,exports){
-var util = require('../util');
-var builder = require('xmlbuilder');
-
-function XmlBuilder() { }
-
-XmlBuilder.prototype.toXML = function(params, shape, rootElement, noEmpty) {
- var xml = builder.create(rootElement);
- applyNamespaces(xml, shape);
- serialize(xml, params, shape);
- return xml.children.length > 0 || noEmpty ? xml.root().toString() : '';
-};
-
-function serialize(xml, value, shape) {
- switch (shape.type) {
- case 'structure': return serializeStructure(xml, value, shape);
- case 'map': return serializeMap(xml, value, shape);
- case 'list': return serializeList(xml, value, shape);
- default: return serializeScalar(xml, value, shape);
- }
-}
-
-function serializeStructure(xml, params, shape) {
- util.arrayEach(shape.memberNames, function(memberName) {
- var memberShape = shape.members[memberName];
- if (memberShape.location !== 'body') return;
-
- var value = params[memberName];
- var name = memberShape.name;
- if (value !== undefined && value !== null) {
- if (memberShape.isXmlAttribute) {
- xml.att(name, value);
- } else if (memberShape.flattened) {
- serialize(xml, value, memberShape);
- } else {
- var element = xml.ele(name);
- applyNamespaces(element, memberShape);
- serialize(element, value, memberShape);
- }
- }
- });
-}
-
-function serializeMap(xml, map, shape) {
- var xmlKey = shape.key.name || 'key';
- var xmlValue = shape.value.name || 'value';
-
- util.each(map, function(key, value) {
- var entry = xml.ele(shape.flattened ? shape.name : 'entry');
- serialize(entry.ele(xmlKey), key, shape.key);
- serialize(entry.ele(xmlValue), value, shape.value);
- });
-}
-
-function serializeList(xml, list, shape) {
- if (shape.flattened) {
- util.arrayEach(list, function(value) {
- var name = shape.member.name || shape.name;
- var element = xml.ele(name);
- serialize(element, value, shape.member);
- });
- } else {
- util.arrayEach(list, function(value) {
- var name = shape.member.name || 'member';
- var element = xml.ele(name);
- serialize(element, value, shape.member);
- });
- }
-}
-
-function serializeScalar(xml, value, shape) {
- xml.txt(shape.toWireFormat(value));
-}
-
-function applyNamespaces(xml, shape) {
- var uri, prefix = 'xmlns';
- if (shape.xmlNamespaceUri) {
- uri = shape.xmlNamespaceUri;
- if (shape.xmlNamespacePrefix) prefix += ':' + shape.xmlNamespacePrefix;
- } else if (xml.isRoot && shape.api.xmlNamespaceUri) {
- uri = shape.api.xmlNamespaceUri;
- }
-
- if (uri) xml.att(prefix, uri);
-}
-
-module.exports = XmlBuilder;
-
-},{"../util":51,"xmlbuilder":75}],54:[function(require,module,exports){
-
-
-var base64 = require('base64-js')
-var ieee754 = require('ieee754')
-
-exports.Buffer = Buffer
-exports.SlowBuffer = Buffer
-exports.INSPECT_MAX_BYTES = 50
-Buffer.poolSize = 8192
-
-
-Buffer._useTypedArrays = (function () {
- try {
- var buf = new ArrayBuffer(0)
- var arr = new Uint8Array(buf)
- arr.foo = function () { return 42 }
- return 42 === arr.foo() &&
- typeof arr.subarray === 'function' // Chrome 9-10 lack `subarray`
- } catch (e) {
- return false
- }
-})()
-
-
-function Buffer (subject, encoding, noZero) {
- if (!(this instanceof Buffer))
- return new Buffer(subject, encoding, noZero)
-
- var type = typeof subject
-
- if (encoding === 'base64' && type === 'string') {
- subject = stringtrim(subject)
- while (subject.length % 4 !== 0) {
- subject = subject + '='
- }
- }
-
- var length
- if (type === 'number')
- length = coerce(subject)
- else if (type === 'string')
- length = Buffer.byteLength(subject, encoding)
- else if (type === 'object')
- length = coerce(subject.length) // assume that object is array-like
- else
- throw new Error('First argument needs to be a number, array or string.')
-
- var buf
- if (Buffer._useTypedArrays) {
- buf = Buffer._augment(new Uint8Array(length))
- } else {
- buf = this
- buf.length = length
- buf._isBuffer = true
- }
-
- var i
- if (Buffer._useTypedArrays && typeof subject.byteLength === 'number') {
- buf._set(subject)
- } else if (isArrayish(subject)) {
- for (i = 0; i < length; i++) {
- if (Buffer.isBuffer(subject))
- buf[i] = subject.readUInt8(i)
- else
- buf[i] = subject[i]
- }
- } else if (type === 'string') {
- buf.write(subject, 0, encoding)
- } else if (type === 'number' && !Buffer._useTypedArrays && !noZero) {
- for (i = 0; i < length; i++) {
- buf[i] = 0
- }
- }
-
- return buf
-}
-
-
-Buffer.isEncoding = function (encoding) {
- switch (String(encoding).toLowerCase()) {
- case 'hex':
- case 'utf8':
- case 'utf-8':
- case 'ascii':
- case 'binary':
- case 'base64':
- case 'raw':
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- return true
- default:
- return false
- }
-}
-
-Buffer.isBuffer = function (b) {
- return !!(b !== null && b !== undefined && b._isBuffer)
-}
-
-Buffer.byteLength = function (str, encoding) {
- var ret
- str = str + ''
- switch (encoding || 'utf8') {
- case 'hex':
- ret = str.length / 2
- break
- case 'utf8':
- case 'utf-8':
- ret = utf8ToBytes(str).length
- break
- case 'ascii':
- case 'binary':
- case 'raw':
- ret = str.length
- break
- case 'base64':
- ret = base64ToBytes(str).length
- break
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- ret = str.length * 2
- break
- default:
- throw new Error('Unknown encoding')
- }
- return ret
-}
-
-Buffer.concat = function (list, totalLength) {
- assert(isArray(list), 'Usage: Buffer.concat(list, [totalLength])\n' +
- 'list should be an Array.')
-
- if (list.length === 0) {
- return new Buffer(0)
- } else if (list.length === 1) {
- return list[0]
- }
-
- var i
- if (typeof totalLength !== 'number') {
- totalLength = 0
- for (i = 0; i < list.length; i++) {
- totalLength += list[i].length
- }
- }
-
- var buf = new Buffer(totalLength)
- var pos = 0
- for (i = 0; i < list.length; i++) {
- var item = list[i]
- item.copy(buf, pos)
- pos += item.length
- }
- return buf
-}
-
-
-function _hexWrite (buf, string, offset, length) {
- offset = Number(offset) || 0
- var remaining = buf.length - offset
- if (!length) {
- length = remaining
- } else {
- length = Number(length)
- if (length > remaining) {
- length = remaining
- }
- }
-
- var strLen = string.length
- assert(strLen % 2 === 0, 'Invalid hex string')
-
- if (length > strLen / 2) {
- length = strLen / 2
- }
- for (var i = 0; i < length; i++) {
- var byte = parseInt(string.substr(i * 2, 2), 16)
- assert(!isNaN(byte), 'Invalid hex string')
- buf[offset + i] = byte
- }
- Buffer._charsWritten = i * 2
- return i
-}
-
-function _utf8Write (buf, string, offset, length) {
- var charsWritten = Buffer._charsWritten =
- blitBuffer(utf8ToBytes(string), buf, offset, length)
- return charsWritten
-}
-
-function _asciiWrite (buf, string, offset, length) {
- var charsWritten = Buffer._charsWritten =
- blitBuffer(asciiToBytes(string), buf, offset, length)
- return charsWritten
-}
-
-function _binaryWrite (buf, string, offset, length) {
- return _asciiWrite(buf, string, offset, length)
-}
-
-function _base64Write (buf, string, offset, length) {
- var charsWritten = Buffer._charsWritten =
- blitBuffer(base64ToBytes(string), buf, offset, length)
- return charsWritten
-}
-
-function _utf16leWrite (buf, string, offset, length) {
- var charsWritten = Buffer._charsWritten =
- blitBuffer(utf16leToBytes(string), buf, offset, length)
- return charsWritten
-}
-
-Buffer.prototype.write = function (string, offset, length, encoding) {
- if (isFinite(offset)) {
- if (!isFinite(length)) {
- encoding = length
- length = undefined
- }
- } else { // legacy
- var swap = encoding
- encoding = offset
- offset = length
- length = swap
- }
-
- offset = Number(offset) || 0
- var remaining = this.length - offset
- if (!length) {
- length = remaining
- } else {
- length = Number(length)
- if (length > remaining) {
- length = remaining
- }
- }
- encoding = String(encoding || 'utf8').toLowerCase()
-
- var ret
- switch (encoding) {
- case 'hex':
- ret = _hexWrite(this, string, offset, length)
- break
- case 'utf8':
- case 'utf-8':
- ret = _utf8Write(this, string, offset, length)
- break
- case 'ascii':
- ret = _asciiWrite(this, string, offset, length)
- break
- case 'binary':
- ret = _binaryWrite(this, string, offset, length)
- break
- case 'base64':
- ret = _base64Write(this, string, offset, length)
- break
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- ret = _utf16leWrite(this, string, offset, length)
- break
- default:
- throw new Error('Unknown encoding')
- }
- return ret
-}
-
-Buffer.prototype.toString = function (encoding, start, end) {
- var self = this
-
- encoding = String(encoding || 'utf8').toLowerCase()
- start = Number(start) || 0
- end = (end !== undefined)
- ? Number(end)
- : end = self.length
-
- if (end === start)
- return ''
-
- var ret
- switch (encoding) {
- case 'hex':
- ret = _hexSlice(self, start, end)
- break
- case 'utf8':
- case 'utf-8':
- ret = _utf8Slice(self, start, end)
- break
- case 'ascii':
- ret = _asciiSlice(self, start, end)
- break
- case 'binary':
- ret = _binarySlice(self, start, end)
- break
- case 'base64':
- ret = _base64Slice(self, start, end)
- break
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- ret = _utf16leSlice(self, start, end)
- break
- default:
- throw new Error('Unknown encoding')
- }
- return ret
-}
-
-Buffer.prototype.toJSON = function () {
- return {
- type: 'Buffer',
- data: Array.prototype.slice.call(this._arr || this, 0)
- }
-}
-
-Buffer.prototype.copy = function (target, target_start, start, end) {
- var source = this
-
- if (!start) start = 0
- if (!end && end !== 0) end = this.length
- if (!target_start) target_start = 0
-
- if (end === start) return
- if (target.length === 0 || source.length === 0) return
-
- assert(end >= start, 'sourceEnd < sourceStart')
- assert(target_start >= 0 && target_start < target.length,
- 'targetStart out of bounds')
- assert(start >= 0 && start < source.length, 'sourceStart out of bounds')
- assert(end >= 0 && end <= source.length, 'sourceEnd out of bounds')
-
- if (end > this.length)
- end = this.length
- if (target.length - target_start < end - start)
- end = target.length - target_start + start
-
- var len = end - start
-
- if (len < 100 || !Buffer._useTypedArrays) {
- for (var i = 0; i < len; i++)
- target[i + target_start] = this[i + start]
- } else {
- target._set(this.subarray(start, start + len), target_start)
- }
-}
-
-function _base64Slice (buf, start, end) {
- if (start === 0 && end === buf.length) {
- return base64.fromByteArray(buf)
- } else {
- return base64.fromByteArray(buf.slice(start, end))
- }
-}
-
-function _utf8Slice (buf, start, end) {
- var res = ''
- var tmp = ''
- end = Math.min(buf.length, end)
-
- for (var i = start; i < end; i++) {
- if (buf[i] <= 0x7F) {
- res += decodeUtf8Char(tmp) + String.fromCharCode(buf[i])
- tmp = ''
- } else {
- tmp += '%' + buf[i].toString(16)
- }
- }
-
- return res + decodeUtf8Char(tmp)
-}
-
-function _asciiSlice (buf, start, end) {
- var ret = ''
- end = Math.min(buf.length, end)
-
- for (var i = start; i < end; i++)
- ret += String.fromCharCode(buf[i])
- return ret
-}
-
-function _binarySlice (buf, start, end) {
- return _asciiSlice(buf, start, end)
-}
-
-function _hexSlice (buf, start, end) {
- var len = buf.length
-
- if (!start || start < 0) start = 0
- if (!end || end < 0 || end > len) end = len
-
- var out = ''
- for (var i = start; i < end; i++) {
- out += toHex(buf[i])
- }
- return out
-}
-
-function _utf16leSlice (buf, start, end) {
- var bytes = buf.slice(start, end)
- var res = ''
- for (var i = 0; i < bytes.length; i += 2) {
- res += String.fromCharCode(bytes[i] + bytes[i+1] * 256)
- }
- return res
-}
-
-Buffer.prototype.slice = function (start, end) {
- var len = this.length
- start = clamp(start, len, 0)
- end = clamp(end, len, len)
-
- if (Buffer._useTypedArrays) {
- return Buffer._augment(this.subarray(start, end))
- } else {
- var sliceLen = end - start
- var newBuf = new Buffer(sliceLen, undefined, true)
- for (var i = 0; i < sliceLen; i++) {
- newBuf[i] = this[i + start]
- }
- return newBuf
- }
-}
-
-Buffer.prototype.get = function (offset) {
- console.log('.get() is deprecated. Access using array indexes instead.')
- return this.readUInt8(offset)
-}
-
-Buffer.prototype.set = function (v, offset) {
- console.log('.set() is deprecated. Access using array indexes instead.')
- return this.writeUInt8(v, offset)
-}
-
-Buffer.prototype.readUInt8 = function (offset, noAssert) {
- if (!noAssert) {
- assert(offset !== undefined && offset !== null, 'missing offset')
- assert(offset < this.length, 'Trying to read beyond buffer length')
- }
-
- if (offset >= this.length)
- return
-
- return this[offset]
-}
-
-function _readUInt16 (buf, offset, littleEndian, noAssert) {
- if (!noAssert) {
- assert(typeof littleEndian === 'boolean', 'missing or invalid endian')
- assert(offset !== undefined && offset !== null, 'missing offset')
- assert(offset + 1 < buf.length, 'Trying to read beyond buffer length')
- }
-
- var len = buf.length
- if (offset >= len)
- return
-
- var val
- if (littleEndian) {
- val = buf[offset]
- if (offset + 1 < len)
- val |= buf[offset + 1] << 8
- } else {
- val = buf[offset] << 8
- if (offset + 1 < len)
- val |= buf[offset + 1]
- }
- return val
-}
-
-Buffer.prototype.readUInt16LE = function (offset, noAssert) {
- return _readUInt16(this, offset, true, noAssert)
-}
-
-Buffer.prototype.readUInt16BE = function (offset, noAssert) {
- return _readUInt16(this, offset, false, noAssert)
-}
-
-function _readUInt32 (buf, offset, littleEndian, noAssert) {
- if (!noAssert) {
- assert(typeof littleEndian === 'boolean', 'missing or invalid endian')
- assert(offset !== undefined && offset !== null, 'missing offset')
- assert(offset + 3 < buf.length, 'Trying to read beyond buffer length')
- }
-
- var len = buf.length
- if (offset >= len)
- return
-
- var val
- if (littleEndian) {
- if (offset + 2 < len)
- val = buf[offset + 2] << 16
- if (offset + 1 < len)
- val |= buf[offset + 1] << 8
- val |= buf[offset]
- if (offset + 3 < len)
- val = val + (buf[offset + 3] << 24 >>> 0)
- } else {
- if (offset + 1 < len)
- val = buf[offset + 1] << 16
- if (offset + 2 < len)
- val |= buf[offset + 2] << 8
- if (offset + 3 < len)
- val |= buf[offset + 3]
- val = val + (buf[offset] << 24 >>> 0)
- }
- return val
-}
-
-Buffer.prototype.readUInt32LE = function (offset, noAssert) {
- return _readUInt32(this, offset, true, noAssert)
-}
-
-Buffer.prototype.readUInt32BE = function (offset, noAssert) {
- return _readUInt32(this, offset, false, noAssert)
-}
-
-Buffer.prototype.readInt8 = function (offset, noAssert) {
- if (!noAssert) {
- assert(offset !== undefined && offset !== null,
- 'missing offset')
- assert(offset < this.length, 'Trying to read beyond buffer length')
- }
-
- if (offset >= this.length)
- return
-
- var neg = this[offset] & 0x80
- if (neg)
- return (0xff - this[offset] + 1) * -1
- else
- return this[offset]
-}
-
-function _readInt16 (buf, offset, littleEndian, noAssert) {
- if (!noAssert) {
- assert(typeof littleEndian === 'boolean', 'missing or invalid endian')
- assert(offset !== undefined && offset !== null, 'missing offset')
- assert(offset + 1 < buf.length, 'Trying to read beyond buffer length')
- }
-
- var len = buf.length
- if (offset >= len)
- return
-
- var val = _readUInt16(buf, offset, littleEndian, true)
- var neg = val & 0x8000
- if (neg)
- return (0xffff - val + 1) * -1
- else
- return val
-}
-
-Buffer.prototype.readInt16LE = function (offset, noAssert) {
- return _readInt16(this, offset, true, noAssert)
-}
-
-Buffer.prototype.readInt16BE = function (offset, noAssert) {
- return _readInt16(this, offset, false, noAssert)
-}
-
-function _readInt32 (buf, offset, littleEndian, noAssert) {
- if (!noAssert) {
- assert(typeof littleEndian === 'boolean', 'missing or invalid endian')
- assert(offset !== undefined && offset !== null, 'missing offset')
- assert(offset + 3 < buf.length, 'Trying to read beyond buffer length')
- }
-
- var len = buf.length
- if (offset >= len)
- return
-
- var val = _readUInt32(buf, offset, littleEndian, true)
- var neg = val & 0x80000000
- if (neg)
- return (0xffffffff - val + 1) * -1
- else
- return val
-}
-
-Buffer.prototype.readInt32LE = function (offset, noAssert) {
- return _readInt32(this, offset, true, noAssert)
-}
-
-Buffer.prototype.readInt32BE = function (offset, noAssert) {
- return _readInt32(this, offset, false, noAssert)
-}
-
-function _readFloat (buf, offset, littleEndian, noAssert) {
- if (!noAssert) {
- assert(typeof littleEndian === 'boolean', 'missing or invalid endian')
- assert(offset + 3 < buf.length, 'Trying to read beyond buffer length')
- }
-
- return ieee754.read(buf, offset, littleEndian, 23, 4)
-}
-
-Buffer.prototype.readFloatLE = function (offset, noAssert) {
- return _readFloat(this, offset, true, noAssert)
-}
-
-Buffer.prototype.readFloatBE = function (offset, noAssert) {
- return _readFloat(this, offset, false, noAssert)
-}
-
-function _readDouble (buf, offset, littleEndian, noAssert) {
- if (!noAssert) {
- assert(typeof littleEndian === 'boolean', 'missing or invalid endian')
- assert(offset + 7 < buf.length, 'Trying to read beyond buffer length')
- }
-
- return ieee754.read(buf, offset, littleEndian, 52, 8)
-}
-
-Buffer.prototype.readDoubleLE = function (offset, noAssert) {
- return _readDouble(this, offset, true, noAssert)
-}
-
-Buffer.prototype.readDoubleBE = function (offset, noAssert) {
- return _readDouble(this, offset, false, noAssert)
-}
-
-Buffer.prototype.writeUInt8 = function (value, offset, noAssert) {
- if (!noAssert) {
- assert(value !== undefined && value !== null, 'missing value')
- assert(offset !== undefined && offset !== null, 'missing offset')
- assert(offset < this.length, 'trying to write beyond buffer length')
- verifuint(value, 0xff)
- }
-
- if (offset >= this.length) return
-
- this[offset] = value
-}
-
-function _writeUInt16 (buf, value, offset, littleEndian, noAssert) {
- if (!noAssert) {
- assert(value !== undefined && value !== null, 'missing value')
- assert(typeof littleEndian === 'boolean', 'missing or invalid endian')
- assert(offset !== undefined && offset !== null, 'missing offset')
- assert(offset + 1 < buf.length, 'trying to write beyond buffer length')
- verifuint(value, 0xffff)
- }
-
- var len = buf.length
- if (offset >= len)
- return
-
- for (var i = 0, j = Math.min(len - offset, 2); i < j; i++) {
- buf[offset + i] =
- (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
- (littleEndian ? i : 1 - i) * 8
- }
-}
-
-Buffer.prototype.writeUInt16LE = function (value, offset, noAssert) {
- _writeUInt16(this, value, offset, true, noAssert)
-}
-
-Buffer.prototype.writeUInt16BE = function (value, offset, noAssert) {
- _writeUInt16(this, value, offset, false, noAssert)
-}
-
-function _writeUInt32 (buf, value, offset, littleEndian, noAssert) {
- if (!noAssert) {
- assert(value !== undefined && value !== null, 'missing value')
- assert(typeof littleEndian === 'boolean', 'missing or invalid endian')
- assert(offset !== undefined && offset !== null, 'missing offset')
- assert(offset + 3 < buf.length, 'trying to write beyond buffer length')
- verifuint(value, 0xffffffff)
- }
-
- var len = buf.length
- if (offset >= len)
- return
-
- for (var i = 0, j = Math.min(len - offset, 4); i < j; i++) {
- buf[offset + i] =
- (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
- }
-}
-
-Buffer.prototype.writeUInt32LE = function (value, offset, noAssert) {
- _writeUInt32(this, value, offset, true, noAssert)
-}
-
-Buffer.prototype.writeUInt32BE = function (value, offset, noAssert) {
- _writeUInt32(this, value, offset, false, noAssert)
-}
-
-Buffer.prototype.writeInt8 = function (value, offset, noAssert) {
- if (!noAssert) {
- assert(value !== undefined && value !== null, 'missing value')
- assert(offset !== undefined && offset !== null, 'missing offset')
- assert(offset < this.length, 'Trying to write beyond buffer length')
- verifsint(value, 0x7f, -0x80)
- }
-
- if (offset >= this.length)
- return
-
- if (value >= 0)
- this.writeUInt8(value, offset, noAssert)
- else
- this.writeUInt8(0xff + value + 1, offset, noAssert)
-}
-
-function _writeInt16 (buf, value, offset, littleEndian, noAssert) {
- if (!noAssert) {
- assert(value !== undefined && value !== null, 'missing value')
- assert(typeof littleEndian === 'boolean', 'missing or invalid endian')
- assert(offset !== undefined && offset !== null, 'missing offset')
- assert(offset + 1 < buf.length, 'Trying to write beyond buffer length')
- verifsint(value, 0x7fff, -0x8000)
- }
-
- var len = buf.length
- if (offset >= len)
- return
-
- if (value >= 0)
- _writeUInt16(buf, value, offset, littleEndian, noAssert)
- else
- _writeUInt16(buf, 0xffff + value + 1, offset, littleEndian, noAssert)
-}
-
-Buffer.prototype.writeInt16LE = function (value, offset, noAssert) {
- _writeInt16(this, value, offset, true, noAssert)
-}
-
-Buffer.prototype.writeInt16BE = function (value, offset, noAssert) {
- _writeInt16(this, value, offset, false, noAssert)
-}
-
-function _writeInt32 (buf, value, offset, littleEndian, noAssert) {
- if (!noAssert) {
- assert(value !== undefined && value !== null, 'missing value')
- assert(typeof littleEndian === 'boolean', 'missing or invalid endian')
- assert(offset !== undefined && offset !== null, 'missing offset')
- assert(offset + 3 < buf.length, 'Trying to write beyond buffer length')
- verifsint(value, 0x7fffffff, -0x80000000)
- }
-
- var len = buf.length
- if (offset >= len)
- return
-
- if (value >= 0)
- _writeUInt32(buf, value, offset, littleEndian, noAssert)
- else
- _writeUInt32(buf, 0xffffffff + value + 1, offset, littleEndian, noAssert)
-}
-
-Buffer.prototype.writeInt32LE = function (value, offset, noAssert) {
- _writeInt32(this, value, offset, true, noAssert)
-}
-
-Buffer.prototype.writeInt32BE = function (value, offset, noAssert) {
- _writeInt32(this, value, offset, false, noAssert)
-}
-
-function _writeFloat (buf, value, offset, littleEndian, noAssert) {
- if (!noAssert) {
- assert(value !== undefined && value !== null, 'missing value')
- assert(typeof littleEndian === 'boolean', 'missing or invalid endian')
- assert(offset !== undefined && offset !== null, 'missing offset')
- assert(offset + 3 < buf.length, 'Trying to write beyond buffer length')
- verifIEEE754(value, 3.4028234663852886e+38, -3.4028234663852886e+38)
- }
-
- var len = buf.length
- if (offset >= len)
- return
-
- ieee754.write(buf, value, offset, littleEndian, 23, 4)
-}
-
-Buffer.prototype.writeFloatLE = function (value, offset, noAssert) {
- _writeFloat(this, value, offset, true, noAssert)
-}
-
-Buffer.prototype.writeFloatBE = function (value, offset, noAssert) {
- _writeFloat(this, value, offset, false, noAssert)
-}
-
-function _writeDouble (buf, value, offset, littleEndian, noAssert) {
- if (!noAssert) {
- assert(value !== undefined && value !== null, 'missing value')
- assert(typeof littleEndian === 'boolean', 'missing or invalid endian')
- assert(offset !== undefined && offset !== null, 'missing offset')
- assert(offset + 7 < buf.length,
- 'Trying to write beyond buffer length')
- verifIEEE754(value, 1.7976931348623157E+308, -1.7976931348623157E+308)
- }
-
- var len = buf.length
- if (offset >= len)
- return
-
- ieee754.write(buf, value, offset, littleEndian, 52, 8)
-}
-
-Buffer.prototype.writeDoubleLE = function (value, offset, noAssert) {
- _writeDouble(this, value, offset, true, noAssert)
-}
-
-Buffer.prototype.writeDoubleBE = function (value, offset, noAssert) {
- _writeDouble(this, value, offset, false, noAssert)
-}
-
-Buffer.prototype.fill = function (value, start, end) {
- if (!value) value = 0
- if (!start) start = 0
- if (!end) end = this.length
-
- if (typeof value === 'string') {
- value = value.charCodeAt(0)
- }
-
- assert(typeof value === 'number' && !isNaN(value), 'value is not a number')
- assert(end >= start, 'end < start')
-
- if (end === start) return
- if (this.length === 0) return
-
- assert(start >= 0 && start < this.length, 'start out of bounds')
- assert(end >= 0 && end <= this.length, 'end out of bounds')
-
- for (var i = start; i < end; i++) {
- this[i] = value
- }
-}
-
-Buffer.prototype.inspect = function () {
- var out = []
- var len = this.length
- for (var i = 0; i < len; i++) {
- out[i] = toHex(this[i])
- if (i === exports.INSPECT_MAX_BYTES) {
- out[i + 1] = '...'
- break
- }
- }
- return ''
-}
-
-
-Buffer.prototype.toArrayBuffer = function () {
- if (typeof Uint8Array !== 'undefined') {
- if (Buffer._useTypedArrays) {
- return (new Buffer(this)).buffer
- } else {
- var buf = new Uint8Array(this.length)
- for (var i = 0, len = buf.length; i < len; i += 1)
- buf[i] = this[i]
- return buf.buffer
- }
- } else {
- throw new Error('Buffer.toArrayBuffer not supported in this browser')
- }
-}
-
-
-function stringtrim (str) {
- if (str.trim) return str.trim()
- return str.replace(/^\s+|\s+$/g, '')
-}
-
-var BP = Buffer.prototype
-
-
-Buffer._augment = function (arr) {
- arr._isBuffer = true
-
- arr._get = arr.get
- arr._set = arr.set
-
- arr.get = BP.get
- arr.set = BP.set
-
- arr.write = BP.write
- arr.toString = BP.toString
- arr.toLocaleString = BP.toString
- arr.toJSON = BP.toJSON
- arr.copy = BP.copy
- arr.slice = BP.slice
- arr.readUInt8 = BP.readUInt8
- arr.readUInt16LE = BP.readUInt16LE
- arr.readUInt16BE = BP.readUInt16BE
- arr.readUInt32LE = BP.readUInt32LE
- arr.readUInt32BE = BP.readUInt32BE
- arr.readInt8 = BP.readInt8
- arr.readInt16LE = BP.readInt16LE
- arr.readInt16BE = BP.readInt16BE
- arr.readInt32LE = BP.readInt32LE
- arr.readInt32BE = BP.readInt32BE
- arr.readFloatLE = BP.readFloatLE
- arr.readFloatBE = BP.readFloatBE
- arr.readDoubleLE = BP.readDoubleLE
- arr.readDoubleBE = BP.readDoubleBE
- arr.writeUInt8 = BP.writeUInt8
- arr.writeUInt16LE = BP.writeUInt16LE
- arr.writeUInt16BE = BP.writeUInt16BE
- arr.writeUInt32LE = BP.writeUInt32LE
- arr.writeUInt32BE = BP.writeUInt32BE
- arr.writeInt8 = BP.writeInt8
- arr.writeInt16LE = BP.writeInt16LE
- arr.writeInt16BE = BP.writeInt16BE
- arr.writeInt32LE = BP.writeInt32LE
- arr.writeInt32BE = BP.writeInt32BE
- arr.writeFloatLE = BP.writeFloatLE
- arr.writeFloatBE = BP.writeFloatBE
- arr.writeDoubleLE = BP.writeDoubleLE
- arr.writeDoubleBE = BP.writeDoubleBE
- arr.fill = BP.fill
- arr.inspect = BP.inspect
- arr.toArrayBuffer = BP.toArrayBuffer
-
- return arr
-}
-
-function clamp (index, len, defaultValue) {
- if (typeof index !== 'number') return defaultValue
- index = ~~index; // Coerce to integer.
- if (index >= len) return len
- if (index >= 0) return index
- index += len
- if (index >= 0) return index
- return 0
-}
-
-function coerce (length) {
- length = ~~Math.ceil(+length)
- return length < 0 ? 0 : length
-}
-
-function isArray (subject) {
- return (Array.isArray || function (subject) {
- return Object.prototype.toString.call(subject) === '[object Array]'
- })(subject)
-}
-
-function isArrayish (subject) {
- return isArray(subject) || Buffer.isBuffer(subject) ||
- subject && typeof subject === 'object' &&
- typeof subject.length === 'number'
-}
-
-function toHex (n) {
- if (n < 16) return '0' + n.toString(16)
- return n.toString(16)
-}
-
-function utf8ToBytes (str) {
- var byteArray = []
- for (var i = 0; i < str.length; i++) {
- var b = str.charCodeAt(i)
- if (b <= 0x7F)
- byteArray.push(str.charCodeAt(i))
- else {
- var start = i
- if (b >= 0xD800 && b <= 0xDFFF) i++
- var h = encodeURIComponent(str.slice(start, i+1)).substr(1).split('%')
- for (var j = 0; j < h.length; j++)
- byteArray.push(parseInt(h[j], 16))
- }
- }
- return byteArray
-}
-
-function asciiToBytes (str) {
- var byteArray = []
- for (var i = 0; i < str.length; i++) {
- byteArray.push(str.charCodeAt(i) & 0xFF)
- }
- return byteArray
-}
-
-function utf16leToBytes (str) {
- var c, hi, lo
- var byteArray = []
- for (var i = 0; i < str.length; i++) {
- c = str.charCodeAt(i)
- hi = c >> 8
- lo = c % 256
- byteArray.push(lo)
- byteArray.push(hi)
- }
-
- return byteArray
-}
-
-function base64ToBytes (str) {
- return base64.toByteArray(str)
-}
-
-function blitBuffer (src, dst, offset, length) {
- var pos
- for (var i = 0; i < length; i++) {
- if ((i + offset >= dst.length) || (i >= src.length))
- break
- dst[i + offset] = src[i]
- }
- return i
-}
-
-function decodeUtf8Char (str) {
- try {
- return decodeURIComponent(str)
- } catch (err) {
- return String.fromCharCode(0xFFFD) // UTF 8 invalid char
- }
-}
-
-
-function verifuint (value, max) {
- assert(typeof value === 'number', 'cannot write a non-number as a number')
- assert(value >= 0, 'specified a negative value for writing an unsigned value')
- assert(value <= max, 'value is larger than maximum value for type')
- assert(Math.floor(value) === value, 'value has a fractional component')
-}
-
-function verifsint (value, max, min) {
- assert(typeof value === 'number', 'cannot write a non-number as a number')
- assert(value <= max, 'value larger than maximum allowed value')
- assert(value >= min, 'value smaller than minimum allowed value')
- assert(Math.floor(value) === value, 'value has a fractional component')
-}
-
-function verifIEEE754 (value, max, min) {
- assert(typeof value === 'number', 'cannot write a non-number as a number')
- assert(value <= max, 'value larger than maximum allowed value')
- assert(value >= min, 'value smaller than minimum allowed value')
-}
-
-function assert (test, message) {
- if (!test) throw new Error(message || 'Failed assertion')
-}
-
-},{"base64-js":55,"ieee754":56}],55:[function(require,module,exports){
-var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
-
-;(function (exports) {
- 'use strict';
-
- var Arr = (typeof Uint8Array !== 'undefined')
- ? Uint8Array
- : Array
-
- var PLUS = '+'.charCodeAt(0)
- var SLASH = '/'.charCodeAt(0)
- var NUMBER = '0'.charCodeAt(0)
- var LOWER = 'a'.charCodeAt(0)
- var UPPER = 'A'.charCodeAt(0)
- var PLUS_URL_SAFE = '-'.charCodeAt(0)
- var SLASH_URL_SAFE = '_'.charCodeAt(0)
-
- function decode (elt) {
- var code = elt.charCodeAt(0)
- if (code === PLUS ||
- code === PLUS_URL_SAFE)
- return 62 // '+'
- if (code === SLASH ||
- code === SLASH_URL_SAFE)
- return 63 // '/'
- if (code < NUMBER)
- return -1 //no match
- if (code < NUMBER + 10)
- return code - NUMBER + 26 + 26
- if (code < UPPER + 26)
- return code - UPPER
- if (code < LOWER + 26)
- return code - LOWER + 26
- }
-
- function b64ToByteArray (b64) {
- var i, j, l, tmp, placeHolders, arr
-
- if (b64.length % 4 > 0) {
- throw new Error('Invalid string. Length must be a multiple of 4')
- }
-
- var len = b64.length
- placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0
-
- arr = new Arr(b64.length * 3 / 4 - placeHolders)
-
- l = placeHolders > 0 ? b64.length - 4 : b64.length
-
- var L = 0
-
- function push (v) {
- arr[L++] = v
- }
-
- for (i = 0, j = 0; i < l; i += 4, j += 3) {
- tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3))
- push((tmp & 0xFF0000) >> 16)
- push((tmp & 0xFF00) >> 8)
- push(tmp & 0xFF)
- }
-
- if (placeHolders === 2) {
- tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4)
- push(tmp & 0xFF)
- } else if (placeHolders === 1) {
- tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2)
- push((tmp >> 8) & 0xFF)
- push(tmp & 0xFF)
- }
-
- return arr
- }
-
- function uint8ToBase64 (uint8) {
- var i,
- extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes
- output = "",
- temp, length
-
- function encode (num) {
- return lookup.charAt(num)
- }
-
- function tripletToBase64 (num) {
- return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F)
- }
-
- for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) {
- temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])
- output += tripletToBase64(temp)
- }
-
- switch (extraBytes) {
- case 1:
- temp = uint8[uint8.length - 1]
- output += encode(temp >> 2)
- output += encode((temp << 4) & 0x3F)
- output += '=='
- break
- case 2:
- temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1])
- output += encode(temp >> 10)
- output += encode((temp >> 4) & 0x3F)
- output += encode((temp << 2) & 0x3F)
- output += '='
- break
- }
-
- return output
- }
-
- exports.toByteArray = b64ToByteArray
- exports.fromByteArray = uint8ToBase64
-}(typeof exports === 'undefined' ? (this.base64js = {}) : exports))
-
-},{}],56:[function(require,module,exports){
-exports.read = function (buffer, offset, isLE, mLen, nBytes) {
- var e, m
- var eLen = nBytes * 8 - mLen - 1
- var eMax = (1 << eLen) - 1
- var eBias = eMax >> 1
- var nBits = -7
- var i = isLE ? (nBytes - 1) : 0
- var d = isLE ? -1 : 1
- var s = buffer[offset + i]
-
- i += d
-
- e = s & ((1 << (-nBits)) - 1)
- s >>= (-nBits)
- nBits += eLen
- for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
-
- m = e & ((1 << (-nBits)) - 1)
- e >>= (-nBits)
- nBits += mLen
- for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
-
- if (e === 0) {
- e = 1 - eBias
- } else if (e === eMax) {
- return m ? NaN : ((s ? -1 : 1) * Infinity)
- } else {
- m = m + Math.pow(2, mLen)
- e = e - eBias
- }
- return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
-}
-
-exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
- var e, m, c
- var eLen = nBytes * 8 - mLen - 1
- var eMax = (1 << eLen) - 1
- var eBias = eMax >> 1
- var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
- var i = isLE ? 0 : (nBytes - 1)
- var d = isLE ? 1 : -1
- var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
-
- value = Math.abs(value)
-
- if (isNaN(value) || value === Infinity) {
- m = isNaN(value) ? 1 : 0
- e = eMax
- } else {
- e = Math.floor(Math.log(value) / Math.LN2)
- if (value * (c = Math.pow(2, -e)) < 1) {
- e--
- c *= 2
- }
- if (e + eBias >= 1) {
- value += rt / c
- } else {
- value += rt * Math.pow(2, 1 - eBias)
- }
- if (value * c >= 2) {
- e++
- c /= 2
- }
-
- if (e + eBias >= eMax) {
- m = 0
- e = eMax
- } else if (e + eBias >= 1) {
- m = (value * c - 1) * Math.pow(2, mLen)
- e = e + eBias
- } else {
- m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
- e = 0
- }
- }
-
- for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
-
- e = (e << mLen) | m
- eLen += mLen
- for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
-
- buffer[offset + i - d] |= s * 128
-}
-
-},{}],57:[function(require,module,exports){
-var Buffer = require('buffer').Buffer;
-var intSize = 4;
-var zeroBuffer = new Buffer(intSize); zeroBuffer.fill(0);
-var chrsz = 8;
-
-function toArray(buf, bigEndian) {
- if ((buf.length % intSize) !== 0) {
- var len = buf.length + (intSize - (buf.length % intSize));
- buf = Buffer.concat([buf, zeroBuffer], len);
- }
-
- var arr = [];
- var fn = bigEndian ? buf.readInt32BE : buf.readInt32LE;
- for (var i = 0; i < buf.length; i += intSize) {
- arr.push(fn.call(buf, i));
- }
- return arr;
-}
-
-function toBuffer(arr, size, bigEndian) {
- var buf = new Buffer(size);
- var fn = bigEndian ? buf.writeInt32BE : buf.writeInt32LE;
- for (var i = 0; i < arr.length; i++) {
- fn.call(buf, arr[i], i * 4, true);
- }
- return buf;
-}
-
-function hash(buf, fn, hashSize, bigEndian) {
- if (!Buffer.isBuffer(buf)) buf = new Buffer(buf);
- var arr = fn(toArray(buf, bigEndian), buf.length * chrsz);
- return toBuffer(arr, hashSize, bigEndian);
-}
-
-module.exports = { hash: hash };
-
-},{"buffer":54}],58:[function(require,module,exports){
-var Buffer = require('buffer').Buffer
-var sha = require('./sha')
-var sha256 = require('./sha256')
-var rng = require('./rng')
-var md5 = require('./md5')
-
-var algorithms = {
- sha1: sha,
- sha256: sha256,
- md5: md5
-}
-
-var blocksize = 64
-var zeroBuffer = new Buffer(blocksize); zeroBuffer.fill(0)
-function hmac(fn, key, data) {
- if(!Buffer.isBuffer(key)) key = new Buffer(key)
- if(!Buffer.isBuffer(data)) data = new Buffer(data)
-
- if(key.length > blocksize) {
- key = fn(key)
- } else if(key.length < blocksize) {
- key = Buffer.concat([key, zeroBuffer], blocksize)
- }
-
- var ipad = new Buffer(blocksize), opad = new Buffer(blocksize)
- for(var i = 0; i < blocksize; i++) {
- ipad[i] = key[i] ^ 0x36
- opad[i] = key[i] ^ 0x5C
- }
-
- var hash = fn(Buffer.concat([ipad, data]))
- return fn(Buffer.concat([opad, hash]))
-}
-
-function hash(alg, key) {
- alg = alg || 'sha1'
- var fn = algorithms[alg]
- var bufs = []
- var length = 0
- if(!fn) error('algorithm:', alg, 'is not yet supported')
- return {
- update: function (data) {
- if(!Buffer.isBuffer(data)) data = new Buffer(data)
-
- bufs.push(data)
- length += data.length
- return this
- },
- digest: function (enc) {
- var buf = Buffer.concat(bufs)
- var r = key ? hmac(fn, key, buf) : fn(buf)
- bufs = null
- return enc ? r.toString(enc) : r
- }
- }
-}
-
-function error () {
- var m = [].slice.call(arguments).join(' ')
- throw new Error([
- m,
- 'we accept pull requests',
- 'http://github.com/dominictarr/crypto-browserify'
- ].join('\n'))
-}
-
-exports.createHash = function (alg) { return hash(alg) }
-exports.createHmac = function (alg, key) { return hash(alg, key) }
-exports.randomBytes = function(size, callback) {
- if (callback && callback.call) {
- try {
- callback.call(this, undefined, new Buffer(rng(size)))
- } catch (err) { callback(err) }
- } else {
- return new Buffer(rng(size))
- }
-}
-
-function each(a, f) {
- for(var i in a)
- f(a[i], i)
-}
-
-each(['createCredentials'
-, 'createCipher'
-, 'createCipheriv'
-, 'createDecipher'
-, 'createDecipheriv'
-, 'createSign'
-, 'createVerify'
-, 'createDiffieHellman'
-, 'pbkdf2'], function (name) {
- exports[name] = function () {
- error('sorry,', name, 'is not implemented yet')
- }
-})
-
-},{"./md5":59,"./rng":60,"./sha":61,"./sha256":62,"buffer":54}],59:[function(require,module,exports){
-
-
-var helpers = require('./helpers');
-
-
-function md5_vm_test()
-{
- return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72";
-}
-
-
-function core_md5(x, len)
-{
-
- x[len >> 5] |= 0x80 << ((len) % 32);
- x[(((len + 64) >>> 9) << 4) + 14] = len;
-
- var a = 1732584193;
- var b = -271733879;
- var c = -1732584194;
- var d = 271733878;
-
- for(var i = 0; i < x.length; i += 16)
- {
- var olda = a;
- var oldb = b;
- var oldc = c;
- var oldd = d;
-
- a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);
- d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);
- c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);
- b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);
- a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);
- d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);
- c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);
- b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);
- a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);
- d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);
- c = md5_ff(c, d, a, b, x[i+10], 17, -42063);
- b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);
- a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);
- d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);
- c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);
- b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);
-
- a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);
- d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);
- c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);
- b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);
- a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);
- d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);
- c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);
- b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);
- a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);
- d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);
- c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);
- b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);
- a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);
- d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);
- c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);
- b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);
-
- a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);
- d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);
- c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);
- b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);
- a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);
- d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);
- c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);
- b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);
- a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);
- d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);
- c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);
- b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);
- a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);
- d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);
- c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);
- b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);
-
- a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);
- d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);
- c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);
- b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);
- a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);
- d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);
- c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);
- b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);
- a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);
- d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);
- c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);
- b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);
- a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);
- d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);
- c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);
- b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);
-
- a = safe_add(a, olda);
- b = safe_add(b, oldb);
- c = safe_add(c, oldc);
- d = safe_add(d, oldd);
- }
- return Array(a, b, c, d);
-
-}
-
-
-function md5_cmn(q, a, b, x, s, t)
-{
- return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);
-}
-function md5_ff(a, b, c, d, x, s, t)
-{
- return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
-}
-function md5_gg(a, b, c, d, x, s, t)
-{
- return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
-}
-function md5_hh(a, b, c, d, x, s, t)
-{
- return md5_cmn(b ^ c ^ d, a, b, x, s, t);
-}
-function md5_ii(a, b, c, d, x, s, t)
-{
- return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
-}
-
-
-function safe_add(x, y)
-{
- var lsw = (x & 0xFFFF) + (y & 0xFFFF);
- var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
- return (msw << 16) | (lsw & 0xFFFF);
-}
-
-
-function bit_rol(num, cnt)
-{
- return (num << cnt) | (num >>> (32 - cnt));
-}
-
-module.exports = function md5(buf) {
- return helpers.hash(buf, core_md5, 16);
-};
-
-},{"./helpers":57}],60:[function(require,module,exports){
-(function() {
- var _global = this;
-
- var mathRNG, whatwgRNG;
-
- mathRNG = function(size) {
- var bytes = new Array(size);
- var r;
-
- for (var i = 0, r; i < size; i++) {
- if ((i & 0x03) == 0) r = Math.random() * 0x100000000;
- bytes[i] = r >>> ((i & 0x03) << 3) & 0xff;
- }
-
- return bytes;
- }
-
- if (_global.crypto && crypto.getRandomValues) {
- whatwgRNG = function(size) {
- var bytes = new Uint8Array(size);
- crypto.getRandomValues(bytes);
- return bytes;
- }
- }
-
- module.exports = whatwgRNG || mathRNG;
-
-}())
-
-},{}],61:[function(require,module,exports){
-
-
-var helpers = require('./helpers');
-
-
-function core_sha1(x, len)
-{
-
- x[len >> 5] |= 0x80 << (24 - len % 32);
- x[((len + 64 >> 9) << 4) + 15] = len;
-
- var w = Array(80);
- var a = 1732584193;
- var b = -271733879;
- var c = -1732584194;
- var d = 271733878;
- var e = -1009589776;
-
- for(var i = 0; i < x.length; i += 16)
- {
- var olda = a;
- var oldb = b;
- var oldc = c;
- var oldd = d;
- var olde = e;
-
- for(var j = 0; j < 80; j++)
- {
- if(j < 16) w[j] = x[i + j];
- else w[j] = rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1);
- var t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)),
- safe_add(safe_add(e, w[j]), sha1_kt(j)));
- e = d;
- d = c;
- c = rol(b, 30);
- b = a;
- a = t;
- }
-
- a = safe_add(a, olda);
- b = safe_add(b, oldb);
- c = safe_add(c, oldc);
- d = safe_add(d, oldd);
- e = safe_add(e, olde);
- }
- return Array(a, b, c, d, e);
-
-}
-
-
-function sha1_ft(t, b, c, d)
-{
- if(t < 20) return (b & c) | ((~b) & d);
- if(t < 40) return b ^ c ^ d;
- if(t < 60) return (b & c) | (b & d) | (c & d);
- return b ^ c ^ d;
-}
-
-
-function sha1_kt(t)
-{
- return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 :
- (t < 60) ? -1894007588 : -899497514;
-}
-
-
-function safe_add(x, y)
-{
- var lsw = (x & 0xFFFF) + (y & 0xFFFF);
- var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
- return (msw << 16) | (lsw & 0xFFFF);
-}
-
-
-function rol(num, cnt)
-{
- return (num << cnt) | (num >>> (32 - cnt));
-}
-
-module.exports = function sha1(buf) {
- return helpers.hash(buf, core_sha1, 20, true);
-};
-
-},{"./helpers":57}],62:[function(require,module,exports){
-
-
-
-var helpers = require('./helpers');
-
-var safe_add = function(x, y) {
- var lsw = (x & 0xFFFF) + (y & 0xFFFF);
- var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
- return (msw << 16) | (lsw & 0xFFFF);
-};
-
-var S = function(X, n) {
- return (X >>> n) | (X << (32 - n));
-};
-
-var R = function(X, n) {
- return (X >>> n);
-};
-
-var Ch = function(x, y, z) {
- return ((x & y) ^ ((~x) & z));
-};
-
-var Maj = function(x, y, z) {
- return ((x & y) ^ (x & z) ^ (y & z));
-};
-
-var Sigma0256 = function(x) {
- return (S(x, 2) ^ S(x, 13) ^ S(x, 22));
-};
-
-var Sigma1256 = function(x) {
- return (S(x, 6) ^ S(x, 11) ^ S(x, 25));
-};
-
-var Gamma0256 = function(x) {
- return (S(x, 7) ^ S(x, 18) ^ R(x, 3));
-};
-
-var Gamma1256 = function(x) {
- return (S(x, 17) ^ S(x, 19) ^ R(x, 10));
-};
-
-var core_sha256 = function(m, l) {
- var K = new Array(0x428A2F98,0x71374491,0xB5C0FBCF,0xE9B5DBA5,0x3956C25B,0x59F111F1,0x923F82A4,0xAB1C5ED5,0xD807AA98,0x12835B01,0x243185BE,0x550C7DC3,0x72BE5D74,0x80DEB1FE,0x9BDC06A7,0xC19BF174,0xE49B69C1,0xEFBE4786,0xFC19DC6,0x240CA1CC,0x2DE92C6F,0x4A7484AA,0x5CB0A9DC,0x76F988DA,0x983E5152,0xA831C66D,0xB00327C8,0xBF597FC7,0xC6E00BF3,0xD5A79147,0x6CA6351,0x14292967,0x27B70A85,0x2E1B2138,0x4D2C6DFC,0x53380D13,0x650A7354,0x766A0ABB,0x81C2C92E,0x92722C85,0xA2BFE8A1,0xA81A664B,0xC24B8B70,0xC76C51A3,0xD192E819,0xD6990624,0xF40E3585,0x106AA070,0x19A4C116,0x1E376C08,0x2748774C,0x34B0BCB5,0x391C0CB3,0x4ED8AA4A,0x5B9CCA4F,0x682E6FF3,0x748F82EE,0x78A5636F,0x84C87814,0x8CC70208,0x90BEFFFA,0xA4506CEB,0xBEF9A3F7,0xC67178F2);
- var HASH = new Array(0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19);
- var W = new Array(64);
- var a, b, c, d, e, f, g, h, i, j;
- var T1, T2;
-
- m[l >> 5] |= 0x80 << (24 - l % 32);
- m[((l + 64 >> 9) << 4) + 15] = l;
- for (var i = 0; i < m.length; i += 16) {
- a = HASH[0]; b = HASH[1]; c = HASH[2]; d = HASH[3]; e = HASH[4]; f = HASH[5]; g = HASH[6]; h = HASH[7];
- for (var j = 0; j < 64; j++) {
- if (j < 16) {
- W[j] = m[j + i];
- } else {
- W[j] = safe_add(safe_add(safe_add(Gamma1256(W[j - 2]), W[j - 7]), Gamma0256(W[j - 15])), W[j - 16]);
- }
- T1 = safe_add(safe_add(safe_add(safe_add(h, Sigma1256(e)), Ch(e, f, g)), K[j]), W[j]);
- T2 = safe_add(Sigma0256(a), Maj(a, b, c));
- h = g; g = f; f = e; e = safe_add(d, T1); d = c; c = b; b = a; a = safe_add(T1, T2);
- }
- HASH[0] = safe_add(a, HASH[0]); HASH[1] = safe_add(b, HASH[1]); HASH[2] = safe_add(c, HASH[2]); HASH[3] = safe_add(d, HASH[3]);
- HASH[4] = safe_add(e, HASH[4]); HASH[5] = safe_add(f, HASH[5]); HASH[6] = safe_add(g, HASH[6]); HASH[7] = safe_add(h, HASH[7]);
- }
- return HASH;
-};
-
-module.exports = function sha256(buf) {
- return helpers.hash(buf, core_sha256, 32, true);
-};
-
-},{"./helpers":57}],63:[function(require,module,exports){
-
-function EventEmitter() {
- this._events = this._events || {};
- this._maxListeners = this._maxListeners || undefined;
-}
-module.exports = EventEmitter;
-
-EventEmitter.EventEmitter = EventEmitter;
-
-EventEmitter.prototype._events = undefined;
-EventEmitter.prototype._maxListeners = undefined;
-
-EventEmitter.defaultMaxListeners = 10;
-
-EventEmitter.prototype.setMaxListeners = function(n) {
- if (!isNumber(n) || n < 0 || isNaN(n))
- throw TypeError('n must be a positive number');
- this._maxListeners = n;
- return this;
-};
-
-EventEmitter.prototype.emit = function(type) {
- var er, handler, len, args, i, listeners;
-
- if (!this._events)
- this._events = {};
-
- if (type === 'error') {
- if (!this._events.error ||
- (isObject(this._events.error) && !this._events.error.length)) {
- er = arguments[1];
- if (er instanceof Error) {
- throw er; // Unhandled 'error' event
- }
- throw TypeError('Uncaught, unspecified "error" event.');
- }
- }
-
- handler = this._events[type];
-
- if (isUndefined(handler))
- return false;
-
- if (isFunction(handler)) {
- switch (arguments.length) {
- case 1:
- handler.call(this);
- break;
- case 2:
- handler.call(this, arguments[1]);
- break;
- case 3:
- handler.call(this, arguments[1], arguments[2]);
- break;
- default:
- len = arguments.length;
- args = new Array(len - 1);
- for (i = 1; i < len; i++)
- args[i - 1] = arguments[i];
- handler.apply(this, args);
- }
- } else if (isObject(handler)) {
- len = arguments.length;
- args = new Array(len - 1);
- for (i = 1; i < len; i++)
- args[i - 1] = arguments[i];
-
- listeners = handler.slice();
- len = listeners.length;
- for (i = 0; i < len; i++)
- listeners[i].apply(this, args);
- }
-
- return true;
-};
-
-EventEmitter.prototype.addListener = function(type, listener) {
- var m;
-
- if (!isFunction(listener))
- throw TypeError('listener must be a function');
-
- if (!this._events)
- this._events = {};
-
- if (this._events.newListener)
- this.emit('newListener', type,
- isFunction(listener.listener) ?
- listener.listener : listener);
-
- if (!this._events[type])
- this._events[type] = listener;
- else if (isObject(this._events[type]))
- this._events[type].push(listener);
- else
- this._events[type] = [this._events[type], listener];
-
- if (isObject(this._events[type]) && !this._events[type].warned) {
- var m;
- if (!isUndefined(this._maxListeners)) {
- m = this._maxListeners;
- } else {
- m = EventEmitter.defaultMaxListeners;
- }
-
- if (m && m > 0 && this._events[type].length > m) {
- this._events[type].warned = true;
- console.error('(node) warning: possible EventEmitter memory ' +
- 'leak detected. %d listeners added. ' +
- 'Use emitter.setMaxListeners() to increase limit.',
- this._events[type].length);
- if (typeof console.trace === 'function') {
- console.trace();
- }
- }
- }
-
- return this;
-};
-
-EventEmitter.prototype.on = EventEmitter.prototype.addListener;
-
-EventEmitter.prototype.once = function(type, listener) {
- if (!isFunction(listener))
- throw TypeError('listener must be a function');
-
- var fired = false;
-
- function g() {
- this.removeListener(type, g);
-
- if (!fired) {
- fired = true;
- listener.apply(this, arguments);
- }
- }
-
- g.listener = listener;
- this.on(type, g);
-
- return this;
-};
-
-EventEmitter.prototype.removeListener = function(type, listener) {
- var list, position, length, i;
-
- if (!isFunction(listener))
- throw TypeError('listener must be a function');
-
- if (!this._events || !this._events[type])
- return this;
-
- list = this._events[type];
- length = list.length;
- position = -1;
-
- if (list === listener ||
- (isFunction(list.listener) && list.listener === listener)) {
- delete this._events[type];
- if (this._events.removeListener)
- this.emit('removeListener', type, listener);
-
- } else if (isObject(list)) {
- for (i = length; i-- > 0;) {
- if (list[i] === listener ||
- (list[i].listener && list[i].listener === listener)) {
- position = i;
- break;
- }
- }
-
- if (position < 0)
- return this;
-
- if (list.length === 1) {
- list.length = 0;
- delete this._events[type];
- } else {
- list.splice(position, 1);
- }
-
- if (this._events.removeListener)
- this.emit('removeListener', type, listener);
- }
-
- return this;
-};
-
-EventEmitter.prototype.removeAllListeners = function(type) {
- var key, listeners;
-
- if (!this._events)
- return this;
-
- if (!this._events.removeListener) {
- if (arguments.length === 0)
- this._events = {};
- else if (this._events[type])
- delete this._events[type];
- return this;
- }
-
- if (arguments.length === 0) {
- for (key in this._events) {
- if (key === 'removeListener') continue;
- this.removeAllListeners(key);
- }
- this.removeAllListeners('removeListener');
- this._events = {};
- return this;
- }
-
- listeners = this._events[type];
-
- if (isFunction(listeners)) {
- this.removeListener(type, listeners);
- } else {
- while (listeners.length)
- this.removeListener(type, listeners[listeners.length - 1]);
- }
- delete this._events[type];
-
- return this;
-};
-
-EventEmitter.prototype.listeners = function(type) {
- var ret;
- if (!this._events || !this._events[type])
- ret = [];
- else if (isFunction(this._events[type]))
- ret = [this._events[type]];
- else
- ret = this._events[type].slice();
- return ret;
-};
-
-EventEmitter.listenerCount = function(emitter, type) {
- var ret;
- if (!emitter._events || !emitter._events[type])
- ret = 0;
- else if (isFunction(emitter._events[type]))
- ret = 1;
- else
- ret = emitter._events[type].length;
- return ret;
-};
-
-function isFunction(arg) {
- return typeof arg === 'function';
-}
-
-function isNumber(arg) {
- return typeof arg === 'number';
-}
-
-function isObject(arg) {
- return typeof arg === 'object' && arg !== null;
-}
-
-function isUndefined(arg) {
- return arg === void 0;
-}
-
-},{}],64:[function(require,module,exports){
-if (typeof Object.create === 'function') {
- module.exports = function inherits(ctor, superCtor) {
- ctor.super_ = superCtor
- ctor.prototype = Object.create(superCtor.prototype, {
- constructor: {
- value: ctor,
- enumerable: false,
- writable: true,
- configurable: true
- }
- });
- };
-} else {
- module.exports = function inherits(ctor, superCtor) {
- ctor.super_ = superCtor
- var TempCtor = function () {}
- TempCtor.prototype = superCtor.prototype
- ctor.prototype = new TempCtor()
- ctor.prototype.constructor = ctor
- }
-}
-
-},{}],65:[function(require,module,exports){
-
-var process = module.exports = {};
-
-process.nextTick = (function () {
- var canSetImmediate = typeof window !== 'undefined'
- && window.setImmediate;
- var canPost = typeof window !== 'undefined'
- && window.postMessage && window.addEventListener
- ;
-
- if (canSetImmediate) {
- return function (f) { return window.setImmediate(f) };
- }
-
- if (canPost) {
- var queue = [];
- window.addEventListener('message', function (ev) {
- var source = ev.source;
- if ((source === window || source === null) && ev.data === 'process-tick') {
- ev.stopPropagation();
- if (queue.length > 0) {
- var fn = queue.shift();
- fn();
- }
- }
- }, true);
-
- return function nextTick(fn) {
- queue.push(fn);
- window.postMessage('process-tick', '*');
- };
- }
-
- return function nextTick(fn) {
- setTimeout(fn, 0);
- };
-})();
-
-process.title = 'browser';
-process.browser = true;
-process.env = {};
-process.argv = [];
-
-function noop() {}
-
-process.on = noop;
-process.addListener = noop;
-process.once = noop;
-process.off = noop;
-process.removeListener = noop;
-process.removeAllListeners = noop;
-process.emit = noop;
-
-process.binding = function (name) {
- throw new Error('process.binding is not supported');
-}
-
-process.cwd = function () { return '/' };
-process.chdir = function (dir) {
- throw new Error('process.chdir is not supported');
-};
-
-},{}],66:[function(require,module,exports){
-(function (global){
-
-;(function(root) {
-
-
- var freeExports = typeof exports == 'object' && exports;
- var freeModule = typeof module == 'object' && module &&
- module.exports == freeExports && module;
- var freeGlobal = typeof global == 'object' && global;
- if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
- root = freeGlobal;
- }
-
-
- var punycode,
-
-
- maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
-
-
- base = 36,
- tMin = 1,
- tMax = 26,
- skew = 38,
- damp = 700,
- initialBias = 72,
- initialN = 128, // 0x80
- delimiter = '-', // '\x2D'
-
-
- regexPunycode = /^xn--/,
- regexNonASCII = /[^ -~]/, // unprintable ASCII chars + non-ASCII chars
- regexSeparators = /\x2E|\u3002|\uFF0E|\uFF61/g, // RFC 3490 separators
-
-
- errors = {
- 'overflow': 'Overflow: input needs wider integers to process',
- 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
- 'invalid-input': 'Invalid input'
- },
-
-
- baseMinusTMin = base - tMin,
- floor = Math.floor,
- stringFromCharCode = String.fromCharCode,
-
-
- key;
-
-
-
-
- function error(type) {
- throw RangeError(errors[type]);
- }
-
-
- function map(array, fn) {
- var length = array.length;
- while (length--) {
- array[length] = fn(array[length]);
- }
- return array;
- }
-
-
- function mapDomain(string, fn) {
- return map(string.split(regexSeparators), fn).join('.');
- }
-
-
- function ucs2decode(string) {
- var output = [],
- counter = 0,
- length = string.length,
- value,
- extra;
- while (counter < length) {
- value = string.charCodeAt(counter++);
- if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
- extra = string.charCodeAt(counter++);
- if ((extra & 0xFC00) == 0xDC00) { // low surrogate
- output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
- } else {
- output.push(value);
- counter--;
- }
- } else {
- output.push(value);
- }
- }
- return output;
- }
-
-
- function ucs2encode(array) {
- return map(array, function(value) {
- var output = '';
- if (value > 0xFFFF) {
- value -= 0x10000;
- output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
- value = 0xDC00 | value & 0x3FF;
- }
- output += stringFromCharCode(value);
- return output;
- }).join('');
- }
-
-
- function basicToDigit(codePoint) {
- if (codePoint - 48 < 10) {
- return codePoint - 22;
- }
- if (codePoint - 65 < 26) {
- return codePoint - 65;
- }
- if (codePoint - 97 < 26) {
- return codePoint - 97;
- }
- return base;
- }
-
-
- function digitToBasic(digit, flag) {
- return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
- }
-
-
- function adapt(delta, numPoints, firstTime) {
- var k = 0;
- delta = firstTime ? floor(delta / damp) : delta >> 1;
- delta += floor(delta / numPoints);
- for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
- delta = floor(delta / baseMinusTMin);
- }
- return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
- }
-
-
- function decode(input) {
- var output = [],
- inputLength = input.length,
- out,
- i = 0,
- n = initialN,
- bias = initialBias,
- basic,
- j,
- index,
- oldi,
- w,
- k,
- digit,
- t,
-
- baseMinusT;
-
-
- basic = input.lastIndexOf(delimiter);
- if (basic < 0) {
- basic = 0;
- }
-
- for (j = 0; j < basic; ++j) {
- if (input.charCodeAt(j) >= 0x80) {
- error('not-basic');
- }
- output.push(input.charCodeAt(j));
- }
-
-
- for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
-
- for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
-
- if (index >= inputLength) {
- error('invalid-input');
- }
-
- digit = basicToDigit(input.charCodeAt(index++));
-
- if (digit >= base || digit > floor((maxInt - i) / w)) {
- error('overflow');
- }
-
- i += digit * w;
- t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
-
- if (digit < t) {
- break;
- }
-
- baseMinusT = base - t;
- if (w > floor(maxInt / baseMinusT)) {
- error('overflow');
- }
-
- w *= baseMinusT;
-
- }
-
- out = output.length + 1;
- bias = adapt(i - oldi, out, oldi == 0);
-
- if (floor(i / out) > maxInt - n) {
- error('overflow');
- }
-
- n += floor(i / out);
- i %= out;
-
- output.splice(i++, 0, n);
-
- }
-
- return ucs2encode(output);
- }
-
-
- function encode(input) {
- var n,
- delta,
- handledCPCount,
- basicLength,
- bias,
- j,
- m,
- q,
- k,
- t,
- currentValue,
- output = [],
-
- inputLength,
-
- handledCPCountPlusOne,
- baseMinusT,
- qMinusT;
-
- input = ucs2decode(input);
-
- inputLength = input.length;
-
- n = initialN;
- delta = 0;
- bias = initialBias;
-
- for (j = 0; j < inputLength; ++j) {
- currentValue = input[j];
- if (currentValue < 0x80) {
- output.push(stringFromCharCode(currentValue));
- }
- }
-
- handledCPCount = basicLength = output.length;
-
-
- if (basicLength) {
- output.push(delimiter);
- }
-
- while (handledCPCount < inputLength) {
-
- for (m = maxInt, j = 0; j < inputLength; ++j) {
- currentValue = input[j];
- if (currentValue >= n && currentValue < m) {
- m = currentValue;
- }
- }
-
- handledCPCountPlusOne = handledCPCount + 1;
- if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
- error('overflow');
- }
-
- delta += (m - n) * handledCPCountPlusOne;
- n = m;
-
- for (j = 0; j < inputLength; ++j) {
- currentValue = input[j];
-
- if (currentValue < n && ++delta > maxInt) {
- error('overflow');
- }
-
- if (currentValue == n) {
- for (q = delta, k = base; /* no condition */; k += base) {
- t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
- if (q < t) {
- break;
- }
- qMinusT = q - t;
- baseMinusT = base - t;
- output.push(
- stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
- );
- q = floor(qMinusT / baseMinusT);
- }
-
- output.push(stringFromCharCode(digitToBasic(q, 0)));
- bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
- delta = 0;
- ++handledCPCount;
- }
- }
-
- ++delta;
- ++n;
-
- }
- return output.join('');
- }
-
-
- function toUnicode(domain) {
- return mapDomain(domain, function(string) {
- return regexPunycode.test(string)
- ? decode(string.slice(4).toLowerCase())
- : string;
- });
- }
-
-
- function toASCII(domain) {
- return mapDomain(domain, function(string) {
- return regexNonASCII.test(string)
- ? 'xn--' + encode(string)
- : string;
- });
- }
-
-
-
-
- punycode = {
-
- 'version': '1.2.4',
-
- 'ucs2': {
- 'decode': ucs2decode,
- 'encode': ucs2encode
- },
- 'decode': decode,
- 'encode': encode,
- 'toASCII': toASCII,
- 'toUnicode': toUnicode
- };
-
-
- if (
- typeof define == 'function' &&
- typeof define.amd == 'object' &&
- define.amd
- ) {
- define('punycode', function() {
- return punycode;
- });
- } else if (freeExports && !freeExports.nodeType) {
- if (freeModule) { // in Node.js or RingoJS v0.8.0+
- freeModule.exports = punycode;
- } else { // in Narwhal or RingoJS v0.7.0-
- for (key in punycode) {
- punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
- }
- }
- } else { // in Rhino or a web browser
- root.punycode = punycode;
- }
-
-}(this));
-
-}).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{}],67:[function(require,module,exports){
-
-'use strict';
-
-function hasOwnProperty(obj, prop) {
- return Object.prototype.hasOwnProperty.call(obj, prop);
-}
-
-module.exports = function(qs, sep, eq, options) {
- sep = sep || '&';
- eq = eq || '=';
- var obj = {};
-
- if (typeof qs !== 'string' || qs.length === 0) {
- return obj;
- }
-
- var regexp = /\+/g;
- qs = qs.split(sep);
-
- var maxKeys = 1000;
- if (options && typeof options.maxKeys === 'number') {
- maxKeys = options.maxKeys;
- }
-
- var len = qs.length;
- if (maxKeys > 0 && len > maxKeys) {
- len = maxKeys;
- }
-
- for (var i = 0; i < len; ++i) {
- var x = qs[i].replace(regexp, '%20'),
- idx = x.indexOf(eq),
- kstr, vstr, k, v;
-
- if (idx >= 0) {
- kstr = x.substr(0, idx);
- vstr = x.substr(idx + 1);
- } else {
- kstr = x;
- vstr = '';
- }
-
- k = decodeURIComponent(kstr);
- v = decodeURIComponent(vstr);
-
- if (!hasOwnProperty(obj, k)) {
- obj[k] = v;
- } else if (isArray(obj[k])) {
- obj[k].push(v);
- } else {
- obj[k] = [obj[k], v];
- }
- }
-
- return obj;
-};
-
-var isArray = Array.isArray || function (xs) {
- return Object.prototype.toString.call(xs) === '[object Array]';
-};
-
-},{}],68:[function(require,module,exports){
-
-'use strict';
-
-var stringifyPrimitive = function(v) {
- switch (typeof v) {
- case 'string':
- return v;
-
- case 'boolean':
- return v ? 'true' : 'false';
-
- case 'number':
- return isFinite(v) ? v : '';
-
- default:
- return '';
- }
-};
-
-module.exports = function(obj, sep, eq, name) {
- sep = sep || '&';
- eq = eq || '=';
- if (obj === null) {
- obj = undefined;
- }
-
- if (typeof obj === 'object') {
- return map(objectKeys(obj), function(k) {
- var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;
- if (isArray(obj[k])) {
- return obj[k].map(function(v) {
- return ks + encodeURIComponent(stringifyPrimitive(v));
- }).join(sep);
- } else {
- return ks + encodeURIComponent(stringifyPrimitive(obj[k]));
- }
- }).join(sep);
-
- }
-
- if (!name) return '';
- return encodeURIComponent(stringifyPrimitive(name)) + eq +
- encodeURIComponent(stringifyPrimitive(obj));
-};
-
-var isArray = Array.isArray || function (xs) {
- return Object.prototype.toString.call(xs) === '[object Array]';
-};
-
-function map (xs, f) {
- if (xs.map) return xs.map(f);
- var res = [];
- for (var i = 0; i < xs.length; i++) {
- res.push(f(xs[i], i));
- }
- return res;
-}
-
-var objectKeys = Object.keys || function (obj) {
- var res = [];
- for (var key in obj) {
- if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);
- }
- return res;
-};
-
-},{}],69:[function(require,module,exports){
-'use strict';
-
-exports.decode = exports.parse = require('./decode');
-exports.encode = exports.stringify = require('./encode');
-
-},{"./decode":67,"./encode":68}],70:[function(require,module,exports){
-
-var punycode = require('punycode');
-
-exports.parse = urlParse;
-exports.resolve = urlResolve;
-exports.resolveObject = urlResolveObject;
-exports.format = urlFormat;
-
-exports.Url = Url;
-
-function Url() {
- this.protocol = null;
- this.slashes = null;
- this.auth = null;
- this.host = null;
- this.port = null;
- this.hostname = null;
- this.hash = null;
- this.search = null;
- this.query = null;
- this.pathname = null;
- this.path = null;
- this.href = null;
-}
-
-
-var protocolPattern = /^([a-z0-9.+-]+:)/i,
- portPattern = /:[0-9]*$/,
-
- delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'],
-
- unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims),
-
- autoEscape = ['\''].concat(unwise),
- nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),
- hostEndingChars = ['/', '?', '#'],
- hostnameMaxLen = 255,
- hostnamePartPattern = /^[a-z0-9A-Z_-]{0,63}$/,
- hostnamePartStart = /^([a-z0-9A-Z_-]{0,63})(.*)$/,
- unsafeProtocol = {
- 'javascript': true,
- 'javascript:': true
- },
- hostlessProtocol = {
- 'javascript': true,
- 'javascript:': true
- },
- slashedProtocol = {
- 'http': true,
- 'https': true,
- 'ftp': true,
- 'gopher': true,
- 'file': true,
- 'http:': true,
- 'https:': true,
- 'ftp:': true,
- 'gopher:': true,
- 'file:': true
- },
- querystring = require('querystring');
-
-function urlParse(url, parseQueryString, slashesDenoteHost) {
- if (url && isObject(url) && url instanceof Url) return url;
-
- var u = new Url;
- u.parse(url, parseQueryString, slashesDenoteHost);
- return u;
-}
-
-Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {
- if (!isString(url)) {
- throw new TypeError("Parameter 'url' must be a string, not " + typeof url);
- }
-
- var rest = url;
-
- rest = rest.trim();
-
- var proto = protocolPattern.exec(rest);
- if (proto) {
- proto = proto[0];
- var lowerProto = proto.toLowerCase();
- this.protocol = lowerProto;
- rest = rest.substr(proto.length);
- }
-
- if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) {
- var slashes = rest.substr(0, 2) === '//';
- if (slashes && !(proto && hostlessProtocol[proto])) {
- rest = rest.substr(2);
- this.slashes = true;
- }
- }
-
- if (!hostlessProtocol[proto] &&
- (slashes || (proto && !slashedProtocol[proto]))) {
-
-
-
- var hostEnd = -1;
- for (var i = 0; i < hostEndingChars.length; i++) {
- var hec = rest.indexOf(hostEndingChars[i]);
- if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))
- hostEnd = hec;
- }
-
- var auth, atSign;
- if (hostEnd === -1) {
- atSign = rest.lastIndexOf('@');
- } else {
- atSign = rest.lastIndexOf('@', hostEnd);
- }
-
- if (atSign !== -1) {
- auth = rest.slice(0, atSign);
- rest = rest.slice(atSign + 1);
- this.auth = decodeURIComponent(auth);
- }
-
- hostEnd = -1;
- for (var i = 0; i < nonHostChars.length; i++) {
- var hec = rest.indexOf(nonHostChars[i]);
- if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))
- hostEnd = hec;
- }
- if (hostEnd === -1)
- hostEnd = rest.length;
-
- this.host = rest.slice(0, hostEnd);
- rest = rest.slice(hostEnd);
-
- this.parseHost();
-
- this.hostname = this.hostname || '';
-
- var ipv6Hostname = this.hostname[0] === '[' &&
- this.hostname[this.hostname.length - 1] === ']';
-
- if (!ipv6Hostname) {
- var hostparts = this.hostname.split(/\./);
- for (var i = 0, l = hostparts.length; i < l; i++) {
- var part = hostparts[i];
- if (!part) continue;
- if (!part.match(hostnamePartPattern)) {
- var newpart = '';
- for (var j = 0, k = part.length; j < k; j++) {
- if (part.charCodeAt(j) > 127) {
- newpart += 'x';
- } else {
- newpart += part[j];
- }
- }
- if (!newpart.match(hostnamePartPattern)) {
- var validParts = hostparts.slice(0, i);
- var notHost = hostparts.slice(i + 1);
- var bit = part.match(hostnamePartStart);
- if (bit) {
- validParts.push(bit[1]);
- notHost.unshift(bit[2]);
- }
- if (notHost.length) {
- rest = '/' + notHost.join('.') + rest;
- }
- this.hostname = validParts.join('.');
- break;
- }
- }
- }
- }
-
- if (this.hostname.length > hostnameMaxLen) {
- this.hostname = '';
- } else {
- this.hostname = this.hostname.toLowerCase();
- }
-
- if (!ipv6Hostname) {
- var domainArray = this.hostname.split('.');
- var newOut = [];
- for (var i = 0; i < domainArray.length; ++i) {
- var s = domainArray[i];
- newOut.push(s.match(/[^A-Za-z0-9_-]/) ?
- 'xn--' + punycode.encode(s) : s);
- }
- this.hostname = newOut.join('.');
- }
-
- var p = this.port ? ':' + this.port : '';
- var h = this.hostname || '';
- this.host = h + p;
- this.href += this.host;
-
- if (ipv6Hostname) {
- this.hostname = this.hostname.substr(1, this.hostname.length - 2);
- if (rest[0] !== '/') {
- rest = '/' + rest;
- }
- }
- }
-
- if (!unsafeProtocol[lowerProto]) {
-
- for (var i = 0, l = autoEscape.length; i < l; i++) {
- var ae = autoEscape[i];
- var esc = encodeURIComponent(ae);
- if (esc === ae) {
- esc = escape(ae);
- }
- rest = rest.split(ae).join(esc);
- }
- }
-
-
- var hash = rest.indexOf('#');
- if (hash !== -1) {
- this.hash = rest.substr(hash);
- rest = rest.slice(0, hash);
- }
- var qm = rest.indexOf('?');
- if (qm !== -1) {
- this.search = rest.substr(qm);
- this.query = rest.substr(qm + 1);
- if (parseQueryString) {
- this.query = querystring.parse(this.query);
- }
- rest = rest.slice(0, qm);
- } else if (parseQueryString) {
- this.search = '';
- this.query = {};
- }
- if (rest) this.pathname = rest;
- if (slashedProtocol[lowerProto] &&
- this.hostname && !this.pathname) {
- this.pathname = '/';
- }
-
- if (this.pathname || this.search) {
- var p = this.pathname || '';
- var s = this.search || '';
- this.path = p + s;
- }
-
- this.href = this.format();
- return this;
-};
-
-function urlFormat(obj) {
- if (isString(obj)) obj = urlParse(obj);
- if (!(obj instanceof Url)) return Url.prototype.format.call(obj);
- return obj.format();
-}
-
-Url.prototype.format = function() {
- var auth = this.auth || '';
- if (auth) {
- auth = encodeURIComponent(auth);
- auth = auth.replace(/%3A/i, ':');
- auth += '@';
- }
-
- var protocol = this.protocol || '',
- pathname = this.pathname || '',
- hash = this.hash || '',
- host = false,
- query = '';
-
- if (this.host) {
- host = auth + this.host;
- } else if (this.hostname) {
- host = auth + (this.hostname.indexOf(':') === -1 ?
- this.hostname :
- '[' + this.hostname + ']');
- if (this.port) {
- host += ':' + this.port;
- }
- }
-
- if (this.query &&
- isObject(this.query) &&
- Object.keys(this.query).length) {
- query = querystring.stringify(this.query);
- }
-
- var search = this.search || (query && ('?' + query)) || '';
-
- if (protocol && protocol.substr(-1) !== ':') protocol += ':';
-
- if (this.slashes ||
- (!protocol || slashedProtocol[protocol]) && host !== false) {
- host = '//' + (host || '');
- if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;
- } else if (!host) {
- host = '';
- }
-
- if (hash && hash.charAt(0) !== '#') hash = '#' + hash;
- if (search && search.charAt(0) !== '?') search = '?' + search;
-
- pathname = pathname.replace(/[?#]/g, function(match) {
- return encodeURIComponent(match);
- });
- search = search.replace('#', '%23');
-
- return protocol + host + pathname + search + hash;
-};
-
-function urlResolve(source, relative) {
- return urlParse(source, false, true).resolve(relative);
-}
-
-Url.prototype.resolve = function(relative) {
- return this.resolveObject(urlParse(relative, false, true)).format();
-};
-
-function urlResolveObject(source, relative) {
- if (!source) return relative;
- return urlParse(source, false, true).resolveObject(relative);
-}
-
-Url.prototype.resolveObject = function(relative) {
- if (isString(relative)) {
- var rel = new Url();
- rel.parse(relative, false, true);
- relative = rel;
- }
-
- var result = new Url();
- Object.keys(this).forEach(function(k) {
- result[k] = this[k];
- }, this);
-
- result.hash = relative.hash;
-
- if (relative.href === '') {
- result.href = result.format();
- return result;
- }
-
- if (relative.slashes && !relative.protocol) {
- Object.keys(relative).forEach(function(k) {
- if (k !== 'protocol')
- result[k] = relative[k];
- });
-
- if (slashedProtocol[result.protocol] &&
- result.hostname && !result.pathname) {
- result.path = result.pathname = '/';
- }
-
- result.href = result.format();
- return result;
- }
-
- if (relative.protocol && relative.protocol !== result.protocol) {
- if (!slashedProtocol[relative.protocol]) {
- Object.keys(relative).forEach(function(k) {
- result[k] = relative[k];
- });
- result.href = result.format();
- return result;
- }
-
- result.protocol = relative.protocol;
- if (!relative.host && !hostlessProtocol[relative.protocol]) {
- var relPath = (relative.pathname || '').split('/');
- while (relPath.length && !(relative.host = relPath.shift()));
- if (!relative.host) relative.host = '';
- if (!relative.hostname) relative.hostname = '';
- if (relPath[0] !== '') relPath.unshift('');
- if (relPath.length < 2) relPath.unshift('');
- result.pathname = relPath.join('/');
- } else {
- result.pathname = relative.pathname;
- }
- result.search = relative.search;
- result.query = relative.query;
- result.host = relative.host || '';
- result.auth = relative.auth;
- result.hostname = relative.hostname || relative.host;
- result.port = relative.port;
- if (result.pathname || result.search) {
- var p = result.pathname || '';
- var s = result.search || '';
- result.path = p + s;
- }
- result.slashes = result.slashes || relative.slashes;
- result.href = result.format();
- return result;
- }
-
- var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),
- isRelAbs = (
- relative.host ||
- relative.pathname && relative.pathname.charAt(0) === '/'
- ),
- mustEndAbs = (isRelAbs || isSourceAbs ||
- (result.host && relative.pathname)),
- removeAllDots = mustEndAbs,
- srcPath = result.pathname && result.pathname.split('/') || [],
- relPath = relative.pathname && relative.pathname.split('/') || [],
- psychotic = result.protocol && !slashedProtocol[result.protocol];
-
- if (psychotic) {
- result.hostname = '';
- result.port = null;
- if (result.host) {
- if (srcPath[0] === '') srcPath[0] = result.host;
- else srcPath.unshift(result.host);
- }
- result.host = '';
- if (relative.protocol) {
- relative.hostname = null;
- relative.port = null;
- if (relative.host) {
- if (relPath[0] === '') relPath[0] = relative.host;
- else relPath.unshift(relative.host);
- }
- relative.host = null;
- }
- mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');
- }
-
- if (isRelAbs) {
- result.host = (relative.host || relative.host === '') ?
- relative.host : result.host;
- result.hostname = (relative.hostname || relative.hostname === '') ?
- relative.hostname : result.hostname;
- result.search = relative.search;
- result.query = relative.query;
- srcPath = relPath;
- } else if (relPath.length) {
- if (!srcPath) srcPath = [];
- srcPath.pop();
- srcPath = srcPath.concat(relPath);
- result.search = relative.search;
- result.query = relative.query;
- } else if (!isNullOrUndefined(relative.search)) {
- if (psychotic) {
- result.hostname = result.host = srcPath.shift();
- var authInHost = result.host && result.host.indexOf('@') > 0 ?
- result.host.split('@') : false;
- if (authInHost) {
- result.auth = authInHost.shift();
- result.host = result.hostname = authInHost.shift();
- }
- }
- result.search = relative.search;
- result.query = relative.query;
- if (!isNull(result.pathname) || !isNull(result.search)) {
- result.path = (result.pathname ? result.pathname : '') +
- (result.search ? result.search : '');
- }
- result.href = result.format();
- return result;
- }
-
- if (!srcPath.length) {
- result.pathname = null;
- if (result.search) {
- result.path = '/' + result.search;
- } else {
- result.path = null;
- }
- result.href = result.format();
- return result;
- }
-
- var last = srcPath.slice(-1)[0];
- var hasTrailingSlash = (
- (result.host || relative.host) && (last === '.' || last === '..') ||
- last === '');
-
- var up = 0;
- for (var i = srcPath.length; i >= 0; i--) {
- last = srcPath[i];
- if (last == '.') {
- srcPath.splice(i, 1);
- } else if (last === '..') {
- srcPath.splice(i, 1);
- up++;
- } else if (up) {
- srcPath.splice(i, 1);
- up--;
- }
- }
-
- if (!mustEndAbs && !removeAllDots) {
- for (; up--; up) {
- srcPath.unshift('..');
- }
- }
-
- if (mustEndAbs && srcPath[0] !== '' &&
- (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {
- srcPath.unshift('');
- }
-
- if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {
- srcPath.push('');
- }
-
- var isAbsolute = srcPath[0] === '' ||
- (srcPath[0] && srcPath[0].charAt(0) === '/');
-
- if (psychotic) {
- result.hostname = result.host = isAbsolute ? '' :
- srcPath.length ? srcPath.shift() : '';
- var authInHost = result.host && result.host.indexOf('@') > 0 ?
- result.host.split('@') : false;
- if (authInHost) {
- result.auth = authInHost.shift();
- result.host = result.hostname = authInHost.shift();
- }
- }
-
- mustEndAbs = mustEndAbs || (result.host && srcPath.length);
-
- if (mustEndAbs && !isAbsolute) {
- srcPath.unshift('');
- }
-
- if (!srcPath.length) {
- result.pathname = null;
- result.path = null;
- } else {
- result.pathname = srcPath.join('/');
- }
-
- if (!isNull(result.pathname) || !isNull(result.search)) {
- result.path = (result.pathname ? result.pathname : '') +
- (result.search ? result.search : '');
- }
- result.auth = relative.auth || result.auth;
- result.slashes = result.slashes || relative.slashes;
- result.href = result.format();
- return result;
-};
-
-Url.prototype.parseHost = function() {
- var host = this.host;
- var port = portPattern.exec(host);
- if (port) {
- port = port[0];
- if (port !== ':') {
- this.port = port.substr(1);
- }
- host = host.substr(0, host.length - port.length);
- }
- if (host) this.hostname = host;
-};
-
-function isString(arg) {
- return typeof arg === "string";
-}
-
-function isObject(arg) {
- return typeof arg === 'object' && arg !== null;
-}
-
-function isNull(arg) {
- return arg === null;
-}
-function isNullOrUndefined(arg) {
- return arg == null;
-}
-
-},{"punycode":66,"querystring":69}],71:[function(require,module,exports){
-module.exports = function isBuffer(arg) {
- return arg && typeof arg === 'object'
- && typeof arg.copy === 'function'
- && typeof arg.fill === 'function'
- && typeof arg.readUInt8 === 'function';
-}
-},{}],72:[function(require,module,exports){
-(function (process,global){
-
-var formatRegExp = /%[sdj%]/g;
-exports.format = function(f) {
- if (!isString(f)) {
- var objects = [];
- for (var i = 0; i < arguments.length; i++) {
- objects.push(inspect(arguments[i]));
- }
- return objects.join(' ');
- }
-
- var i = 1;
- var args = arguments;
- var len = args.length;
- var str = String(f).replace(formatRegExp, function(x) {
- if (x === '%') return '%';
- if (i >= len) return x;
- switch (x) {
- case '%s': return String(args[i++]);
- case '%d': return Number(args[i++]);
- case '%j':
- try {
- return JSON.stringify(args[i++]);
- } catch (_) {
- return '[Circular]';
- }
- default:
- return x;
- }
- });
- for (var x = args[i]; i < len; x = args[++i]) {
- if (isNull(x) || !isObject(x)) {
- str += ' ' + x;
- } else {
- str += ' ' + inspect(x);
- }
- }
- return str;
-};
-
-
-exports.deprecate = function(fn, msg) {
- if (isUndefined(global.process)) {
- return function() {
- return exports.deprecate(fn, msg).apply(this, arguments);
- };
- }
-
- if (process.noDeprecation === true) {
- return fn;
- }
-
- var warned = false;
- function deprecated() {
- if (!warned) {
- if (process.throwDeprecation) {
- throw new Error(msg);
- } else if (process.traceDeprecation) {
- console.trace(msg);
- } else {
- console.error(msg);
- }
- warned = true;
- }
- return fn.apply(this, arguments);
- }
-
- return deprecated;
-};
-
-
-var debugs = {};
-var debugEnviron;
-exports.debuglog = function(set) {
- if (isUndefined(debugEnviron))
- debugEnviron = process.env.NODE_DEBUG || '';
- set = set.toUpperCase();
- if (!debugs[set]) {
- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
- var pid = process.pid;
- debugs[set] = function() {
- var msg = exports.format.apply(exports, arguments);
- console.error('%s %d: %s', set, pid, msg);
- };
- } else {
- debugs[set] = function() {};
- }
- }
- return debugs[set];
-};
-
-
-
-
-function inspect(obj, opts) {
- var ctx = {
- seen: [],
- stylize: stylizeNoColor
- };
- if (arguments.length >= 3) ctx.depth = arguments[2];
- if (arguments.length >= 4) ctx.colors = arguments[3];
- if (isBoolean(opts)) {
- ctx.showHidden = opts;
- } else if (opts) {
- exports._extend(ctx, opts);
- }
- if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
- if (isUndefined(ctx.depth)) ctx.depth = 2;
- if (isUndefined(ctx.colors)) ctx.colors = false;
- if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
- if (ctx.colors) ctx.stylize = stylizeWithColor;
- return formatValue(ctx, obj, ctx.depth);
-}
-exports.inspect = inspect;
-
-
-inspect.colors = {
- 'bold' : [1, 22],
- 'italic' : [3, 23],
- 'underline' : [4, 24],
- 'inverse' : [7, 27],
- 'white' : [37, 39],
- 'grey' : [90, 39],
- 'black' : [30, 39],
- 'blue' : [34, 39],
- 'cyan' : [36, 39],
- 'green' : [32, 39],
- 'magenta' : [35, 39],
- 'red' : [31, 39],
- 'yellow' : [33, 39]
-};
-
-inspect.styles = {
- 'special': 'cyan',
- 'number': 'yellow',
- 'boolean': 'yellow',
- 'undefined': 'grey',
- 'null': 'bold',
- 'string': 'green',
- 'date': 'magenta',
- 'regexp': 'red'
-};
-
-
-function stylizeWithColor(str, styleType) {
- var style = inspect.styles[styleType];
-
- if (style) {
- return '\u001b[' + inspect.colors[style][0] + 'm' + str +
- '\u001b[' + inspect.colors[style][1] + 'm';
- } else {
- return str;
- }
-}
-
-
-function stylizeNoColor(str, styleType) {
- return str;
-}
-
-
-function arrayToHash(array) {
- var hash = {};
-
- array.forEach(function(val, idx) {
- hash[val] = true;
- });
-
- return hash;
-}
-
-
-function formatValue(ctx, value, recurseTimes) {
- if (ctx.customInspect &&
- value &&
- isFunction(value.inspect) &&
- value.inspect !== exports.inspect &&
- !(value.constructor && value.constructor.prototype === value)) {
- var ret = value.inspect(recurseTimes, ctx);
- if (!isString(ret)) {
- ret = formatValue(ctx, ret, recurseTimes);
- }
- return ret;
- }
-
- var primitive = formatPrimitive(ctx, value);
- if (primitive) {
- return primitive;
- }
-
- var keys = Object.keys(value);
- var visibleKeys = arrayToHash(keys);
-
- if (ctx.showHidden) {
- keys = Object.getOwnPropertyNames(value);
- }
-
- if (isError(value)
- && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
- return formatError(value);
- }
-
- if (keys.length === 0) {
- if (isFunction(value)) {
- var name = value.name ? ': ' + value.name : '';
- return ctx.stylize('[Function' + name + ']', 'special');
- }
- if (isRegExp(value)) {
- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
- }
- if (isDate(value)) {
- return ctx.stylize(Date.prototype.toString.call(value), 'date');
- }
- if (isError(value)) {
- return formatError(value);
- }
- }
-
- var base = '', array = false, braces = ['{', '}'];
-
- if (isArray(value)) {
- array = true;
- braces = ['[', ']'];
- }
-
- if (isFunction(value)) {
- var n = value.name ? ': ' + value.name : '';
- base = ' [Function' + n + ']';
- }
-
- if (isRegExp(value)) {
- base = ' ' + RegExp.prototype.toString.call(value);
- }
-
- if (isDate(value)) {
- base = ' ' + Date.prototype.toUTCString.call(value);
- }
-
- if (isError(value)) {
- base = ' ' + formatError(value);
- }
-
- if (keys.length === 0 && (!array || value.length == 0)) {
- return braces[0] + base + braces[1];
- }
-
- if (recurseTimes < 0) {
- if (isRegExp(value)) {
- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
- } else {
- return ctx.stylize('[Object]', 'special');
- }
- }
-
- ctx.seen.push(value);
-
- var output;
- if (array) {
- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
- } else {
- output = keys.map(function(key) {
- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
- });
- }
-
- ctx.seen.pop();
-
- return reduceToSingleString(output, base, braces);
-}
-
-
-function formatPrimitive(ctx, value) {
- if (isUndefined(value))
- return ctx.stylize('undefined', 'undefined');
- if (isString(value)) {
- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
- .replace(/'/g, "\\'")
- .replace(/\\"/g, '"') + '\'';
- return ctx.stylize(simple, 'string');
- }
- if (isNumber(value))
- return ctx.stylize('' + value, 'number');
- if (isBoolean(value))
- return ctx.stylize('' + value, 'boolean');
- if (isNull(value))
- return ctx.stylize('null', 'null');
-}
-
-
-function formatError(value) {
- return '[' + Error.prototype.toString.call(value) + ']';
-}
-
-
-function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
- var output = [];
- for (var i = 0, l = value.length; i < l; ++i) {
- if (hasOwnProperty(value, String(i))) {
- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
- String(i), true));
- } else {
- output.push('');
- }
- }
- keys.forEach(function(key) {
- if (!key.match(/^\d+$/)) {
- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
- key, true));
- }
- });
- return output;
-}
-
-
-function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
- var name, str, desc;
- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
- if (desc.get) {
- if (desc.set) {
- str = ctx.stylize('[Getter/Setter]', 'special');
- } else {
- str = ctx.stylize('[Getter]', 'special');
- }
- } else {
- if (desc.set) {
- str = ctx.stylize('[Setter]', 'special');
- }
- }
- if (!hasOwnProperty(visibleKeys, key)) {
- name = '[' + key + ']';
- }
- if (!str) {
- if (ctx.seen.indexOf(desc.value) < 0) {
- if (isNull(recurseTimes)) {
- str = formatValue(ctx, desc.value, null);
- } else {
- str = formatValue(ctx, desc.value, recurseTimes - 1);
- }
- if (str.indexOf('\n') > -1) {
- if (array) {
- str = str.split('\n').map(function(line) {
- return ' ' + line;
- }).join('\n').substr(2);
- } else {
- str = '\n' + str.split('\n').map(function(line) {
- return ' ' + line;
- }).join('\n');
- }
- }
- } else {
- str = ctx.stylize('[Circular]', 'special');
- }
- }
- if (isUndefined(name)) {
- if (array && key.match(/^\d+$/)) {
- return str;
- }
- name = JSON.stringify('' + key);
- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
- name = name.substr(1, name.length - 2);
- name = ctx.stylize(name, 'name');
- } else {
- name = name.replace(/'/g, "\\'")
- .replace(/\\"/g, '"')
- .replace(/(^"|"$)/g, "'");
- name = ctx.stylize(name, 'string');
- }
- }
-
- return name + ': ' + str;
-}
-
-
-function reduceToSingleString(output, base, braces) {
- var numLinesEst = 0;
- var length = output.reduce(function(prev, cur) {
- numLinesEst++;
- if (cur.indexOf('\n') >= 0) numLinesEst++;
- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
- }, 0);
-
- if (length > 60) {
- return braces[0] +
- (base === '' ? '' : base + '\n ') +
- ' ' +
- output.join(',\n ') +
- ' ' +
- braces[1];
- }
-
- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
-}
-
-
-function isArray(ar) {
- return Array.isArray(ar);
-}
-exports.isArray = isArray;
-
-function isBoolean(arg) {
- return typeof arg === 'boolean';
-}
-exports.isBoolean = isBoolean;
-
-function isNull(arg) {
- return arg === null;
-}
-exports.isNull = isNull;
-
-function isNullOrUndefined(arg) {
- return arg == null;
-}
-exports.isNullOrUndefined = isNullOrUndefined;
-
-function isNumber(arg) {
- return typeof arg === 'number';
-}
-exports.isNumber = isNumber;
-
-function isString(arg) {
- return typeof arg === 'string';
-}
-exports.isString = isString;
-
-function isSymbol(arg) {
- return typeof arg === 'symbol';
-}
-exports.isSymbol = isSymbol;
-
-function isUndefined(arg) {
- return arg === void 0;
-}
-exports.isUndefined = isUndefined;
-
-function isRegExp(re) {
- return isObject(re) && objectToString(re) === '[object RegExp]';
-}
-exports.isRegExp = isRegExp;
-
-function isObject(arg) {
- return typeof arg === 'object' && arg !== null;
-}
-exports.isObject = isObject;
-
-function isDate(d) {
- return isObject(d) && objectToString(d) === '[object Date]';
-}
-exports.isDate = isDate;
-
-function isError(e) {
- return isObject(e) &&
- (objectToString(e) === '[object Error]' || e instanceof Error);
-}
-exports.isError = isError;
-
-function isFunction(arg) {
- return typeof arg === 'function';
-}
-exports.isFunction = isFunction;
-
-function isPrimitive(arg) {
- return arg === null ||
- typeof arg === 'boolean' ||
- typeof arg === 'number' ||
- typeof arg === 'string' ||
- typeof arg === 'symbol' || // ES6 symbol
- typeof arg === 'undefined';
-}
-exports.isPrimitive = isPrimitive;
-
-exports.isBuffer = require('./support/isBuffer');
-
-function objectToString(o) {
- return Object.prototype.toString.call(o);
-}
-
-
-function pad(n) {
- return n < 10 ? '0' + n.toString(10) : n.toString(10);
-}
-
-
-var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
- 'Oct', 'Nov', 'Dec'];
-
-function timestamp() {
- var d = new Date();
- var time = [pad(d.getHours()),
- pad(d.getMinutes()),
- pad(d.getSeconds())].join(':');
- return [d.getDate(), months[d.getMonth()], time].join(' ');
-}
-
-
-exports.log = function() {
- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
-};
-
-
-
-exports.inherits = require('inherits');
-
-exports._extend = function(origin, add) {
- if (!add || !isObject(add)) return origin;
-
- var keys = Object.keys(add);
- var i = keys.length;
- while (i--) {
- origin[keys[i]] = add[keys[i]];
- }
- return origin;
-};
-
-function hasOwnProperty(obj, prop) {
- return Object.prototype.hasOwnProperty.call(obj, prop);
-}
-
-}).call(this,require("FWaASH"),typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./support/isBuffer":71,"FWaASH":65,"inherits":64}],73:[function(require,module,exports){
-(function() {
- var XMLBuilder, XMLFragment;
-
- XMLFragment = require('./XMLFragment');
-
- XMLBuilder = (function() {
-
- function XMLBuilder(name, xmldec, doctype) {
- var att, child, _ref;
- this.children = [];
- this.rootObject = null;
- if (this.is(name, 'Object')) {
- _ref = [name, xmldec], xmldec = _ref[0], doctype = _ref[1];
- name = null;
- }
- if (name != null) {
- name = '' + name || '';
- if (xmldec == null) {
- xmldec = {
- 'version': '1.0'
- };
- }
- }
- if ((xmldec != null) && !(xmldec.version != null)) {
- throw new Error("Version number is required");
- }
- if (xmldec != null) {
- xmldec.version = '' + xmldec.version || '';
- if (!xmldec.version.match(/1\.[0-9]+/)) {
- throw new Error("Invalid version number: " + xmldec.version);
- }
- att = {
- version: xmldec.version
- };
- if (xmldec.encoding != null) {
- xmldec.encoding = '' + xmldec.encoding || '';
- if (!xmldec.encoding.match(/[A-Za-z](?:[A-Za-z0-9._-]|-)*/)) {
- throw new Error("Invalid encoding: " + xmldec.encoding);
- }
- att.encoding = xmldec.encoding;
- }
- if (xmldec.standalone != null) {
- att.standalone = xmldec.standalone ? "yes" : "no";
- }
- child = new XMLFragment(this, '?xml', att);
- this.children.push(child);
- }
- if (doctype != null) {
- att = {};
- if (name != null) {
- att.name = name;
- }
- if (doctype.ext != null) {
- doctype.ext = '' + doctype.ext || '';
- att.ext = doctype.ext;
- }
- child = new XMLFragment(this, '!DOCTYPE', att);
- this.children.push(child);
- }
- if (name != null) {
- this.begin(name);
- }
- }
-
- XMLBuilder.prototype.begin = function(name, xmldec, doctype) {
- var doc, root;
- if (!(name != null)) {
- throw new Error("Root element needs a name");
- }
- if (this.rootObject) {
- this.children = [];
- this.rootObject = null;
- }
- if (xmldec != null) {
- doc = new XMLBuilder(name, xmldec, doctype);
- return doc.root();
- }
- name = '' + name || '';
- root = new XMLFragment(this, name, {});
- root.isRoot = true;
- root.documentObject = this;
- this.children.push(root);
- this.rootObject = root;
- return root;
- };
-
- XMLBuilder.prototype.root = function() {
- return this.rootObject;
- };
-
- XMLBuilder.prototype.end = function(options) {
- return toString(options);
- };
-
- XMLBuilder.prototype.toString = function(options) {
- var child, r, _i, _len, _ref;
- r = '';
- _ref = this.children;
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- child = _ref[_i];
- r += child.toString(options);
- }
- return r;
- };
-
- XMLBuilder.prototype.is = function(obj, type) {
- var clas;
- clas = Object.prototype.toString.call(obj).slice(8, -1);
- return (obj != null) && clas === type;
- };
-
- return XMLBuilder;
-
- })();
-
- module.exports = XMLBuilder;
-
-}).call(this);
-
-},{"./XMLFragment":74}],74:[function(require,module,exports){
-(function() {
- var XMLFragment,
- __hasProp = {}.hasOwnProperty;
-
- XMLFragment = (function() {
-
- function XMLFragment(parent, name, attributes, text) {
- this.isRoot = false;
- this.documentObject = null;
- this.parent = parent;
- this.name = name;
- this.attributes = attributes;
- this.value = text;
- this.children = [];
- }
-
- XMLFragment.prototype.element = function(name, attributes, text) {
- var child, key, val, _ref, _ref1;
- if (!(name != null)) {
- throw new Error("Missing element name");
- }
- name = '' + name || '';
- this.assertLegalChar(name);
- if (attributes == null) {
- attributes = {};
- }
- if (this.is(attributes, 'String') && this.is(text, 'Object')) {
- _ref = [text, attributes], attributes = _ref[0], text = _ref[1];
- } else if (this.is(attributes, 'String')) {
- _ref1 = [{}, attributes], attributes = _ref1[0], text = _ref1[1];
- }
- for (key in attributes) {
- if (!__hasProp.call(attributes, key)) continue;
- val = attributes[key];
- val = '' + val || '';
- attributes[key] = this.escape(val);
- }
- child = new XMLFragment(this, name, attributes);
- if (text != null) {
- text = '' + text || '';
- text = this.escape(text);
- this.assertLegalChar(text);
- child.raw(text);
- }
- this.children.push(child);
- return child;
- };
-
- XMLFragment.prototype.insertBefore = function(name, attributes, text) {
- var child, i, key, val, _ref, _ref1;
- if (this.isRoot) {
- throw new Error("Cannot insert elements at root level");
- }
- if (!(name != null)) {
- throw new Error("Missing element name");
- }
- name = '' + name || '';
- this.assertLegalChar(name);
- if (attributes == null) {
- attributes = {};
- }
- if (this.is(attributes, 'String') && this.is(text, 'Object')) {
- _ref = [text, attributes], attributes = _ref[0], text = _ref[1];
- } else if (this.is(attributes, 'String')) {
- _ref1 = [{}, attributes], attributes = _ref1[0], text = _ref1[1];
- }
- for (key in attributes) {
- if (!__hasProp.call(attributes, key)) continue;
- val = attributes[key];
- val = '' + val || '';
- attributes[key] = this.escape(val);
- }
- child = new XMLFragment(this.parent, name, attributes);
- if (text != null) {
- text = '' + text || '';
- text = this.escape(text);
- this.assertLegalChar(text);
- child.raw(text);
- }
- i = this.parent.children.indexOf(this);
- this.parent.children.splice(i, 0, child);
- return child;
- };
-
- XMLFragment.prototype.insertAfter = function(name, attributes, text) {
- var child, i, key, val, _ref, _ref1;
- if (this.isRoot) {
- throw new Error("Cannot insert elements at root level");
- }
- if (!(name != null)) {
- throw new Error("Missing element name");
- }
- name = '' + name || '';
- this.assertLegalChar(name);
- if (attributes == null) {
- attributes = {};
- }
- if (this.is(attributes, 'String') && this.is(text, 'Object')) {
- _ref = [text, attributes], attributes = _ref[0], text = _ref[1];
- } else if (this.is(attributes, 'String')) {
- _ref1 = [{}, attributes], attributes = _ref1[0], text = _ref1[1];
- }
- for (key in attributes) {
- if (!__hasProp.call(attributes, key)) continue;
- val = attributes[key];
- val = '' + val || '';
- attributes[key] = this.escape(val);
- }
- child = new XMLFragment(this.parent, name, attributes);
- if (text != null) {
- text = '' + text || '';
- text = this.escape(text);
- this.assertLegalChar(text);
- child.raw(text);
- }
- i = this.parent.children.indexOf(this);
- this.parent.children.splice(i + 1, 0, child);
- return child;
- };
-
- XMLFragment.prototype.remove = function() {
- var i, _ref;
- if (this.isRoot) {
- throw new Error("Cannot remove the root element");
- }
- i = this.parent.children.indexOf(this);
- [].splice.apply(this.parent.children, [i, i - i + 1].concat(_ref = [])), _ref;
- return this.parent;
- };
-
- XMLFragment.prototype.text = function(value) {
- var child;
- if (!(value != null)) {
- throw new Error("Missing element text");
- }
- value = '' + value || '';
- value = this.escape(value);
- this.assertLegalChar(value);
- child = new XMLFragment(this, '', {}, value);
- this.children.push(child);
- return this;
- };
-
- XMLFragment.prototype.cdata = function(value) {
- var child;
- if (!(value != null)) {
- throw new Error("Missing CDATA text");
- }
- value = '' + value || '';
- this.assertLegalChar(value);
- if (value.match(/]]>/)) {
- throw new Error("Invalid CDATA text: " + value);
- }
- child = new XMLFragment(this, '', {}, '');
- this.children.push(child);
- return this;
- };
-
- XMLFragment.prototype.comment = function(value) {
- var child;
- if (!(value != null)) {
- throw new Error("Missing comment text");
- }
- value = '' + value || '';
- value = this.escape(value);
- this.assertLegalChar(value);
- if (value.match(/--/)) {
- throw new Error("Comment text cannot contain double-hypen: " + value);
- }
- child = new XMLFragment(this, '', {}, '');
- this.children.push(child);
- return this;
- };
-
- XMLFragment.prototype.raw = function(value) {
- var child;
- if (!(value != null)) {
- throw new Error("Missing raw text");
- }
- value = '' + value || '';
- child = new XMLFragment(this, '', {}, value);
- this.children.push(child);
- return this;
- };
-
- XMLFragment.prototype.up = function() {
- if (this.isRoot) {
- throw new Error("This node has no parent. Use doc() if you need to get the document object.");
- }
- return this.parent;
- };
-
- XMLFragment.prototype.root = function() {
- var child;
- if (this.isRoot) {
- return this;
- }
- child = this.parent;
- while (!child.isRoot) {
- child = child.parent;
- }
- return child;
- };
-
- XMLFragment.prototype.document = function() {
- return this.root().documentObject;
- };
-
- XMLFragment.prototype.end = function(options) {
- return this.document().toString(options);
- };
-
- XMLFragment.prototype.prev = function() {
- var i;
- if (this.isRoot) {
- throw new Error("Root node has no siblings");
- }
- i = this.parent.children.indexOf(this);
- if (i < 1) {
- throw new Error("Already at the first node");
- }
- return this.parent.children[i - 1];
- };
-
- XMLFragment.prototype.next = function() {
- var i;
- if (this.isRoot) {
- throw new Error("Root node has no siblings");
- }
- i = this.parent.children.indexOf(this);
- if (i === -1 || i === this.parent.children.length - 1) {
- throw new Error("Already at the last node");
- }
- return this.parent.children[i + 1];
- };
-
- XMLFragment.prototype.clone = function(deep) {
- var clonedSelf;
- clonedSelf = new XMLFragment(this.parent, this.name, this.attributes, this.value);
- if (deep) {
- this.children.forEach(function(child) {
- var clonedChild;
- clonedChild = child.clone(deep);
- clonedChild.parent = clonedSelf;
- return clonedSelf.children.push(clonedChild);
- });
- }
- return clonedSelf;
- };
-
- XMLFragment.prototype.importXMLBuilder = function(xmlbuilder) {
- var clonedRoot;
- clonedRoot = xmlbuilder.root().clone(true);
- clonedRoot.parent = this;
- this.children.push(clonedRoot);
- clonedRoot.isRoot = false;
- return this;
- };
-
- XMLFragment.prototype.attribute = function(name, value) {
- var _ref;
- if (!(name != null)) {
- throw new Error("Missing attribute name");
- }
- if (!(value != null)) {
- throw new Error("Missing attribute value");
- }
- name = '' + name || '';
- value = '' + value || '';
- if ((_ref = this.attributes) == null) {
- this.attributes = {};
- }
- this.attributes[name] = this.escape(value);
- return this;
- };
-
- XMLFragment.prototype.removeAttribute = function(name) {
- if (!(name != null)) {
- throw new Error("Missing attribute name");
- }
- name = '' + name || '';
- delete this.attributes[name];
- return this;
- };
-
- XMLFragment.prototype.toString = function(options, level) {
- var attName, attValue, child, indent, newline, pretty, r, space, _i, _len, _ref, _ref1;
- pretty = (options != null) && options.pretty || false;
- indent = (options != null) && options.indent || ' ';
- newline = (options != null) && options.newline || '\n';
- level || (level = 0);
- space = new Array(level + 1).join(indent);
- r = '';
- if (pretty) {
- r += space;
- }
- if (!(this.value != null)) {
- r += '<' + this.name;
- } else {
- r += '' + this.value;
- }
- _ref = this.attributes;
- for (attName in _ref) {
- attValue = _ref[attName];
- if (this.name === '!DOCTYPE') {
- r += ' ' + attValue;
- } else {
- r += ' ' + attName + '="' + attValue + '"';
- }
- }
- if (this.children.length === 0) {
- if (!(this.value != null)) {
- r += this.name === '?xml' ? '?>' : this.name === '!DOCTYPE' ? '>' : '/>';
- }
- if (pretty) {
- r += newline;
- }
- } else if (pretty && this.children.length === 1 && this.children[0].value) {
- r += '>';
- r += this.children[0].value;
- r += '' + this.name + '>';
- r += newline;
- } else {
- r += '>';
- if (pretty) {
- r += newline;
- }
- _ref1 = this.children;
- for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
- child = _ref1[_i];
- r += child.toString(options, level + 1);
- }
- if (pretty) {
- r += space;
- }
- r += '' + this.name + '>';
- if (pretty) {
- r += newline;
- }
- }
- return r;
- };
-
- XMLFragment.prototype.escape = function(str) {
- return str.replace(/&/g, '&').replace(//g, '>').replace(/'/g, ''').replace(/"/g, '"');
- };
-
- XMLFragment.prototype.assertLegalChar = function(str) {
- var chars, chr;
- chars = /[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE-\uFFFF]/;
- chr = str.match(chars);
- if (chr) {
- throw new Error("Invalid character (" + chr + ") in string: " + str);
- }
- };
-
- XMLFragment.prototype.is = function(obj, type) {
- var clas;
- clas = Object.prototype.toString.call(obj).slice(8, -1);
- return (obj != null) && clas === type;
- };
-
- XMLFragment.prototype.ele = function(name, attributes, text) {
- return this.element(name, attributes, text);
- };
-
- XMLFragment.prototype.txt = function(value) {
- return this.text(value);
- };
-
- XMLFragment.prototype.dat = function(value) {
- return this.cdata(value);
- };
-
- XMLFragment.prototype.att = function(name, value) {
- return this.attribute(name, value);
- };
-
- XMLFragment.prototype.com = function(value) {
- return this.comment(value);
- };
-
- XMLFragment.prototype.doc = function() {
- return this.document();
- };
-
- XMLFragment.prototype.e = function(name, attributes, text) {
- return this.element(name, attributes, text);
- };
-
- XMLFragment.prototype.t = function(value) {
- return this.text(value);
- };
-
- XMLFragment.prototype.d = function(value) {
- return this.cdata(value);
- };
-
- XMLFragment.prototype.a = function(name, value) {
- return this.attribute(name, value);
- };
-
- XMLFragment.prototype.c = function(value) {
- return this.comment(value);
- };
-
- XMLFragment.prototype.r = function(value) {
- return this.raw(value);
- };
-
- XMLFragment.prototype.u = function() {
- return this.up();
- };
-
- return XMLFragment;
-
- })();
-
- module.exports = XMLFragment;
-
-}).call(this);
-
-},{}],75:[function(require,module,exports){
-(function() {
- var XMLBuilder;
-
- XMLBuilder = require('./XMLBuilder');
-
- module.exports.create = function(name, xmldec, doctype) {
- if (name != null) {
- return new XMLBuilder(name, xmldec, doctype).root();
- } else {
- return new XMLBuilder();
- }
- };
-
-}).call(this);
-
-},{"./XMLBuilder":73}]},{},[1])
diff --git a/public/vendor/aws-sdk/dist/aws-sdk.min.js b/public/vendor/aws-sdk/dist/aws-sdk.min.js
deleted file mode 100644
index 077da7dab3e..00000000000
--- a/public/vendor/aws-sdk/dist/aws-sdk.min.js
+++ /dev/null
@@ -1,17 +0,0 @@
-// AWS SDK for JavaScript v2.1.42
-// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
-// License at https://sdk.amazonaws.com/js/BUNDLE_LICENSE.txt
-!function e(t,r,a){function o(i,s){if(!r[i]){if(!t[i]){var u="function"==typeof require&&require;if(!s&&u)return u(i,!0);if(n)return n(i,!0);throw new Error("Cannot find module '"+i+"'")}var c=r[i]={exports:{}};t[i][0].call(c.exports,function(e){var r=t[i][1][e];return o(r?r:e)},c,c.exports,e,t,r,a)}return r[i].exports}for(var n="function"==typeof require&&require,i=0;ithis.expireTime?!0:this.expired||!this.accessKeyId||!this.secretAccessKey},get:function(e){var t=this;this.needsRefresh()?this.refresh(function(r){r||(t.expired=!1),e&&e(r)}):e&&e()},refresh:function(e){this.expired=!1,e()}})},{"./core":3}],5:[function(e,t,r){var a=e("../core");a.CognitoIdentityCredentials=a.util.inherit(a.Credentials,{localStorageKey:{id:"aws.cognito.identity-id.",providers:"aws.cognito.identity-providers."},constructor:function(e){a.Credentials.call(this),this.expired=!0,this.params=e,this.data=null,this.identityId=null,this.loadCachedId()},refresh:function(e){var t=this;t.createClients(),t.data=null,t.identityId=null,t.getId(function(r){r?(t.clearCachedId(),e(r)):t.params.RoleArn?t.getCredentialsFromSTS(e):t.getCredentialsForIdentity(e)})},clearCachedId:function(){this.identityId=null,delete this.params.IdentityId;var e=this.params.IdentityPoolId;delete this.storage[this.localStorageKey.id+e],delete this.storage[this.localStorageKey.providers+e]},getId:function(e){var t=this;return"string"==typeof t.params.IdentityId?e(null,t.params.IdentityId):void t.cognito.getId(function(r,a){!r&&a.IdentityId?(t.params.IdentityId=a.IdentityId,e(null,a.IdentityId)):e(r)})},loadCredentials:function(e,t){e&&t&&(t.expired=!1,t.accessKeyId=e.Credentials.AccessKeyId,t.secretAccessKey=e.Credentials.SecretKey,t.sessionToken=e.Credentials.SessionToken,t.expireTime=e.Credentials.Expiration)},getCredentialsForIdentity:function(e){var t=this;t.cognito.getCredentialsForIdentity(function(r,a){r?t.clearCachedId():(t.cacheId(a),t.data=a,t.loadCredentials(t.data,t)),e(r)})},getCredentialsFromSTS:function(e){var t=this;t.cognito.getOpenIdToken(function(r,a){r?(t.clearCachedId(),e(r)):(t.cacheId(a),t.params.WebIdentityToken=a.Token,t.webIdentityCredentials.refresh(function(r){r?t.clearCachedId():(t.data=t.webIdentityCredentials.data,t.sts.credentialsFrom(t.data,t)),e(r)}))})},loadCachedId:function(){var e=this;if(a.util.isBrowser()&&!e.params.IdentityId){var t=e.getStorage("id");if(t&&e.params.Logins){var r=Object.keys(e.params.Logins),o=(e.getStorage("providers")||"").split(","),n=o.filter(function(e){return-1!==r.indexOf(e)});0!==n.length&&(e.params.IdentityId=t)}else t&&(e.params.IdentityId=t)}},createClients:function(){this.webIdentityCredentials=this.webIdentityCredentials||new a.WebIdentityCredentials(this.params),this.cognito=this.cognito||new a.CognitoIdentity({params:this.params}),this.sts=this.sts||new a.STS},cacheId:function(e){this.identityId=e.IdentityId,this.params.IdentityId=this.identityId,a.util.isBrowser()&&(this.setStorage("id",e.IdentityId),this.params.Logins&&this.setStorage("providers",Object.keys(this.params.Logins).join(",")))},getStorage:function(e){return this.storage[this.localStorageKey[e]+this.params.IdentityPoolId]},setStorage:function(e,t){try{this.storage[this.localStorageKey[e]+this.params.IdentityPoolId]=t}catch(r){}},storage:function(){try{return a.util.isBrowser()&&"object"==typeof window.localStorage?window.localStorage:{}}catch(e){return{}}}()})},{"../core":3}],6:[function(e,t,r){var a=e("../core");a.CredentialProviderChain=a.util.inherit(a.Credentials,{constructor:function(e){e?this.providers=e:this.providers=a.CredentialProviderChain.defaultProviders.slice(0)},resolve:function(e){function t(o,n){if(!o&&n||r===a.length)return void e(o,n);var i=a[r++];n="function"==typeof i?i.call():i,n.get?n.get(function(e){t(e,e?null:n)}):t(null,n)}if(0===this.providers.length)return e(new Error("No providers")),this;var r=0,a=this.providers.slice(0);return t(),this}}),a.CredentialProviderChain.defaultProviders=[]},{"../core":3}],7:[function(e,t,r){var a=e("../core");a.SAMLCredentials=a.util.inherit(a.Credentials,{constructor:function(e){a.Credentials.call(this),this.expired=!0,this.params=e},refresh:function(e){var t=this;t.createClients(),e||(e=function(e){if(e)throw e}),t.service.assumeRoleWithSAML(function(r,a){r||t.service.credentialsFrom(a,t),e(r)})},createClients:function(){this.service=this.service||new a.STS({params:this.params})}})},{"../core":3}],8:[function(e,t,r){var a=e("../core");a.TemporaryCredentials=a.util.inherit(a.Credentials,{constructor:function(e){a.Credentials.call(this),this.loadMasterCredentials(),this.expired=!0,this.params=e||{},this.params.RoleArn&&(this.params.RoleSessionName=this.params.RoleSessionName||"temporary-credentials")},refresh:function(e){var t=this;t.createClients(),e||(e=function(e){if(e)throw e}),t.service.config.credentials=t.masterCredentials;var r=t.params.RoleArn?t.service.assumeRole:t.service.getSessionToken;r.call(t.service,function(r,a){r||t.service.credentialsFrom(a,t),e(r)})},loadMasterCredentials:function(){for(this.masterCredentials=a.config.credentials;this.masterCredentials.masterCredentials;)this.masterCredentials=this.masterCredentials.masterCredentials},createClients:function(){this.service=this.service||new a.STS({params:this.params})}})},{"../core":3}],9:[function(e,t,r){var a=e("../core");a.WebIdentityCredentials=a.util.inherit(a.Credentials,{constructor:function(e){a.Credentials.call(this),this.expired=!0,this.params=e,this.params.RoleSessionName=this.params.RoleSessionName||"web-identity",this.data=null},refresh:function(e){var t=this;t.createClients(),e||(e=function(e){if(e)throw e}),t.service.assumeRoleWithWebIdentity(function(r,a){t.data=null,r||(t.data=a,t.service.credentialsFrom(a,t)),e(r)})},createClients:function(){this.service=this.service||new a.STS({params:this.params})}})},{"../core":3}],10:[function(e,t,r){var a=e("./core"),o=e("./sequential_executor");a.EventListeners={Core:{}},a.EventListeners={Core:(new o).addNamedListeners(function(e,t){t("VALIDATE_CREDENTIALS","validate",function(e,t){return e.service.api.signatureVersion?void e.service.config.getCredentials(function(r){r&&(e.response.error=a.util.error(r,{code:"CredentialsError",message:"Missing credentials in config"})),t()}):t()}),e("VALIDATE_REGION","validate",function(e){e.service.config.region||e.service.isGlobalEndpoint||(e.response.error=a.util.error(new Error,{code:"ConfigError",message:"Missing region in config"}))}),e("VALIDATE_PARAMETERS","validate",function(e){var t=e.service.api.operations[e.operation].input;(new a.ParamValidator).validate(t,e.params)}),t("COMPUTE_SHA256","afterBuild",function(e,t){if(e.haltHandlersOnError(),!e.service.api.signatureVersion)return t();if(e.service.getSignerClass(e)===a.Signers.V4){var r=e.httpRequest.body||"";a.util.computeSha256(r,function(r,a){r?t(r):(e.httpRequest.headers["X-Amz-Content-Sha256"]=a,t())})}else t()}),e("SET_CONTENT_LENGTH","afterBuild",function(e){if(void 0===e.httpRequest.headers["Content-Length"]){var t=a.util.string.byteLength(e.httpRequest.body);e.httpRequest.headers["Content-Length"]=t}}),e("SET_HTTP_HOST","afterBuild",function(e){e.httpRequest.headers.Host=e.httpRequest.endpoint.host}),e("RESTART","restart",function(){var e=this.response.error;e&&e.retryable&&(this.httpRequest=new a.HttpRequest(this.service.endpoint,this.service.region),this.response.retryCount=600?this.emit("sign",[this],function(e){e?t(e):i()}):i()}),e("HTTP_HEADERS","httpHeaders",function(e,t,r){r.httpResponse.statusCode=e,r.httpResponse.headers=t,r.httpResponse.body=new a.util.Buffer(""),r.httpResponse.buffers=[],r.httpResponse.numBytes=0}),e("HTTP_DATA","httpData",function(e,t){if(e){if(a.util.isNode()){t.httpResponse.numBytes+=e.length;var r=t.httpResponse.headers["content-length"],o={loaded:t.httpResponse.numBytes,total:r};t.request.emit("httpDownloadProgress",[o,t])}t.httpResponse.buffers.push(new a.util.Buffer(e))}}),e("HTTP_DONE","httpDone",function(e){if(e.httpResponse.buffers&&e.httpResponse.buffers.length>0){var t=a.util.buffer.concat(e.httpResponse.buffers);e.httpResponse.body=t}delete e.httpResponse.numBytes,delete e.httpResponse.buffers}),e("FINALIZE_ERROR","retry",function(e){e.httpResponse.statusCode&&(e.error.statusCode=e.httpResponse.statusCode,void 0===e.error.retryable&&(e.error.retryable=this.service.retryableError(e.error,this)))}),e("INVALIDATE_CREDENTIALS","retry",function(e){
-if(e.error)switch(e.error.code){case"RequestExpired":case"ExpiredTokenException":case"ExpiredToken":e.error.retryable=!0,e.request.service.config.credentials.expired=!0}}),e("EXPIRED_SIGNATURE","retry",function(e){var t=e.error;t&&"string"==typeof t.code&&"string"==typeof t.message&&t.code.match(/Signature/)&&t.message.match(/expired/)&&(e.error.retryable=!0)}),e("REDIRECT","retry",function(e){e.error&&e.error.statusCode>=300&&e.error.statusCode<400&&e.httpResponse.headers.location&&(this.httpRequest.endpoint=new a.Endpoint(e.httpResponse.headers.location),this.httpRequest.headers.Host=this.httpRequest.endpoint.host,e.error.redirect=!0,e.error.retryable=!0)}),e("RETRY_CHECK","retry",function(e){if(e.error)if(e.error.redirect&&e.redirectCount=this.HEADERS_RECEIVED&&!m){try{p.responseType="arraybuffer"}catch(e){}u.statusCode=p.status,u.headers=i.parseHeaders(p.getAllResponseHeaders()),u.emit("headers",u.statusCode,u.headers),m=!0}this.readyState===this.DONE&&i.finishRequest(p,u)},!1),p.upload.addEventListener("progress",function(e){u.emit("sendProgress",e)}),p.addEventListener("progress",function(e){u.emit("receiveProgress",e)},!1),p.addEventListener("timeout",function(){n(a.util.error(new Error("Timeout"),{code:"TimeoutError"}))},!1),p.addEventListener("error",function(){n(a.util.error(new Error("Network Failure"),{code:"NetworkingError"}))},!1),r(u),p.open(e.method,c,t.xhrAsync!==!1),a.util.each(e.headers,function(e,t){"Content-Length"!==e&&"User-Agent"!==e&&"Host"!==e&&p.setRequestHeader(e,t)}),t.timeout&&t.xhrAsync!==!1&&(p.timeout=t.timeout),t.xhrWithCredentials&&(p.withCredentials=!0);try{p.send(e.body)}catch(l){if(!e.body||"object"!=typeof e.body.buffer)throw l;p.send(e.body.buffer)}return u},parseHeaders:function(e){var t={};return a.util.arrayEach(e.split(/\r?\n/),function(e){var r=e.split(":",1)[0],a=e.substring(r.length+2);r.length>0&&(t[r.toLowerCase()]=a)}),t},finishRequest:function(e,t){var r;if("arraybuffer"===e.responseType&&e.response){var o=e.response;r=new a.util.Buffer(o.byteLength);for(var n=new Uint8Array(o),i=0;i1)){if(1===this.errors.length)throw this.errors[0];return!0}var o=this.errors.join("\n* ");if(this.errors.length>1)throw o="There were "+this.errors.length+" validation errors:\n* "+o,a.util.error(new Error(o),{code:"MultipleValidationErrors",errors:this.errors})},validateStructure:function(e,t,r){this.validateType(r,t,["object"],"structure");for(var a,o=0;e.required&&o0){var a=JSON.parse(r.body.toString());(a.__type||a.code)&&(t.code=(a.__type||a.code).split("#").pop()),"RequestEntityTooLarge"===t.code?t.message="Request body must be less than 1 MB":t.message=a.message||a.Message||null}else t.statusCode=r.statusCode,t.message=r.statusCode.toString();e.error=i.error(new Error,t)}function n(e){var t=e.httpResponse.body.toString()||"{}";if(e.request.service.config.convertResponseTypes===!1)e.data=JSON.parse(t);else{var r=e.request.service.api.operations[e.request.operation],a=r.output||{},o=new u;e.data=o.parse(t,a)}}var i=e("../util"),s=e("../json/builder"),u=e("../json/parser");t.exports={buildRequest:a,extractError:o,extractData:n}},{"../json/builder":13,"../json/parser":14,"../util":51}],23:[function(e,t,r){function a(e){var t=e.service.api.operations[e.operation],r=e.httpRequest;r.headers["Content-Type"]="application/x-www-form-urlencoded; charset=utf-8",r.params={Version:e.service.api.apiVersion,Action:t.name};var a=new u;a.serialize(e.params,t.input,function(e,t){r.params[e]=t}),r.body=s.queryParamsToString(r.params)}function o(e){var t,r=e.httpResponse.body.toString();t=r.match("=0?"&":"?";var i=[];c.arrayEach(Object.keys(o).sort(),function(e){Array.isArray(o[e])||(o[e]=[o[e]]);for(var t=0;t0){t=new s.XML.Parser;var m=t.parse(a.toString(),n);u.update(e.data,m)}}var s=e("../core"),u=e("../util"),c=e("./rest");t.exports={buildRequest:o,extractError:n,extractData:i}},{"../core":3,"../util":51,"./rest":24}],27:[function(e,t,r){function a(){}function o(e){return e.isQueryName||"ec2"!==e.api.protocol?e.name:e.name[0].toUpperCase()+e.name.substr(1)}function n(e,t,r,a){c.each(r.members,function(r,n){var i=t[r];if(null!==i&&void 0!==i){var s=o(n);s=e?e+"."+s:s,u(s,i,n,a)}})}function i(e,t,r,a){var o=1;c.each(t,function(t,n){var i=r.flattened?".":".entry.",s=i+o++ +".",c=s+(r.key.name||"key"),p=s+(r.value.name||"value");u(e+c,t,r.key,a),u(e+p,n,r.value,a)})}function s(e,t,r,a){var n=r.member||{};return 0===t.length?void a.call(this,e,null):void c.arrayEach(t,function(t,i){var s="."+(i+1);if("ec2"===r.api.protocol)s+="";else if(r.flattened){if(n.name){var c=e.split(".");c.pop(),c.push(o(n)),e=c.join(".")}}else s=".member"+s;u(e+s,t,n,a)})}function u(e,t,r,a){null!==t&&void 0!==t&&("structure"===r.type?n(e,t,r,a):"list"===r.type?s(e,t,r,a):"map"===r.type?i(e,t,r,a):a(e,r.toWireFormat(t).toString()))}var c=e("../util");a.prototype.serialize=function(e,t,r){n("",e,t,r)},t.exports=a},{"../util":51}],28:[function(e,t,r){function a(e){if(!e)return null;var t=e.split("-");return t.length<3?null:t.slice(0,t.length-2).join("-")+"-*"}function o(e){var t=e.config.region,r=a(t),o=e.api.endpointPrefix;return[[t,o],[r,o],[t,"*"],[r,"*"],["*",o],["*","*"]].map(function(e){return e[0]&&e[1]?e.join("/"):null})}function n(e,t){s.each(t,function(t,r){"globalEndpoint"!==t&&(void 0===e.config[t]||null===e.config[t])&&(e.config[t]=r)})}function i(e){for(var t=o(e),r=0;re){r.removeListener("httpData",a.EventListeners.Core.HTTP_DATA),r.removeListener("httpError",a.EventListeners.Core.HTTP_ERROR),r.on("httpError",function(e){n.error=e,n.error.retryable=!1});var i=n.httpResponse.createUnbufferedStream();2===a.HttpClient.streamsApiVersion?i.pipe(o):(i.on("data",function(e){o.emit("data",e)}),i.on("end",function(){o.emit("end")})),i.on("error",function(e){o.emit("error",e)})}}),this.on("error",function(e){o.emit("error",e)}),o},emitEvent:function(e,t,r){"function"==typeof t&&(r=t,t=null),r||(r=function(){}),t||(t=this.eventParameters(e,this.response));var o=a.SequentialExecutor.prototype.emit;o.call(this,e,t,function(e){e&&(this.response.error=e),r.call(this,e)})},eventParameters:function(e){switch(e){case"restart":case"validate":case"sign":case"build":case"afterValidate":case"afterBuild":return[this];case"error":return[this.response.error,this.response];default:return[this.response]}},presign:function(e,t){return t||"function"!=typeof e||(t=e,e=null),(new a.Signers.Presign).sign(this.toGet(),e,t)},toUnauthenticated:function(){return this.removeListener("validate",a.EventListeners.Core.VALIDATE_CREDENTIALS),this.removeListener("sign",a.EventListeners.Core.SIGN),this.toGet()},toGet:function(){return("query"===this.service.api.protocol||"ec2"===this.service.api.protocol)&&(this.removeListener("build",this.buildAsGet),this.addListener("build",this.buildAsGet)),this},buildAsGet:function(e){e.httpRequest.method="GET",e.httpRequest.path=e.service.endpoint.path+"?"+e.httpRequest.body,e.httpRequest.body="",delete e.httpRequest.headers["Content-Length"],delete e.httpRequest.headers["Content-Type"]},haltHandlersOnError:function(){this._haltHandlersOnError=!0}}),a.util.mixin(a.Request,a.SequentialExecutor)}).call(this,e("FWaASH"))},{"./core":3,"./state_machine":50,FWaASH:65}],31:[function(e,t,r){var a=e("./core"),o=a.util.inherit;a.ResourceWaiter=o({constructor:function(e,t){this.service=e,this.state=t,"object"==typeof this.state&&a.util.each.call(this,this.state,function(e,t){this.state=e,this.expectedValue=t}),this.loadWaiterConfig(this.state),this.expectedValue||(this.expectedValue=this.config.successValue)},service:null,state:null,expectedValue:null,config:null,waitDone:!1,Listeners:{retry:(new a.SequentialExecutor).addNamedListeners(function(e){e("RETRY_CHECK","retry",function(e){var t=e.request._waiter;e.error&&"ResourceNotReady"===e.error.code&&(e.error.retryDelay=1e3*t.config.interval)})}),output:(new a.SequentialExecutor).addNamedListeners(function(e){e("CHECK_OUT_ERROR","extractError",function(e){e.error&&e.request._waiter.setError(e,!0)}),e("CHECK_OUTPUT","extractData",function(e){var t=e.request._waiter,r=t.checkSuccess(e);r?e.error=null:t.setError(e,null===r?!1:!0)})}),error:(new a.SequentialExecutor).addNamedListeners(function(e){e("CHECK_ERROR","extractError",function(e){var t=e.request._waiter,r=t.checkError(e);r?(e.error=null,e.data={},e.request.removeAllListeners("extractData")):t.setError(e,null===r?!1:!0)}),e("CHECK_ERR_OUTPUT","extractData",function(e){e.request._waiter.setError(e,!0)})})},wait:function(e,t){"function"==typeof e&&(t=e,e=void 0);var r=this.service.makeRequest(this.config.operation,e),a=this.Listeners[this.config.successType];return r._waiter=this,r.response.maxRetries=this.config.maxAttempts,r.addListeners(this.Listeners.retry),a&&r.addListeners(a),t&&r.send(t),r},setError:function(e,t){e.data=null,e.error=a.util.error(e.error||new Error,{code:"ResourceNotReady",message:"Resource is not in the state "+this.state,retryable:t})},checkSuccess:function(e){if(!this.config.successPath)return e.httpResponse.statusCode<300;var t=a.util.jamespath.find(this.config.successPath,e.data);return this.config.failureValue&&this.config.failureValue.indexOf(t)>=0?null:this.expectedValue?t===this.expectedValue:t?!0:!1},checkError:function(e){var t=this.config.successValue;return"number"==typeof t?e.httpResponse.statusCode===t:e.error&&e.error.code===t},loadWaiterConfig:function(e,t){if(!this.service.api.waiters[e]){if(t)return;throw new a.util.error(new Error,{code:"StateNotFoundError",message:"State "+e+" not found."})}this.config=this.service.api.waiters[e];var r=this.config;!function(){r.successType=r.successType||r.acceptorType,r.successPath=r.successPath||r.acceptorPath,r.successValue=r.successValue||r.acceptorValue,r.failureType=r.failureType||r.acceptorType,r.failurePath=r.failurePath||r.acceptorPath,r.failureValue=r.failureValue||r.acceptorValue}()}})},{"./core":3}],32:[function(e,t,r){var a=e("./core"),o=a.util.inherit;a.Response=o({constructor:function(e){this.request=e,this.data=null,this.error=null,this.retryCount=0,this.redirectCount=0,this.httpResponse=new a.HttpResponse,e&&(this.maxRetries=e.service.numRetries(),this.maxRedirects=e.service.config.maxRedirects)},nextPage:function(e){var t,r=this.request.service,o=this.request.operation;try{t=r.paginationConfig(o,!0)}catch(n){this.error=n}if(!this.hasNextPage()){if(e)e(this.error,null);else if(this.error)throw this.error;return null}var i=a.util.copy(this.request.params);if(this.nextPageTokens){var s=t.inputToken;"string"==typeof s&&(s=[s]);for(var u=0;ue.partSize&&(e.partSize=r)}else e.totalBytes=void 0},isDoneChunking:!1,partPos:0,totalChunkedBytes:0,totalUploadedBytes:0,totalBytes:void 0,numParts:0,totalPartNumbers:0,activeParts:0,doneParts:0,parts:null,completeInfo:null,failed:!1,multipartReq:null,partBuffers:null,partBufferLength:0,fillBuffer:function(){var e=this,t=o(e.body);if(0===t)return e.isDoneChunking=!0,e.numParts=1,void e.nextChunk(e.body);for(;e.activeParts=e.queueSize)){var t=e.body.read(e.partSize-e.partBufferLength)||e.body.read();if(t&&(e.partBuffers.push(t),e.partBufferLength+=t.length,e.totalChunkedBytes+=t.length),e.partBufferLength>=e.partSize){var a=r.concat(e.partBuffers);if(e.partBuffers=[],e.partBufferLength=0,a.length>e.partSize){var o=a.slice(e.partSize);e.partBuffers.push(o),e.partBufferLength+=o.length,a=a.slice(0,e.partSize)}e.nextChunk(a)}e.isDoneChunking&&!e.isDoneSending&&(a=r.concat(e.partBuffers),e.partBuffers=[],e.partBufferLength=0,e.totalBytes=e.totalChunkedBytes,e.isDoneSending=!0,(0===e.numParts||a.length>0)&&(e.numParts++,e.nextChunk(a))),e.body.read(0)}},nextChunk:function(e){var t=this;if(t.failed)return null;var r=++t.totalPartNumbers;if(t.isDoneChunking&&1===r){var a=t.service.putObject({Body:e});return a._managedUpload=t,a.on("httpUploadProgress",t.progress).send(t.finishSinglePart),null}t.activeParts++,t.service.config.params.UploadId?t.uploadPart(e,r):t.multipartReq?t.queueChunks(e,r):(t.multipartReq=t.service.createMultipartUpload(),t.multipartReq.on("success",function(e){t.service.config.params.UploadId=e.data.UploadId,t.multipartReq=null}),t.queueChunks(e,r),t.multipartReq.on("error",function(e){t.cleanup(e)}),t.multipartReq.send())},uploadPart:function(e,t){var r=this,o={Body:e,ContentLength:a.util.string.byteLength(e),PartNumber:t},n={ETag:null,PartNumber:t};r.completeInfo.push(n);var i=r.service.uploadPart(o);r.parts[t]=i,i._lastUploadedBytes=0,i._managedUpload=r,i.on("httpUploadProgress",r.progress),i.send(function(e,t){if(delete r.parts[o.PartNumber],r.activeParts--,!(e||t&&t.ETag)){var i="No access to ETag property on response.";a.util.isBrowser()&&(i+=" Check CORS configuration to expose ETag header."),e=a.util.error(new Error(i),{code:"ETagMissing",retryable:!1})}return e?r.cleanup(e):(n.ETag=t.ETag,r.doneParts++,void(r.isDoneChunking&&r.doneParts===r.numParts?r.finishMultiPart():r.fillQueue.call(r)))})},queueChunks:function(e,t){var r=this;r.multipartReq.on("success",function(){r.uploadPart(e,t)})},cleanup:function(e){var t=this;t.failed||("function"==typeof t.body.removeAllListeners&&"function"==typeof t.body.resume&&(t.body.removeAllListeners("readable"),t.body.removeAllListeners("end"),t.body.resume()),t.service.config.params.UploadId&&!t.leavePartsOnError&&t.service.abortMultipartUpload().send(),a.util.each(t.parts,function(e,t){t.removeAllListeners("complete"),t.abort()}),t.parts={},t.callback(e),t.failed=!0)},finishMultiPart:function(){var e=this,t={MultipartUpload:{Parts:e.completeInfo}};e.service.completeMultipartUpload(t,function(t,r){return t?e.cleanup(t):void e.callback(t,r)})},finishSinglePart:function(e,t){var r=this.request._managedUpload,o=this.request.httpRequest,n=a.util.urlFormat(o.endpoint);return e?r.callback(e):(t.Location=n.substr(0,n.length-1)+o.path,void r.callback(e,t))},progress:function(e){var t=this._managedUpload;"putObject"===this.operation?e.part=1:(t.totalUploadedBytes+=e.loaded-this._lastUploadedBytes,this._lastUploadedBytes=e.loaded,e={loaded:t.totalUploadedBytes,total:t.totalBytes,part:this.params.PartNumber}),t.emit("httpUploadProgress",[e])}}),a.util.mixin(a.S3.ManagedUpload,a.SequentialExecutor),t.exports=a.S3.ManagedUpload}).call(this,e("buffer").Buffer)},{"../core":3,buffer:54}],34:[function(e,t,r){var a=e("./core");a.SequentialExecutor=a.util.inherit({constructor:function(){this._events={}},listeners:function(e){return this._events[e]?this._events[e].slice(0):[]},on:function(e,t){return this._events[e]?this._events[e].push(t):this._events[e]=[t],this},onAsync:function(e,t){return t._isAsync=!0,this.on(e,t)},removeListener:function(e,t){var r=this._events[e];if(r){for(var a=r.length,o=-1,n=0;a>n;++n)r[n]===t&&(o=n);o>-1&&r.splice(o,1)}return this},removeAllListeners:function(e){return e?delete this._events[e]:this._events={},this},emit:function(e,t,r){r||(r=function(){});var a=this.listeners(e),o=a.length;return this.callListeners(a,t,r),o>0},callListeners:function(e,t,r,o){function n(o){return o&&(s=a.util.error(s||new Error,o),i._haltHandlersOnError)?r.call(i,s):void i.callListeners(e,t,r,s)}for(var i=this,s=o||null;e.length>0;){var u=e.shift();if(u._isAsync)return void u.apply(i,t.concat([n]));try{u.apply(i,t)}catch(c){s=a.util.error(s||new Error,c)}if(s&&i._haltHandlersOnError)return void r.call(i,s)}r.call(i,s)},addListeners:function(e){var t=this;return e._events&&(e=e._events),a.util.each(e,function(e,r){"function"==typeof r&&(r=[r]),a.util.arrayEach(r,function(r){t.on(e,r)})}),t},addNamedListener:function(e,t,r){return this[e]=r,this.addListener(t,r),this},addNamedAsyncListener:function(e,t,r){return r._isAsync=!0,this.addNamedListener(e,t,r)},addNamedListeners:function(e){var t=this;return e(function(){t.addNamedListener.apply(t,arguments)},function(){t.addNamedAsyncListener.apply(t,arguments)}),this}}),a.SequentialExecutor.prototype.addListener=a.SequentialExecutor.prototype.on,t.exports=a.SequentialExecutor},{"./core":3}],35:[function(e,t,r){var a=e("./core"),o=e("./model/api"),n=e("./region_config"),i=a.util.inherit;a.Service=i({constructor:function(e){if(!this.loadServiceClass)throw a.util.error(new Error,"Service must be constructed with `new' operator");var t=this.loadServiceClass(e||{});return t?new t(e):void this.initialize(e)},initialize:function(e){var t=a.config[this.serviceIdentifier];this.config=new a.Config(a.config),t&&this.config.update(t,!0),e&&this.config.update(e,!0),this.validateService(),this.config.endpoint||n(this),this.config.endpoint=this.endpointFromTemplate(this.config.endpoint),this.setEndpoint(this.config.endpoint)},validateService:function(){},loadServiceClass:function(e){var t=e;if(a.util.isEmpty(this.api)){if(t.apiConfig)return a.Service.defineServiceApi(this.constructor,t.apiConfig);if(this.constructor.services){t=new a.Config(a.config),t.update(e,!0);var r=t.apiVersions[this.constructor.serviceIdentifier];return r=r||t.apiVersion,this.getLatestServiceClass(r)}return null}return null},getLatestServiceClass:function(e){return e=this.getLatestServiceVersion(e),null===this.constructor.services[e]&&a.Service.defineServiceApi(this.constructor,e),this.constructor.services[e]},getLatestServiceVersion:function(e){if(!this.constructor.services||0===this.constructor.services.length)throw new Error("No services defined on "+this.constructor.serviceIdentifier);if(e?a.util.isType(e,Date)&&(e=a.util.date.iso8601(e).split("T")[0]):e="latest",Object.hasOwnProperty(this.constructor.services,e))return e;for(var t=Object.keys(this.constructor.services).sort(),r=null,o=t.length-1;o>=0;o--)if("*"!==t[o][t[o].length-1]&&(r=t[o]),t[o].substr(0,10)<=e)return r;throw new Error("Could not find "+this.constructor.serviceIdentifier+" API to satisfy version constraint `"+e+"'")},api:{},defaultRetryCount:3,makeRequest:function(e,t,r){if("function"==typeof t&&(r=t,t=null),t=t||{},this.config.params){var o=this.api.operations[e];o&&(t=a.util.copy(t),a.util.each(this.config.params,function(e,r){o.input.members[e]&&(void 0===t[e]||null===t[e])&&(t[e]=r)}))}var n=new a.Request(this,e,t);return this.addAllRequestListeners(n),r&&n.send(r),n},makeUnauthenticatedRequest:function(e,t,r){"function"==typeof t&&(r=t,t={});var a=this.makeRequest(e,t).toUnauthenticated();return r?a.send(r):a},waitFor:function(e,t,r){var o=new a.ResourceWaiter(this,e);return o.wait(t,r)},addAllRequestListeners:function(e){for(var t=[a.events,a.EventListeners.Core,this.serviceInterface(),a.EventListeners.CorePost],r=0;rr;++r)t[r]=30*Math.pow(2,r);return t},retryableError:function(e){return this.networkingError(e)?!0:this.expiredCredentialsError(e)?!0:this.throttledError(e)?!0:e.statusCode>=500?!0:!1},networkingError:function(e){return"NetworkingError"===e.code},expiredCredentialsError:function(e){return"ExpiredTokenException"===e.code},throttledError:function(e){switch(e.code){case"ProvisionedThroughputExceededException":case"Throttling":case"ThrottlingException":case"RequestLimitExceeded":case"RequestThrottled":return!0;default:return!1}},endpointFromTemplate:function(e){if("string"!=typeof e)return e;var t=e;return t=t.replace(/\{service\}/g,this.api.endpointPrefix),t=t.replace(/\{region\}/g,this.config.region),t=t.replace(/\{scheme\}/g,this.config.sslEnabled?"https":"http")},setEndpoint:function(e){this.endpoint=new a.Endpoint(e,this.config)},paginationConfig:function(e,t){var r=this.api.operations[e].paginator;if(!r){if(t){var o=new Error;throw a.util.error(o,"No pagination configuration for "+e)}return null}return r}}),a.util.update(a.Service,{defineMethods:function(e){a.util.each(e.prototype.api.operations,function(t){e.prototype[t]||(e.prototype[t]=function(e,r){return this.makeRequest(t,e,r)})})},defineService:function(e,t,r){a.Service._serviceMap[e]=!0,Array.isArray(t)||(r=t,t=[]);var o=i(a.Service,r||{});if("string"==typeof e){a.Service.addVersions(o,t);var n=o.serviceIdentifier||e;o.serviceIdentifier=n}else o.prototype.api=e,a.Service.defineMethods(o);return o},addVersions:function(e,t){Array.isArray(t)||(t=[t]),e.services=e.services||{};for(var r=0;rr;++r)0===r?t.push(0):t.push(50*Math.pow(2,r-1));return t}})},{"../core":3}],38:[function(e,t,r){var a=e("../core");a.util.update(a.EC2.prototype,{setupRequestListeners:function(e){e.removeListener("extractError",a.EventListeners.Query.EXTRACT_ERROR),e.addListener("extractError",this.extractError),"copySnapshot"===e.operation&&e.onAsync("validate",this.buildCopySnapshotPresignedUrl)},buildCopySnapshotPresignedUrl:function(e,t){if(e.params.PresignedUrl||e._subRequest)return t();e.params=a.util.copy(e.params),e.params.DestinationRegion=e.service.config.region;var r=a.util.copy(e.service.config);delete r.endpoint,r.region=e.params.SourceRegion;var o=new e.service.constructor(r),n=o[e.operation](e.params);n._subRequest=!0,n.presign(function(r,a){r?t(r):(e.params.PresignedUrl=a,t())})},extractError:function(e){var t=e.httpResponse,r=(new a.XML.Parser).parse(t.body.toString()||"");r.Errors?e.error=a.util.error(new Error,{code:r.Errors.Error.Code,message:r.Errors.Error.Message}):e.error=a.util.error(new Error,{code:t.statusCode,message:null})}})},{"../core":3}],39:[function(e,t,r){var a=e("../core");a.util.update(a.MachineLearning.prototype,{setupRequestListeners:function(e){"predict"===e.operation&&e.addListener("build",this.buildEndpoint)},buildEndpoint:function(e){var t=e.params.PredictEndpoint;t&&(e.httpRequest.endpoint=new a.Endpoint(t))}})},{"../core":3}],40:[function(e,t,r){var a=e("../core");e("../s3/managed_upload"),a.util.update(a.S3.prototype,{validateService:function(){if(this.config.region||(this.config.region="us-east-1"),!this.config.endpoint&&this.config.s3BucketEndpoint){var e="An endpoint must be provided when configuring `s3BucketEndpoint` to true.";throw a.util.error(new Error,{name:"InvalidEndpoint",message:e})}},setupRequestListeners:function(e){e.addListener("validate",this.validateScheme),e.addListener("validate",this.validateBucketEndpoint),e.addListener("build",this.addContentType),e.addListener("build",this.populateURI),e.addListener("build",this.computeContentMd5),e.addListener("build",this.computeSseCustomerKeyMd5),e.addListener("afterBuild",this.addExpect100Continue),e.removeListener("validate",a.EventListeners.Core.VALIDATE_REGION),e.addListener("extractError",this.extractError),e.addListener("extractData",this.extractData),e.addListener("extractData",a.util.hoistPayloadMember),e.addListener("beforePresign",this.prepareSignedUrl)},validateScheme:function(e){var t=e.params,r=e.httpRequest.endpoint.protocol,o=t.SSECustomerKey||t.CopySourceSSECustomerKey;if(o&&"https:"!==r){var n="Cannot send SSE keys over HTTP. Set 'sslEnabled'to 'true' in your configuration";throw a.util.error(new Error,{code:"ConfigError",message:n})}},validateBucketEndpoint:function(e){if(!e.params.Bucket&&e.service.config.s3BucketEndpoint){var t="Cannot send requests to root API with `s3BucketEndpoint` set.";throw a.util.error(new Error,{code:"ConfigError",message:t})}},populateURI:function(e){var t=e.httpRequest,r=e.params.Bucket;if(r&&!e.service.pathStyleBucketName(r)){if(!e.service.config.s3BucketEndpoint){t.endpoint.hostname=r+"."+t.endpoint.hostname;var a=t.endpoint.port;80!==a&&443!==a?t.endpoint.host=t.endpoint.hostname+":"+t.endpoint.port:t.endpoint.host=t.endpoint.hostname}t.virtualHostedBucket=r,t.path=t.path.replace(new RegExp("/"+r),""),"/"!==t.path[0]&&(t.path="/"+t.path)}},addExpect100Continue:function(e){var t=e.httpRequest.headers["Content-Length"];a.util.isNode()&&t>=1048576&&(e.httpRequest.headers.Expect="100-continue")},addContentType:function(e){var t=e.httpRequest;if("GET"===t.method||"HEAD"===t.method)return void delete t.headers["Content-Type"];t.headers["Content-Type"]||(t.headers["Content-Type"]="application/octet-stream");var r=t.headers["Content-Type"];if(a.util.isBrowser())if("string"!=typeof t.body||r.match(/;\s*charset=/)){var o=function(e,t,r){return t+r.toUpperCase()};t.headers["Content-Type"]=r.replace(/(;\s*charset=)(.+)$/,o)}else{var n="; charset=UTF-8";t.headers["Content-Type"]+=n}},computableChecksumOperations:{putBucketCors:!0,putBucketLifecycle:!0,putBucketTagging:!0,deleteObjects:!0},willComputeChecksums:function(e){if(this.computableChecksumOperations[e.operation])return!0;if(!this.config.computeChecksums)return!1;if(!a.util.Buffer.isBuffer(e.httpRequest.body)&&"string"!=typeof e.httpRequest.body)return!1;var t=e.service.api.operations[e.operation].input.members;return e.service.getSignerClass(e)===a.Signers.V4&&t.ContentMD5&&!t.ContentMD5.required?!1:t.ContentMD5&&!e.params.ContentMD5?!0:void 0},computeContentMd5:function(e){if(e.service.willComputeChecksums(e)){var t=a.util.crypto.md5(e.httpRequest.body,"base64");e.httpRequest.headers["Content-MD5"]=t}},computeSseCustomerKeyMd5:function(e){var t={SSECustomerKey:"x-amz-server-side-encryption-customer-key-MD5",CopySourceSSECustomerKey:"x-amz-copy-source-server-side-encryption-customer-key-MD5"};a.util.each(t,function(t,r){if(e.params[t]){var o=a.util.crypto.md5(e.params[t],"base64");e.httpRequest.headers[r]=o}})},pathStyleBucketName:function(e){return this.config.s3ForcePathStyle?!0:this.config.s3BucketEndpoint?!1:this.dnsCompatibleBucketName(e)?this.config.sslEnabled&&e.match(/\./)?!0:!1:!0},dnsCompatibleBucketName:function(e){var t=e,r=new RegExp(/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/),a=new RegExp(/(\d+\.){3}\d+/),o=new RegExp(/\.\./);return!t.match(r)||t.match(a)||t.match(o)?!1:!0},successfulResponse:function(e){var t=e.request,r=e.httpResponse;return"completeMultipartUpload"===t.operation&&r.body.toString().match("")?!1:r.statusCode<300},retryableError:function(e,t){if("completeMultipartUpload"===t.operation&&200===e.statusCode)return!0;if(e&&"RequestTimeout"===e.code)return!0;var r=a.Service.prototype.retryableError;return r.call(this,e,t)},extractData:function(e){var t=e.request;if("getBucketLocation"===t.operation){var r=e.httpResponse.body.toString().match(/>(.+)<\/Location/);delete e.data._,r?e.data.LocationConstraint=r[1]:e.data.LocationConstraint=""}},extractError:function(e){var t={304:"NotModified",403:"Forbidden",400:"BadRequest",404:"NotFound"},r=e.httpResponse.statusCode,o=e.httpResponse.body||"";if(t[r]&&0===o.length)e.error=a.util.error(new Error,{code:t[e.httpResponse.statusCode],message:null});else{var n=(new a.XML.Parser).parse(o.toString());e.error=a.util.error(new Error,{code:n.Code||r,message:n.Message||null})}},getSignedUrl:function(e,t,r){t=a.util.copy(t||{});var o=t.Expires||900;delete t.Expires;var n=this.makeRequest(e,t);return n.presign(o,r)},prepareSignedUrl:function(e){e.addListener("validate",e.service.noPresignedContentLength),e.removeListener("build",e.service.addContentType),e.params.Body?e.addListener("afterBuild",a.EventListeners.Core.COMPUTE_SHA256):e.removeListener("build",e.service.computeContentMd5)},noPresignedContentLength:function(e){if(void 0!==e.params.ContentLength)throw a.util.error(new Error,{code:"UnexpectedParameter",message:"ContentLength is not supported in pre-signed URLs."})},createBucket:function(e,t){e||(e={});var r=this.endpoint.hostname;return r===this.api.globalEndpoint||e.CreateBucketConfiguration||(e.CreateBucketConfiguration={LocationConstraint:this.config.region}),this.makeRequest("createBucket",e,t)},upload:function(e,t,r){"function"==typeof t&&void 0===r&&(r=t,t=null),t=t||{},t=a.util.merge(t||{},{service:this,params:e});var o=new a.S3.ManagedUpload(t);return"function"==typeof r&&o.send(r),o}})},{"../core":3,"../s3/managed_upload":33}],41:[function(e,t,r){var a=e("../core");a.util.update(a.SQS.prototype,{setupRequestListeners:function(e){e.addListener("build",this.buildEndpoint),e.service.config.computeChecksums&&("sendMessage"===e.operation?e.addListener("extractData",this.verifySendMessageChecksum):"sendMessageBatch"===e.operation?e.addListener("extractData",this.verifySendMessageBatchChecksum):"receiveMessage"===e.operation&&e.addListener("extractData",this.verifyReceiveMessageChecksum))},verifySendMessageChecksum:function(e){if(e.data){var t=e.data.MD5OfMessageBody,r=this.params.MessageBody,a=this.service.calculateChecksum(r);if(a!==t){var o='Got "'+e.data.MD5OfMessageBody+'", expecting "'+a+'".';this.service.throwInvalidChecksumError(e,[e.data.MessageId],o)}}},verifySendMessageBatchChecksum:function(e){if(e.data){var t=this.service,r={},o=[],n=[];a.util.arrayEach(e.data.Successful,function(e){r[e.Id]=e}),a.util.arrayEach(this.params.Entries,function(e){if(r[e.Id]){var a=r[e.Id].MD5OfMessageBody,i=e.MessageBody;t.isChecksumValid(a,i)||(o.push(e.Id),n.push(r[e.Id].MessageId))}}),o.length>0&&t.throwInvalidChecksumError(e,n,"Invalid messages: "+o.join(", "))}},verifyReceiveMessageChecksum:function(e){if(e.data){var t=this.service,r=[];a.util.arrayEach(e.data.Messages,function(e){var a=e.MD5OfBody,o=e.Body;t.isChecksumValid(a,o)||r.push(e.MessageId)}),r.length>0&&t.throwInvalidChecksumError(e,r,"Invalid messages: "+r.join(", "))}},throwInvalidChecksumError:function(e,t,r){e.error=a.util.error(new Error,{retryable:!0,code:"InvalidChecksum",messageIds:t,message:e.request.operation+" returned an invalid MD5 response. "+r})},isChecksumValid:function(e,t){return this.calculateChecksum(t)===e},calculateChecksum:function(e){return a.util.crypto.md5(e,"hex")},buildEndpoint:function(e){var t=e.httpRequest.params.QueueUrl;if(t){e.httpRequest.endpoint=new a.Endpoint(t);var r=e.httpRequest.endpoint.host.match(/^sqs\.(.+?)\./);r&&(e.httpRequest.region=r[1])}}})},{"../core":3}],42:[function(e,t,r){var a=e("../core");a.util.update(a.STS.prototype,{credentialsFrom:function(e,t){return e?(t||(t=new a.TemporaryCredentials),t.expired=!1,t.accessKeyId=e.Credentials.AccessKeyId,t.secretAccessKey=e.Credentials.SecretAccessKey,t.sessionToken=e.Credentials.SessionToken,t.expireTime=e.Credentials.Expiration,t):null},assumeRoleWithWebIdentity:function(e,t){return this.makeUnauthenticatedRequest("assumeRoleWithWebIdentity",e,t)},assumeRoleWithSAML:function(e,t){return this.makeUnauthenticatedRequest("assumeRoleWithSAML",e,t)}})},{"../core":3}],43:[function(e,t,r){function a(e){var t=e.httpRequest.headers[s];
-if(delete e.httpRequest.headers["User-Agent"],delete e.httpRequest.headers["X-Amz-User-Agent"],e.service.getSignerClass()===n.Signers.V4){if(t>604800){var r="Presigning does not support expiry time greater than a week with SigV4 signing.";throw n.util.error(new Error,{code:"InvalidExpiryTime",message:r,retryable:!1})}e.httpRequest.headers[s]=t}else{if(e.service.getSignerClass()!==n.Signers.S3)throw n.util.error(new Error,{message:"Presigning only supports S3 or SigV4 signing.",code:"UnsupportedSigner",retryable:!1});e.httpRequest.headers[s]=parseInt(n.util.date.unixTimestamp()+t,10).toString()}}function o(e){var t=e.httpRequest.endpoint,r=n.util.urlParse(e.httpRequest.path),a={};r.search&&(a=n.util.queryStringParse(r.search.substr(1))),n.util.each(e.httpRequest.headers,function(e,t){e===s&&(e="Expires"),a[e]=t}),delete e.httpRequest.headers[s];var o=a.Authorization.split(" ");if("AWS"===o[0])o=o[1].split(":"),a.AWSAccessKeyId=o[0],a.Signature=o[1];else if("AWS4-HMAC-SHA256"===o[0]){o.shift();var i=o.join(" "),u=i.match(/Signature=(.*?)(?:,|\s|\r?\n|$)/)[1];a["X-Amz-Signature"]=u,delete a.Expires}delete a.Authorization,delete a.Host,t.pathname=r.pathname,t.search=n.util.queryParamsToString(a)}var n=e("../core"),i=n.util.inherit,s="presigned-expires";n.Signers.Presign=i({sign:function(e,t,r){if(e.httpRequest.headers[s]=t||3600,e.on("build",a),e.on("sign",o),e.removeListener("afterBuild",n.EventListeners.Core.SET_CONTENT_LENGTH),e.removeListener("afterBuild",n.EventListeners.Core.COMPUTE_SHA256),e.emit("beforePresign",[e]),!r){if(e.build(),e.response.error)throw e.response.error;return n.util.urlFormat(e.httpRequest.endpoint)}e.build(function(){this.response.error?r(this.response.error):r(null,n.util.urlFormat(e.httpRequest.endpoint))})}}),t.exports=n.Signers.Presign},{"../core":3}],44:[function(e,t,r){var a=e("../core"),o=a.util.inherit;a.Signers.RequestSigner=o({constructor:function(e){this.request=e}}),a.Signers.RequestSigner.getVersion=function(e){switch(e){case"v2":return a.Signers.V2;case"v3":return a.Signers.V3;case"v4":return a.Signers.V4;case"s3":return a.Signers.S3;case"v3https":return a.Signers.V3Https}throw new Error("Unknown signing version "+e)},e("./v2"),e("./v3"),e("./v3https"),e("./v4"),e("./s3"),e("./presign")},{"../core":3,"./presign":43,"./s3":45,"./v2":46,"./v3":47,"./v3https":48,"./v4":49}],45:[function(e,t,r){var a=e("../core"),o=a.util.inherit;a.Signers.S3=o(a.Signers.RequestSigner,{subResources:{acl:1,cors:1,lifecycle:1,"delete":1,location:1,logging:1,notification:1,partNumber:1,policy:1,requestPayment:1,restore:1,tagging:1,torrent:1,uploadId:1,uploads:1,versionId:1,versioning:1,versions:1,website:1},responseHeaders:{"response-content-type":1,"response-content-language":1,"response-expires":1,"response-cache-control":1,"response-content-disposition":1,"response-content-encoding":1},addAuthorization:function(e,t){this.request.headers["presigned-expires"]||(this.request.headers["X-Amz-Date"]=a.util.date.rfc822(t)),e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken);var r=this.sign(e.secretAccessKey,this.stringToSign()),o="AWS "+e.accessKeyId+":"+r;this.request.headers.Authorization=o},stringToSign:function(){var e=this.request,t=[];t.push(e.method),t.push(e.headers["Content-MD5"]||""),t.push(e.headers["Content-Type"]||""),t.push(e.headers["presigned-expires"]||"");var r=this.canonicalizedAmzHeaders();return r&&t.push(r),t.push(this.canonicalizedResource()),t.join("\n")},canonicalizedAmzHeaders:function(){var e=[];a.util.each(this.request.headers,function(t){t.match(/^x-amz-/i)&&e.push(t)}),e.sort(function(e,t){return e.toLowerCase()=0?"&":"?";this.request.path+=n+a.util.queryParamsToString(o)},authorization:function(e,t){var r=[],a=this.credentialString(t);return r.push(this.algorithm+" Credential="+e.accessKeyId+"/"+a),r.push("SignedHeaders="+this.signedHeaders()),r.push("Signature="+this.signature(e,t)),r.join(", ")},signature:function(e,t){var r=n[this.serviceName],o=t.substr(0,8);if(!r||r.akid!==e.accessKeyId||r.region!==this.request.region||r.date!==o){var i=e.secretAccessKey,s=a.util.crypto.hmac("AWS4"+i,o,"buffer"),u=a.util.crypto.hmac(s,this.request.region,"buffer"),c=a.util.crypto.hmac(u,this.serviceName,"buffer"),p=a.util.crypto.hmac(c,"aws4_request","buffer");n[this.serviceName]={region:this.request.region,date:o,key:p,akid:e.accessKeyId}}var m=n[this.serviceName].key;return a.util.crypto.hmac(m,this.stringToSign(t),"hex")},stringToSign:function(e){var t=[];return t.push("AWS4-HMAC-SHA256"),t.push(e),t.push(this.credentialString(e)),t.push(this.hexEncodedHash(this.canonicalString())),t.join("\n")},canonicalString:function(){var e=[],t=this.request.pathname();return"s3"!==this.serviceName&&(t=a.util.uriEscapePath(t)),e.push(this.request.method),e.push(t),e.push(this.request.search()),e.push(this.canonicalHeaders()+"\n"),e.push(this.signedHeaders()),e.push(this.hexEncodedBodyHash()),e.join("\n")},canonicalHeaders:function(){var e=[];a.util.each.call(this,this.request.headers,function(t,r){e.push([t,r])}),e.sort(function(e,t){return e[0].toLowerCase()=e.length)return t.push(null);var o=r+a;o>e.length&&(o=e.length),t.push(e.slice(r,o)),r=o},t},concat:function(e){var t,r=0,a=0,o=null;for(t=0;ta&&(a=e.length+a),r.push(e[a])}}),a=r),0===a.length?i.abort:void 0}),a.length>0?(r=a,i.abort):void 0}),r},find:function(e,t){return i.jamespath.query(e,t)[0]}},date:{getDate:function(){return a||(a=e("./core")),a.config.systemClockOffset?new Date((new Date).getTime()+a.config.systemClockOffset):new Date},iso8601:function(e){return void 0===e&&(e=i.date.getDate()),e.toISOString().replace(/\.\d{3}Z$/,"Z")},rfc822:function(e){return void 0===e&&(e=i.date.getDate()),e.toUTCString()},unixTimestamp:function(e){return void 0===e&&(e=i.date.getDate()),e.getTime()/1e3},from:function(e){return"number"==typeof e?new Date(1e3*e):new Date(e)},format:function(e,t){return t||(t="iso8601"),i.date[t](i.date.from(e))},parseTimestamp:function(e){if("number"==typeof e)return new Date(1e3*e);if(e.match(/^\d+$/))return new Date(1e3*e);if(e.match(/^\d{4}/))return new Date(e);if(e.match(/^\w{3},/))return new Date(e);throw i.error(new Error("unhandled timestamp format: "+e),{code:"TimestampParserError"})}},crypto:{crc32Table:[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],crc32:function(e){var t=i.crypto.crc32Table,r=-1;"string"==typeof e&&(e=new n(e));for(var a=0;a>>8^t[255&(r^o)]}return(-1^r)>>>0},hmac:function(e,t,r,a){return r||(r="binary"),"buffer"===r&&(r=void 0),a||(a="sha256"),"string"==typeof t&&(t=new n(t)),o.createHmac(a,e).update(t).digest(r)},md5:function(e,t,r){return i.crypto.hash("md5",e,t,r)},sha256:function(e,t,r){return i.crypto.hash("sha256",e,t,r)},hash:function(e,t,r,a){var o=i.crypto.createHash(e);r||(r="binary"),"buffer"===r&&(r=void 0),"string"==typeof t&&(t=new n(t));var s=i.arraySliceFn(t),u=n.isBuffer(t);if(a&&"object"==typeof t&&"function"==typeof t.on&&!u)t.on("data",function(e){o.update(e)}),t.on("error",function(e){a(e)}),t.on("end",function(){a(null,o.digest(r))});else{if(!a||!s||u||"undefined"==typeof FileReader){i.isBrowser()&&"object"==typeof t&&!u&&(t=new n(new Uint8Array(t)));var c=o.update(t).digest(r);return a&&a(null,c),c}var p=0,m=524288,l=new FileReader;l.onerror=function(){a(new Error("Failed to read data."))},l.onload=function(){var e=new n(new Uint8Array(l.result));o.update(e),p+=e.length,l._continueReading()},l._continueReading=function(){if(p>=t.size)return void a(null,o.digest(r));var e=p+m;e>t.size&&(e=t.size),l.readAsArrayBuffer(s.call(t,p,e))},l._continueReading()}},toHex:function(e){for(var t=[],r=0;r0||a?n.root().toString():""},t.exports=a},{"../util":51,xmlbuilder:75}],54:[function(e,t,r){function a(e,t,r){if(!(this instanceof a))return new a(e,t,r);var o=typeof e;if("base64"===t&&"string"===o)for(e=A(e);e.length%4!==0;)e+="=";var n;if("number"===o)n=x(e);else if("string"===o)n=a.byteLength(e,t);else{if("object"!==o)throw new Error("First argument needs to be a number, array or string.");n=x(e.length)}var i;a._useTypedArrays?i=a._augment(new Uint8Array(n)):(i=this,i.length=n,i._isBuffer=!0);var s;if(a._useTypedArrays&&"number"==typeof e.byteLength)i._set(e);else if(P(e))for(s=0;n>s;s++)a.isBuffer(e)?i[s]=e.readUInt8(s):i[s]=e[s];else if("string"===o)i.write(e,0,t);else if("number"===o&&!a._useTypedArrays&&!r)for(s=0;n>s;s++)i[s]=0;return i}function o(e,t,r,o){r=Number(r)||0;var n=e.length-r;o?(o=Number(o),o>n&&(o=n)):o=n;var i=t.length;G(i%2===0,"Invalid hex string"),o>i/2&&(o=i/2);for(var s=0;o>s;s++){var u=parseInt(t.substr(2*s,2),16);G(!isNaN(u),"Invalid hex string"),e[r+s]=u}return a._charsWritten=2*s,s}function n(e,t,r,o){var n=a._charsWritten=_(L(t),e,r,o);return n}function i(e,t,r,o){var n=a._charsWritten=_(M(t),e,r,o);return n}function s(e,t,r,a){return i(e,t,r,a)}function u(e,t,r,o){var n=a._charsWritten=_(U(t),e,r,o);return n}function c(e,t,r,o){var n=a._charsWritten=_(B(t),e,r,o);return n}function p(e,t,r){return 0===t&&r===e.length?K.fromByteArray(e):K.fromByteArray(e.slice(t,r))}function m(e,t,r){var a="",o="";r=Math.min(e.length,r);for(var n=t;r>n;n++)e[n]<=127?(a+=V(o)+String.fromCharCode(e[n]),o=""):o+="%"+e[n].toString(16);return a+V(o)}function l(e,t,r){var a="";r=Math.min(e.length,r);for(var o=t;r>o;o++)a+=String.fromCharCode(e[o]);return a}function d(e,t,r){return l(e,t,r)}function y(e,t,r){var a=e.length;(!t||0>t)&&(t=0),(!r||0>r||r>a)&&(r=a);for(var o="",n=t;r>n;n++)o+=w(e[n]);return o}function h(e,t,r){for(var a=e.slice(t,r),o="",n=0;n=o)){var n;return r?(n=e[t],o>t+1&&(n|=e[t+1]<<8)):(n=e[t]<<8,o>t+1&&(n|=e[t+1])),n}}function f(e,t,r,a){a||(G("boolean"==typeof r,"missing or invalid endian"),G(void 0!==t&&null!==t,"missing offset"),G(t+3=o)){var n;return r?(o>t+2&&(n=e[t+2]<<16),o>t+1&&(n|=e[t+1]<<8),n|=e[t],o>t+3&&(n+=e[t+3]<<24>>>0)):(o>t+1&&(n=e[t+1]<<16),o>t+2&&(n|=e[t+2]<<8),o>t+3&&(n|=e[t+3]),n+=e[t]<<24>>>0),n}}function S(e,t,r,a){a||(G("boolean"==typeof r,"missing or invalid endian"),G(void 0!==t&&null!==t,"missing offset"),G(t+1=o)){var n=b(e,t,r,!0),i=32768&n;return i?-1*(65535-n+1):n}}function g(e,t,r,a){a||(G("boolean"==typeof r,"missing or invalid endian"),G(void 0!==t&&null!==t,"missing offset"),G(t+3=o)){var n=f(e,t,r,!0),i=2147483648&n;return i?-1*(4294967295-n+1):n}}function N(e,t,r,a){return a||(G("boolean"==typeof r,"missing or invalid endian"),G(t+3=n))for(var i=0,s=Math.min(n-r,2);s>i;i++)e[r+i]=(t&255<<8*(a?i:1-i))>>>8*(a?i:1-i)}function k(e,t,r,a,o){o||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof a,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+3=n))for(var i=0,s=Math.min(n-r,4);s>i;i++)e[r+i]=t>>>8*(a?i:3-i)&255}function R(e,t,r,a,o){o||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof a,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+1=n||(t>=0?v(e,t,r,a,o):v(e,65535+t+1,r,a,o))}function C(e,t,r,a,o){o||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof a,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+3=n||(t>=0?k(e,t,r,a,o):k(e,4294967295+t+1,r,a,o))}function T(e,t,r,a,o){o||(G(void 0!==t&&null!==t,"missing value"),G("boolean"==typeof a,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+3=n||j.write(e,t,r,a,23,4)}function D(e,t,r,a,o){o||(G(void 0!==t&&null!==t,"missing value"),
-G("boolean"==typeof a,"missing or invalid endian"),G(void 0!==r&&null!==r,"missing offset"),G(r+7=n||j.write(e,t,r,a,52,8)}function A(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function q(e,t,r){return"number"!=typeof e?r:(e=~~e,e>=t?t:e>=0?e:(e+=t,e>=0?e:0))}function x(e){return e=~~Math.ceil(+e),0>e?0:e}function E(e){return(Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)})(e)}function P(e){return E(e)||a.isBuffer(e)||e&&"object"==typeof e&&"number"==typeof e.length}function w(e){return 16>e?"0"+e.toString(16):e.toString(16)}function L(e){for(var t=[],r=0;r=a)t.push(e.charCodeAt(r));else{var o=r;a>=55296&&57343>=a&&r++;for(var n=encodeURIComponent(e.slice(o,r+1)).substr(1).split("%"),i=0;i>8,a=t%256,o.push(a),o.push(r);return o}function U(e){return K.toByteArray(e)}function _(e,t,r,a){for(var o=0;a>o&&!(o+r>=t.length||o>=e.length);o++)t[o+r]=e[o];return o}function V(e){try{return decodeURIComponent(e)}catch(t){return String.fromCharCode(65533)}}function z(e,t){G("number"==typeof e,"cannot write a non-number as a number"),G(e>=0,"specified a negative value for writing an unsigned value"),G(t>=e,"value is larger than maximum value for type"),G(Math.floor(e)===e,"value has a fractional component")}function F(e,t,r){G("number"==typeof e,"cannot write a non-number as a number"),G(t>=e,"value larger than maximum allowed value"),G(e>=r,"value smaller than minimum allowed value"),G(Math.floor(e)===e,"value has a fractional component")}function O(e,t,r){G("number"==typeof e,"cannot write a non-number as a number"),G(t>=e,"value larger than maximum allowed value"),G(e>=r,"value smaller than minimum allowed value")}function G(e,t){if(!e)throw new Error(t||"Failed assertion")}var K=e("base64-js"),j=e("ieee754");r.Buffer=a,r.SlowBuffer=a,r.INSPECT_MAX_BYTES=50,a.poolSize=8192,a._useTypedArrays=function(){try{var e=new ArrayBuffer(0),t=new Uint8Array(e);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray}catch(r){return!1}}(),a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.isBuffer=function(e){return!(null===e||void 0===e||!e._isBuffer)},a.byteLength=function(e,t){var r;switch(e+="",t||"utf8"){case"hex":r=e.length/2;break;case"utf8":case"utf-8":r=L(e).length;break;case"ascii":case"binary":case"raw":r=e.length;break;case"base64":r=U(e).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":r=2*e.length;break;default:throw new Error("Unknown encoding")}return r},a.concat=function(e,t){if(G(E(e),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===e.length)return new a(0);if(1===e.length)return e[0];var r;if("number"!=typeof t)for(t=0,r=0;rm&&(r=m)):r=m,a=String(a||"utf8").toLowerCase();var l;switch(a){case"hex":l=o(this,e,t,r);break;case"utf8":case"utf-8":l=n(this,e,t,r);break;case"ascii":l=i(this,e,t,r);break;case"binary":l=s(this,e,t,r);break;case"base64":l=u(this,e,t,r);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":l=c(this,e,t,r);break;default:throw new Error("Unknown encoding")}return l},a.prototype.toString=function(e,t,r){var a=this;if(e=String(e||"utf8").toLowerCase(),t=Number(t)||0,r=void 0!==r?Number(r):r=a.length,r===t)return"";var o;switch(e){case"hex":o=y(a,t,r);break;case"utf8":case"utf-8":o=m(a,t,r);break;case"ascii":o=l(a,t,r);break;case"binary":o=d(a,t,r);break;case"base64":o=p(a,t,r);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":o=h(a,t,r);break;default:throw new Error("Unknown encoding")}return o},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},a.prototype.copy=function(e,t,r,o){var n=this;if(r||(r=0),o||0===o||(o=this.length),t||(t=0),o!==r&&0!==e.length&&0!==n.length){G(o>=r,"sourceEnd < sourceStart"),G(t>=0&&t=0&&r=0&&o<=n.length,"sourceEnd out of bounds"),o>this.length&&(o=this.length),e.length-ti||!a._useTypedArrays)for(var s=0;i>s;s++)e[s+t]=this[s+r];else e._set(this.subarray(r,r+i),t)}},a.prototype.slice=function(e,t){var r=this.length;if(e=q(e,r,0),t=q(t,r,r),a._useTypedArrays)return a._augment(this.subarray(e,t));for(var o=t-e,n=new a(o,void 0,!0),i=0;o>i;i++)n[i]=this[i+e];return n},a.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},a.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},a.prototype.readUInt8=function(e,t){return t||(G(void 0!==e&&null!==e,"missing offset"),G(e=this.length?void 0:this[e]},a.prototype.readUInt16LE=function(e,t){return b(this,e,!0,t)},a.prototype.readUInt16BE=function(e,t){return b(this,e,!1,t)},a.prototype.readUInt32LE=function(e,t){return f(this,e,!0,t)},a.prototype.readUInt32BE=function(e,t){return f(this,e,!1,t)},a.prototype.readInt8=function(e,t){if(t||(G(void 0!==e&&null!==e,"missing offset"),G(e=this.length)){var r=128&this[e];return r?-1*(255-this[e]+1):this[e]}},a.prototype.readInt16LE=function(e,t){return S(this,e,!0,t)},a.prototype.readInt16BE=function(e,t){return S(this,e,!1,t)},a.prototype.readInt32LE=function(e,t){return g(this,e,!0,t)},a.prototype.readInt32BE=function(e,t){return g(this,e,!1,t)},a.prototype.readFloatLE=function(e,t){return N(this,e,!0,t)},a.prototype.readFloatBE=function(e,t){return N(this,e,!1,t)},a.prototype.readDoubleLE=function(e,t){return I(this,e,!0,t)},a.prototype.readDoubleBE=function(e,t){return I(this,e,!1,t)},a.prototype.writeUInt8=function(e,t,r){r||(G(void 0!==e&&null!==e,"missing value"),G(void 0!==t&&null!==t,"missing offset"),G(t=this.length||(this[t]=e)},a.prototype.writeUInt16LE=function(e,t,r){v(this,e,t,!0,r)},a.prototype.writeUInt16BE=function(e,t,r){v(this,e,t,!1,r)},a.prototype.writeUInt32LE=function(e,t,r){k(this,e,t,!0,r)},a.prototype.writeUInt32BE=function(e,t,r){k(this,e,t,!1,r)},a.prototype.writeInt8=function(e,t,r){r||(G(void 0!==e&&null!==e,"missing value"),G(void 0!==t&&null!==t,"missing offset"),G(t=this.length||(e>=0?this.writeUInt8(e,t,r):this.writeUInt8(255+e+1,t,r))},a.prototype.writeInt16LE=function(e,t,r){R(this,e,t,!0,r)},a.prototype.writeInt16BE=function(e,t,r){R(this,e,t,!1,r)},a.prototype.writeInt32LE=function(e,t,r){C(this,e,t,!0,r)},a.prototype.writeInt32BE=function(e,t,r){C(this,e,t,!1,r)},a.prototype.writeFloatLE=function(e,t,r){T(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){T(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){D(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){D(this,e,t,!1,r)},a.prototype.fill=function(e,t,r){if(e||(e=0),t||(t=0),r||(r=this.length),"string"==typeof e&&(e=e.charCodeAt(0)),G("number"==typeof e&&!isNaN(e),"value is not a number"),G(r>=t,"end < start"),r!==t&&0!==this.length){G(t>=0&&t=0&&r<=this.length,"end out of bounds");for(var a=t;r>a;a++)this[a]=e}},a.prototype.inspect=function(){for(var e=[],t=this.length,a=0;t>a;a++)if(e[a]=w(this[a]),a===r.INSPECT_MAX_BYTES){e[a+1]="...";break}return""},a.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(a._useTypedArrays)return new a(this).buffer;for(var e=new Uint8Array(this.length),t=0,r=e.length;r>t;t+=1)e[t]=this[t];return e.buffer}throw new Error("Buffer.toArrayBuffer not supported in this browser")};var H=a.prototype;a._augment=function(e){return e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=H.get,e.set=H.set,e.write=H.write,e.toString=H.toString,e.toLocaleString=H.toString,e.toJSON=H.toJSON,e.copy=H.copy,e.slice=H.slice,e.readUInt8=H.readUInt8,e.readUInt16LE=H.readUInt16LE,e.readUInt16BE=H.readUInt16BE,e.readUInt32LE=H.readUInt32LE,e.readUInt32BE=H.readUInt32BE,e.readInt8=H.readInt8,e.readInt16LE=H.readInt16LE,e.readInt16BE=H.readInt16BE,e.readInt32LE=H.readInt32LE,e.readInt32BE=H.readInt32BE,e.readFloatLE=H.readFloatLE,e.readFloatBE=H.readFloatBE,e.readDoubleLE=H.readDoubleLE,e.readDoubleBE=H.readDoubleBE,e.writeUInt8=H.writeUInt8,e.writeUInt16LE=H.writeUInt16LE,e.writeUInt16BE=H.writeUInt16BE,e.writeUInt32LE=H.writeUInt32LE,e.writeUInt32BE=H.writeUInt32BE,e.writeInt8=H.writeInt8,e.writeInt16LE=H.writeInt16LE,e.writeInt16BE=H.writeInt16BE,e.writeInt32LE=H.writeInt32LE,e.writeInt32BE=H.writeInt32BE,e.writeFloatLE=H.writeFloatLE,e.writeFloatBE=H.writeFloatBE,e.writeDoubleLE=H.writeDoubleLE,e.writeDoubleBE=H.writeDoubleBE,e.fill=H.fill,e.inspect=H.inspect,e.toArrayBuffer=H.toArrayBuffer,e}},{"base64-js":55,ieee754:56}],55:[function(e,t,r){var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(e){"use strict";function t(e){var t=e.charCodeAt(0);return t===i||t===m?62:t===s||t===l?63:u>t?-1:u+10>t?t-u+26+26:p+26>t?t-p:c+26>t?t-c+26:void 0}function r(e){function r(e){c[m++]=e}var a,o,i,s,u,c;if(e.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var p=e.length;u="="===e.charAt(p-2)?2:"="===e.charAt(p-1)?1:0,c=new n(3*e.length/4-u),i=u>0?e.length-4:e.length;var m=0;for(a=0,o=0;i>a;a+=4,o+=3)s=t(e.charAt(a))<<18|t(e.charAt(a+1))<<12|t(e.charAt(a+2))<<6|t(e.charAt(a+3)),r((16711680&s)>>16),r((65280&s)>>8),r(255&s);return 2===u?(s=t(e.charAt(a))<<2|t(e.charAt(a+1))>>4,r(255&s)):1===u&&(s=t(e.charAt(a))<<10|t(e.charAt(a+1))<<4|t(e.charAt(a+2))>>2,r(s>>8&255),r(255&s)),c}function o(e){function t(e){return a.charAt(e)}function r(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var o,n,i,s=e.length%3,u="";for(o=0,i=e.length-s;i>o;o+=3)n=(e[o]<<16)+(e[o+1]<<8)+e[o+2],u+=r(n);switch(s){case 1:n=e[e.length-1],u+=t(n>>2),u+=t(n<<4&63),u+="==";break;case 2:n=(e[e.length-2]<<8)+e[e.length-1],u+=t(n>>10),u+=t(n>>4&63),u+=t(n<<2&63),u+="="}return u}var n="undefined"!=typeof Uint8Array?Uint8Array:Array,i="+".charCodeAt(0),s="/".charCodeAt(0),u="0".charCodeAt(0),c="a".charCodeAt(0),p="A".charCodeAt(0),m="-".charCodeAt(0),l="_".charCodeAt(0);e.toByteArray=r,e.fromByteArray=o}("undefined"==typeof r?this.base64js={}:r)},{}],56:[function(e,t,r){r.read=function(e,t,r,a,o){var n,i,s=8*o-a-1,u=(1<>1,p=-7,m=r?o-1:0,l=r?-1:1,d=e[t+m];for(m+=l,n=d&(1<<-p)-1,d>>=-p,p+=s;p>0;n=256*n+e[t+m],m+=l,p-=8);for(i=n&(1<<-p)-1,n>>=-p,p+=a;p>0;i=256*i+e[t+m],m+=l,p-=8);if(0===n)n=1-c;else{if(n===u)return i?NaN:(d?-1:1)*(1/0);i+=Math.pow(2,a),n-=c}return(d?-1:1)*i*Math.pow(2,n-a)},r.write=function(e,t,r,a,o,n){var i,s,u,c=8*n-o-1,p=(1<>1,l=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=a?0:n-1,y=a?1:-1,h=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,i=p):(i=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-i))<1&&(i--,u*=2),t+=i+m>=1?l/u:l*Math.pow(2,1-m),t*u>=2&&(i++,u/=2),i+m>=p?(s=0,i=p):i+m>=1?(s=(t*u-1)*Math.pow(2,o),i+=m):(s=t*Math.pow(2,m-1)*Math.pow(2,o),i=0));o>=8;e[r+d]=255&s,d+=y,s/=256,o-=8);for(i=i<0;e[r+d]=255&i,d+=y,i/=256,c-=8);e[r+d-y]|=128*h}},{}],57:[function(e,t,r){function a(e,t){if(e.length%s!==0){var r=e.length+(s-e.length%s);e=i.concat([e,u],r)}for(var a=[],o=t?e.readInt32BE:e.readInt32LE,n=0;nd?t=e(t):t.lengthn;n++)a[n]=54^t[n],o[n]=92^t[n];var i=e(s.concat([a,r]));return e(s.concat([o,i]))}function o(e,t){e=e||"sha1";var r=l[e],o=[],i=0;return r||n("algorithm:",e,"is not yet supported"),{update:function(e){return s.isBuffer(e)||(e=new s(e)),o.push(e),i+=e.length,this},digest:function(e){var n=s.concat(o),i=t?a(r,t,n):r(n);return o=null,e?i.toString(e):i}}}function n(){var e=[].slice.call(arguments).join(" ");throw new Error([e,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function i(e,t){for(var r in e)t(e[r],r)}var s=e("buffer").Buffer,u=e("./sha"),c=e("./sha256"),p=e("./rng"),m=e("./md5"),l={sha1:u,sha256:c,md5:m},d=64,y=new s(d);y.fill(0),r.createHash=function(e){return o(e)},r.createHmac=function(e,t){return o(e,t)},r.randomBytes=function(e,t){if(!t||!t.call)return new s(p(e));try{t.call(this,void 0,new s(p(e)))}catch(r){t(r)}},i(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],function(e){r[e]=function(){n("sorry,",e,"is not implemented yet")}})},{"./md5":59,"./rng":60,"./sha":61,"./sha256":62,buffer:54}],59:[function(e,t,r){function a(e,t){e[t>>5]|=128<>>9<<4)+14]=t;for(var r=1732584193,a=-271733879,o=-1732584194,p=271733878,m=0;m>16)+(t>>16)+(r>>16);return a<<16|65535&r}function p(e,t){return e<>>32-t}var m=e("./helpers");t.exports=function(e){return m.hash(e,a,16)}},{"./helpers":57}],60:[function(e,t,r){!function(){var e,r,a=this;e=function(e){for(var t,t,r=new Array(e),a=0;e>a;a++)0==(3&a)&&(t=4294967296*Math.random()),r[a]=t>>>((3&a)<<3)&255;return r},a.crypto&&crypto.getRandomValues&&(r=function(e){var t=new Uint8Array(e);return crypto.getRandomValues(t),t}),t.exports=r||e}()},{}],61:[function(e,t,r){function a(e,t){e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var r=Array(80),a=1732584193,u=-271733879,c=-1732584194,p=271733878,m=-1009589776,l=0;lS;S++){16>S?r[S]=e[l+S]:r[S]=s(r[S-3]^r[S-8]^r[S-14]^r[S-16],1);var g=i(i(s(a,5),o(S,u,c,p)),i(i(m,r[S]),n(S)));m=p,p=c,c=s(u,30),u=a,a=g}a=i(a,d),u=i(u,y),c=i(c,h),p=i(p,b),m=i(m,f)}return Array(a,u,c,p,m)}function o(e,t,r,a){return 20>e?t&r|~t&a:40>e?t^r^a:60>e?t&r|t&a|r&a:t^r^a}function n(e){return 20>e?1518500249:40>e?1859775393:60>e?-1894007588:-899497514}function i(e,t){var r=(65535&e)+(65535&t),a=(e>>16)+(t>>16)+(r>>16);return a<<16|65535&r}function s(e,t){return e<>>32-t}var u=e("./helpers");t.exports=function(e){return u.hash(e,a,20,!0)}},{"./helpers":57}],62:[function(e,t,r){var a=e("./helpers"),o=function(e,t){var r=(65535&e)+(65535&t),a=(e>>16)+(t>>16)+(r>>16);return a<<16|65535&r},n=function(e,t){return e>>>t|e<<32-t},i=function(e,t){return e>>>t},s=function(e,t,r){return e&t^~e&r},u=function(e,t,r){return e&t^e&r^t&r},c=function(e){return n(e,2)^n(e,13)^n(e,22)},p=function(e){return n(e,6)^n(e,11)^n(e,25)},m=function(e){return n(e,7)^n(e,18)^i(e,3)},l=function(e){return n(e,17)^n(e,19)^i(e,10)},d=function(e,t){var r,a,n,i,d,y,h,b,f,S,g,N,I=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),v=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),k=new Array(64);e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var f=0;fS;S++)16>S?k[S]=e[S+f]:k[S]=o(o(o(l(k[S-2]),k[S-7]),m(k[S-15])),k[S-16]),g=o(o(o(o(b,p(d)),s(d,y,h)),I[S]),k[S]),N=o(c(r),u(r,a,n)),b=h,h=y,y=d,d=o(i,g),i=n,n=a,a=r,r=o(g,N);v[0]=o(r,v[0]),v[1]=o(a,v[1]),v[2]=o(n,v[2]),v[3]=o(i,v[3]),v[4]=o(d,v[4]),v[5]=o(y,v[5]),v[6]=o(h,v[6]),v[7]=o(b,v[7])}return v};t.exports=function(e){return a.hash(e,d,32,!0)}},{"./helpers":57}],63:[function(e,t,r){function a(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function o(e){return"function"==typeof e}function n(e){return"number"==typeof e}function i(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}t.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._maxListeners=void 0,a.defaultMaxListeners=10,a.prototype.setMaxListeners=function(e){if(!n(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},a.prototype.emit=function(e){var t,r,a,n,u,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(r=this._events[e],s(r))return!1;if(o(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(a=arguments.length,n=new Array(a-1),u=1;a>u;u++)n[u-1]=arguments[u];r.apply(this,n)}else if(i(r)){for(a=arguments.length,n=new Array(a-1),u=1;a>u;u++)n[u-1]=arguments[u];for(c=r.slice(),a=c.length,u=0;a>u;u++)c[u].apply(this,n)}return!0},a.prototype.addListener=function(e,t){var r;if(!o(t))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,o(t.listener)?t.listener:t),this._events[e]?i(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,i(this._events[e])&&!this._events[e].warned){var r;r=s(this._maxListeners)?a.defaultMaxListeners:this._maxListeners,r&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())}return this},a.prototype.on=a.prototype.addListener,a.prototype.once=function(e,t){function r(){this.removeListener(e,r),a||(a=!0,t.apply(this,arguments))}if(!o(t))throw TypeError("listener must be a function");var a=!1;return r.listener=t,this.on(e,r),this},a.prototype.removeListener=function(e,t){var r,a,n,s;if(!o(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],n=r.length,a=-1,r===t||o(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(r)){for(s=n;s-->0;)if(r[s]===t||r[s].listener&&r[s].listener===t){a=s;break}if(0>a)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(a,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},a.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],o(r))this.removeListener(e,r);else for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},a.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?o(this._events[e])?[this._events[e]]:this._events[e].slice():[]},a.listenerCount=function(e,t){var r;return r=e._events&&e._events[t]?o(e._events[t])?1:e._events[t].length:0}},{}],64:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],65:[function(e,t,r){function a(){}var o=t.exports={};o.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var r=[];return window.addEventListener("message",function(e){var t=e.source;if((t===window||null===t)&&"process-tick"===e.data&&(e.stopPropagation(),r.length>0)){var a=r.shift();a()}},!0),function(e){r.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),o.title="browser",o.browser=!0,o.env={},o.argv=[],o.on=a,o.addListener=a,o.once=a,o.off=a,o.removeListener=a,o.removeAllListeners=a,o.emit=a,o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")}},{}],66:[function(e,t,r){(function(e){!function(a){function o(e){throw RangeError(w[e])}function n(e,t){for(var r=e.length;r--;)e[r]=t(e[r]);return e}function i(e,t){return n(e.split(P),t).join(".")}function s(e){for(var t,r,a=[],o=0,n=e.length;n>o;)t=e.charCodeAt(o++),t>=55296&&56319>=t&&n>o?(r=e.charCodeAt(o++),56320==(64512&r)?a.push(((1023&t)<<10)+(1023&r)+65536):(a.push(t),o--)):a.push(t);return a}function u(e){return n(e,function(e){var t="";return e>65535&&(e-=65536,t+=B(e>>>10&1023|55296),e=56320|1023&e),t+=B(e)}).join("")}function c(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:v}function p(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function m(e,t,r){var a=0;for(e=r?M(e/T):e>>1,e+=M(e/t);e>L*R>>1;a+=v)e=M(e/L);return M(a+(L+1)*e/(e+C))}function l(e){var t,r,a,n,i,s,p,l,d,y,h=[],b=e.length,f=0,S=A,g=D;for(r=e.lastIndexOf(q),0>r&&(r=0),a=0;r>a;++a)e.charCodeAt(a)>=128&&o("not-basic"),h.push(e.charCodeAt(a));for(n=r>0?r+1:0;b>n;){for(i=f,s=1,p=v;n>=b&&o("invalid-input"),l=c(e.charCodeAt(n++)),(l>=v||l>M((I-f)/s))&&o("overflow"),f+=l*s,d=g>=p?k:p>=g+R?R:p-g,!(d>l);p+=v)y=v-d,s>M(I/y)&&o("overflow"),s*=y;t=h.length+1,g=m(f-i,t,0==i),M(f/t)>I-S&&o("overflow"),S+=M(f/t),f%=t,h.splice(f++,0,S)}return u(h)}function d(e){var t,r,a,n,i,u,c,l,d,y,h,b,f,S,g,N=[];for(e=s(e),b=e.length,t=A,r=0,i=D,u=0;b>u;++u)h=e[u],128>h&&N.push(B(h));for(a=n=N.length,n&&N.push(q);b>a;){for(c=I,u=0;b>u;++u)h=e[u],h>=t&&c>h&&(c=h);for(f=a+1,c-t>M((I-r)/f)&&o("overflow"),r+=(c-t)*f,t=c,u=0;b>u;++u)if(h=e[u],t>h&&++r>I&&o("overflow"),h==t){for(l=r,d=v;y=i>=d?k:d>=i+R?R:d-i,!(y>l);d+=v)g=l-y,S=v-y,N.push(B(p(y+g%S,0))),l=M(g/S);N.push(B(p(l,0))),i=m(r,f,a==n),r=0,++a}++r,++t}return N.join("")}function y(e){return i(e,function(e){return x.test(e)?l(e.slice(4).toLowerCase()):e})}function h(e){return i(e,function(e){return E.test(e)?"xn--"+d(e):e})}var b="object"==typeof r&&r,f="object"==typeof t&&t&&t.exports==b&&t,S="object"==typeof e&&e;(S.global===S||S.window===S)&&(a=S);var g,N,I=2147483647,v=36,k=1,R=26,C=38,T=700,D=72,A=128,q="-",x=/^xn--/,E=/[^ -~]/,P=/\x2E|\u3002|\uFF0E|\uFF61/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},L=v-k,M=Math.floor,B=String.fromCharCode;if(g={version:"1.2.4",ucs2:{decode:s,encode:u},decode:l,encode:d,toASCII:h,toUnicode:y},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return g});else if(b&&!b.nodeType)if(f)f.exports=g;else for(N in g)g.hasOwnProperty(N)&&(b[N]=g[N]);else a.punycode=g}(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],67:[function(e,t,r){"use strict";function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,n){t=t||"&",r=r||"=";var i={};if("string"!=typeof e||0===e.length)return i;var s=/\+/g;e=e.split(t);var u=1e3;n&&"number"==typeof n.maxKeys&&(u=n.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var p=0;c>p;++p){var m,l,d,y,h=e[p].replace(s,"%20"),b=h.indexOf(r);b>=0?(m=h.substr(0,b),l=h.substr(b+1)):(m=h,l=""),d=decodeURIComponent(m),y=decodeURIComponent(l),a(i,d)?o(i[d])?i[d].push(y):i[d]=[i[d],y]:i[d]=y}return i};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],68:[function(e,t,r){"use strict";function a(e,t){if(e.map)return e.map(t);for(var r=[],a=0;a",'"',"`"," ","\r","\n"," "],b=["{","}","|","\\","^","`"].concat(h),f=["'"].concat(b),S=["%","/","?",";","#"].concat(f),g=["/","?","#"],N=255,I=/^[a-z0-9A-Z_-]{0,63}$/,v=/^([a-z0-9A-Z_-]{0,63})(.*)$/,k={javascript:!0,"javascript:":!0},R={javascript:!0,"javascript:":!0},C={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},T=e("querystring");a.prototype.parse=function(e,t,r){if(!u(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e;a=a.trim();var o=d.exec(a);if(o){o=o[0];var n=o.toLowerCase();this.protocol=n,a=a.substr(o.length)}if(r||o||a.match(/^\/\/[^@\/]+@[^@\/]+/)){var i="//"===a.substr(0,2);!i||o&&R[o]||(a=a.substr(2),this.slashes=!0)}if(!R[o]&&(i||o&&!C[o])){for(var s=-1,c=0;cp)&&(s=p)}var m,y;y=-1===s?a.lastIndexOf("@"):a.lastIndexOf("@",s),-1!==y&&(m=a.slice(0,y),a=a.slice(y+1),this.auth=decodeURIComponent(m)),s=-1;for(var c=0;cp)&&(s=p)}-1===s&&(s=a.length),this.host=a.slice(0,s),a=a.slice(s),this.parseHost(),this.hostname=this.hostname||"";var h="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!h)for(var b=this.hostname.split(/\./),c=0,D=b.length;D>c;c++){var A=b[c];if(A&&!A.match(I)){for(var q="",x=0,E=A.length;E>x;x++)q+=A.charCodeAt(x)>127?"x":A[x];if(!q.match(I)){var P=b.slice(0,c),w=b.slice(c+1),L=A.match(v);L&&(P.push(L[1]),w.unshift(L[2])),w.length&&(a="/"+w.join(".")+a),this.hostname=P.join(".");break}}}if(this.hostname.length>N?this.hostname="":this.hostname=this.hostname.toLowerCase(),!h){for(var M=this.hostname.split("."),B=[],c=0;cc;c++){var z=f[c],F=encodeURIComponent(z);F===z&&(F=escape(z)),a=a.split(z).join(F)}var O=a.indexOf("#");-1!==O&&(this.hash=a.substr(O),a=a.slice(0,O));var G=a.indexOf("?");if(-1!==G?(this.search=a.substr(G),this.query=a.substr(G+1),t&&(this.query=T.parse(this.query)),a=a.slice(0,G)):t&&(this.search="",this.query={}),a&&(this.pathname=a),C[n]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var _=this.pathname||"",U=this.search||"";this.path=_+U}return this.href=this.format(),this},a.prototype.format=function(){var e=this.auth||"";
-e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",a=this.hash||"",o=!1,n="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&c(this.query)&&Object.keys(this.query).length&&(n=T.stringify(this.query));var i=this.search||n&&"?"+n||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||C[t])&&o!==!1?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),a&&"#"!==a.charAt(0)&&(a="#"+a),i&&"?"!==i.charAt(0)&&(i="?"+i),r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),i=i.replace("#","%23"),t+o+r+i+a},a.prototype.resolve=function(e){return this.resolveObject(o(e,!1,!0)).format()},a.prototype.resolveObject=function(e){if(u(e)){var t=new a;t.parse(e,!1,!0),e=t}var r=new a;if(Object.keys(this).forEach(function(e){r[e]=this[e]},this),r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol)return Object.keys(e).forEach(function(t){"protocol"!==t&&(r[t]=e[t])}),C[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r;if(e.protocol&&e.protocol!==r.protocol){if(!C[e.protocol])return Object.keys(e).forEach(function(t){r[t]=e[t]}),r.href=r.format(),r;if(r.protocol=e.protocol,e.host||R[e.protocol])r.pathname=e.pathname;else{for(var o=(e.pathname||"").split("/");o.length&&!(e.host=o.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==o[0]&&o.unshift(""),o.length<2&&o.unshift(""),r.pathname=o.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var n=r.pathname||"",i=r.search||"";r.path=n+i}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var s=r.pathname&&"/"===r.pathname.charAt(0),c=e.host||e.pathname&&"/"===e.pathname.charAt(0),l=c||s||r.host&&e.pathname,d=l,y=r.pathname&&r.pathname.split("/")||[],o=e.pathname&&e.pathname.split("/")||[],h=r.protocol&&!C[r.protocol];if(h&&(r.hostname="",r.port=null,r.host&&(""===y[0]?y[0]=r.host:y.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===o[0]?o[0]=e.host:o.unshift(e.host)),e.host=null),l=l&&(""===o[0]||""===y[0])),c)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,y=o;else if(o.length)y||(y=[]),y.pop(),y=y.concat(o),r.search=e.search,r.query=e.query;else if(!m(e.search)){if(h){r.hostname=r.host=y.shift();var b=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;b&&(r.auth=b.shift(),r.host=r.hostname=b.shift())}return r.search=e.search,r.query=e.query,p(r.pathname)&&p(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!y.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var f=y.slice(-1)[0],S=(r.host||e.host)&&("."===f||".."===f)||""===f,g=0,N=y.length;N>=0;N--)f=y[N],"."==f?y.splice(N,1):".."===f?(y.splice(N,1),g++):g&&(y.splice(N,1),g--);if(!l&&!d)for(;g--;g)y.unshift("..");!l||""===y[0]||y[0]&&"/"===y[0].charAt(0)||y.unshift(""),S&&"/"!==y.join("/").substr(-1)&&y.push("");var I=""===y[0]||y[0]&&"/"===y[0].charAt(0);if(h){r.hostname=r.host=I?"":y.length?y.shift():"";var b=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;b&&(r.auth=b.shift(),r.host=r.hostname=b.shift())}return l=l||r.host&&y.length,l&&!I&&y.unshift(""),y.length?r.pathname=y.join("/"):(r.pathname=null,r.path=null),p(r.pathname)&&p(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},a.prototype.parseHost=function(){var e=this.host,t=y.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{punycode:66,querystring:69}],71:[function(e,t,r){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],72:[function(e,t,r){(function(t,a){function o(e,t){var a={seen:[],stylize:i};return arguments.length>=3&&(a.depth=arguments[2]),arguments.length>=4&&(a.colors=arguments[3]),h(t)?a.showHidden=t:t&&r._extend(a,t),I(a.showHidden)&&(a.showHidden=!1),I(a.depth)&&(a.depth=2),I(a.colors)&&(a.colors=!1),I(a.customInspect)&&(a.customInspect=!0),a.colors&&(a.stylize=n),u(a,e,a.depth)}function n(e,t){var r=o.styles[t];return r?"["+o.colors[r][0]+"m"+e+"["+o.colors[r][1]+"m":e}function i(e,t){return e}function s(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}function u(e,t,a){if(e.customInspect&&t&&T(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var o=t.inspect(a,e);return g(o)||(o=u(e,o,a)),o}var n=c(e,t);if(n)return n;var i=Object.keys(t),h=s(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(t)),C(t)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return p(t);if(0===i.length){if(T(t)){var b=t.name?": "+t.name:"";return e.stylize("[Function"+b+"]","special")}if(v(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(R(t))return e.stylize(Date.prototype.toString.call(t),"date");if(C(t))return p(t)}var f="",S=!1,N=["{","}"];if(y(t)&&(S=!0,N=["[","]"]),T(t)){var I=t.name?": "+t.name:"";f=" [Function"+I+"]"}if(v(t)&&(f=" "+RegExp.prototype.toString.call(t)),R(t)&&(f=" "+Date.prototype.toUTCString.call(t)),C(t)&&(f=" "+p(t)),0===i.length&&(!S||0==t.length))return N[0]+f+N[1];if(0>a)return v(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var k;return k=S?m(e,t,a,h,i):i.map(function(r){return l(e,t,a,h,r,S)}),e.seen.pop(),d(k,f,N)}function c(e,t){if(I(t))return e.stylize("undefined","undefined");if(g(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return S(t)?e.stylize(""+t,"number"):h(t)?e.stylize(""+t,"boolean"):b(t)?e.stylize("null","null"):void 0}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function m(e,t,r,a,o){for(var n=[],i=0,s=t.length;s>i;++i)E(t,String(i))?n.push(l(e,t,r,a,String(i),!0)):n.push("");return o.forEach(function(o){o.match(/^\d+$/)||n.push(l(e,t,r,a,o,!0))}),n}function l(e,t,r,a,o,n){var i,s,c;if(c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]},c.get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),E(a,o)||(i="["+o+"]"),s||(e.seen.indexOf(c.value)<0?(s=b(r)?u(e,c.value,null):u(e,c.value,r-1),s.indexOf("\n")>-1&&(s=n?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n"))):s=e.stylize("[Circular]","special")),I(i)){if(n&&o.match(/^\d+$/))return s;i=JSON.stringify(""+o),i.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=e.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=e.stylize(i,"string"))}return i+": "+s}function d(e,t,r){var a=0,o=e.reduce(function(e,t){return a++,t.indexOf("\n")>=0&&a++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function y(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function b(e){return null===e}function f(e){return null==e}function S(e){return"number"==typeof e}function g(e){return"string"==typeof e}function N(e){return"symbol"==typeof e}function I(e){return void 0===e}function v(e){return k(e)&&"[object RegExp]"===A(e)}function k(e){return"object"==typeof e&&null!==e}function R(e){return k(e)&&"[object Date]"===A(e)}function C(e){return k(e)&&("[object Error]"===A(e)||e instanceof Error)}function T(e){return"function"==typeof e}function D(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function A(e){return Object.prototype.toString.call(e)}function q(e){return 10>e?"0"+e.toString(10):e.toString(10)}function x(){var e=new Date,t=[q(e.getHours()),q(e.getMinutes()),q(e.getSeconds())].join(":");return[e.getDate(),M[e.getMonth()],t].join(" ")}function E(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var P=/%[sdj%]/g;r.format=function(e){if(!g(e)){for(var t=[],r=0;r=n)return e;switch(e){case"%s":return String(a[r++]);case"%d":return Number(a[r++]);case"%j":try{return JSON.stringify(a[r++])}catch(t){return"[Circular]"}default:return e}}),s=a[r];n>r;s=a[++r])i+=b(s)||!k(s)?" "+s:" "+o(s);return i},r.deprecate=function(e,o){function n(){if(!i){if(t.throwDeprecation)throw new Error(o);t.traceDeprecation?console.trace(o):console.error(o),i=!0}return e.apply(this,arguments)}if(I(a.process))return function(){return r.deprecate(e,o).apply(this,arguments)};if(t.noDeprecation===!0)return e;var i=!1;return n};var w,L={};r.debuglog=function(e){if(I(w)&&(w=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!L[e])if(new RegExp("\\b"+e+"\\b","i").test(w)){var a=t.pid;L[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,a,t)}}else L[e]=function(){};return L[e]},r.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=y,r.isBoolean=h,r.isNull=b,r.isNullOrUndefined=f,r.isNumber=S,r.isString=g,r.isSymbol=N,r.isUndefined=I,r.isRegExp=v,r.isObject=k,r.isDate=R,r.isError=C,r.isFunction=T,r.isPrimitive=D,r.isBuffer=e("./support/isBuffer");var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",x(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!k(t))return e;for(var r=Object.keys(t),a=r.length;a--;)e[r[a]]=t[r[a]];return e}}).call(this,e("FWaASH"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":71,FWaASH:65,inherits:64}],73:[function(e,t,r){(function(){var r,a;a=e("./XMLFragment"),r=function(){function e(e,t,r){var o,n,i;if(this.children=[],this.rootObject=null,this.is(e,"Object")&&(i=[e,t],t=i[0],r=i[1],e=null),null!=e&&(e=""+e||"",null==t&&(t={version:"1.0"})),null!=t&&null==t.version)throw new Error("Version number is required");if(null!=t){if(t.version=""+t.version||"",!t.version.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+t.version);if(o={version:t.version},null!=t.encoding){if(t.encoding=""+t.encoding||"",!t.encoding.match(/[A-Za-z](?:[A-Za-z0-9._-]|-)*/))throw new Error("Invalid encoding: "+t.encoding);o.encoding=t.encoding}null!=t.standalone&&(o.standalone=t.standalone?"yes":"no"),n=new a(this,"?xml",o),this.children.push(n)}null!=r&&(o={},null!=e&&(o.name=e),null!=r.ext&&(r.ext=""+r.ext||"",o.ext=r.ext),n=new a(this,"!DOCTYPE",o),this.children.push(n)),null!=e&&this.begin(e)}return e.prototype.begin=function(t,r,o){var n,i;if(null==t)throw new Error("Root element needs a name");return this.rootObject&&(this.children=[],this.rootObject=null),null!=r?(n=new e(t,r,o),n.root()):(t=""+t||"",i=new a(this,t,{}),i.isRoot=!0,i.documentObject=this,this.children.push(i),this.rootObject=i,i)},e.prototype.root=function(){return this.rootObject},e.prototype.end=function(e){return toString(e)},e.prototype.toString=function(e){var t,r,a,o,n;for(r="",n=this.children,a=0,o=n.length;o>a;a++)t=n[a],r+=t.toString(e);return r},e.prototype.is=function(e,t){var r;return r=Object.prototype.toString.call(e).slice(8,-1),null!=e&&r===t},e}(),t.exports=r}).call(this)},{"./XMLFragment":74}],74:[function(e,t,r){(function(){var e,r={}.hasOwnProperty;e=function(){function e(e,t,r,a){this.isRoot=!1,this.documentObject=null,this.parent=e,this.name=t,this.attributes=r,this.value=a,this.children=[]}return e.prototype.element=function(t,a,o){var n,i,s,u,c;if(null==t)throw new Error("Missing element name");t=""+t||"",this.assertLegalChar(t),null==a&&(a={}),this.is(a,"String")&&this.is(o,"Object")?(u=[o,a],a=u[0],o=u[1]):this.is(a,"String")&&(c=[{},a],a=c[0],o=c[1]);for(i in a)r.call(a,i)&&(s=a[i],s=""+s||"",a[i]=this.escape(s));return n=new e(this,t,a),null!=o&&(o=""+o||"",o=this.escape(o),this.assertLegalChar(o),n.raw(o)),this.children.push(n),n},e.prototype.insertBefore=function(t,a,o){var n,i,s,u,c,p;if(this.isRoot)throw new Error("Cannot insert elements at root level");if(null==t)throw new Error("Missing element name");t=""+t||"",this.assertLegalChar(t),null==a&&(a={}),this.is(a,"String")&&this.is(o,"Object")?(c=[o,a],a=c[0],o=c[1]):this.is(a,"String")&&(p=[{},a],a=p[0],o=p[1]);for(s in a)r.call(a,s)&&(u=a[s],u=""+u||"",a[s]=this.escape(u));return n=new e(this.parent,t,a),null!=o&&(o=""+o||"",o=this.escape(o),this.assertLegalChar(o),n.raw(o)),i=this.parent.children.indexOf(this),this.parent.children.splice(i,0,n),n},e.prototype.insertAfter=function(t,a,o){var n,i,s,u,c,p;if(this.isRoot)throw new Error("Cannot insert elements at root level");if(null==t)throw new Error("Missing element name");t=""+t||"",this.assertLegalChar(t),null==a&&(a={}),this.is(a,"String")&&this.is(o,"Object")?(c=[o,a],a=c[0],o=c[1]):this.is(a,"String")&&(p=[{},a],a=p[0],o=p[1]);for(s in a)r.call(a,s)&&(u=a[s],u=""+u||"",a[s]=this.escape(u));return n=new e(this.parent,t,a),null!=o&&(o=""+o||"",o=this.escape(o),this.assertLegalChar(o),n.raw(o)),i=this.parent.children.indexOf(this),this.parent.children.splice(i+1,0,n),n},e.prototype.remove=function(){var e,t;if(this.isRoot)throw new Error("Cannot remove the root element");return e=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[e,e-e+1].concat(t=[])),t,this.parent},e.prototype.text=function(t){var r;if(null==t)throw new Error("Missing element text");return t=""+t||"",t=this.escape(t),this.assertLegalChar(t),r=new e(this,"",{},t),this.children.push(r),this},e.prototype.cdata=function(t){var r;if(null==t)throw new Error("Missing CDATA text");if(t=""+t||"",this.assertLegalChar(t),t.match(/]]>/))throw new Error("Invalid CDATA text: "+t);return r=new e(this,"",{},""),this.children.push(r),this},e.prototype.comment=function(t){var r;if(null==t)throw new Error("Missing comment text");if(t=""+t||"",t=this.escape(t),this.assertLegalChar(t),t.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+t);return r=new e(this,"",{},""),this.children.push(r),this},e.prototype.raw=function(t){var r;if(null==t)throw new Error("Missing raw text");return t=""+t||"",r=new e(this,"",{},t),this.children.push(r),this},e.prototype.up=function(){if(this.isRoot)throw new Error("This node has no parent. Use doc() if you need to get the document object.");return this.parent},e.prototype.root=function(){var e;if(this.isRoot)return this;for(e=this.parent;!e.isRoot;)e=e.parent;return e},e.prototype.document=function(){return this.root().documentObject},e.prototype.end=function(e){return this.document().toString(e)},e.prototype.prev=function(){var e;if(this.isRoot)throw new Error("Root node has no siblings");if(e=this.parent.children.indexOf(this),1>e)throw new Error("Already at the first node");return this.parent.children[e-1]},e.prototype.next=function(){var e;if(this.isRoot)throw new Error("Root node has no siblings");if(e=this.parent.children.indexOf(this),-1===e||e===this.parent.children.length-1)throw new Error("Already at the last node");return this.parent.children[e+1]},e.prototype.clone=function(t){var r;return r=new e(this.parent,this.name,this.attributes,this.value),t&&this.children.forEach(function(e){var a;return a=e.clone(t),a.parent=r,r.children.push(a)}),r},e.prototype.importXMLBuilder=function(e){var t;return t=e.root().clone(!0),t.parent=this,this.children.push(t),t.isRoot=!1,this},e.prototype.attribute=function(e,t){var r;if(null==e)throw new Error("Missing attribute name");if(null==t)throw new Error("Missing attribute value");return e=""+e||"",t=""+t||"",null==(r=this.attributes)&&(this.attributes={}),this.attributes[e]=this.escape(t),this},e.prototype.removeAttribute=function(e){if(null==e)throw new Error("Missing attribute name");return e=""+e||"",delete this.attributes[e],this},e.prototype.toString=function(e,t){var r,a,o,n,i,s,u,c,p,m,l,d;s=null!=e&&e.pretty||!1,n=null!=e&&e.indent||" ",i=null!=e&&e.newline||"\n",t||(t=0),c=new Array(t+1).join(n),u="",s&&(u+=c),u+=null==this.value?"<"+this.name:""+this.value,l=this.attributes;for(r in l)a=l[r],u+="!DOCTYPE"===this.name?" "+a:" "+r+'="'+a+'"';if(0===this.children.length)null==this.value&&(u+="?xml"===this.name?"?>":"!DOCTYPE"===this.name?">":"/>"),s&&(u+=i);else if(s&&1===this.children.length&&this.children[0].value)u+=">",u+=this.children[0].value,u+=""+this.name+">",u+=i;else{for(u+=">",s&&(u+=i),d=this.children,p=0,m=d.length;m>p;p++)o=d[p],u+=o.toString(e,t+1);s&&(u+=c),u+=""+this.name+">",s&&(u+=i)}return u},e.prototype.escape=function(e){return e.replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},e.prototype.assertLegalChar=function(e){var t,r;if(t=/[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE-\uFFFF]/,r=e.match(t))throw new Error("Invalid character ("+r+") in string: "+e)},e.prototype.is=function(e,t){var r;return r=Object.prototype.toString.call(e).slice(8,-1),null!=e&&r===t},e.prototype.ele=function(e,t,r){return this.element(e,t,r)},e.prototype.txt=function(e){return this.text(e)},e.prototype.dat=function(e){return this.cdata(e)},e.prototype.att=function(e,t){return this.attribute(e,t)},e.prototype.com=function(e){return this.comment(e)},e.prototype.doc=function(){return this.document()},e.prototype.e=function(e,t,r){return this.element(e,t,r)},e.prototype.t=function(e){return this.text(e)},e.prototype.d=function(e){return this.cdata(e)},e.prototype.a=function(e,t){return this.attribute(e,t)},e.prototype.c=function(e){return this.comment(e)},e.prototype.r=function(e){return this.raw(e)},e.prototype.u=function(){return this.up()},e}(),t.exports=e}).call(this)},{}],75:[function(e,t,r){(function(){var r;r=e("./XMLBuilder"),t.exports.create=function(e,t,a){return null!=e?new r(e,t,a).root():new r}}).call(this)},{"./XMLBuilder":73}]},{},[1]);
diff --git a/tasks/options/watch.js b/tasks/options/watch.js
index 14ec65ab3fb..0341b444c95 100644
--- a/tasks/options/watch.js
+++ b/tasks/options/watch.js
@@ -1,28 +1,39 @@
module.exports = function(config) {
+ 'use strict';
+
return {
- css: {
- files: [ '<%= srcDir %>/less/**/*.less' ],
- tasks: ['css'],
- options: {
- spawn: false
- }
- },
+ // css: {
+ // files: [ '<%= srcDir %>/less#<{(||)}>#*.less' ],
+ // tasks: ['css'],
+ // options: {
+ // spawn: false
+ // }
+ // },
copy_to_gen: {
- files: ['<%= srcDir %>/**/*', '!<%= srcDir %>/**/*.less'],
- tasks: ['copy:public_to_gen'],
+ files: ['<%= srcDir %>/**/*'],
+ tasks: [
+ 'clean:gen',
+ 'copy:public_to_gen',
+ 'css',
+ 'typescript:build',
+ 'jshint',
+ 'jscs',
+ 'tslint',
+ 'karma:test'
+ ],
options: {
spawn: false
}
},
- typescript: {
- files: ['<%= srcDir %>/app/**/*.ts', '<%= srcDir %>/test/**/*.ts'],
- tasks: ['tslint', 'typescript:build'],
- options: {
- spawn: false
- }
- }
+ // typescript: {
+ // files: ['<%= srcDir %>/app#<{(||)}>#*.ts', '<%= srcDir %>/test#<{(||)}>#*.ts'],
+ // tasks: ['tslint', 'typescript:build'],
+ // options: {
+ // spawn: false
+ // }
+ // }
};
};