Documentation

AwsClientInterface

Represents an AWS client.

Table of Contents

__call()  : ResultInterface
Creates and executes a command for an operation by name.
execute()  : ResultInterface
Execute a single command.
executeAsync()  : PromiseInterface
Execute a command asynchronously.
getApi()  : Service
Get the service description associated with the client.
getCommand()  : CommandInterface
Create a command for an operation name.
getConfig()  : mixed|null
Get a client configuration value.
getCredentials()  : PromiseInterface
Returns a promise that is fulfilled with an {@see \Aws\Credentials\CredentialsInterface} object.
getEndpoint()  : UriInterface
Gets the default endpoint, or base URL, used by the client.
getHandlerList()  : HandlerList
Get the handler list used to transfer commands.
getIterator()  : Iterator
Get a resource iterator for the specified operation.
getPaginator()  : ResultPaginator
Get a result paginator for the specified operation.
getRegion()  : string
Get the region to which the client is configured to send requests.
getWaiter()  : Waiter
Get a waiter that waits until a resource is in a particular state.
waitUntil()  : void
Wait until a resource is in a particular state.

Methods

__call()

Creates and executes a command for an operation by name.

public __call(string $name, array<string|int, mixed> $arguments) : ResultInterface

Suffixing an operation name with "Async" will return a promise that can be used to execute commands asynchronously.

Parameters
$name : string

Name of the command to execute.

$arguments : array<string|int, mixed>

Arguments to pass to the getCommand method.

Tags
throws
Exception
Return values
ResultInterface —

getCommand()

Create a command for an operation name.

public getCommand(string $name[, array<string|int, mixed> $args = [] ]) : CommandInterface

Special keys may be set on the command to control how it behaves, including:

  • @http: Associative array of transfer specific options to apply to the request that is serialized for this command. Available keys include "proxy", "verify", "timeout", "connect_timeout", "debug", "delay", and "headers".
Parameters
$name : string

Name of the operation to use in the command

$args : array<string|int, mixed> = []

Arguments to pass to the command

Tags
throws
InvalidArgumentException

if no command can be found by name

Return values
CommandInterface —

getConfig()

Get a client configuration value.

public getConfig([string|null $option = null ]) : mixed|null
Parameters
$option : string|null = null

The option to retrieve. Pass null to retrieve all options.

Return values
mixed|null —

getCredentials()

Returns a promise that is fulfilled with an {@see \Aws\Credentials\CredentialsInterface} object.

public getCredentials() : PromiseInterface

If you need the credentials synchronously, then call the wait() method on the returned promise.

Return values
PromiseInterface —

getHandlerList()

Get the handler list used to transfer commands.

public getHandlerList() : HandlerList

This list can be modified to add middleware or to change the underlying handler used to send HTTP requests.

Return values
HandlerList —

getIterator()

Get a resource iterator for the specified operation.

public getIterator(string $name[, array<string|int, mixed> $args = [] ]) : Iterator
Parameters
$name : string

Name of the iterator to retrieve.

$args : array<string|int, mixed> = []

Command arguments to use with each command.

Tags
throws
UnexpectedValueException

if the iterator config is invalid.

Return values
Iterator —

getPaginator()

Get a result paginator for the specified operation.

public getPaginator(string $name[, array<string|int, mixed> $args = [] ]) : ResultPaginator
Parameters
$name : string

Name of the operation used for iterator

$args : array<string|int, mixed> = []

Command args to be used with each command

Tags
throws
UnexpectedValueException

if the iterator config is invalid.

Return values
ResultPaginator —

getRegion()

Get the region to which the client is configured to send requests.

public getRegion() : string
Return values
string —

getWaiter()

Get a waiter that waits until a resource is in a particular state.

public getWaiter(string|callable $name[, array<string|int, mixed> $args = [] ]) : Waiter

Retrieving a waiter can be useful when you wish to wait asynchronously:

$waiter = $client->getWaiter('foo', ['bar' => 'baz']); $waiter->promise()->then(function () { echo 'Done!'; });

Parameters
$name : string|callable

Name of the waiter that defines the wait configuration and conditions.

$args : array<string|int, mixed> = []

Args to be used with each command executed by the waiter. Waiter configuration options can be provided in an associative array in the @waiter key.

Tags
throws
UnexpectedValueException

if the waiter is invalid.

Return values
Waiter —

waitUntil()

Wait until a resource is in a particular state.

public waitUntil(string|callable $name[, array<string|int, mixed> $args = [] ]) : void
Parameters
$name : string|callable

Name of the waiter that defines the wait configuration and conditions.

$args : array<string|int, mixed> = []

Args to be used with each command executed by the waiter. Waiter configuration options can be provided in an associative array in the @waiter key.

Tags
throws
UnexpectedValueException

if the waiter is invalid.

Return values
void —

Search results