apigatewaymanagementapi

package
v1.99.1 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package apigatewaymanagementapi provides the client and types for making API requests to AmazonApiGatewayManagementApi.

The Amazon API Gateway Management API allows you to directly manage runtime aspects of your deployed APIs. To use it, you must explicitly set the SDK's endpoint to point to the endpoint of your deployed API. The endpoint will be of the form https://{api-id}.execute-api.{region}.amazonaws.com/{stage}, or will be the endpoint corresponding to your API's custom domain and base path, if applicable.

See https://docs.aws.amazon.com/goto/WebAPI/apigatewaymanagementapi-2018-11-29 for more information on this service.

See apigatewaymanagementapi package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/apigatewaymanagementapi/

Using the Client

To contact AmazonApiGatewayManagementApi with the SDK use the New function to create a new service client. With that client you can make API requests to the service. These clients are safe to use concurrently.

See the SDK's documentation for more information on how to use the SDK. https://docs.aws.amazon.com/sdk-for-go/api/

See aws.Config documentation for more information on configuring SDK clients. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config

See the AmazonApiGatewayManagementApi client ApiGatewayManagementApi for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/apigatewaymanagementapi/#New

Index

Constants

View Source
const (

	// ErrCodeForbiddenException for service response error code
	// "ForbiddenException".
	//
	// The caller is not authorized to invoke this operation.
	ErrCodeForbiddenException = "ForbiddenException"

	// ErrCodeGoneException for service response error code
	// "GoneException".
	//
	// The connection with the provided id no longer exists.
	ErrCodeGoneException = "GoneException"

	// ErrCodeLimitExceededException for service response error code
	// "LimitExceededException".
	//
	// The client is sending more than the allowed number of requests per unit of
	// time.
	ErrCodeLimitExceededException = "LimitExceededException"

	// ErrCodePayloadTooLargeException for service response error code
	// "PayloadTooLargeException".
	//
	// The data has exceeded the maximum size allowed.
	ErrCodePayloadTooLargeException = "PayloadTooLargeException"
)
View Source
const (
	ServiceName = "ApiGatewayManagementApi" // Name of service.
	EndpointsID = "execute-api"             // ID to lookup a service endpoint with.
	ServiceID   = "ApiGatewayManagementApi" // ServiceID is a unique identifer of a specific service.
)

Service information constants

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiGatewayManagementApi

type ApiGatewayManagementApi struct {
	*client.Client
}

ApiGatewayManagementApi provides the API operation methods for making requests to AmazonApiGatewayManagementApi. See this package's package overview docs for details on the service.

ApiGatewayManagementApi methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

func New

New creates a new instance of the ApiGatewayManagementApi client with a session. If additional configuration is needed for the client instance use the optional aws.Config parameter to add your extra config.

Example:

// Create a ApiGatewayManagementApi client from just a session.
svc := apigatewaymanagementapi.New(mySession)

// Create a ApiGatewayManagementApi client with additional configuration
svc := apigatewaymanagementapi.New(mySession, aws.NewConfig().WithRegion("us-west-2"))

func (*ApiGatewayManagementApi) PostToConnection

PostToConnection API operation for AmazonApiGatewayManagementApi.

Sends the provided data to the specified connection.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AmazonApiGatewayManagementApi's API operation PostToConnection for usage and error information.

Returned Error Codes:

  • ErrCodeGoneException "GoneException" The connection with the provided id no longer exists.

  • ErrCodeLimitExceededException "LimitExceededException" The client is sending more than the allowed number of requests per unit of time.

  • ErrCodePayloadTooLargeException "PayloadTooLargeException" The data has exceeded the maximum size allowed.

  • ErrCodeForbiddenException "ForbiddenException" The caller is not authorized to invoke this operation.

See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewaymanagementapi-2018-11-29/PostToConnection

func (*ApiGatewayManagementApi) PostToConnectionRequest

func (c *ApiGatewayManagementApi) PostToConnectionRequest(input *PostToConnectionInput) (req *request.Request, output *PostToConnectionOutput)

PostToConnectionRequest generates a "aws/request.Request" representing the client's request for the PostToConnection operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See PostToConnection for more information on using the PostToConnection API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the PostToConnectionRequest method.
req, resp := client.PostToConnectionRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/apigatewaymanagementapi-2018-11-29/PostToConnection

func (*ApiGatewayManagementApi) PostToConnectionWithContext

func (c *ApiGatewayManagementApi) PostToConnectionWithContext(ctx aws.Context, input *PostToConnectionInput, opts ...request.Option) (*PostToConnectionOutput, error)

PostToConnectionWithContext is the same as PostToConnection with the addition of the ability to pass a context and additional request options.

See PostToConnection for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

type PostToConnectionInput

type PostToConnectionInput struct {

	// ConnectionId is a required field
	ConnectionId *string `location:"uri" locationName:"connectionId" type:"string" required:"true"`

	// The data to be sent to the client specified by its connection id.
	//
	// Data is a required field
	Data []byte `type:"blob" required:"true"`
	// contains filtered or unexported fields
}

func (PostToConnectionInput) GoString

func (s PostToConnectionInput) GoString() string

GoString returns the string representation

func (*PostToConnectionInput) SetConnectionId

func (s *PostToConnectionInput) SetConnectionId(v string) *PostToConnectionInput

SetConnectionId sets the ConnectionId field's value.

func (*PostToConnectionInput) SetData

SetData sets the Data field's value.

func (PostToConnectionInput) String

func (s PostToConnectionInput) String() string

String returns the string representation

func (*PostToConnectionInput) Validate

func (s *PostToConnectionInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type PostToConnectionOutput

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

func (PostToConnectionOutput) GoString

func (s PostToConnectionOutput) GoString() string

GoString returns the string representation

func (PostToConnectionOutput) String

func (s PostToConnectionOutput) String() string

String returns the string representation

Directories

Path Synopsis
Package apigatewaymanagementapiiface provides an interface to enable mocking the AmazonApiGatewayManagementApi service client for testing your code.
Package apigatewaymanagementapiiface provides an interface to enable mocking the AmazonApiGatewayManagementApi service client for testing your code.

Jump to

Keyboard shortcuts

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