AccessPointArn.php 683 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace Aws\Arn\S3;
  3. use Aws\Arn\AccessPointArn as BaseAccessPointArn;
  4. use Aws\Arn\AccessPointArnInterface;
  5. use Aws\Arn\ArnInterface;
  6. use Aws\Arn\Exception\InvalidArnException;
  7. /**
  8. * @internal
  9. */
  10. class AccessPointArn extends BaseAccessPointArn implements AccessPointArnInterface
  11. {
  12. /**
  13. * Validation specific to AccessPointArn
  14. *
  15. * @param array $data
  16. */
  17. public static function validate(array $data)
  18. {
  19. parent::validate($data);
  20. if ($data['service'] !== 's3') {
  21. throw new InvalidArnException("The 3rd component of an S3 access"
  22. . " point ARN represents the region and must be 's3'.");
  23. }
  24. }
  25. }