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 or the WebSocket client side buffer is full.
    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) DeleteConnection Uses

func (c *ApiGatewayManagementApi) DeleteConnection(input *DeleteConnectionInput) (*DeleteConnectionOutput, error)

DeleteConnection API operation for AmazonApiGatewayManagementApi.

Delete the connection with the provided id.

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 DeleteConnection 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 or the WebSocket client side buffer is full.

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

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

func (*ApiGatewayManagementApi) DeleteConnectionRequest Uses

func (c *ApiGatewayManagementApi) DeleteConnectionRequest(input *DeleteConnectionInput) (req *request.Request, output *DeleteConnectionOutput)

DeleteConnectionRequest generates a "aws/request.Request" representing the client's request for the DeleteConnection 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 DeleteConnection for more information on using the DeleteConnection 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 DeleteConnectionRequest method.
req, resp := client.DeleteConnectionRequest(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/DeleteConnection

func (*ApiGatewayManagementApi) DeleteConnectionWithContext Uses

func (c *ApiGatewayManagementApi) DeleteConnectionWithContext(ctx aws.Context, input *DeleteConnectionInput, opts ...request.Option) (*DeleteConnectionOutput, error)

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

See DeleteConnection 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.

func (*ApiGatewayManagementApi) GetConnection Uses

func (c *ApiGatewayManagementApi) GetConnection(input *GetConnectionInput) (*GetConnectionOutput, error)

GetConnection API operation for AmazonApiGatewayManagementApi.

Get information about the connection with the provided id.

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 GetConnection 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 or the WebSocket client side buffer is full.

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

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

func (*ApiGatewayManagementApi) GetConnectionRequest Uses

func (c *ApiGatewayManagementApi) GetConnectionRequest(input *GetConnectionInput) (req *request.Request, output *GetConnectionOutput)

GetConnectionRequest generates a "aws/request.Request" representing the client's request for the GetConnection 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 GetConnection for more information on using the GetConnection 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 GetConnectionRequest method.
req, resp := client.GetConnectionRequest(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/GetConnection

func (*ApiGatewayManagementApi) GetConnectionWithContext Uses

func (c *ApiGatewayManagementApi) GetConnectionWithContext(ctx aws.Context, input *GetConnectionInput, opts ...request.Option) (*GetConnectionOutput, error)

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

See GetConnection 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.

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 or the WebSocket client side buffer is full.

* 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 DeleteConnectionInput Uses

type DeleteConnectionInput struct {

    // ConnectionId is a required field
    ConnectionId *string `location:"uri" locationName:"connectionId" type:"string" required:"true"`
    // contains filtered or unexported fields
}

func (DeleteConnectionInput) GoString Uses

func (s DeleteConnectionInput) GoString() string

GoString returns the string representation

func (*DeleteConnectionInput) SetConnectionId Uses

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

SetConnectionId sets the ConnectionId field's value.

func (DeleteConnectionInput) String Uses

func (s DeleteConnectionInput) String() string

String returns the string representation

func (*DeleteConnectionInput) Validate Uses

func (s *DeleteConnectionInput) Validate() error

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

type DeleteConnectionOutput Uses

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

func (DeleteConnectionOutput) GoString Uses

func (s DeleteConnectionOutput) GoString() string

GoString returns the string representation

func (DeleteConnectionOutput) String Uses

func (s DeleteConnectionOutput) String() string

String returns the string representation

type GetConnectionInput Uses

type GetConnectionInput struct {

    // ConnectionId is a required field
    ConnectionId *string `location:"uri" locationName:"connectionId" type:"string" required:"true"`
    // contains filtered or unexported fields
}

func (GetConnectionInput) GoString Uses

func (s GetConnectionInput) GoString() string

GoString returns the string representation

func (*GetConnectionInput) SetConnectionId Uses

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

SetConnectionId sets the ConnectionId field's value.

func (GetConnectionInput) String Uses

func (s GetConnectionInput) String() string

String returns the string representation

func (*GetConnectionInput) Validate Uses

func (s *GetConnectionInput) Validate() error

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

type GetConnectionOutput Uses

type GetConnectionOutput struct {
    ConnectedAt *time.Time `locationName:"connectedAt" type:"timestamp" timestampFormat:"iso8601"`

    Identity *Identity `locationName:"identity" type:"structure"`

    LastActiveAt *time.Time `locationName:"lastActiveAt" type:"timestamp" timestampFormat:"iso8601"`
    // contains filtered or unexported fields
}

func (GetConnectionOutput) GoString Uses

func (s GetConnectionOutput) GoString() string

GoString returns the string representation

func (*GetConnectionOutput) SetConnectedAt Uses

func (s *GetConnectionOutput) SetConnectedAt(v time.Time) *GetConnectionOutput

SetConnectedAt sets the ConnectedAt field's value.

func (*GetConnectionOutput) SetIdentity Uses

func (s *GetConnectionOutput) SetIdentity(v *Identity) *GetConnectionOutput

SetIdentity sets the Identity field's value.

func (*GetConnectionOutput) SetLastActiveAt Uses

func (s *GetConnectionOutput) SetLastActiveAt(v time.Time) *GetConnectionOutput

SetLastActiveAt sets the LastActiveAt field's value.

func (GetConnectionOutput) String Uses

func (s GetConnectionOutput) String() string

String returns the string representation

type Identity Uses

type Identity struct {

    // The source IP address of the TCP connection making the request to API Gateway.
    //
    // SourceIp is a required field
    SourceIp *string `locationName:"sourceIp" type:"string" required:"true"`

    // The User Agent of the API caller.
    //
    // UserAgent is a required field
    UserAgent *string `locationName:"userAgent" type:"string" required:"true"`
    // contains filtered or unexported fields
}

func (Identity) GoString Uses

func (s Identity) GoString() string

GoString returns the string representation

func (*Identity) SetSourceIp Uses

func (s *Identity) SetSourceIp(v string) *Identity

SetSourceIp sets the SourceIp field's value.

func (*Identity) SetUserAgent Uses

func (s *Identity) SetUserAgent(v string) *Identity

SetUserAgent sets the UserAgent field's value.

func (Identity) String Uses

func (s Identity) String() string

String returns the string representation

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 9 packages (graph) and is imported by 8 packages. Updated 2019-08-31. Refresh now. Tools for package owners.