apigatewaymanagementapi

package
v0.0.0-...-50c6590 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0, Apache-2.0 Imports: 10 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 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"
)
View Source
const (
	ServiceName = "ApiGatewayManagementApi" // Name of service.
	EndpointsID = "execute-api"             // ID to lookup a service endpoint with.
	ServiceID   = "ApiGatewayManagementApi" // ServiceID is a unique identifier 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:

mySession := session.Must(session.NewSession())

// 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

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 Types:

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

  • LimitExceededException The client is sending more than the allowed number of requests per unit of time or the WebSocket client side buffer is full.

  • 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

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

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

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 Types:

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

  • LimitExceededException The client is sending more than the allowed number of requests per unit of time or the WebSocket client side buffer is full.

  • 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

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

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

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 Types:

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

  • LimitExceededException The client is sending more than the allowed number of requests per unit of time or the WebSocket client side buffer is full.

  • PayloadTooLargeException The data has exceeded the maximum size allowed.

  • 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 DeleteConnectionInput

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

func (s DeleteConnectionInput) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*DeleteConnectionInput) SetConnectionId

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

SetConnectionId sets the ConnectionId field's value.

func (DeleteConnectionInput) String

func (s DeleteConnectionInput) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*DeleteConnectionInput) Validate

func (s *DeleteConnectionInput) Validate() error

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

type DeleteConnectionOutput

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

func (DeleteConnectionOutput) GoString

func (s DeleteConnectionOutput) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (DeleteConnectionOutput) String

func (s DeleteConnectionOutput) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type ForbiddenException

type ForbiddenException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The caller is not authorized to invoke this operation.

func (*ForbiddenException) Code

func (s *ForbiddenException) Code() string

Code returns the exception type name.

func (*ForbiddenException) Error

func (s *ForbiddenException) Error() string

func (ForbiddenException) GoString

func (s ForbiddenException) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*ForbiddenException) Message

func (s *ForbiddenException) Message() string

Message returns the exception's message.

func (*ForbiddenException) OrigErr

func (s *ForbiddenException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*ForbiddenException) RequestID

func (s *ForbiddenException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*ForbiddenException) StatusCode

func (s *ForbiddenException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (ForbiddenException) String

func (s ForbiddenException) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type GetConnectionInput

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

func (s GetConnectionInput) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*GetConnectionInput) SetConnectionId

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

SetConnectionId sets the ConnectionId field's value.

func (GetConnectionInput) String

func (s GetConnectionInput) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*GetConnectionInput) Validate

func (s *GetConnectionInput) Validate() error

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

type GetConnectionOutput

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

func (s GetConnectionOutput) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*GetConnectionOutput) SetConnectedAt

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

SetConnectedAt sets the ConnectedAt field's value.

func (*GetConnectionOutput) SetIdentity

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

SetIdentity sets the Identity field's value.

func (*GetConnectionOutput) SetLastActiveAt

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

SetLastActiveAt sets the LastActiveAt field's value.

func (GetConnectionOutput) String

func (s GetConnectionOutput) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type GoneException

type GoneException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The connection with the provided id no longer exists.

func (*GoneException) Code

func (s *GoneException) Code() string

Code returns the exception type name.

func (*GoneException) Error

func (s *GoneException) Error() string

func (GoneException) GoString

func (s GoneException) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*GoneException) Message

func (s *GoneException) Message() string

Message returns the exception's message.

func (*GoneException) OrigErr

func (s *GoneException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*GoneException) RequestID

func (s *GoneException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*GoneException) StatusCode

func (s *GoneException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (GoneException) String

func (s GoneException) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type Identity

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

func (s Identity) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*Identity) SetSourceIp

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

SetSourceIp sets the SourceIp field's value.

func (*Identity) SetUserAgent

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

SetUserAgent sets the UserAgent field's value.

func (Identity) String

func (s Identity) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type LimitExceededException

type LimitExceededException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The client is sending more than the allowed number of requests per unit of time or the WebSocket client side buffer is full.

func (*LimitExceededException) Code

func (s *LimitExceededException) Code() string

Code returns the exception type name.

func (*LimitExceededException) Error

func (s *LimitExceededException) Error() string

func (LimitExceededException) GoString

func (s LimitExceededException) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*LimitExceededException) Message

func (s *LimitExceededException) Message() string

Message returns the exception's message.

func (*LimitExceededException) OrigErr

func (s *LimitExceededException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*LimitExceededException) RequestID

func (s *LimitExceededException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*LimitExceededException) StatusCode

func (s *LimitExceededException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (LimitExceededException) String

func (s LimitExceededException) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type PayloadTooLargeException

type PayloadTooLargeException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

The data has exceeded the maximum size allowed.

func (*PayloadTooLargeException) Code

func (s *PayloadTooLargeException) Code() string

Code returns the exception type name.

func (*PayloadTooLargeException) Error

func (s *PayloadTooLargeException) Error() string

func (PayloadTooLargeException) GoString

func (s PayloadTooLargeException) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*PayloadTooLargeException) Message

func (s *PayloadTooLargeException) Message() string

Message returns the exception's message.

func (*PayloadTooLargeException) OrigErr

func (s *PayloadTooLargeException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*PayloadTooLargeException) RequestID

func (s *PayloadTooLargeException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*PayloadTooLargeException) StatusCode

func (s *PayloadTooLargeException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (PayloadTooLargeException) String

func (s PayloadTooLargeException) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

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.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

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.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

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.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (PostToConnectionOutput) String

func (s PostToConnectionOutput) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

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