aws-sdk-go: github.com/aws/aws-sdk-go/service/apigatewaymanagementapi Index | Files | Directories

package apigatewaymanagementapi

import "github.com/aws/aws-sdk-go/service/apigatewaymanagementapi"

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

Package Files

api.go doc.go errors.go service.go

Constants

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"
)
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

type ApiGatewayManagementApi Uses

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 Uses

func New(p client.ConfigProvider, cfgs ...*aws.Config) *ApiGatewayManagementApi

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 Uses

func (c *ApiGatewayManagementApi) PostToConnection(input *PostToConnectionInput) (*PostToConnectionOutput, error)

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 Uses

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 Uses

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 Uses

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 Uses

func (s PostToConnectionInput) GoString() string

GoString returns the string representation

func (*PostToConnectionInput) SetConnectionId Uses

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

SetConnectionId sets the ConnectionId field's value.

func (*PostToConnectionInput) SetData Uses

func (s *PostToConnectionInput) SetData(v []byte) *PostToConnectionInput

SetData sets the Data field's value.

func (PostToConnectionInput) String Uses

func (s PostToConnectionInput) String() string

String returns the string representation

func (*PostToConnectionInput) Validate Uses

func (s *PostToConnectionInput) Validate() error

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

type PostToConnectionOutput Uses

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

func (PostToConnectionOutput) GoString Uses

func (s PostToConnectionOutput) GoString() string

GoString returns the string representation

func (PostToConnectionOutput) String Uses

func (s PostToConnectionOutput) String() string

String returns the string representation

Directories

PathSynopsis
apigatewaymanagementapiifacePackage apigatewaymanagementapiiface provides an interface to enable mocking the AmazonApiGatewayManagementApi service client for testing your code.

Package apigatewaymanagementapi imports 8 packages (graph) and is imported by 8 packages. Updated 2019-03-19. Refresh now. Tools for package owners.