ec2query

package module
v0.2.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2021 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Overview

Package ec2query provides the API client, operations, and parameter types for the API.

An EC2 query service that sends query requests and XML responses.

Index

Constants

View Source
const ServiceAPIVersion = "2020-01-08"
View Source
const ServiceID = "EC2 Protocol"

Variables

This section is empty.

Functions

func NewDefaultEndpointResolver

func NewDefaultEndpointResolver() *internalendpoints.Resolver

NewDefaultEndpointResolver constructs a new service endpoint resolver

func WithAPIOptions added in v0.2.1

func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options)

WithAPIOptions returns a functional option for setting the Client's APIOptions option.

func WithEndpointResolver

func WithEndpointResolver(v EndpointResolver) func(*Options)

WithEndpointResolver returns a functional option for setting the Client's EndpointResolver option.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides the API client to make operations call for the API.

func New

func New(options Options, optFns ...func(*Options)) *Client

New returns an initialized Client based on the functional options. Provide additional functional options to further configure the behavior of the client, such as changing the client's endpoint or adding custom middleware behavior.

func NewFromConfig

func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client

NewFromConfig returns a new client from the provided config.

func (*Client) EmptyInputAndEmptyOutput

func (c *Client) EmptyInputAndEmptyOutput(ctx context.Context, params *EmptyInputAndEmptyOutputInput, optFns ...func(*Options)) (*EmptyInputAndEmptyOutputOutput, error)

The example tests how requests and responses are serialized when there's no request or response members. While this should be rare, code generators must support this.

func (*Client) EndpointOperation added in v0.2.4

func (c *Client) EndpointOperation(ctx context.Context, params *EndpointOperationInput, optFns ...func(*Options)) (*EndpointOperationOutput, error)

func (*Client) EndpointWithHostLabelOperation added in v0.2.4

func (c *Client) EndpointWithHostLabelOperation(ctx context.Context, params *EndpointWithHostLabelOperationInput, optFns ...func(*Options)) (*EndpointWithHostLabelOperationOutput, error)

func (*Client) GreetingWithErrors

func (c *Client) GreetingWithErrors(ctx context.Context, params *GreetingWithErrorsInput, optFns ...func(*Options)) (*GreetingWithErrorsOutput, error)

This operation has three possible return values:

* A successful response in the form of GreetingWithErrorsOutput

* An InvalidGreeting error.

* A BadRequest error.

func (*Client) IgnoresWrappingXmlName

func (c *Client) IgnoresWrappingXmlName(ctx context.Context, params *IgnoresWrappingXmlNameInput, optFns ...func(*Options)) (*IgnoresWrappingXmlNameOutput, error)

The xmlName trait on the output structure is ignored in AWS Query. The wrapping element is always operation name + "Response".

func (*Client) NestedStructures

func (c *Client) NestedStructures(ctx context.Context, params *NestedStructuresInput, optFns ...func(*Options)) (*NestedStructuresOutput, error)

This test serializes nested and recursive structure members.

func (*Client) NoInputAndOutput

func (c *Client) NoInputAndOutput(ctx context.Context, params *NoInputAndOutputInput, optFns ...func(*Options)) (*NoInputAndOutputOutput, error)

The example tests how requests and responses are serialized when there's no request payload or response members. While this should be rare, code generators must support this.

func (*Client) QueryIdempotencyTokenAutoFill

func (c *Client) QueryIdempotencyTokenAutoFill(ctx context.Context, params *QueryIdempotencyTokenAutoFillInput, optFns ...func(*Options)) (*QueryIdempotencyTokenAutoFillOutput, error)

Automatically adds idempotency tokens.

func (*Client) QueryLists

func (c *Client) QueryLists(ctx context.Context, params *QueryListsInput, optFns ...func(*Options)) (*QueryListsOutput, error)

This test serializes simple and complex lists.

func (*Client) QueryTimestamps

func (c *Client) QueryTimestamps(ctx context.Context, params *QueryTimestampsInput, optFns ...func(*Options)) (*QueryTimestampsOutput, error)

This test serializes timestamps.

* Timestamps are serialized as RFC 3339 date-time values by default.

* A timestampFormat trait on a member changes the format.

* A timestampFormat trait on the shape targeted by the member changes the format.

func (*Client) RecursiveXmlShapes

func (c *Client) RecursiveXmlShapes(ctx context.Context, params *RecursiveXmlShapesInput, optFns ...func(*Options)) (*RecursiveXmlShapesOutput, error)

Recursive shapes

func (*Client) SimpleInputParams

func (c *Client) SimpleInputParams(ctx context.Context, params *SimpleInputParamsInput, optFns ...func(*Options)) (*SimpleInputParamsOutput, error)

This test serializes strings, numbers, and boolean values.

func (*Client) SimpleScalarXmlProperties

func (c *Client) SimpleScalarXmlProperties(ctx context.Context, params *SimpleScalarXmlPropertiesInput, optFns ...func(*Options)) (*SimpleScalarXmlPropertiesOutput, error)

func (*Client) XmlBlobs

func (c *Client) XmlBlobs(ctx context.Context, params *XmlBlobsInput, optFns ...func(*Options)) (*XmlBlobsOutput, error)

Blobs are base64 encoded

func (*Client) XmlEmptyBlobs

func (c *Client) XmlEmptyBlobs(ctx context.Context, params *XmlEmptyBlobsInput, optFns ...func(*Options)) (*XmlEmptyBlobsOutput, error)

func (*Client) XmlEmptyLists

func (c *Client) XmlEmptyLists(ctx context.Context, params *XmlEmptyListsInput, optFns ...func(*Options)) (*XmlEmptyListsOutput, error)

func (*Client) XmlEnums

func (c *Client) XmlEnums(ctx context.Context, params *XmlEnumsInput, optFns ...func(*Options)) (*XmlEnumsOutput, error)

This example serializes enums as top level properties, in lists, sets, and maps.

func (*Client) XmlLists

func (c *Client) XmlLists(ctx context.Context, params *XmlListsInput, optFns ...func(*Options)) (*XmlListsOutput, error)

This test case serializes XML lists for the following cases for both input and output:

* Normal XML lists.

* Normal XML sets.

* XML lists of lists.

* XML lists with @xmlName on its members

* Flattened XML lists.

* Flattened XML lists with @xmlName.

* Flattened XML lists with @xmlNamespace.

* Lists of structures.

func (*Client) XmlNamespaces

func (c *Client) XmlNamespaces(ctx context.Context, params *XmlNamespacesInput, optFns ...func(*Options)) (*XmlNamespacesOutput, error)

func (*Client) XmlTimestamps

func (c *Client) XmlTimestamps(ctx context.Context, params *XmlTimestampsInput, optFns ...func(*Options)) (*XmlTimestampsOutput, error)

This tests how timestamps are serialized, including using the default format of date-time and various @timestampFormat trait values.

type EmptyInputAndEmptyOutputInput

type EmptyInputAndEmptyOutputInput struct {
}

type EmptyInputAndEmptyOutputOutput

type EmptyInputAndEmptyOutputOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type EndpointOperationInput added in v0.2.4

type EndpointOperationInput struct {
}

type EndpointOperationOutput added in v0.2.4

type EndpointOperationOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type EndpointResolver

type EndpointResolver interface {
	ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error)
}

EndpointResolver interface for resolving service endpoints.

func EndpointResolverFromURL added in v0.2.2

func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver

EndpointResolverFromURL returns an EndpointResolver configured using the provided endpoint url. By default, the resolved endpoint resolver uses the client region as signing region, and the endpoint source is set to EndpointSourceCustom.You can provide functional options to configure endpoint values for the resolved endpoint.

type EndpointResolverFunc

type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error)

EndpointResolverFunc is a helper utility that wraps a function so it satisfies the EndpointResolver interface. This is useful when you want to add additional endpoint resolving logic, or stub out specific endpoints with custom values.

func (EndpointResolverFunc) ResolveEndpoint

func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error)

type EndpointResolverOptions added in v0.1.3

type EndpointResolverOptions = internalendpoints.Options

EndpointResolverOptions is the service endpoint resolver options

type EndpointWithHostLabelOperationInput added in v0.2.4

type EndpointWithHostLabelOperationInput struct {

	// This member is required.
	Label *string
}

type EndpointWithHostLabelOperationOutput added in v0.2.4

type EndpointWithHostLabelOperationOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type GreetingWithErrorsInput

type GreetingWithErrorsInput struct {
}

type GreetingWithErrorsOutput

type GreetingWithErrorsOutput struct {
	Greeting *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type HTTPClient

type HTTPClient interface {
	Do(*http.Request) (*http.Response, error)
}

type IdempotencyTokenProvider

type IdempotencyTokenProvider interface {
	GetIdempotencyToken() (string, error)
}

IdempotencyTokenProvider interface for providing idempotency token

type IgnoresWrappingXmlNameInput

type IgnoresWrappingXmlNameInput struct {
}

type IgnoresWrappingXmlNameOutput

type IgnoresWrappingXmlNameOutput struct {
	Foo *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type NestedStructuresInput

type NestedStructuresInput struct {
	Nested *types.StructArg
}

type NestedStructuresOutput

type NestedStructuresOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type NoInputAndOutputInput

type NoInputAndOutputInput struct {
}

type NoInputAndOutputOutput

type NoInputAndOutputOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type Options

type Options struct {
	// Set of options to modify how an operation is invoked. These apply to all
	// operations invoked for this client. Use functional options on operation call to
	// modify this list for per operation behavior.
	APIOptions []func(*middleware.Stack) error

	// Configures the events that will be sent to the configured logger.
	ClientLogMode aws.ClientLogMode

	// The endpoint options to be used when attempting to resolve an endpoint.
	EndpointOptions EndpointResolverOptions

	// The service endpoint resolver.
	EndpointResolver EndpointResolver

	// Provides idempotency tokens values that will be automatically populated into
	// idempotent API operations.
	IdempotencyTokenProvider IdempotencyTokenProvider

	// The logger writer interface to write logging messages to.
	Logger logging.Logger

	// The region to send requests to. (Required)
	Region string

	// Retryer guides how HTTP requests should be retried in case of recoverable
	// failures. When nil the API client will use a default retryer.
	Retryer aws.Retryer

	// The HTTP client to invoke API calls with. Defaults to client's default HTTP
	// implementation if nil.
	HTTPClient HTTPClient
}

func (Options) Copy

func (o Options) Copy() Options

Copy creates a clone where the APIOptions list is deep copied.

type QueryIdempotencyTokenAutoFillInput

type QueryIdempotencyTokenAutoFillInput struct {
	Token *string
}

type QueryIdempotencyTokenAutoFillOutput

type QueryIdempotencyTokenAutoFillOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type QueryListsInput

type QueryListsInput struct {
	ComplexListArg []types.GreetingStruct

	ListArg []string

	ListArgWithXmlName []string

	ListArgWithXmlNameMember []string
}

type QueryListsOutput

type QueryListsOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type QueryTimestampsInput

type QueryTimestampsInput struct {
	EpochMember *time.Time

	EpochTarget *time.Time

	NormalFormat *time.Time
}

type QueryTimestampsOutput

type QueryTimestampsOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type RecursiveXmlShapesInput

type RecursiveXmlShapesInput struct {
}

type RecursiveXmlShapesOutput

type RecursiveXmlShapesOutput struct {
	Nested *types.RecursiveXmlShapesOutputNested1

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type ResolveEndpoint

type ResolveEndpoint struct {
	Resolver EndpointResolver
	Options  EndpointResolverOptions
}

func (*ResolveEndpoint) HandleSerialize

func (*ResolveEndpoint) ID

func (*ResolveEndpoint) ID() string

type SimpleInputParamsInput

type SimpleInputParamsInput struct {
	Bam *int32

	Bar *string

	Baz *bool

	Boo *float64

	Foo *string

	FooEnum types.FooEnum

	HasQueryAndXmlName *string

	HasQueryName *string

	Qux []byte

	UsesXmlName *string
}

type SimpleInputParamsOutput

type SimpleInputParamsOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type SimpleScalarXmlPropertiesInput

type SimpleScalarXmlPropertiesInput struct {
}

type SimpleScalarXmlPropertiesOutput

type SimpleScalarXmlPropertiesOutput struct {
	ByteValue *int8

	DoubleValue *float64

	EmptyStringValue *string

	FalseBooleanValue *bool

	FloatValue *float32

	IntegerValue *int32

	LongValue *int64

	ShortValue *int16

	StringValue *string

	TrueBooleanValue *bool

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type XmlBlobsInput

type XmlBlobsInput struct {
}

type XmlBlobsOutput

type XmlBlobsOutput struct {
	Data []byte

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type XmlEmptyBlobsInput

type XmlEmptyBlobsInput struct {
}

type XmlEmptyBlobsOutput

type XmlEmptyBlobsOutput struct {
	Data []byte

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type XmlEmptyListsInput

type XmlEmptyListsInput struct {
}

type XmlEmptyListsOutput

type XmlEmptyListsOutput struct {
	BooleanList []bool

	EnumList []types.FooEnum

	FlattenedList []string

	FlattenedList2 []string

	FlattenedListWithMemberNamespace []string

	FlattenedListWithNamespace []string

	IntegerList []int32

	// A list of lists of strings.
	NestedStringList [][]string

	RenamedListMembers []string

	StringList []string

	StringSet []string

	StructureList []types.StructureListMember

	TimestampList []time.Time

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type XmlEnumsInput

type XmlEnumsInput struct {
}

type XmlEnumsOutput

type XmlEnumsOutput struct {
	FooEnum1 types.FooEnum

	FooEnum2 types.FooEnum

	FooEnum3 types.FooEnum

	FooEnumList []types.FooEnum

	FooEnumMap map[string]types.FooEnum

	FooEnumSet []types.FooEnum

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type XmlListsInput

type XmlListsInput struct {
}

type XmlListsOutput

type XmlListsOutput struct {
	BooleanList []bool

	EnumList []types.FooEnum

	FlattenedList []string

	FlattenedList2 []string

	FlattenedListWithMemberNamespace []string

	FlattenedListWithNamespace []string

	IntegerList []int32

	// A list of lists of strings.
	NestedStringList [][]string

	RenamedListMembers []string

	StringList []string

	StringSet []string

	StructureList []types.StructureListMember

	TimestampList []time.Time

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type XmlNamespacesInput

type XmlNamespacesInput struct {
}

type XmlNamespacesOutput

type XmlNamespacesOutput struct {
	Nested *types.XmlNamespaceNested

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type XmlTimestampsInput

type XmlTimestampsInput struct {
}

type XmlTimestampsOutput

type XmlTimestampsOutput struct {
	DateTime *time.Time

	EpochSeconds *time.Time

	HttpDate *time.Time

	Normal *time.Time

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL