Documentation

EcsCredentialProvider
in package

Credential provider that fetches credentials with GET request.

ECS environment variable is used in constructing request URI.

Table of Contents

ENV_TIMEOUT  = 'AWS_METADATA_SERVICE_TIMEOUT'
ENV_URI  = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"
SERVER_URI  = 'http://169.254.170.2'
$client  : callable
$timeout  : float|mixed
__construct()  : mixed
The constructor accepts following options: - timeout: (optional) Connection timeout, in seconds, default 1.0 - client: An EcsClient to make request from
__invoke()  : PromiseInterface
Load ECS credentials
decodeResult()  : mixed
getEcsUri()  : string
Fetch credential URI from ECS environment variable

Constants

Properties

Methods

__construct()

The constructor accepts following options: - timeout: (optional) Connection timeout, in seconds, default 1.0 - client: An EcsClient to make request from

public __construct([array<string|int, mixed> $config = [] ]) : mixed
Parameters
$config : array<string|int, mixed> = []

Configuration options

Return values
mixed

decodeResult()

private decodeResult(mixed $response) : mixed
Parameters
$response : mixed
Return values
mixed

getEcsUri()

Fetch credential URI from ECS environment variable

private getEcsUri() : string
Return values
string

Returns ECS URI

Search results