SDK for PHP 3.x

Client: Aws\ApiGatewayManagementApi\ApiGatewayManagementApiClient
Service ID: apigatewaymanagementapi
Version: 2018-11-29

This page describes the parameters and results for the operations of the AmazonApiGatewayManagementApi (2018-11-29), and shows how to use the Aws\ApiGatewayManagementApi\ApiGatewayManagementApiClient object to call the described operations. This documentation is specific to the 2018-11-29 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

DeleteConnection ( array $params = [] )
Delete the connection with the provided id.
GetConnection ( array $params = [] )
Get information about the connection with the provided id.
PostToConnection ( array $params = [] )
Sends the provided data to the specified connection.

Operations

DeleteConnection

$result = $client->deleteConnection([/* ... */]);
$promise = $client->deleteConnectionAsync([/* ... */]);

Delete the connection with the provided id.

Parameter Syntax

$result = $client->deleteConnection([
    'ConnectionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
ConnectionId
Required: Yes
Type: string

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

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.

GetConnection

$result = $client->getConnection([/* ... */]);
$promise = $client->getConnectionAsync([/* ... */]);

Get information about the connection with the provided id.

Parameter Syntax

$result = $client->getConnection([
    'ConnectionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
ConnectionId
Required: Yes
Type: string

Result Syntax

[
    'ConnectedAt' => <DateTime>,
    'Identity' => [
        'SourceIp' => '<string>',
        'UserAgent' => '<string>',
    ],
    'LastActiveAt' => <DateTime>,
]

Result Details

Members
ConnectedAt
Type: timestamp (string|DateTime or anything parsable by strtotime)
Identity
Type: Identity structure
LastActiveAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

Errors

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.

PostToConnection

$result = $client->postToConnection([/* ... */]);
$promise = $client->postToConnectionAsync([/* ... */]);

Sends the provided data to the specified connection.

Parameter Syntax

$result = $client->postToConnection([
    'ConnectionId' => '<string>', // REQUIRED
    'Data' => <string || resource || Psr\Http\Message\StreamInterface>, // REQUIRED
]);

Parameter Details

Members
ConnectionId
Required: Yes
Type: string
Data
Required: Yes
Type: blob (string|resource|Psr\Http\Message\StreamInterface)

The data to be sent to the client specified by its connection id.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

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.

Shapes

ForbiddenException

Description

The caller is not authorized to invoke this operation.

Members

GoneException

Description

The connection with the provided id no longer exists.

Members

Identity

Members
SourceIp
Required: Yes
Type: string

The source IP address of the TCP connection making the request to API Gateway.

UserAgent
Required: Yes
Type: string

The User Agent of the API caller.

LimitExceededException

Description

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

Members

PayloadTooLargeException

Description

The data has exceeded the maximum size allowed.

Members
Message
Type: string