mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
add ebs_volume_ids() for templating
This commit is contained in:
parent
ca9861e749
commit
9600b1f103
10
Godeps/Godeps.json
generated
10
Godeps/Godeps.json
generated
@ -28,6 +28,11 @@
|
|||||||
"Comment": "v0.7.3",
|
"Comment": "v0.7.3",
|
||||||
"Rev": "bed164a424e75154a40550c04c313ef51a7bb275"
|
"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",
|
"ImportPath": "github.com/aws/aws-sdk-go/internal/protocol/query",
|
||||||
"Comment": "v0.7.3",
|
"Comment": "v0.7.3",
|
||||||
@ -53,6 +58,11 @@
|
|||||||
"Comment": "v0.7.3",
|
"Comment": "v0.7.3",
|
||||||
"Rev": "bed164a424e75154a40550c04c313ef51a7bb275"
|
"Rev": "bed164a424e75154a40550c04c313ef51a7bb275"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "github.com/aws/aws-sdk-go/service/ec2",
|
||||||
|
"Comment": "v0.7.3",
|
||||||
|
"Rev": "bed164a424e75154a40550c04c313ef51a7bb275"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "github.com/davecgh/go-spew/spew",
|
"ImportPath": "github.com/davecgh/go-spew/spew",
|
||||||
"Rev": "2df174808ee097f90d259e432cc04442cf60be21"
|
"Rev": "2df174808ee097f90d259e432cc04442cf60be21"
|
||||||
|
32
Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/build.go
generated
vendored
Normal file
32
Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/build.go
generated
vendored
Normal file
@ -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()
|
||||||
|
}
|
||||||
|
}
|
860
Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/build_test.go
generated
vendored
Normal file
860
Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/build_test.go
generated
vendored
Normal file
@ -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
|
||||||
|
|
||||||
|
}
|
54
Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/unmarshal.go
generated
vendored
Normal file
54
Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/unmarshal.go
generated
vendored
Normal file
@ -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,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
816
Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/unmarshal_test.go
generated
vendored
Normal file
816
Godeps/_workspace/src/github.com/aws/aws-sdk-go/internal/protocol/ec2query/unmarshal_test.go
generated
vendored
Normal file
@ -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("<OperationNameResponse><Str>myname</Str><FooNum>123</FooNum><FalseBool>false</FalseBool><TrueBool>true</TrueBool><Float>1.2</Float><Double>1.3</Double><Long>200</Long><Char>a</Char><RequestId>request-id</RequestId></OperationNameResponse>"))
|
||||||
|
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("<OperationNameResponse><Blob>dmFsdWU=</Blob><RequestId>requestid</RequestId></OperationNameResponse>"))
|
||||||
|
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("<OperationNameResponse><ListMember><member>abc</member><member>123</member></ListMember><RequestId>requestid</RequestId></OperationNameResponse>"))
|
||||||
|
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("<OperationNameResponse><ListMember><item>abc</item><item>123</item></ListMember><RequestId>requestid</RequestId></OperationNameResponse>"))
|
||||||
|
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("<OperationNameResponse><ListMember>abc</ListMember><ListMember>123</ListMember><RequestId>requestid</RequestId></OperationNameResponse>"))
|
||||||
|
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("<OperationNameResponse><Map><entry><key>qux</key><value><foo>bar</foo></value></entry><entry><key>baz</key><value><foo>bam</foo></value></entry></Map><RequestId>requestid</RequestId></OperationNameResponse>"))
|
||||||
|
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("<OperationNameResponse><Map><key>qux</key><value>bar</value></Map><Map><key>baz</key><value>bam</value></Map><RequestId>requestid</RequestId></OperationNameResponse>"))
|
||||||
|
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("<OperationNameResponse><Map><foo>qux</foo><bar>bar</bar></Map><Map><foo>baz</foo><bar>bam</bar></Map><RequestId>requestid</RequestId></OperationNameResponse>"))
|
||||||
|
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"])
|
||||||
|
|
||||||
|
}
|
24490
Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/api.go
generated
vendored
Normal file
24490
Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/api.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
57
Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/customizations.go
generated
vendored
Normal file
57
Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/customizations.go
generated
vendored
Normal file
@ -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
|
||||||
|
}
|
36
Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/customizations_test.go
generated
vendored
Normal file
36
Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/customizations_test.go
generated
vendored
Normal file
@ -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)
|
||||||
|
}
|
756
Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/ec2iface/interface.go
generated
vendored
Normal file
756
Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/ec2iface/interface.go
generated
vendored
Normal file
@ -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)
|
||||||
|
}
|
15
Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/ec2iface/interface_test.go
generated
vendored
Normal file
15
Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/ec2iface/interface_test.go
generated
vendored
Normal file
@ -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))
|
||||||
|
}
|
6619
Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/examples_test.go
generated
vendored
Normal file
6619
Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/examples_test.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
60
Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/service.go
generated
vendored
Normal file
60
Godeps/_workspace/src/github.com/aws/aws-sdk-go/service/ec2/service.go
generated
vendored
Normal file
@ -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
|
||||||
|
}
|
@ -9,6 +9,7 @@ import (
|
|||||||
|
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/service/cloudwatch"
|
"github.com/aws/aws-sdk-go/service/cloudwatch"
|
||||||
|
"github.com/aws/aws-sdk-go/service/ec2"
|
||||||
"github.com/grafana/grafana/pkg/middleware"
|
"github.com/grafana/grafana/pkg/middleware"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -22,86 +23,123 @@ func ProxyCloudWatchDataSourceRequest(c *middleware.Context) {
|
|||||||
}{}
|
}{}
|
||||||
json.Unmarshal([]byte(body), reqInfo)
|
json.Unmarshal([]byte(body), reqInfo)
|
||||||
|
|
||||||
svc := cloudwatch.New(&aws.Config{Region: aws.String(reqInfo.Region)})
|
switch reqInfo.Service {
|
||||||
|
case "CloudWatch":
|
||||||
|
svc := cloudwatch.New(&aws.Config{Region: aws.String(reqInfo.Region)})
|
||||||
|
|
||||||
switch reqInfo.Action {
|
switch reqInfo.Action {
|
||||||
case "GetMetricStatistics":
|
case "GetMetricStatistics":
|
||||||
reqParam := &struct {
|
reqParam := &struct {
|
||||||
Parameters struct {
|
Parameters struct {
|
||||||
Namespace string `json:"Namespace"`
|
Namespace string `json:"Namespace"`
|
||||||
MetricName string `json:"MetricName"`
|
MetricName string `json:"MetricName"`
|
||||||
Dimensions []map[string]string `json:"Dimensions"`
|
Dimensions []map[string]string `json:"Dimensions"`
|
||||||
Statistics []string `json:"Statistics"`
|
Statistics []string `json:"Statistics"`
|
||||||
StartTime int64 `json:"StartTime"`
|
StartTime int64 `json:"StartTime"`
|
||||||
EndTime int64 `json:"EndTime"`
|
EndTime int64 `json:"EndTime"`
|
||||||
Period int64 `json:"Period"`
|
Period int64 `json:"Period"`
|
||||||
} `json:"parameters"`
|
} `json:"parameters"`
|
||||||
}{}
|
}{}
|
||||||
json.Unmarshal([]byte(body), reqParam)
|
json.Unmarshal([]byte(body), reqParam)
|
||||||
|
|
||||||
statistics := make([]*string, 0)
|
statistics := make([]*string, 0)
|
||||||
for k := range reqParam.Parameters.Statistics {
|
for k := range reqParam.Parameters.Statistics {
|
||||||
statistics = append(statistics, &reqParam.Parameters.Statistics[k])
|
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))
|
||||||
}
|
}
|
||||||
dimensions := make([]*cloudwatch.Dimension, 0)
|
case "EC2":
|
||||||
for _, d := range reqParam.Parameters.Dimensions {
|
svc := ec2.New(&aws.Config{Region: aws.String(reqInfo.Region)})
|
||||||
dimensions = append(dimensions, &cloudwatch.Dimension{
|
|
||||||
Name: aws.String(d["Name"]),
|
switch reqInfo.Action {
|
||||||
Value: aws.String(d["Value"]),
|
case "DescribeInstances":
|
||||||
})
|
reqParam := &struct {
|
||||||
|
Parameters struct {
|
||||||
|
Filters []*ec2.Filter `json:"Filters"`
|
||||||
|
InstanceIds []*string `json:"InstanceIds"`
|
||||||
|
} `json:"parameters"`
|
||||||
|
}{}
|
||||||
|
json.Unmarshal([]byte(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
|
||||||
|
}
|
||||||
|
|
||||||
|
respJson, _ := json.Marshal(resp)
|
||||||
|
fmt.Fprint(c.RW(), string(respJson))
|
||||||
|
default:
|
||||||
|
c.JsonApiErr(500, "Unexpected EC2 action", errors.New(reqInfo.Action))
|
||||||
}
|
}
|
||||||
|
|
||||||
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:
|
default:
|
||||||
c.JsonApiErr(500, "Unexpected CloudWatch action", errors.New(reqInfo.Action))
|
c.JsonApiErr(500, "Unexpected service", errors.New(reqInfo.Service))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -275,7 +275,7 @@ function (angular, _, dateMath) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
CloudWatchDatasource.prototype.performTimeSeriesQuery = function(query, start, end) {
|
CloudWatchDatasource.prototype.performTimeSeriesQuery = function(query, start, end) {
|
||||||
var cloudwatch = this.getCloudWatchClient(query.region);
|
var cloudwatch = this.getAwsClient(query.region, 'CloudWatch');
|
||||||
|
|
||||||
var params = {
|
var params = {
|
||||||
Namespace: query.namespace,
|
Namespace: query.namespace,
|
||||||
@ -321,7 +321,7 @@ function (angular, _, dateMath) {
|
|||||||
namespace = templateSrv.replace(namespace);
|
namespace = templateSrv.replace(namespace);
|
||||||
metricName = templateSrv.replace(metricName);
|
metricName = templateSrv.replace(metricName);
|
||||||
|
|
||||||
var cloudwatch = this.getCloudWatchClient(region);
|
var cloudwatch = this.getAwsClient(region, 'CloudWatch');
|
||||||
|
|
||||||
var params = {
|
var params = {
|
||||||
Namespace: namespace,
|
Namespace: namespace,
|
||||||
@ -436,6 +436,33 @@ function (angular, _, dateMath) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var ebsVolumeIdsQuery = query.match(/^ebs_volume_ids\(([^,]+?),\s?([^,]+?)\)/);
|
||||||
|
if (ebsVolumeIdsQuery) {
|
||||||
|
region = templateSrv.replace(ebsVolumeIdsQuery[1]);
|
||||||
|
var instanceId = templateSrv.replace(ebsVolumeIdsQuery[2]);
|
||||||
|
|
||||||
|
var ec2 = this.getAwsClient(region, 'EC2');
|
||||||
|
|
||||||
|
var params = {
|
||||||
|
InstanceIds: [
|
||||||
|
instanceId
|
||||||
|
]
|
||||||
|
};
|
||||||
|
ec2.describeInstances(params, function(err, data) {
|
||||||
|
if (err) {
|
||||||
|
throw err;
|
||||||
|
}
|
||||||
|
|
||||||
|
var volumeIds = _.map(data.Reservations[0].Instances[0].BlockDeviceMappings, function(mapping) {
|
||||||
|
return mapping.EBS.VolumeID;
|
||||||
|
});
|
||||||
|
|
||||||
|
d.resolve(transformSuggestData(volumeIds));
|
||||||
|
});
|
||||||
|
|
||||||
|
return d.promise;
|
||||||
|
}
|
||||||
|
|
||||||
return $q.when([]);
|
return $q.when([]);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -451,9 +478,9 @@ function (angular, _, dateMath) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
CloudWatchDatasource.prototype.getCloudWatchClient = function(region) {
|
CloudWatchDatasource.prototype.getAwsClient = function(region, service) {
|
||||||
if (!this.proxyMode) {
|
if (!this.proxyMode) {
|
||||||
return new AWS.CloudWatch({
|
return new AWS[service]({
|
||||||
region: region,
|
region: region,
|
||||||
accessKeyId: this.credentials.accessKeyId,
|
accessKeyId: this.credentials.accessKeyId,
|
||||||
secretAccessKey: this.credentials.secretAccessKey
|
secretAccessKey: this.credentials.secretAccessKey
|
||||||
@ -483,10 +510,22 @@ function (angular, _, dateMath) {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
var proxy;
|
||||||
getMetricStatistics: generateRequestProxy('CloudWatch', 'GetMetricStatistics'),
|
switch (service) {
|
||||||
listMetrics: generateRequestProxy('CloudWatch', 'ListMetrics')
|
case 'CloudWatch':
|
||||||
};
|
proxy = {
|
||||||
|
getMetricStatistics: generateRequestProxy('CloudWatch', 'GetMetricStatistics'),
|
||||||
|
listMetrics: generateRequestProxy('CloudWatch', 'ListMetrics')
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
case 'EC2':
|
||||||
|
proxy = {
|
||||||
|
describeInstances: generateRequestProxy('EC2', 'DescribeInstances')
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return proxy;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user