ResultInterface
extends
ArrayAccess, IteratorAggregate, Countable
in
Represents an AWS result object that is returned from executing an operation.
Table of Contents
Methods
- __toString() : string
- Provides debug information about the result object
- get() : mixed|null
- Get a specific key value from the result model.
- hasKey() : bool
- Check if the model contains a key by name
- search() : mixed
- Returns the result of executing a JMESPath expression on the contents of the Result model.
- toArray() : array<string|int, mixed>
- Convert the result to an array.
Methods
__toString()
Provides debug information about the result object
public
__toString() : string
Return values
stringget()
Get a specific key value from the result model.
public
get(string $key) : mixed|null
Parameters
- $key : string
-
Key to retrieve.
Return values
mixed|null —Value of the key or NULL if not found.
hasKey()
Check if the model contains a key by name
public
hasKey(string $name) : bool
Parameters
- $name : string
-
Name of the key to retrieve
Return values
boolsearch()
Returns the result of executing a JMESPath expression on the contents of the Result model.
public
search(string $expression) : mixed
$result = $client->execute($command);
$jpResult = $result->search('foo.*.bar[?baz > 10
]');
Parameters
- $expression : string
-
JMESPath expression to execute
Tags
Return values
mixed —Returns the result of the JMESPath expression.
toArray()
Convert the result to an array.
public
toArray() : array<string|int, mixed>