Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

SDK for PHP 3.x

Partition
in package
implements ArrayAccess, PartitionInterface Uses HasDataTrait

FinalYes

Default implementation of an AWS partition.

Table of Contents

Interfaces

ArrayAccess
PartitionInterface
Represents a section of the AWS cloud.

Methods

__construct()  : mixed
The partition constructor accepts the following options:
__invoke()  : array<string|int, mixed>
A partition must be invokable as an endpoint provider.
count()  : int
getAvailableEndpoints()  : array<string|int, string>
Return the endpoints supported by a given service.
getIterator()  : Traversable
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()  : bool
offsetGet()  : mixed|null
This method returns a reference to the variable to allow for indirect array modification (e.g., $foo['bar']['baz'] = 'qux').
offsetSet()  : void
offsetUnset()  : void
toArray()  : mixed

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

__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>

count()

public count() : int
Return values
int

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() : Traversable
Return values
Traversable

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) : bool
Parameters
$offset : mixed
Return values
bool

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) : void
Parameters
$offset : mixed
$value : mixed

offsetUnset()

public offsetUnset(mixed $offset) : void
Parameters
$offset : mixed

toArray()

public toArray() : mixed
On this page