AwsClientInterface.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <?php
  2. /**
  3. * Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License").
  6. * You may not use this file except in compliance with the License.
  7. * A copy of the License is located at
  8. *
  9. * http://aws.amazon.com/apache2.0
  10. *
  11. * or in the "license" file accompanying this file. This file is distributed
  12. * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  13. * express or implied. See the License for the specific language governing
  14. * permissions and limitations under the License.
  15. */
  16. namespace Aws\Common\Client;
  17. use Aws\Common\Credentials\CredentialsInterface;
  18. use Aws\Common\Signature\SignatureInterface;
  19. use Aws\Common\Waiter\WaiterFactoryInterface;
  20. use Aws\Common\Waiter\WaiterInterface;
  21. use Guzzle\Service\ClientInterface;
  22. /**
  23. * Interface that all AWS clients implement
  24. */
  25. interface AwsClientInterface extends ClientInterface
  26. {
  27. /**
  28. * Returns the AWS credentials associated with the client
  29. *
  30. * @return CredentialsInterface
  31. */
  32. public function getCredentials();
  33. /**
  34. * Sets the credentials object associated with the client
  35. *
  36. * @param CredentialsInterface $credentials Credentials object to use
  37. *
  38. * @return self
  39. */
  40. public function setCredentials(CredentialsInterface $credentials);
  41. /**
  42. * Returns the signature implementation used with the client
  43. *
  44. * @return SignatureInterface
  45. */
  46. public function getSignature();
  47. /**
  48. * Get a list of available regions and region data
  49. *
  50. * @return array
  51. */
  52. public function getRegions();
  53. /**
  54. * Get the name of the region to which the client is configured to send requests
  55. *
  56. * @return string
  57. */
  58. public function getRegion();
  59. /**
  60. * Change the region to which the client is configured to send requests
  61. *
  62. * @param string $region Name of the region
  63. *
  64. * @return self
  65. */
  66. public function setRegion($region);
  67. /**
  68. * Get the waiter factory being used by the client
  69. *
  70. * @return WaiterFactoryInterface
  71. */
  72. public function getWaiterFactory();
  73. /**
  74. * Set the waiter factory to use with the client
  75. *
  76. * @param WaiterFactoryInterface $waiterFactory Factory used to create waiters
  77. *
  78. * @return self
  79. */
  80. public function setWaiterFactory(WaiterFactoryInterface $waiterFactory);
  81. /**
  82. * Wait until a resource is available or an associated waiter returns true
  83. *
  84. * @param string $waiter Name of the waiter
  85. * @param array $input Values used as input for the underlying operation and to control the waiter
  86. *
  87. * @return self
  88. */
  89. public function waitUntil($waiter, array $input = array());
  90. /**
  91. * Get a named waiter object
  92. *
  93. * @param string $waiter Name of the waiter
  94. * @param array $input Values used as input for the underlying operation and to control the waiter
  95. *
  96. * @return WaiterInterface
  97. */
  98. public function getWaiter($waiter, array $input = array());
  99. /**
  100. * Get the API version of the client (e.g. 2006-03-01)
  101. *
  102. * @return string
  103. */
  104. public function getApiVersion();
  105. }