Class IdempotencyTokenMiddleware
Methods Summary
-
static
wrap ( Aws\Api\Service $service, callable $bytesGenerator = null )
Creates a middleware that populates operation parameter with trait 'idempotencyToken' enabled with a random UUIDv4
- __construct ( callable $nextHandler, Aws\Api\Service $service, callable $bytesGenerator = null )
- __invoke ( Aws\CommandInterface $command, Psr\Http\Message\RequestInterface $request = null )
Methods Details
static
callable
wrap (
Aws\Api\Service
$service,
callable
$bytesGenerator = null
)
Creates a middleware that populates operation parameter with trait 'idempotencyToken' enabled with a random UUIDv4
One of following functions needs to be available in order to generate random bytes used for UUID (SDK will attempt to utilize function in following order): - random_bytes (requires PHP 7.0 or above) - openssl_random_pseudo_bytes (requires 'openssl' module enabled) - mcrypt_create_iv (requires 'mcrypt' module enabled)
You may also supply a custom bytes generator as an optional second parameter.
Parameters
Aws\Api\Service |
$service | |
callable | $bytesGenerator = null |
Returns
callable |