RdsClient.php 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. <?php
  2. namespace Aws\Rds;
  3. use Aws\AwsClient;
  4. use Aws\Api\Service;
  5. use Aws\Api\DocModel;
  6. use Aws\Api\ApiProvider;
  7. use Aws\PresignUrlMiddleware;
  8. /**
  9. * This client is used to interact with the **Amazon Relational Database Service (Amazon RDS)**.
  10. *
  11. * @method \Aws\Result addSourceIdentifierToSubscription(array $args = [])
  12. * @method \GuzzleHttp\Promise\Promise addSourceIdentifierToSubscriptionAsync(array $args = [])
  13. * @method \Aws\Result addTagsToResource(array $args = [])
  14. * @method \GuzzleHttp\Promise\Promise addTagsToResourceAsync(array $args = [])
  15. * @method \Aws\Result authorizeDBSecurityGroupIngress(array $args = [])
  16. * @method \GuzzleHttp\Promise\Promise authorizeDBSecurityGroupIngressAsync(array $args = [])
  17. * @method \Aws\Result copyDBParameterGroup(array $args = [])
  18. * @method \GuzzleHttp\Promise\Promise copyDBParameterGroupAsync(array $args = [])
  19. * @method \Aws\Result copyDBSnapshot(array $args = [])
  20. * @method \GuzzleHttp\Promise\Promise copyDBSnapshotAsync(array $args = [])
  21. * @method \Aws\Result copyOptionGroup(array $args = [])
  22. * @method \GuzzleHttp\Promise\Promise copyOptionGroupAsync(array $args = [])
  23. * @method \Aws\Result createDBInstance(array $args = [])
  24. * @method \GuzzleHttp\Promise\Promise createDBInstanceAsync(array $args = [])
  25. * @method \Aws\Result createDBInstanceReadReplica(array $args = [])
  26. * @method \GuzzleHttp\Promise\Promise createDBInstanceReadReplicaAsync(array $args = [])
  27. * @method \Aws\Result createDBParameterGroup(array $args = [])
  28. * @method \GuzzleHttp\Promise\Promise createDBParameterGroupAsync(array $args = [])
  29. * @method \Aws\Result createDBSecurityGroup(array $args = [])
  30. * @method \GuzzleHttp\Promise\Promise createDBSecurityGroupAsync(array $args = [])
  31. * @method \Aws\Result createDBSnapshot(array $args = [])
  32. * @method \GuzzleHttp\Promise\Promise createDBSnapshotAsync(array $args = [])
  33. * @method \Aws\Result createDBSubnetGroup(array $args = [])
  34. * @method \GuzzleHttp\Promise\Promise createDBSubnetGroupAsync(array $args = [])
  35. * @method \Aws\Result createEventSubscription(array $args = [])
  36. * @method \GuzzleHttp\Promise\Promise createEventSubscriptionAsync(array $args = [])
  37. * @method \Aws\Result createOptionGroup(array $args = [])
  38. * @method \GuzzleHttp\Promise\Promise createOptionGroupAsync(array $args = [])
  39. * @method \Aws\Result deleteDBInstance(array $args = [])
  40. * @method \GuzzleHttp\Promise\Promise deleteDBInstanceAsync(array $args = [])
  41. * @method \Aws\Result deleteDBParameterGroup(array $args = [])
  42. * @method \GuzzleHttp\Promise\Promise deleteDBParameterGroupAsync(array $args = [])
  43. * @method \Aws\Result deleteDBSecurityGroup(array $args = [])
  44. * @method \GuzzleHttp\Promise\Promise deleteDBSecurityGroupAsync(array $args = [])
  45. * @method \Aws\Result deleteDBSnapshot(array $args = [])
  46. * @method \GuzzleHttp\Promise\Promise deleteDBSnapshotAsync(array $args = [])
  47. * @method \Aws\Result deleteDBSubnetGroup(array $args = [])
  48. * @method \GuzzleHttp\Promise\Promise deleteDBSubnetGroupAsync(array $args = [])
  49. * @method \Aws\Result deleteEventSubscription(array $args = [])
  50. * @method \GuzzleHttp\Promise\Promise deleteEventSubscriptionAsync(array $args = [])
  51. * @method \Aws\Result deleteOptionGroup(array $args = [])
  52. * @method \GuzzleHttp\Promise\Promise deleteOptionGroupAsync(array $args = [])
  53. * @method \Aws\Result describeDBEngineVersions(array $args = [])
  54. * @method \GuzzleHttp\Promise\Promise describeDBEngineVersionsAsync(array $args = [])
  55. * @method \Aws\Result describeDBInstances(array $args = [])
  56. * @method \GuzzleHttp\Promise\Promise describeDBInstancesAsync(array $args = [])
  57. * @method \Aws\Result describeDBLogFiles(array $args = [])
  58. * @method \GuzzleHttp\Promise\Promise describeDBLogFilesAsync(array $args = [])
  59. * @method \Aws\Result describeDBParameterGroups(array $args = [])
  60. * @method \GuzzleHttp\Promise\Promise describeDBParameterGroupsAsync(array $args = [])
  61. * @method \Aws\Result describeDBParameters(array $args = [])
  62. * @method \GuzzleHttp\Promise\Promise describeDBParametersAsync(array $args = [])
  63. * @method \Aws\Result describeDBSecurityGroups(array $args = [])
  64. * @method \GuzzleHttp\Promise\Promise describeDBSecurityGroupsAsync(array $args = [])
  65. * @method \Aws\Result describeDBSnapshots(array $args = [])
  66. * @method \GuzzleHttp\Promise\Promise describeDBSnapshotsAsync(array $args = [])
  67. * @method \Aws\Result describeDBSubnetGroups(array $args = [])
  68. * @method \GuzzleHttp\Promise\Promise describeDBSubnetGroupsAsync(array $args = [])
  69. * @method \Aws\Result describeEngineDefaultParameters(array $args = [])
  70. * @method \GuzzleHttp\Promise\Promise describeEngineDefaultParametersAsync(array $args = [])
  71. * @method \Aws\Result describeEventCategories(array $args = [])
  72. * @method \GuzzleHttp\Promise\Promise describeEventCategoriesAsync(array $args = [])
  73. * @method \Aws\Result describeEventSubscriptions(array $args = [])
  74. * @method \GuzzleHttp\Promise\Promise describeEventSubscriptionsAsync(array $args = [])
  75. * @method \Aws\Result describeEvents(array $args = [])
  76. * @method \GuzzleHttp\Promise\Promise describeEventsAsync(array $args = [])
  77. * @method \Aws\Result describeOptionGroupOptions(array $args = [])
  78. * @method \GuzzleHttp\Promise\Promise describeOptionGroupOptionsAsync(array $args = [])
  79. * @method \Aws\Result describeOptionGroups(array $args = [])
  80. * @method \GuzzleHttp\Promise\Promise describeOptionGroupsAsync(array $args = [])
  81. * @method \Aws\Result describeOrderableDBInstanceOptions(array $args = [])
  82. * @method \GuzzleHttp\Promise\Promise describeOrderableDBInstanceOptionsAsync(array $args = [])
  83. * @method \Aws\Result describeReservedDBInstances(array $args = [])
  84. * @method \GuzzleHttp\Promise\Promise describeReservedDBInstancesAsync(array $args = [])
  85. * @method \Aws\Result describeReservedDBInstancesOfferings(array $args = [])
  86. * @method \GuzzleHttp\Promise\Promise describeReservedDBInstancesOfferingsAsync(array $args = [])
  87. * @method \Aws\Result downloadDBLogFilePortion(array $args = [])
  88. * @method \GuzzleHttp\Promise\Promise downloadDBLogFilePortionAsync(array $args = [])
  89. * @method \Aws\Result listTagsForResource(array $args = [])
  90. * @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
  91. * @method \Aws\Result modifyDBInstance(array $args = [])
  92. * @method \GuzzleHttp\Promise\Promise modifyDBInstanceAsync(array $args = [])
  93. * @method \Aws\Result modifyDBParameterGroup(array $args = [])
  94. * @method \GuzzleHttp\Promise\Promise modifyDBParameterGroupAsync(array $args = [])
  95. * @method \Aws\Result modifyDBSubnetGroup(array $args = [])
  96. * @method \GuzzleHttp\Promise\Promise modifyDBSubnetGroupAsync(array $args = [])
  97. * @method \Aws\Result modifyEventSubscription(array $args = [])
  98. * @method \GuzzleHttp\Promise\Promise modifyEventSubscriptionAsync(array $args = [])
  99. * @method \Aws\Result modifyOptionGroup(array $args = [])
  100. * @method \GuzzleHttp\Promise\Promise modifyOptionGroupAsync(array $args = [])
  101. * @method \Aws\Result promoteReadReplica(array $args = [])
  102. * @method \GuzzleHttp\Promise\Promise promoteReadReplicaAsync(array $args = [])
  103. * @method \Aws\Result purchaseReservedDBInstancesOffering(array $args = [])
  104. * @method \GuzzleHttp\Promise\Promise purchaseReservedDBInstancesOfferingAsync(array $args = [])
  105. * @method \Aws\Result rebootDBInstance(array $args = [])
  106. * @method \GuzzleHttp\Promise\Promise rebootDBInstanceAsync(array $args = [])
  107. * @method \Aws\Result removeSourceIdentifierFromSubscription(array $args = [])
  108. * @method \GuzzleHttp\Promise\Promise removeSourceIdentifierFromSubscriptionAsync(array $args = [])
  109. * @method \Aws\Result removeTagsFromResource(array $args = [])
  110. * @method \GuzzleHttp\Promise\Promise removeTagsFromResourceAsync(array $args = [])
  111. * @method \Aws\Result resetDBParameterGroup(array $args = [])
  112. * @method \GuzzleHttp\Promise\Promise resetDBParameterGroupAsync(array $args = [])
  113. * @method \Aws\Result restoreDBInstanceFromDBSnapshot(array $args = [])
  114. * @method \GuzzleHttp\Promise\Promise restoreDBInstanceFromDBSnapshotAsync(array $args = [])
  115. * @method \Aws\Result restoreDBInstanceToPointInTime(array $args = [])
  116. * @method \GuzzleHttp\Promise\Promise restoreDBInstanceToPointInTimeAsync(array $args = [])
  117. * @method \Aws\Result revokeDBSecurityGroupIngress(array $args = [])
  118. * @method \GuzzleHttp\Promise\Promise revokeDBSecurityGroupIngressAsync(array $args = [])
  119. * @method \Aws\Result addRoleToDBCluster(array $args = []) (supported in versions 2014-10-31)
  120. * @method \GuzzleHttp\Promise\Promise addRoleToDBClusterAsync(array $args = []) (supported in versions 2014-10-31)
  121. * @method \Aws\Result applyPendingMaintenanceAction(array $args = []) (supported in versions 2014-10-31)
  122. * @method \GuzzleHttp\Promise\Promise applyPendingMaintenanceActionAsync(array $args = []) (supported in versions 2014-10-31)
  123. * @method \Aws\Result copyDBClusterParameterGroup(array $args = []) (supported in versions 2014-10-31)
  124. * @method \GuzzleHttp\Promise\Promise copyDBClusterParameterGroupAsync(array $args = []) (supported in versions 2014-10-31)
  125. * @method \Aws\Result copyDBClusterSnapshot(array $args = []) (supported in versions 2014-10-31)
  126. * @method \GuzzleHttp\Promise\Promise copyDBClusterSnapshotAsync(array $args = []) (supported in versions 2014-10-31)
  127. * @method \Aws\Result createDBCluster(array $args = []) (supported in versions 2014-10-31)
  128. * @method \GuzzleHttp\Promise\Promise createDBClusterAsync(array $args = []) (supported in versions 2014-10-31)
  129. * @method \Aws\Result createDBClusterParameterGroup(array $args = []) (supported in versions 2014-10-31)
  130. * @method \GuzzleHttp\Promise\Promise createDBClusterParameterGroupAsync(array $args = []) (supported in versions 2014-10-31)
  131. * @method \Aws\Result createDBClusterSnapshot(array $args = []) (supported in versions 2014-10-31)
  132. * @method \GuzzleHttp\Promise\Promise createDBClusterSnapshotAsync(array $args = []) (supported in versions 2014-10-31)
  133. * @method \Aws\Result deleteDBCluster(array $args = []) (supported in versions 2014-10-31)
  134. * @method \GuzzleHttp\Promise\Promise deleteDBClusterAsync(array $args = []) (supported in versions 2014-10-31)
  135. * @method \Aws\Result deleteDBClusterParameterGroup(array $args = []) (supported in versions 2014-10-31)
  136. * @method \GuzzleHttp\Promise\Promise deleteDBClusterParameterGroupAsync(array $args = []) (supported in versions 2014-10-31)
  137. * @method \Aws\Result deleteDBClusterSnapshot(array $args = []) (supported in versions 2014-10-31)
  138. * @method \GuzzleHttp\Promise\Promise deleteDBClusterSnapshotAsync(array $args = []) (supported in versions 2014-10-31)
  139. * @method \Aws\Result describeAccountAttributes(array $args = []) (supported in versions 2014-10-31)
  140. * @method \GuzzleHttp\Promise\Promise describeAccountAttributesAsync(array $args = []) (supported in versions 2014-10-31)
  141. * @method \Aws\Result describeCertificates(array $args = []) (supported in versions 2014-10-31)
  142. * @method \GuzzleHttp\Promise\Promise describeCertificatesAsync(array $args = []) (supported in versions 2014-10-31)
  143. * @method \Aws\Result describeDBClusterParameterGroups(array $args = []) (supported in versions 2014-10-31)
  144. * @method \GuzzleHttp\Promise\Promise describeDBClusterParameterGroupsAsync(array $args = []) (supported in versions 2014-10-31)
  145. * @method \Aws\Result describeDBClusterParameters(array $args = []) (supported in versions 2014-10-31)
  146. * @method \GuzzleHttp\Promise\Promise describeDBClusterParametersAsync(array $args = []) (supported in versions 2014-10-31)
  147. * @method \Aws\Result describeDBClusterSnapshotAttributes(array $args = []) (supported in versions 2014-10-31)
  148. * @method \GuzzleHttp\Promise\Promise describeDBClusterSnapshotAttributesAsync(array $args = []) (supported in versions 2014-10-31)
  149. * @method \Aws\Result describeDBClusterSnapshots(array $args = []) (supported in versions 2014-10-31)
  150. * @method \GuzzleHttp\Promise\Promise describeDBClusterSnapshotsAsync(array $args = []) (supported in versions 2014-10-31)
  151. * @method \Aws\Result describeDBClusters(array $args = []) (supported in versions 2014-10-31)
  152. * @method \GuzzleHttp\Promise\Promise describeDBClustersAsync(array $args = []) (supported in versions 2014-10-31)
  153. * @method \Aws\Result describeDBSnapshotAttributes(array $args = []) (supported in versions 2014-10-31)
  154. * @method \GuzzleHttp\Promise\Promise describeDBSnapshotAttributesAsync(array $args = []) (supported in versions 2014-10-31)
  155. * @method \Aws\Result describeEngineDefaultClusterParameters(array $args = []) (supported in versions 2014-10-31)
  156. * @method \GuzzleHttp\Promise\Promise describeEngineDefaultClusterParametersAsync(array $args = []) (supported in versions 2014-10-31)
  157. * @method \Aws\Result describePendingMaintenanceActions(array $args = []) (supported in versions 2014-10-31)
  158. * @method \GuzzleHttp\Promise\Promise describePendingMaintenanceActionsAsync(array $args = []) (supported in versions 2014-10-31)
  159. * @method \Aws\Result describeSourceRegions(array $args = []) (supported in versions 2014-10-31)
  160. * @method \GuzzleHttp\Promise\Promise describeSourceRegionsAsync(array $args = []) (supported in versions 2014-10-31)
  161. * @method \Aws\Result failoverDBCluster(array $args = []) (supported in versions 2014-10-31)
  162. * @method \GuzzleHttp\Promise\Promise failoverDBClusterAsync(array $args = []) (supported in versions 2014-10-31)
  163. * @method \Aws\Result modifyDBCluster(array $args = []) (supported in versions 2014-10-31)
  164. * @method \GuzzleHttp\Promise\Promise modifyDBClusterAsync(array $args = []) (supported in versions 2014-10-31)
  165. * @method \Aws\Result modifyDBClusterParameterGroup(array $args = []) (supported in versions 2014-10-31)
  166. * @method \GuzzleHttp\Promise\Promise modifyDBClusterParameterGroupAsync(array $args = []) (supported in versions 2014-10-31)
  167. * @method \Aws\Result modifyDBClusterSnapshotAttribute(array $args = []) (supported in versions 2014-10-31)
  168. * @method \GuzzleHttp\Promise\Promise modifyDBClusterSnapshotAttributeAsync(array $args = []) (supported in versions 2014-10-31)
  169. * @method \Aws\Result modifyDBSnapshot(array $args = []) (supported in versions 2014-10-31)
  170. * @method \GuzzleHttp\Promise\Promise modifyDBSnapshotAsync(array $args = []) (supported in versions 2014-10-31)
  171. * @method \Aws\Result modifyDBSnapshotAttribute(array $args = []) (supported in versions 2014-10-31)
  172. * @method \GuzzleHttp\Promise\Promise modifyDBSnapshotAttributeAsync(array $args = []) (supported in versions 2014-10-31)
  173. * @method \Aws\Result promoteReadReplicaDBCluster(array $args = []) (supported in versions 2014-10-31)
  174. * @method \GuzzleHttp\Promise\Promise promoteReadReplicaDBClusterAsync(array $args = []) (supported in versions 2014-10-31)
  175. * @method \Aws\Result removeRoleFromDBCluster(array $args = []) (supported in versions 2014-10-31)
  176. * @method \GuzzleHttp\Promise\Promise removeRoleFromDBClusterAsync(array $args = []) (supported in versions 2014-10-31)
  177. * @method \Aws\Result resetDBClusterParameterGroup(array $args = []) (supported in versions 2014-10-31)
  178. * @method \GuzzleHttp\Promise\Promise resetDBClusterParameterGroupAsync(array $args = []) (supported in versions 2014-10-31)
  179. * @method \Aws\Result restoreDBClusterFromS3(array $args = []) (supported in versions 2014-10-31)
  180. * @method \GuzzleHttp\Promise\Promise restoreDBClusterFromS3Async(array $args = []) (supported in versions 2014-10-31)
  181. * @method \Aws\Result restoreDBClusterFromSnapshot(array $args = []) (supported in versions 2014-10-31)
  182. * @method \GuzzleHttp\Promise\Promise restoreDBClusterFromSnapshotAsync(array $args = []) (supported in versions 2014-10-31)
  183. * @method \Aws\Result restoreDBClusterToPointInTime(array $args = []) (supported in versions 2014-10-31)
  184. * @method \GuzzleHttp\Promise\Promise restoreDBClusterToPointInTimeAsync(array $args = []) (supported in versions 2014-10-31)
  185. * @method \Aws\Result startDBInstance(array $args = []) (supported in versions 2014-10-31)
  186. * @method \GuzzleHttp\Promise\Promise startDBInstanceAsync(array $args = []) (supported in versions 2014-10-31)
  187. * @method \Aws\Result stopDBInstance(array $args = []) (supported in versions 2014-10-31)
  188. * @method \GuzzleHttp\Promise\Promise stopDBInstanceAsync(array $args = []) (supported in versions 2014-10-31)
  189. */
  190. class RdsClient extends AwsClient
  191. {
  192. public function __construct(array $args)
  193. {
  194. $args['with_resolved'] = function (array $args) {
  195. $this->getHandlerList()->appendInit(
  196. PresignUrlMiddleware::wrap(
  197. $this,
  198. $args['endpoint_provider'],
  199. [
  200. 'operations' => [
  201. 'CopyDBSnapshot',
  202. 'CreateDBInstanceReadReplica',
  203. 'CopyDBClusterSnapshot',
  204. 'CreateDBCluster'
  205. ],
  206. 'service' => 'rds',
  207. 'presign_param' => 'PreSignedUrl',
  208. ]
  209. ),
  210. 'rds.presigner'
  211. );
  212. };
  213. parent::__construct($args);
  214. }
  215. /**
  216. * @internal
  217. * @codeCoverageIgnore
  218. */
  219. public static function applyDocFilters(array $api, array $docs)
  220. {
  221. // Add the SourceRegion parameter
  222. $docs['shapes']['SourceRegion']['base'] = 'A required parameter that indicates '
  223. . 'the region that the DB snapshot will be copied from.';
  224. $api['shapes']['SourceRegion'] = ['type' => 'string'];
  225. $api['shapes']['CopyDBSnapshotMessage']['members']['SourceRegion'] = ['shape' => 'SourceRegion'];
  226. $api['shapes']['CreateDBInstanceReadReplicaMessage']['members']['SourceRegion'] = ['shape' => 'SourceRegion'];
  227. // Several parameters in presign APIs are optional.
  228. $docs['shapes']['String']['refs']['CopyDBSnapshotMessage$PreSignedUrl']
  229. = '<div class="alert alert-info">The SDK will compute this value '
  230. . 'for you on your behalf.</div>';
  231. $docs['shapes']['String']['refs']['CopyDBSnapshotMessage$DestinationRegion']
  232. = '<div class="alert alert-info">The SDK will populate this '
  233. . 'parameter on your behalf using the configured region value of '
  234. . 'the client.</div>';
  235. // Several parameters in presign APIs are optional.
  236. $docs['shapes']['String']['refs']['CreateDBInstanceReadReplicaMessage$PreSignedUrl']
  237. = '<div class="alert alert-info">The SDK will compute this value '
  238. . 'for you on your behalf.</div>';
  239. $docs['shapes']['String']['refs']['CreateDBInstanceReadReplicaMessage$DestinationRegion']
  240. = '<div class="alert alert-info">The SDK will populate this '
  241. . 'parameter on your behalf using the configured region value of '
  242. . 'the client.</div>';
  243. if ($api['metadata']['apiVersion'] != '2014-09-01') {
  244. $api['shapes']['CopyDBClusterSnapshotMessage']['members']['SourceRegion'] = ['shape' => 'SourceRegion'];
  245. $api['shapes']['CreateDBClusterMessage']['members']['SourceRegion'] = ['shape' => 'SourceRegion'];
  246. // Several parameters in presign APIs are optional.
  247. $docs['shapes']['String']['refs']['CopyDBClusterSnapshotMessage$PreSignedUrl']
  248. = '<div class="alert alert-info">The SDK will compute this value '
  249. . 'for you on your behalf.</div>';
  250. $docs['shapes']['String']['refs']['CopyDBClusterSnapshotMessage$DestinationRegion']
  251. = '<div class="alert alert-info">The SDK will populate this '
  252. . 'parameter on your behalf using the configured region value of '
  253. . 'the client.</div>';
  254. // Several parameters in presign APIs are optional.
  255. $docs['shapes']['String']['refs']['CreateDBClusterMessage$PreSignedUrl']
  256. = '<div class="alert alert-info">The SDK will compute this value '
  257. . 'for you on your behalf.</div>';
  258. $docs['shapes']['String']['refs']['CreateDBClusterMessage$DestinationRegion']
  259. = '<div class="alert alert-info">The SDK will populate this '
  260. . 'parameter on your behalf using the configured region value of '
  261. . 'the client.</div>';
  262. }
  263. return [
  264. new Service($api, ApiProvider::defaultProvider()),
  265. new DocModel($docs)
  266. ];
  267. }
  268. }