Class Partition
- Aws\Endpoint\Partition implements ArrayAccess, Aws\Endpoint\PartitionInterface uses Aws\HasDataTrait
- Final class
- Namespace: Aws\Endpoint
- Located at Endpoint/Partition.php
Default implementation of an AWS partition.
Methods Summary
-
__construct ( array $definition )
The partition constructor accepts the following options:
-
getName ( )
Returns the partition's short name, e.g., 'aws,' 'aws-cn,' or 'aws-us-gov.'
-
isRegionMatch ( string $region, string $service )
Determine if this partition contains the provided region. Include the name of the service to inspect non-regional endpoints
-
getAvailableEndpoints ( string $service, bool $allowNonRegionalEndpoints = false )
Return the endpoints supported by a given service.
-
__invoke ( array $args = [] )
A partition must be invokable as an endpoint provider.
Methods inherited from ArrayAccess
offsetExists()
,
offsetGet()
,
offsetSet()
,
offsetUnset()
Methods used from Aws\HasDataTrait
Methods Details
__construct ( array $definition )
The partition constructor accepts the following options:
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 anendpoint
definition will supersede any values specified indefaults
.services
: (array, required) A map of service endpoint prefix name (the value found in a hostname) to information about the service.
Parameters
array | $definition |
Exceptions
InvalidArgumentException if any required options are missing |
string getName ( )
Returns the partition's short name, e.g., 'aws,' 'aws-cn,' or 'aws-us-gov.'
Returns
string |
Implementation of
boolean isRegionMatch ( string $region, string $service )
Determine if this partition contains the provided region. Include the name of the service to inspect non-regional endpoints
Parameters
string | $region | |
string | $service |
Returns
boolean |
Implementation of
string[] getAvailableEndpoints ( string $service, boolean $allowNonRegionalEndpoints = false )
Return the endpoints supported by a given service.
Parameters
string | $service | Identifier of the service whose endpoints should be listed (e.g., 's3' or 'ses') |
boolean | $allowNonRegionalEndpoints = false | Set to |
Returns
string[] |
Implementation of
array __invoke ( array $args = [] )
A partition must be invokable as an endpoint provider.
Parameters
array | $args = [] |
Returns
array |