Route53Client.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <?php
  2. namespace Aws\Route53;
  3. use Aws\AwsClient;
  4. use Aws\CommandInterface;
  5. use Psr\Http\Message\RequestInterface;
  6. /**
  7. * This client is used to interact with the **Amazon Route 53** service.
  8. *
  9. * @method \Aws\Result activateKeySigningKey(array $args = [])
  10. * @method \GuzzleHttp\Promise\Promise activateKeySigningKeyAsync(array $args = [])
  11. * @method \Aws\Result associateVPCWithHostedZone(array $args = [])
  12. * @method \GuzzleHttp\Promise\Promise associateVPCWithHostedZoneAsync(array $args = [])
  13. * @method \Aws\Result changeCidrCollection(array $args = [])
  14. * @method \GuzzleHttp\Promise\Promise changeCidrCollectionAsync(array $args = [])
  15. * @method \Aws\Result changeResourceRecordSets(array $args = [])
  16. * @method \GuzzleHttp\Promise\Promise changeResourceRecordSetsAsync(array $args = [])
  17. * @method \Aws\Result changeTagsForResource(array $args = [])
  18. * @method \GuzzleHttp\Promise\Promise changeTagsForResourceAsync(array $args = [])
  19. * @method \Aws\Result createCidrCollection(array $args = [])
  20. * @method \GuzzleHttp\Promise\Promise createCidrCollectionAsync(array $args = [])
  21. * @method \Aws\Result createHealthCheck(array $args = [])
  22. * @method \GuzzleHttp\Promise\Promise createHealthCheckAsync(array $args = [])
  23. * @method \Aws\Result createHostedZone(array $args = [])
  24. * @method \GuzzleHttp\Promise\Promise createHostedZoneAsync(array $args = [])
  25. * @method \Aws\Result createKeySigningKey(array $args = [])
  26. * @method \GuzzleHttp\Promise\Promise createKeySigningKeyAsync(array $args = [])
  27. * @method \Aws\Result createQueryLoggingConfig(array $args = [])
  28. * @method \GuzzleHttp\Promise\Promise createQueryLoggingConfigAsync(array $args = [])
  29. * @method \Aws\Result createReusableDelegationSet(array $args = [])
  30. * @method \GuzzleHttp\Promise\Promise createReusableDelegationSetAsync(array $args = [])
  31. * @method \Aws\Result createTrafficPolicy(array $args = [])
  32. * @method \GuzzleHttp\Promise\Promise createTrafficPolicyAsync(array $args = [])
  33. * @method \Aws\Result createTrafficPolicyInstance(array $args = [])
  34. * @method \GuzzleHttp\Promise\Promise createTrafficPolicyInstanceAsync(array $args = [])
  35. * @method \Aws\Result createTrafficPolicyVersion(array $args = [])
  36. * @method \GuzzleHttp\Promise\Promise createTrafficPolicyVersionAsync(array $args = [])
  37. * @method \Aws\Result createVPCAssociationAuthorization(array $args = [])
  38. * @method \GuzzleHttp\Promise\Promise createVPCAssociationAuthorizationAsync(array $args = [])
  39. * @method \Aws\Result deactivateKeySigningKey(array $args = [])
  40. * @method \GuzzleHttp\Promise\Promise deactivateKeySigningKeyAsync(array $args = [])
  41. * @method \Aws\Result deleteCidrCollection(array $args = [])
  42. * @method \GuzzleHttp\Promise\Promise deleteCidrCollectionAsync(array $args = [])
  43. * @method \Aws\Result deleteHealthCheck(array $args = [])
  44. * @method \GuzzleHttp\Promise\Promise deleteHealthCheckAsync(array $args = [])
  45. * @method \Aws\Result deleteHostedZone(array $args = [])
  46. * @method \GuzzleHttp\Promise\Promise deleteHostedZoneAsync(array $args = [])
  47. * @method \Aws\Result deleteKeySigningKey(array $args = [])
  48. * @method \GuzzleHttp\Promise\Promise deleteKeySigningKeyAsync(array $args = [])
  49. * @method \Aws\Result deleteQueryLoggingConfig(array $args = [])
  50. * @method \GuzzleHttp\Promise\Promise deleteQueryLoggingConfigAsync(array $args = [])
  51. * @method \Aws\Result deleteReusableDelegationSet(array $args = [])
  52. * @method \GuzzleHttp\Promise\Promise deleteReusableDelegationSetAsync(array $args = [])
  53. * @method \Aws\Result deleteTrafficPolicy(array $args = [])
  54. * @method \GuzzleHttp\Promise\Promise deleteTrafficPolicyAsync(array $args = [])
  55. * @method \Aws\Result deleteTrafficPolicyInstance(array $args = [])
  56. * @method \GuzzleHttp\Promise\Promise deleteTrafficPolicyInstanceAsync(array $args = [])
  57. * @method \Aws\Result deleteVPCAssociationAuthorization(array $args = [])
  58. * @method \GuzzleHttp\Promise\Promise deleteVPCAssociationAuthorizationAsync(array $args = [])
  59. * @method \Aws\Result disableHostedZoneDNSSEC(array $args = [])
  60. * @method \GuzzleHttp\Promise\Promise disableHostedZoneDNSSECAsync(array $args = [])
  61. * @method \Aws\Result disassociateVPCFromHostedZone(array $args = [])
  62. * @method \GuzzleHttp\Promise\Promise disassociateVPCFromHostedZoneAsync(array $args = [])
  63. * @method \Aws\Result enableHostedZoneDNSSEC(array $args = [])
  64. * @method \GuzzleHttp\Promise\Promise enableHostedZoneDNSSECAsync(array $args = [])
  65. * @method \Aws\Result getAccountLimit(array $args = [])
  66. * @method \GuzzleHttp\Promise\Promise getAccountLimitAsync(array $args = [])
  67. * @method \Aws\Result getChange(array $args = [])
  68. * @method \GuzzleHttp\Promise\Promise getChangeAsync(array $args = [])
  69. * @method \Aws\Result getCheckerIpRanges(array $args = [])
  70. * @method \GuzzleHttp\Promise\Promise getCheckerIpRangesAsync(array $args = [])
  71. * @method \Aws\Result getDNSSEC(array $args = [])
  72. * @method \GuzzleHttp\Promise\Promise getDNSSECAsync(array $args = [])
  73. * @method \Aws\Result getGeoLocation(array $args = [])
  74. * @method \GuzzleHttp\Promise\Promise getGeoLocationAsync(array $args = [])
  75. * @method \Aws\Result getHealthCheck(array $args = [])
  76. * @method \GuzzleHttp\Promise\Promise getHealthCheckAsync(array $args = [])
  77. * @method \Aws\Result getHealthCheckCount(array $args = [])
  78. * @method \GuzzleHttp\Promise\Promise getHealthCheckCountAsync(array $args = [])
  79. * @method \Aws\Result getHealthCheckLastFailureReason(array $args = [])
  80. * @method \GuzzleHttp\Promise\Promise getHealthCheckLastFailureReasonAsync(array $args = [])
  81. * @method \Aws\Result getHealthCheckStatus(array $args = [])
  82. * @method \GuzzleHttp\Promise\Promise getHealthCheckStatusAsync(array $args = [])
  83. * @method \Aws\Result getHostedZone(array $args = [])
  84. * @method \GuzzleHttp\Promise\Promise getHostedZoneAsync(array $args = [])
  85. * @method \Aws\Result getHostedZoneCount(array $args = [])
  86. * @method \GuzzleHttp\Promise\Promise getHostedZoneCountAsync(array $args = [])
  87. * @method \Aws\Result getHostedZoneLimit(array $args = [])
  88. * @method \GuzzleHttp\Promise\Promise getHostedZoneLimitAsync(array $args = [])
  89. * @method \Aws\Result getQueryLoggingConfig(array $args = [])
  90. * @method \GuzzleHttp\Promise\Promise getQueryLoggingConfigAsync(array $args = [])
  91. * @method \Aws\Result getReusableDelegationSet(array $args = [])
  92. * @method \GuzzleHttp\Promise\Promise getReusableDelegationSetAsync(array $args = [])
  93. * @method \Aws\Result getReusableDelegationSetLimit(array $args = [])
  94. * @method \GuzzleHttp\Promise\Promise getReusableDelegationSetLimitAsync(array $args = [])
  95. * @method \Aws\Result getTrafficPolicy(array $args = [])
  96. * @method \GuzzleHttp\Promise\Promise getTrafficPolicyAsync(array $args = [])
  97. * @method \Aws\Result getTrafficPolicyInstance(array $args = [])
  98. * @method \GuzzleHttp\Promise\Promise getTrafficPolicyInstanceAsync(array $args = [])
  99. * @method \Aws\Result getTrafficPolicyInstanceCount(array $args = [])
  100. * @method \GuzzleHttp\Promise\Promise getTrafficPolicyInstanceCountAsync(array $args = [])
  101. * @method \Aws\Result listCidrBlocks(array $args = [])
  102. * @method \GuzzleHttp\Promise\Promise listCidrBlocksAsync(array $args = [])
  103. * @method \Aws\Result listCidrCollections(array $args = [])
  104. * @method \GuzzleHttp\Promise\Promise listCidrCollectionsAsync(array $args = [])
  105. * @method \Aws\Result listCidrLocations(array $args = [])
  106. * @method \GuzzleHttp\Promise\Promise listCidrLocationsAsync(array $args = [])
  107. * @method \Aws\Result listGeoLocations(array $args = [])
  108. * @method \GuzzleHttp\Promise\Promise listGeoLocationsAsync(array $args = [])
  109. * @method \Aws\Result listHealthChecks(array $args = [])
  110. * @method \GuzzleHttp\Promise\Promise listHealthChecksAsync(array $args = [])
  111. * @method \Aws\Result listHostedZones(array $args = [])
  112. * @method \GuzzleHttp\Promise\Promise listHostedZonesAsync(array $args = [])
  113. * @method \Aws\Result listHostedZonesByName(array $args = [])
  114. * @method \GuzzleHttp\Promise\Promise listHostedZonesByNameAsync(array $args = [])
  115. * @method \Aws\Result listHostedZonesByVPC(array $args = [])
  116. * @method \GuzzleHttp\Promise\Promise listHostedZonesByVPCAsync(array $args = [])
  117. * @method \Aws\Result listQueryLoggingConfigs(array $args = [])
  118. * @method \GuzzleHttp\Promise\Promise listQueryLoggingConfigsAsync(array $args = [])
  119. * @method \Aws\Result listResourceRecordSets(array $args = [])
  120. * @method \GuzzleHttp\Promise\Promise listResourceRecordSetsAsync(array $args = [])
  121. * @method \Aws\Result listReusableDelegationSets(array $args = [])
  122. * @method \GuzzleHttp\Promise\Promise listReusableDelegationSetsAsync(array $args = [])
  123. * @method \Aws\Result listTagsForResource(array $args = [])
  124. * @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
  125. * @method \Aws\Result listTagsForResources(array $args = [])
  126. * @method \GuzzleHttp\Promise\Promise listTagsForResourcesAsync(array $args = [])
  127. * @method \Aws\Result listTrafficPolicies(array $args = [])
  128. * @method \GuzzleHttp\Promise\Promise listTrafficPoliciesAsync(array $args = [])
  129. * @method \Aws\Result listTrafficPolicyInstances(array $args = [])
  130. * @method \GuzzleHttp\Promise\Promise listTrafficPolicyInstancesAsync(array $args = [])
  131. * @method \Aws\Result listTrafficPolicyInstancesByHostedZone(array $args = [])
  132. * @method \GuzzleHttp\Promise\Promise listTrafficPolicyInstancesByHostedZoneAsync(array $args = [])
  133. * @method \Aws\Result listTrafficPolicyInstancesByPolicy(array $args = [])
  134. * @method \GuzzleHttp\Promise\Promise listTrafficPolicyInstancesByPolicyAsync(array $args = [])
  135. * @method \Aws\Result listTrafficPolicyVersions(array $args = [])
  136. * @method \GuzzleHttp\Promise\Promise listTrafficPolicyVersionsAsync(array $args = [])
  137. * @method \Aws\Result listVPCAssociationAuthorizations(array $args = [])
  138. * @method \GuzzleHttp\Promise\Promise listVPCAssociationAuthorizationsAsync(array $args = [])
  139. * @method \Aws\Result testDNSAnswer(array $args = [])
  140. * @method \GuzzleHttp\Promise\Promise testDNSAnswerAsync(array $args = [])
  141. * @method \Aws\Result updateHealthCheck(array $args = [])
  142. * @method \GuzzleHttp\Promise\Promise updateHealthCheckAsync(array $args = [])
  143. * @method \Aws\Result updateHostedZoneComment(array $args = [])
  144. * @method \GuzzleHttp\Promise\Promise updateHostedZoneCommentAsync(array $args = [])
  145. * @method \Aws\Result updateTrafficPolicyComment(array $args = [])
  146. * @method \GuzzleHttp\Promise\Promise updateTrafficPolicyCommentAsync(array $args = [])
  147. * @method \Aws\Result updateTrafficPolicyInstance(array $args = [])
  148. * @method \GuzzleHttp\Promise\Promise updateTrafficPolicyInstanceAsync(array $args = [])
  149. */
  150. class Route53Client extends AwsClient
  151. {
  152. public function __construct(array $args)
  153. {
  154. parent::__construct($args);
  155. $this->getHandlerList()->appendInit($this->cleanIdFn(), 'route53.clean_id');
  156. }
  157. private function cleanIdFn()
  158. {
  159. return function (callable $handler) {
  160. return function (CommandInterface $c, RequestInterface $r = null) use ($handler) {
  161. foreach (['Id', 'HostedZoneId', 'DelegationSetId'] as $clean) {
  162. if ($c->hasParam($clean)) {
  163. $c[$clean] = $this->cleanId($c[$clean]);
  164. }
  165. }
  166. return $handler($c, $r);
  167. };
  168. };
  169. }
  170. private function cleanId($id)
  171. {
  172. static $toClean = ['/hostedzone/', '/change/', '/delegationset/'];
  173. return str_replace($toClean, '', $id);
  174. }
  175. }