AwsClientInterface
in
Represents an AWS client.
Table of Contents
Methods
- __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
Return values
ResultInterfaceexecute()
Execute a single command.
public
execute(CommandInterface $command) : ResultInterface
Parameters
- $command : CommandInterface
-
Command to execute
Tags
Return values
ResultInterfaceexecuteAsync()
Execute a command asynchronously.
public
executeAsync(CommandInterface $command) : PromiseInterface
Parameters
- $command : CommandInterface
-
Command to execute
Return values
PromiseInterfacegetApi()
Get the service description associated with the client.
public
getApi() : Service
Return values
ServicegetCommand()
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
Return values
CommandInterfacegetConfig()
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|nullgetCredentials()
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
PromiseInterfacegetEndpoint()
Gets the default endpoint, or base URL, used by the client.
public
getEndpoint() : UriInterface
Return values
UriInterfacegetHandlerList()
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
HandlerListgetIterator()
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
Return values
IteratorgetPaginator()
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
Return values
ResultPaginatorgetRegion()
Get the region to which the client is configured to send requests.
public
getRegion() : string
Return values
stringgetWaiter()
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
Return values
WaiterwaitUntil()
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.