Documentation

Partition
in package
implements ArrayAccess, PartitionInterface Uses HasDataTrait

Default implementation of an AWS partition.

Interfaces, Classes and Traits

ArrayAccess
PartitionInterface
Represents a section of the AWS cloud.

Table of Contents

$data  : array<string|int, mixed>
$stsLegacyGlobalRegions  : mixed
__construct()  : mixed
The partition constructor accepts the following options:
__invoke()  : array<string|int, mixed>
A partition must be invokable as an endpoint provider.
count()  : mixed
getAvailableEndpoints()  : array<string|int, string>
Return the endpoints supported by a given service.
getIterator()  : mixed
getName()  : string
Returns the partition's short name, e.g., 'aws,' 'aws-cn,' or 'aws-us-gov.'
isRegionMatch()  : bool
Determine if this partition contains the provided region. Include the name of the service to inspect non-regional endpoints
offsetExists()  : mixed
offsetGet()  : mixed|null
This method returns a reference to the variable to allow for indirect array modification (e.g., $foo['bar']['baz'] = 'qux').
offsetSet()  : mixed
offsetUnset()  : mixed
toArray()  : mixed
formatEndpoint()  : mixed
getEndpointData()  : mixed
getPartitionEndpoint()  : mixed
getSignatureVersion()  : mixed
isS3LegacyEndpointUsed()  : bool
S3 legacy us-east-1 endpoint used for valid regions unless option is explicitly set to 'regional'
isServicePartitionGlobal()  : mixed
isStsLegacyEndpointUsed()  : bool
STS legacy endpoints used for valid regions unless option is explicitly set to 'regional'
resolveRegion()  : mixed

Properties

$stsLegacyGlobalRegions

private mixed $stsLegacyGlobalRegions = ['ap-northeast-1', 'ap-south-1', 'ap-southeast-1', 'ap-southeast-2', 'aws-global', 'ca-central-1', 'eu-central-1', 'eu-north-1', 'eu-west-1', 'eu-west-2', 'eu-west-3', 'sa-east-1', 'us-east-1', 'us-east-2', 'us-west-1', 'us-west-2']

Methods

__construct()

The partition constructor accepts the following options:

public __construct(array<string|int, mixed> $definition) : mixed
  • partition: (string, required) The partition name as specified in an ARN (e.g., aws)
  • partitionName: (string) The human readable name of the partition (e.g., "AWS Standard")
  • dnsSuffix: (string, required) The DNS suffix of the partition. This value is used to determine how endpoints in the partition are resolved.
  • regionRegex: (string) A PCRE regular expression that specifies the pattern that region names in the endpoint adhere to.
  • regions: (array, required) A map of the regions in the partition. Each key is the region as present in a hostname (e.g., us-east-1), and each value is a structure containing region information.
  • defaults: (array) A map of default key value pairs to apply to each endpoint of the partition. Any value in an endpoint definition will supersede any values specified in defaults.
  • services: (array, required) A map of service endpoint prefix name (the value found in a hostname) to information about the service.
Parameters
$definition : array<string|int, mixed>
Tags
throws
InvalidArgumentException

if any required options are missing

Return values
mixed

__invoke()

A partition must be invokable as an endpoint provider.

public __invoke([array<string|int, mixed> $args = [] ]) : array<string|int, mixed>
Parameters
$args : array<string|int, mixed> = []
Return values
array<string|int, mixed>

getAvailableEndpoints()

Return the endpoints supported by a given service.

public getAvailableEndpoints(mixed $service[, mixed $allowNonRegionalEndpoints = false ]) : array<string|int, string>
Parameters
$service : mixed

Identifier of the service whose endpoints should be listed (e.g., 's3' or 'ses')

$allowNonRegionalEndpoints : mixed = false

Set to true to include endpoints that are not AWS regions (e.g., 'local' for DynamoDB or 'fips-us-gov-west-1' for S3)

Return values
array<string|int, string>

getIterator()

public getIterator() : mixed
Return values
mixed

getName()

Returns the partition's short name, e.g., 'aws,' 'aws-cn,' or 'aws-us-gov.'

public getName() : string
Return values
string

isRegionMatch()

Determine if this partition contains the provided region. Include the name of the service to inspect non-regional endpoints

public isRegionMatch(mixed $region, mixed $service) : bool
Parameters
$region : mixed
$service : mixed
Return values
bool

offsetExists()

public offsetExists(mixed $offset) : mixed
Parameters
$offset : mixed
Return values
mixed

offsetGet()

This method returns a reference to the variable to allow for indirect array modification (e.g., $foo['bar']['baz'] = 'qux').

public offsetGet( $offset) : mixed|null
Parameters
$offset :
Return values
mixed|null

offsetSet()

public offsetSet(mixed $offset, mixed $value) : mixed
Parameters
$offset : mixed
$value : mixed
Return values
mixed

offsetUnset()

public offsetUnset(mixed $offset) : mixed
Parameters
$offset : mixed
Return values
mixed

toArray()

public toArray() : mixed
Return values
mixed

formatEndpoint()

private formatEndpoint(mixed $template, mixed $service, mixed $region) : mixed
Parameters
$template : mixed
$service : mixed
$region : mixed
Return values
mixed

getEndpointData()

private getEndpointData(mixed $service, mixed $region, mixed $options) : mixed
Parameters
$service : mixed
$region : mixed
$options : mixed
Return values
mixed

getPartitionEndpoint()

private getPartitionEndpoint(mixed $service) : mixed
Parameters
$service : mixed
Return values
mixed

getSignatureVersion()

private getSignatureVersion(array<string|int, mixed> $data) : mixed
Parameters
$data : array<string|int, mixed>
Return values
mixed

isS3LegacyEndpointUsed()

S3 legacy us-east-1 endpoint used for valid regions unless option is explicitly set to 'regional'

private isS3LegacyEndpointUsed(string $service, string $region, array<string|int, mixed> $options) : bool
Parameters
$service : string
$region : string
$options : array<string|int, mixed>
Return values
bool

isServicePartitionGlobal()

private isServicePartitionGlobal(mixed $service) : mixed
Parameters
$service : mixed
Return values
mixed

isStsLegacyEndpointUsed()

STS legacy endpoints used for valid regions unless option is explicitly set to 'regional'

private isStsLegacyEndpointUsed(string $service, string $region, array<string|int, mixed> $options) : bool
Parameters
$service : string
$region : string
$options : array<string|int, mixed>
Return values
bool

resolveRegion()

private resolveRegion(mixed $service, mixed $region, mixed $options) : mixed
Parameters
$service : mixed
$region : mixed
$options : mixed
Return values
mixed

Search results