PATH:
home
/
shotlining
/
public_html
/
wp-content
/
plugins
/
w3-total-cache
/
vendor
/
aws
/
aws-sdk-php
/
src
<?php namespace Aws; use Aws\Api\Parser\Exception\ParserException; use Aws\Exception\AwsException; use GuzzleHttp\Promise; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; /** * Converts an HTTP handler into a Command HTTP handler. * * HTTP handlers have the following signature: * function(RequestInterface $request, array $options) : PromiseInterface * * The promise returned form an HTTP handler must resolve to a PSR-7 response * object when fulfilled or an error array when rejected. The error array * can contain the following data: * * - exception: (required, Exception) Exception that was encountered. * - response: (ResponseInterface) PSR-7 response that was received (if a * response) was received. * - connection_error: (bool) True if the error is the result of failing to * connect. */ class WrappedHttpHandler { private $httpHandler; private $parser; private $errorParser; private $exceptionClass; private $collectStats; /** * @param callable $httpHandler Function that accepts a request and array * of request options and returns a promise * that fulfills with a response or rejects * with an error array. * @param callable $parser Function that accepts a response object * and returns an AWS result object. * @param callable $errorParser Function that parses a response object * into AWS error data. * @param string $exceptionClass Exception class to throw. * @param bool $collectStats Whether to collect HTTP transfer * information. */ public function __construct( callable $httpHandler, callable $parser, callable $errorParser, $exceptionClass = AwsException::class, $collectStats = false ) { $this->httpHandler = $httpHandler; $this->parser = $parser; $this->errorParser = $errorParser; $this->exceptionClass = $exceptionClass; $this->collectStats = $collectStats; } /** * Calls the simpler HTTP specific handler and wraps the returned promise * with AWS specific values (e.g., a result object or AWS exception). * * @param CommandInterface $command Command being executed. * @param RequestInterface $request Request to send. * * @return Promise\PromiseInterface */ public function __invoke( CommandInterface $command, RequestInterface $request ) { $fn = $this->httpHandler; $options = $command['@http'] ?: []; $stats = []; if ($this->collectStats || !empty($options['collect_stats'])) { $options['http_stats_receiver'] = static function ( array $transferStats ) use (&$stats) { $stats = $transferStats; }; } elseif (isset($options['http_stats_receiver'])) { throw new \InvalidArgumentException('Providing a custom HTTP stats' . ' receiver to Aws\WrappedHttpHandler is not supported.'); } return Promise\Create::promiseFor($fn($request, $options)) ->then( function ( ResponseInterface $res ) use ($command, $request, &$stats) { return $this->parseResponse($command, $request, $res, $stats); }, function ($err) use ($request, $command, &$stats) { if (is_array($err)) { $err = $this->parseError( $err, $request, $command, $stats ); } return new Promise\RejectedPromise($err); } ); } /** * @param CommandInterface $command * @param RequestInterface $request * @param ResponseInterface $response * @param array $stats * * @return ResultInterface */ private function parseResponse( CommandInterface $command, RequestInterface $request, ResponseInterface $response, array $stats ) { $parser = $this->parser; $status = $response->getStatusCode(); $result = $status < 300 ? $parser($command, $response) : new Result(); $metadata = [ 'statusCode' => $status, 'effectiveUri' => (string) $request->getUri(), 'headers' => [], 'transferStats' => [], ]; if (!empty($stats)) { $metadata['transferStats']['http'] = [$stats]; } // Bring headers into the metadata array. foreach ($response->getHeaders() as $name => $values) { $metadata['headers'][strtolower($name)] = $values[0]; } $result['@metadata'] = $metadata; return $result; } /** * Parses a rejection into an AWS error. * * @param array $err Rejection error array. * @param RequestInterface $request Request that was sent. * @param CommandInterface $command Command being sent. * @param array $stats Transfer statistics * * @return \Exception */ private function parseError( array $err, RequestInterface $request, CommandInterface $command, array $stats ) { if (!isset($err['exception'])) { throw new \RuntimeException('The HTTP handler was rejected without an "exception" key value pair.'); } $serviceError = "AWS HTTP error: " . $err['exception']->getMessage(); if (!isset($err['response'])) { $parts = ['response' => null]; } else { try { $parts = call_user_func( $this->errorParser, $err['response'], $command ); $serviceError .= " {$parts['code']} ({$parts['type']}): " . "{$parts['message']} - " . $err['response']->getBody(); } catch (ParserException $e) { $parts = []; $serviceError .= ' Unable to parse error information from ' . "response - {$e->getMessage()}"; } $parts['response'] = $err['response']; } $parts['exception'] = $err['exception']; $parts['request'] = $request; $parts['connection_error'] = !empty($err['connection_error']); $parts['transfer_stats'] = $stats; return new $this->exceptionClass( sprintf( 'Error executing "%s" on "%s"; %s', $command->getName(), $request->getUri(), $serviceError ), $command, $parts, $err['exception'] ); } }
[+]
..
[+]
Pinpoint
[+]
Chime
[+]
WellArchitected
[+]
Health
[-] IdempotencyTokenMiddleware.php
[edit]
[+]
Handler
[+]
Ssm
[+]
SecurityHub
[+]
BedrockAgentRuntime
[+]
EventBridge
[+]
SageMakerGeospatial
[+]
DefaultsMode
[+]
ResourceGroupsTaggingAPI
[+]
WAFV2
[+]
Identity
[+]
Route53
[+]
Sfn
[+]
Exception
[+]
ivschat
[+]
S3
[-] MultiRegionClient.php
[edit]
[+]
Route53Resolver
[+]
ConnectCampaignService
[+]
MigrationHubStrategyRecommendations
[+]
Sns
[+]
Ses
[+]
WafRegional
[+]
QuickSight
[+]
Sts
[+]
CloudFormation
[+]
Route53RecoveryControlConfig
[+]
WorkDocs
[+]
PinpointSMSVoiceV2
[+]
DeviceFarm
[+]
CleanRoomsML
[+]
CognitoIdentity
[+]
drs
[-] Result.php
[edit]
[+]
Ecs
[-] ClientResolver.php
[edit]
[+]
DataSync
[+]
EndpointV2
[+]
ForecastService
[+]
ConnectCases
[+]
IoTThingsGraph
[+]
TaxSettings
[+]
Route53RecoveryReadiness
[+]
AppSync
[+]
Greengrass
[+]
AppConfigData
[+]
ChimeSDKVoice
[+]
BedrockDataAutomationRuntime
[+]
MWAA
[+]
DSQL
[+]
BCMPricingCalculator
[+]
MarketplaceReporting
[+]
BedrockDataAutomation
[+]
signer
[+]
NeptuneGraph
[+]
ApplicationSignals
[+]
LookoutforVision
[+]
Translate
[+]
PrivateNetworks
[+]
CodePipeline
[+]
Iot
[+]
SupplyChain
[+]
BackupSearch
[+]
RedshiftServerless
[+]
PcaConnectorAd
[+]
CloudWatchRUM
[+]
ApiGatewayManagementApi
[+]
FraudDetector
[+]
EMRServerless
[+]
Comprehend
[+]
LexRuntimeV2
[+]
LexRuntimeService
[+]
AmplifyBackend
[+]
SnowDeviceManagement
[+]
OAM
[+]
Route53Domains
[+]
Ecr
[+]
Bedrock
[+]
Omics
[+]
PinpointSMSVoice
[+]
Lightsail
[+]
RAM
[+]
CodeCommit
[-] CommandPool.php
[edit]
[+]
TimestreamWrite
[+]
Schemas
[+]
Pipes
[-] AwsClient.php
[edit]
[+]
CloudControlApi
[-] AbstractConfigurationProvider.php
[edit]
[+]
DatabaseMigrationService
[-] InputValidationMiddleware.php
[edit]
[-] MockHandler.php
[edit]
[+]
ApplicationAutoScaling
[+]
EMRContainers
[+]
ComprehendMedical
[+]
CloudFront
[+]
Shield
[+]
NetworkFlowMonitor
[+]
WorkMail
[+]
MediaConnect
[+]
KinesisVideoMedia
[+]
IVS
[+]
ConnectWisdomService
[+]
ResourceGroups
[+]
CodeStarconnections
[+]
LaunchWizard
[+]
EKS
[+]
LicenseManager
[+]
SageMakerRuntime
[+]
GeoRoutes
[+]
AutoScaling
[+]
CostExplorer
[+]
VerifiedPermissions
[+]
finspace
[+]
Emr
[+]
Panorama
[+]
FMS
[-] TraceMiddleware.php
[edit]
[+]
NotificationsContacts
[+]
Appstream
[+]
BackupGateway
[-] AwsClientInterface.php
[edit]
[+]
MedicalImaging
[-] HasDataTrait.php
[edit]
[+]
Proton
[+]
Notifications
[+]
ServiceQuotas
[+]
MarketplaceEntitlementService
[-] ResultPaginator.php
[edit]
[-] QueryCompatibleInputMiddleware.php
[edit]
[+]
MainframeModernization
[+]
OpsWorksCM
[+]
CodeBuild
[+]
imagebuilder
[+]
ElasticTranscoder
[+]
Budgets
[+]
IoTSecureTunneling
[+]
Route53RecoveryCluster
[+]
AppMesh
[-] RetryMiddlewareV2.php
[edit]
[+]
Multipart
[+]
IoTDeviceAdvisor
[+]
Waf
[+]
Polly
[+]
FSx
[+]
CloudFrontKeyValueStore
[+]
Inspector2
[+]
XRay
[-] LruArrayCache.php
[edit]
[+]
KinesisVideoSignalingChannels
[+]
Athena
[+]
ConnectCampaignsV2
[+]
InspectorScan
[+]
WorkMailMessageFlow
[+]
AmplifyUIBuilder
[+]
ApiGatewayV2
[+]
PaymentCryptography
[+]
EBS
[+]
Billing
[+]
Endpoint
[-] Waiter.php
[edit]
[+]
MediaLive
[+]
SecretsManager
[+]
LakeFormation
[+]
ServerlessApplicationRepository
[+]
FIS
[+]
Macie2
[+]
RedshiftDataAPIService
[-] MonitoringEventsInterface.php
[edit]
[+]
Credentials
[+]
ResourceExplorer2
[+]
PartnerCentralSelling
[+]
MigrationHub
[+]
MarketplaceCommerceAnalytics
[+]
MTurk
[-] RetryMiddleware.php
[edit]
[+]
IoTEventsData
[+]
KinesisVideoWebRTCStorage
[+]
MediaStore
[+]
Amplify
[+]
BillingConductor
[+]
Kms
[+]
CognitoSync
[+]
Efs
[+]
WorkSpacesThinClient
[+]
DAX
[+]
CloudWatchLogs
[+]
ChimeSDKMessaging
[+]
Rekognition
[+]
EKSAuth
[+]
ChimeSDKIdentity
[+]
RolesAnywhere
[+]
CodeConnections
[+]
CostOptimizationHub
[+]
ForecastQueryService
[+]
GeoMaps
[+]
CodeStarNotifications
[+]
ApplicationCostProfiler
[+]
LicenseManagerUserSubscriptions
[+]
StorageGateway
[-] functions.php
[edit]
[+]
GlueDataBrew
[+]
Iam
[+]
Glacier
[+]
CodeGuruSecurity
[+]
BCMDataExports
[+]
AppRunner
[+]
Batch
[+]
Swf
[+]
MediaTailor
[+]
KendraRanking
[+]
SSO
[+]
PersonalizeEvents
[+]
EC2InstanceConnect
[+]
DataZone
[+]
MediaStoreData
[+]
IoTEvents
[+]
PCS
[-] EndpointParameterMiddleware.php
[edit]
[-] HasMonitoringEventsTrait.php
[edit]
[+]
SavingsPlans
[+]
SSMContacts
[-] Middleware.php
[edit]
[+]
Rds
[+]
AppTest
[+]
Sqs
[+]
IotDataPlane
[+]
ControlTower
[+]
CloudHsm
[+]
CodeCatalyst
[-] RequestCompressionMiddleware.php
[edit]
[+]
IoTFleetWise
[+]
VPCLattice
[+]
Lambda
[+]
FreeTier
[+]
SSMIncidents
[+]
MediaConvert
[+]
IoTTwinMaker
[+]
ImportExport
[+]
SageMakerFeatureStoreRuntime
[+]
DataExchange
[+]
PI
[+]
CodeDeploy
[+]
ACMPCA
[-] CacheInterface.php
[edit]
[+]
Synthetics
[-] StreamRequestPayloadMiddleware.php
[edit]
[+]
ConnectParticipant
[+]
OpsWorks
[+]
DocDBElastic
[+]
ElasticLoadBalancing
[+]
KinesisAnalytics
[+]
CloudSearch
[-] MetricsBuilder.php
[edit]
[+]
CloudTrail
[+]
ElasticBeanstalk
[+]
IoTAnalytics
[+]
MarketplaceAgreement
[-] CommandInterface.php
[edit]
[-] PresignUrlMiddleware.php
[edit]
[+]
Transfer
[+]
EndpointDiscovery
[+]
Backup
[+]
ConfigService
[+]
ManagedBlockchain
[+]
Firehose
[+]
SSMQuickSetup
[+]
Arn
[+]
PersonalizeRuntime
[+]
GuardDuty
[-] Psr16CacheAdapter.php
[edit]
[+]
Textract
[+]
KafkaConnect
[+]
SimSpaceWeaver
[+]
Detective
[+]
GreengrassV2
[+]
SsmSap
[+]
Account
[+]
ElasticsearchService
[+]
KinesisVideo
[+]
QApps
[+]
AutoScalingPlans
[+]
MediaPackage
[+]
AuditManager
[+]
TimestreamInfluxDB
[+]
MediaPackageV2
[+]
Redshift
[+]
IoTSiteWise
[+]
B2bi
[+]
SupportApp
[+]
ComputeOptimizer
[+]
ResilienceHub
[+]
Crypto
[+]
ApiGateway
[+]
CloudHSMV2
[+]
MemoryDB
[+]
ManagedGrafana
[-] JsonCompiler.php
[edit]
[+]
ManagedBlockchainQuery
[+]
ObservabilityAdmin
[+]
AppRegistry
[+]
LexModelsV2
[-] AwsClientTrait.php
[edit]
[+]
LicenseManagerLinuxSubscriptions
[+]
GroundStation
[+]
MigrationHubRefactorSpaces
[+]
NetworkManager
[+]
Route53Profiles
[+]
IVSRealTime
[+]
Invoicing
[+]
Support
[+]
CodeGuruProfiler
[+]
MachineLearning
[+]
S3Tables
[+]
ChimeSDKMeetings
[+]
TrustedAdvisor
[+]
AccessAnalyzer
[+]
ServiceCatalog
[+]
Ec2
[+]
IoTFleetHub
[+]
WorkSpacesWeb
[+]
LocationService
[+]
Deadline
[+]
Neptune
[+]
DynamoDb
[-] ResultInterface.php
[edit]
[+]
Appflow
[+]
SnowBall
[+]
EntityResolution
[+]
WorkSpaces
[+]
TranscribeService
[+]
MQ
[+]
Inspector
[-] History.php
[edit]
[+]
ConnectContactLens
[+]
IoTJobsDataPlane
[+]
KinesisVideoArchivedMedia
[+]
DLM
[+]
ApplicationInsights
[+]
ElastiCache
[+]
Configuration
[+]
VoiceID
[+]
SecurityLake
[+]
LookoutEquipment
[-] ConfigurationProviderInterface.php
[edit]
[+]
Artifact
[+]
ClientSideMonitoring
[+]
QConnect
[+]
MarketplaceMetering
[+]
PaymentCryptographyData
[+]
Neptunedata
[+]
AppConfig
[+]
ServiceDiscovery
[+]
mgn
[+]
NetworkMonitor
[+]
CustomerProfiles
[+]
Auth
[+]
BedrockAgent
[+]
RoboMaker
[+]
MarketplaceDeployment
[+]
SSOAdmin
[+]
DataPipeline
[+]
DevOpsGuru
[+]
Repostspace
[+]
Glue
[+]
SageMakerMetrics
[+]
LexModelBuildingService
[+]
Pricing
[+]
S3Outposts
[+]
ChimeSDKMediaPipelines
[-] HandlerList.php
[edit]
[+]
ApplicationDiscoveryService
[+]
RDSDataService
[+]
SagemakerEdgeManager
[+]
AppFabric
[+]
QLDBSession
[-] Sdk.php
[edit]
[+]
AugmentedAIRuntime
[+]
CloudSearchDomain
[+]
CostandUsageReportService
[+]
Personalize
[+]
Api
[+]
Braket
[+]
DirectoryService
[+]
DynamoDbStreams
[+]
SesV2
[+]
Retry
[+]
Sms
[+]
Tnb
[+]
Token
[+]
QBusiness
[-] HashingStream.php
[edit]
[-] PhpHash.php
[edit]
[+]
Kinesis
[+]
Script
[-] PsrCacheAdapter.php
[edit]
[-] ResponseContainerInterface.php
[edit]
[+]
CloudWatchEvents
[+]
SSOOIDC
[-] WrappedHttpHandler.php
[edit]
[+]
ARCZonalShift
[+]
Keyspaces
[-] HashInterface.php
[edit]
[-] UserAgentMiddleware.php
[edit]
[+]
CodeGuruReviewer
[+]
Organizations
[+]
OpenSearchServerless
[+]
KinesisAnalyticsV2
[+]
OSIS
[+]
TimestreamQuery
[+]
NetworkFirewall
[+]
MarketplaceCatalog
[+]
ElasticLoadBalancingV2
[+]
PrometheusService
[+]
CodeArtifact
[+]
Outposts
[+]
IdentityStore
[+]
Cloud9
[+]
FinSpaceData
[+]
PinpointEmail
[+]
SageMaker
[+]
S3Control
[+]
Chatbot
[+]
OpenSearchService
[+]
InternetMonitor
[+]
GlobalAccelerator
[-] Command.php
[edit]
[+]
PcaConnectorScep
[+]
Acm
[+]
LookoutMetrics
[+]
Scheduler
[+]
ElasticInference
[+]
QLDB
[+]
CloudTrailData
[+]
kendra
[+]
data
[+]
SecurityIR
[+]
GeoPlaces
[+]
BedrockRuntime
[+]
MailManager
[-] DoctrineCacheAdapter.php
[edit]
[+]
MediaPackageVod
[+]
RecycleBin
[+]
CognitoIdentityProvider
[+]
CleanRooms
[+]
MigrationHubConfig
[+]
CloudWatchEvidently
[+]
DocDB
[+]
ECRPublic
[+]
Signature
[+]
GameLift
[+]
Connect
[+]
IoTWireless
[+]
Kafka
[+]
CloudWatch
[+]
ControlCatalog
[+]
CloudDirectory
[+]
SocialMessaging
[+]
DirectConnect
[+]
MigrationHubOrchestrator
[+]
HealthLake
[+]
AppIntegrationsService
[+]
DirectoryServiceData