in src/Endpoint/Partition.php [126:157]
public function __invoke(array $args = [])
{
$service = isset($args['service']) ? $args['service'] : '';
$region = isset($args['region']) ? $args['region'] : '';
$scheme = isset($args['scheme']) ? $args['scheme'] : 'https';
$options = isset($args['options']) ? $args['options'] : [];
$data = $this->getEndpointData($service, $region, $options);
$variant = $this->getVariant($options, $data);
if (isset($variant['hostname'])) {
$template = $variant['hostname'];
} else {
$template = isset($data['hostname']) ? $data['hostname'] : '';
}
$dnsSuffix = isset($variant['dnsSuffix'])
? $variant['dnsSuffix']
: $this->data['dnsSuffix'];
return [
'endpoint' => "{$scheme}://" . $this->formatEndpoint(
$template,
$service,
$region,
$dnsSuffix
),
'signatureVersion' => $this->getSignatureVersion($data),
'signingRegion' => isset($data['credentialScope']['region'])
? $data['credentialScope']['region']
: $region,
'signingName' => isset($data['credentialScope']['service'])
? $data['credentialScope']['service']
: $service,
];
}