composer update
This commit is contained in:
49
vendor/aws/aws-sdk-php/src/AwsClient.php
vendored
49
vendor/aws/aws-sdk-php/src/AwsClient.php
vendored
@@ -4,6 +4,9 @@ namespace Aws;
|
||||
use Aws\Api\ApiProvider;
|
||||
use Aws\Api\DocModel;
|
||||
use Aws\Api\Service;
|
||||
use Aws\ClientSideMonitoring\ApiCallAttemptMonitoringMiddleware;
|
||||
use Aws\ClientSideMonitoring\ApiCallMonitoringMiddleware;
|
||||
use Aws\ClientSideMonitoring\ConfigurationProvider;
|
||||
use Aws\Signature\SignatureProvider;
|
||||
use GuzzleHttp\Psr7\Uri;
|
||||
|
||||
@@ -82,6 +85,11 @@ class AwsClient implements AwsClientInterface
|
||||
* `http_stats_receiver` option for this to have an effect; timer: (bool)
|
||||
* Set to true to enable a command timer that reports the total wall clock
|
||||
* time spent on an operation in seconds.
|
||||
* - disable_host_prefix_injection: (bool) Set to true to disable host prefix
|
||||
* injection logic for services that use it. This disables the entire
|
||||
* prefix injection, including the portions supplied by user-defined
|
||||
* parameters. Setting this flag will have no effect on services that do
|
||||
* not use host prefix injection.
|
||||
* - endpoint: (string) The full URI of the webservice. This is only
|
||||
* required when connecting to a custom endpoint (e.g., a local version
|
||||
* of S3).
|
||||
@@ -165,6 +173,8 @@ class AwsClient implements AwsClientInterface
|
||||
$this->defaultRequestOptions = $config['http'];
|
||||
$this->addSignatureMiddleware();
|
||||
$this->addInvocationId();
|
||||
$this->addClientSideMonitoring($args);
|
||||
$this->addEndpointParameterMiddleware($args);
|
||||
|
||||
if (isset($args['with_resolved'])) {
|
||||
$args['with_resolved']($config);
|
||||
@@ -263,6 +273,19 @@ class AwsClient implements AwsClientInterface
|
||||
];
|
||||
}
|
||||
|
||||
private function addEndpointParameterMiddleware($args)
|
||||
{
|
||||
if (empty($args['disable_host_prefix_injection'])) {
|
||||
$list = $this->getHandlerList();
|
||||
$list->appendBuild(
|
||||
EndpointParameterMiddleware::wrap(
|
||||
$this->api
|
||||
),
|
||||
'endpoint_parameter'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private function addSignatureMiddleware()
|
||||
{
|
||||
$api = $this->getApi();
|
||||
@@ -297,6 +320,32 @@ class AwsClient implements AwsClientInterface
|
||||
$this->handlerList->prependSign(Middleware::invocationId(), 'invocation-id');
|
||||
}
|
||||
|
||||
private function addClientSideMonitoring($args)
|
||||
{
|
||||
$options = ConfigurationProvider::defaultProvider($args);
|
||||
|
||||
$this->handlerList->appendBuild(
|
||||
ApiCallMonitoringMiddleware::wrap(
|
||||
$this->credentialProvider,
|
||||
$options,
|
||||
$this->region,
|
||||
$this->getApi()->getServiceId()
|
||||
),
|
||||
'ApiCallMonitoringMiddleware'
|
||||
);
|
||||
|
||||
$callAttemptMiddleware = ApiCallAttemptMonitoringMiddleware::wrap(
|
||||
$this->credentialProvider,
|
||||
$options,
|
||||
$this->region,
|
||||
$this->getApi()->getServiceId()
|
||||
);
|
||||
$this->handlerList->appendAttempt (
|
||||
$callAttemptMiddleware,
|
||||
'ApiCallAttemptMonitoringMiddleware'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a service model and doc model with any necessary changes
|
||||
* applied.
|
||||
|
||||
Reference in New Issue
Block a user