| 1 | <?php |
| 2 | namespace Aws\Endpoint; |
| 3 | |
| 4 | /** |
| 5 | * Represents a section of the AWS cloud. |
| 6 | */ |
| 7 | interface PartitionInterface |
| 8 | { |
| 9 | /** |
| 10 | * Returns the partition's short name, e.g., 'aws,' 'aws-cn,' or |
| 11 | * 'aws-us-gov.' |
| 12 | * |
| 13 | * @return string |
| 14 | */ |
| 15 | public function getName(); |
| 16 | |
| 17 | /** |
| 18 | * Determine if this partition contains the provided region. Include the |
| 19 | * name of the service to inspect non-regional endpoints |
| 20 | * |
| 21 | * @param string $region |
| 22 | * @param string $service |
| 23 | * |
| 24 | * @return bool |
| 25 | */ |
| 26 | public function isRegionMatch($region, $service); |
| 27 | |
| 28 | /** |
| 29 | * Return the endpoints supported by a given service. |
| 30 | * |
| 31 | * @param string $service Identifier of the service |
| 32 | * whose endpoints should be |
| 33 | * listed (e.g., 's3' or 'ses') |
| 34 | * @param bool $allowNonRegionalEndpoints Set to `true` to include |
| 35 | * endpoints that are not AWS |
| 36 | * regions (e.g., 'local' for |
| 37 | * DynamoDB or |
| 38 | * 'fips-us-gov-west-1' for S3) |
| 39 | * |
| 40 | * @return string[] |
| 41 | */ |
| 42 | public function getAvailableEndpoints( |
| 43 | $service, |
| 44 | $allowNonRegionalEndpoints = false |
| 45 | ); |
| 46 | |
| 47 | /** |
| 48 | * A partition must be invokable as an endpoint provider. |
| 49 | * |
| 50 | * @see EndpointProvider |
| 51 | * |
| 52 | * @param array $args |
| 53 | * @return array |
| 54 | */ |
| 55 | public function __invoke(array $args = []); |
| 56 | } |