PartitionInterface.php 1.6 KB

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