PageRenderTime 48ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 1ms

/wp-content/plugins/backwpup/sdk/WindowsAzure/ServiceManagement/Internal/IServiceManagement.php

https://bitbucket.org/cesarmedrano/cesarmedrano
PHP | 552 lines | 52 code | 33 blank | 467 comment | 0 complexity | 916e78b1e083bc08370a71d73a574728 MD5 | raw file
  1. <?php
  2. /**
  3. * LICENSE: Licensed under the Apache License, Version 2.0 (the "License");
  4. * you may not use this file except in compliance with the License.
  5. * You may obtain a copy of the License at
  6. * http://www.apache.org/licenses/LICENSE-2.0
  7. *
  8. * Unless required by applicable law or agreed to in writing, software
  9. * distributed under the License is distributed on an "AS IS" BASIS,
  10. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. * See the License for the specific language governing permissions and
  12. * limitations under the License.
  13. *
  14. * PHP version 5
  15. *
  16. * @category Microsoft
  17. * @package WindowsAzure\ServiceManagement\Internal
  18. * @author Azure PHP SDK <azurephpsdk@microsoft.com>
  19. * @copyright 2012 Microsoft Corporation
  20. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
  21. * @link https://github.com/windowsazure/azure-sdk-for-php
  22. */
  23. namespace WindowsAzure\ServiceManagement\Internal;
  24. use WindowsAzure\Common\Internal\FilterableService;
  25. /**
  26. * The Windows Azure service management REST API wrappers.
  27. *
  28. * @category Microsoft
  29. * @package WindowsAzure\ServiceManagement\Internal
  30. * @author Azure PHP SDK <azurephpsdk@microsoft.com>
  31. * @copyright 2012 Microsoft Corporation
  32. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
  33. * @version Release: @package_version@
  34. * @link https://github.com/windowsazure/azure-sdk-for-php
  35. */
  36. interface IServiceManagement extends FilterableService
  37. {
  38. /**
  39. * Lists the storage accounts available under the current subscription.
  40. *
  41. * @return ListStorageServicesResult
  42. *
  43. * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460787.aspx
  44. */
  45. public function listStorageServices();
  46. /**
  47. * Returns the system properties for the specified storage account.
  48. *
  49. * These properties include: the address, description, and label of the storage
  50. * account; and the name of the affinity group to which the service belongs,
  51. * or its geo-location if it is not part of an affinity group.
  52. *
  53. * @param string $name The storage account name.
  54. *
  55. * @return GetStorageServicePropertiesResult
  56. *
  57. * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460802.aspx
  58. */
  59. public function getStorageServiceProperties($name);
  60. /**
  61. * Returns the primary and secondary access keys for the specified storage
  62. * account.
  63. *
  64. * @param string $name The storage account name.
  65. *
  66. * @return GetStorageServiceKeysResult
  67. *
  68. * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460785.aspx
  69. */
  70. public function getStorageServiceKeys($name);
  71. /**
  72. * Regenerates the primary or secondary access key for the specified storage
  73. * account.
  74. *
  75. * @param string $name The storage account name.
  76. * @param string $keyType Specifies which key to regenerate.
  77. *
  78. * @return GetStorageServiceKeysResult
  79. *
  80. * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460795.aspx
  81. */
  82. public function regenerateStorageServiceKeys($name, $keyType);
  83. /**
  84. * Creates a new storage account in Windows Azure.
  85. *
  86. * In the optional parameters either location or affinity group must be provided.
  87. * Because Create Storage Account is an asynchronous operation, it always returns
  88. * status code 202 (Accepted). To determine the status code for the operation
  89. * once it is complete, call Get Operation Status. The status code is embedded
  90. * in the response for this operation; if successful, it will be
  91. * status code 200 (OK).
  92. *
  93. * @param string $name The storage account name.
  94. * @param string $label Name for the storage
  95. * account specified as a base64-encoded string. The name may be up to 100
  96. * characters in length. The name can be used identify the storage account for
  97. * your tracking purposes.
  98. * @param CreateServiceOptions $options The optional parameters.
  99. *
  100. * @return AsynchronousOperationResult
  101. *
  102. * @see http://msdn.microsoft.com/en-us/library/windowsazure/hh264518.aspx
  103. */
  104. public function createStorageService($name, $label, $options);
  105. /**
  106. * Deletes the specified storage account from Windows Azure.
  107. *
  108. * @param string $name The storage account name.
  109. *
  110. * @return none
  111. *
  112. * @see http://msdn.microsoft.com/en-us/library/windowsazure/hh264517.aspx
  113. */
  114. public function deleteStorageService($name);
  115. /**
  116. * Updates the label and/or the description for a storage account in Windows
  117. * Azure.
  118. *
  119. * @param string $name The storage account name.
  120. * @param UpdateServiceOptions $options The optional parameters.
  121. *
  122. * @return none
  123. *
  124. * @see http://msdn.microsoft.com/en-us/library/windowsazure/hh264516.aspx
  125. */
  126. public function updateStorageService($name, $options);
  127. /**
  128. * Lists the affinity groups associated with the specified subscription.
  129. *
  130. * @return ListAffinityGroupsResult
  131. *
  132. * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460797.aspx
  133. */
  134. public function listAffinityGroups();
  135. /**
  136. * Creates a new affinity group for the specified subscription.
  137. *
  138. * @param string $name The affinity group name.
  139. * @param string $label A base-64 encoded name for
  140. * the affinity group. The name can be up to 100 characters in length.
  141. * @param string $location The data center location
  142. * where the affinity group will be created. To list available locations, use
  143. * the listLocations API.
  144. * @param CreateAffinityGroupOptions $options The optional parameters.
  145. *
  146. * @return none
  147. *
  148. * @see http://msdn.microsoft.com/en-us/library/windowsazure/gg715317.aspx
  149. */
  150. public function createAffinityGroup($name, $label, $location, $options = null);
  151. /**
  152. * Deletes an affinity group in the specified subscription.
  153. *
  154. * @param string $name The affinity group name.
  155. *
  156. * @return none
  157. *
  158. * @see http://msdn.microsoft.com/en-us/library/windowsazure/gg715314.aspx
  159. */
  160. public function deleteAffinityGroup($name);
  161. /**
  162. * Updates the label and/or the description for an affinity group for the
  163. * specified subscription.
  164. *
  165. * @param string $name The affinity group name.
  166. * @param string $label The affinity group label.
  167. * @param CreateAffinityGroupOptions $options The optional parameters.
  168. *
  169. * @return none
  170. *
  171. * @see http://msdn.microsoft.com/en-us/library/windowsazure/gg715316.aspx
  172. */
  173. public function updateAffinityGroup($name, $label, $options = null);
  174. /**
  175. * Returns the system properties associated with the specified affinity group.
  176. *
  177. * @param string $name The affinity group name.
  178. *
  179. * @return GetAffinityGroupPropertiesResult
  180. *
  181. * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460789.aspx
  182. */
  183. public function getAffinityGroupProperties($name);
  184. /**
  185. * Lists all of the data center locations that are valid for your subscription.
  186. *
  187. * @return ListLocationsResult
  188. *
  189. * @see http://msdn.microsoft.com/en-us/library/windowsazure/gg441293.aspx
  190. */
  191. public function listLocations();
  192. /**
  193. * Returns the status of the specified operation. After calling an asynchronous
  194. * operation, you can call Get Operation Status to determine whether the
  195. * operation has succeeded, failed, or is still in progress.
  196. *
  197. * @param AsynchronousOperationResult $requestInfo The request information for
  198. * the REST call you want to track.
  199. *
  200. * @return GetOperationStatusResult
  201. *
  202. * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460783.aspx
  203. */
  204. public function getOperationStatus($requestInfo);
  205. /**
  206. * Lists the hosted services available under the current subscription.
  207. *
  208. * @return ListHostedServicesResult
  209. *
  210. * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460781.aspx
  211. */
  212. public function listHostedServices();
  213. /**
  214. * Creates a new hosted service in Windows Azure.
  215. *
  216. * @param string $name The name for the hosted service
  217. * that is unique within Windows Azure. This name is the DNS prefix name and can
  218. * be used to access the hosted service.
  219. * @param string $label The name for the hosted service
  220. * that is base-64 encoded. The name can be used identify the storage account for
  221. * your tracking purposes.
  222. * @param CreateServiceOptions $options The optional parameters.
  223. *
  224. * @return none
  225. *
  226. * @see http://msdn.microsoft.com/en-us/library/windowsazure/gg441304.aspx
  227. */
  228. public function createHostedService($name, $label, $options);
  229. /**
  230. * updates the label and/or the description for a hosted service in Windows
  231. * Azure.
  232. *
  233. * @param string $name The name for the hosted service that is
  234. * unique within Windows Azure.
  235. * @param UpdateServiceOptions $options The optional parameters.
  236. *
  237. * @return none
  238. *
  239. * @see http://msdn.microsoft.com/en-us/library/windowsazure/gg441303.aspx
  240. */
  241. public function updateHostedService($name, $options);
  242. /**
  243. * Deletes the specified hosted service from Windows Azure.
  244. *
  245. * Before you can delete a hosted service, you must delete any deployments it
  246. * has. Attempting to delete a hosted service that has deployments results in
  247. * an error. You can call the deleteDeployment API to delete a hosted service's
  248. * deployments.
  249. *
  250. * @param string $name The name for the hosted service.
  251. *
  252. * @return none
  253. *
  254. * @see http://msdn.microsoft.com/en-us/library/windowsazure/gg441305.aspx
  255. */
  256. public function deleteHostedService($name);
  257. /**
  258. * Retrieves system properties for the specified hosted service. These properties
  259. * include the service name and service type; the name of the affinity group to
  260. * which the service belongs, or its location if it is not part of an affinity
  261. * group; and optionally, information on the service's deployments.
  262. *
  263. * @param string $name The name for the hosted
  264. * service.
  265. * @param GetHostedServicePropertiesOptions $options The optional parameters.
  266. *
  267. * @return GetHostedServicePropertiesResult
  268. *
  269. * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460806.aspx
  270. */
  271. public function getHostedServiceProperties($name, $options = null);
  272. /**
  273. * Uploads a new service package and creates a new deployment on staging or
  274. * production.
  275. *
  276. * The createDeployment API is an asynchronous operation. To determine whether
  277. * the management service has finished processing the request, call
  278. * getOperationStatus API.
  279. *
  280. * @param string $name The name for the hosted service
  281. * that is unique within Windows Azure.
  282. * @param string $deploymentName The name for the deployment.
  283. * The deployment name must be unique among other deployments for the hosted
  284. * service.
  285. * @param string $slot The name of the deployment slot
  286. * This can be "production" or "staging".
  287. * @param string $packageUrl The URL that refers to the
  288. * location of the service package in the Blob service. The service package can
  289. * be located in a storage account beneath the same subscription.
  290. * @param string $configuration The base-64 encoded service
  291. * configuration file for the deployment.
  292. * @param string $label The name for the hosted service
  293. * that is base-64 encoded. The name can be up to 100 characters in length. It is
  294. * recommended that the label be unique within the subscription. The name can be
  295. * used identify the hosted service for your tracking purposes.
  296. * @param CreateDeploymentOptions $options The optional parameters.
  297. *
  298. * @return AsynchronousOperationResult
  299. *
  300. * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460813.aspx
  301. */
  302. public function createDeployment(
  303. $name,
  304. $deploymentName,
  305. $slot,
  306. $packageUrl,
  307. $configuration,
  308. $label,
  309. $options = null
  310. );
  311. /**
  312. * Returns configuration information, status, and system properties for a
  313. * deployment.
  314. *
  315. * The getDeployment API can be used to retrieve information for a specific
  316. * deployment or for all deployments in the staging or production environment.
  317. * If you want to retrieve information about a specific deployment, you must
  318. * first get the unique name for the deployment. This unique name is part of the
  319. * response when you make a request to get all deployments in an environment.
  320. *
  321. * @param string $name The hosted service name.
  322. * @param GetDeploymentOptions $options The optional parameters.
  323. *
  324. * @return GetDeploymentResult
  325. *
  326. * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460804.aspx
  327. */
  328. public function getDeployment($name, $options);
  329. /**
  330. * Initiates a virtual IP swap between the staging and production deployment
  331. * environments for a service. If the service is currently running in the staging
  332. * environment, it will be swapped to the production environment. If it is
  333. * running in the production environment, it will be swapped to staging.
  334. *
  335. * You can swap VIPs only if the number of endpoints specified by the service
  336. * definition is identical for both deployments. For example, if you add an HTTPS
  337. * endpoint to a web role that previously exposed only an HTTP endpoint, you
  338. * cannot upgrade your service using a VIP swap; you must delete your production
  339. * deployment and redeploy instead. You can obtain information about endpoints
  340. * that are used by using the Get Deployment operation.
  341. *
  342. * @param string $name The hosted service name.
  343. * @param string $source The name of the source deployment.
  344. * @param string $destination The name of the destination deployment.
  345. *
  346. * @return AsynchronousOperationResult
  347. *
  348. * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460814.aspx
  349. */
  350. public function swapDeployment($name, $source, $destination);
  351. /**
  352. * Deletes the specified deployment.
  353. *
  354. * Note that you can delete a deployment either by specifying the deployment
  355. * environment (staging or production), or by specifying the deployment's unique
  356. * name.
  357. *
  358. * @param string $name The hosted service name.
  359. * @param GetDeploymentOptions $options The optional parameters.
  360. *
  361. * @return AsynchronousOperationResult
  362. *
  363. * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460815.aspx
  364. */
  365. public function deleteDeployment($name, $options);
  366. /**
  367. * Initiates a change to the deployment configuration.
  368. *
  369. * Note that you can change a deployment's configuration either by specifying the
  370. * deployment environment (staging or production), or by specifying the
  371. * deployment's unique name.
  372. *
  373. * @param string $name The hosted service
  374. * name.
  375. * @param string|resource $configuration The configuration
  376. * file contents or file stream,
  377. * @param ChangeDeploymentConfigurationOptions $options The optional
  378. * parameters.
  379. *
  380. * @return AsynchronousOperationResult
  381. *
  382. * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460809.aspx
  383. */
  384. public function changeDeploymentConfiguration($name, $configuration, $options);
  385. /**
  386. * Initiates a change in deployment status.
  387. *
  388. * Note that you can change deployment status either by specifying the deployment
  389. * environment (staging or production), or by specifying the deployment's unique
  390. * name.
  391. *
  392. * @param string $name The hosted service name.
  393. * @param string $status The change to initiate to the
  394. * deployment status.
  395. * Possible values include Running or Suspended.
  396. * @param GetDeploymentOptions $options The optional parameters.
  397. *
  398. * @return AsynchronousOperationResult
  399. *
  400. * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460808.aspx
  401. */
  402. public function updateDeploymentStatus($name, $status, $options);
  403. /**
  404. * Initiates an upgrade to a deployment.
  405. *
  406. * Note that you can upgrade a deployment either by specifying the deployment
  407. * environment (staging or production), or by specifying the deployment's unique
  408. * name.
  409. *
  410. * @param string $name The hosted service name.
  411. * @param string $mode The type of upgrade to initiate
  412. * If not specified the default value is Auto. If set to Manual,
  413. * walkUpgradeDomain API must be called to apply the update. If set to Auto, the
  414. * Windows Azure platform will automatically apply the update to each Upgrade
  415. * Domain in sequence.
  416. * @param string $packageUrl The URL that refers to the
  417. * location of the service package in the Blob service. The service package can
  418. * be located in a storage account beneath the same subscription.
  419. * @param string $configuration The base-64 encoded service
  420. * configuration file for the deployment.
  421. * @param string $label The name for the hosted service
  422. * that is base-64 encoded. The name may be up to 100 characters in length.
  423. * @param boolean $force Specifies whether the rollback
  424. * should proceed even when it will cause local data to be lost from some role
  425. * instances. True if the rollback should proceed; otherwise false if the
  426. * rollback should fail.
  427. * @param UpgradeDeploymentOptions $options The optional parameters.
  428. *
  429. * @return AsynchronousOperationResult
  430. *
  431. * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460793.aspx
  432. */
  433. public function upgradeDeployment(
  434. $name,
  435. $mode,
  436. $packageUrl,
  437. $configuration,
  438. $label,
  439. $force,
  440. $options
  441. );
  442. /**
  443. * Specifies the next upgrade domain to be walked during manual in-place upgrade
  444. * or configuration change.
  445. *
  446. * Note that you can walk an upgrade domain either by specifying the deployment
  447. * environment (staging or production), or by specifying the deployment's unique
  448. * name.
  449. *
  450. * @param string $name The hosted service name.
  451. * @param integer $upgradeDomain The integer value that
  452. * identifies the upgrade domain to walk. Upgrade domains are identified with a
  453. * zero-based index: the first upgrade domain has an ID of 0, the second has an
  454. * ID of 1, and so on.
  455. * @param GetDeploymentOptions $options The optional parameters.
  456. *
  457. * @return AsynchronousOperationResult
  458. *
  459. * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460800.aspx
  460. */
  461. public function walkUpgradeDomain($name, $upgradeDomain, $options);
  462. /**
  463. * Requests a reboot of a role instance that is running in a deployment.
  464. *
  465. * Note that you can reboot role instance either by specifying the deployment
  466. * environment (staging or production), or by specifying the deployment's unique
  467. * name.
  468. *
  469. * @param string $name The hosted service name.
  470. * @param string $roleName The role instance name.
  471. * @param GetDeploymentOptions $options The optional parameters.
  472. *
  473. * @return AsynchronousOperationResult
  474. *
  475. * @see http://msdn.microsoft.com/en-us/library/windowsazure/gg441298.aspx
  476. */
  477. public function rebootRoleInstance($name, $roleName, $options);
  478. /**
  479. * Requests a reimage of a role instance that is running in a deployment.
  480. *
  481. * Note that you can reimage role instance either by specifying the deployment
  482. * environment (staging or production), or by specifying the deployment's unique
  483. * name.
  484. *
  485. * @param string $name The hosted service name.
  486. * @param string $roleName The role instance name.
  487. * @param GetDeploymentOptions $options The optional parameters.
  488. *
  489. * @return AsynchronousOperationResult
  490. *
  491. * @see http://msdn.microsoft.com/en-us/library/windowsazure/gg441292.aspx
  492. */
  493. public function reimageRoleInstance($name, $roleName, $options);
  494. /**
  495. * Cancels an in progress configuration change (update) or upgrade and returns
  496. * the deployment to its state before the upgrade or configuration change was
  497. * started.
  498. *
  499. * Note that you can rollback update or upgrade either by specifying the
  500. * deployment environment (staging or production), or by specifying the
  501. * deployment's unique name.
  502. *
  503. * @param string $name The hosted service name.
  504. * @param string $mode Specifies whether the rollback
  505. * should proceed automatically or not. Auto, The rollback proceeds without
  506. * further user input. Manual, You must call the walkUpgradeDomain API to apply
  507. * the rollback to each upgrade domain.
  508. * @param boolean $force Specifies whether the rollback
  509. * should proceed even when it will cause local data to be lost from some role
  510. * instances. True if the rollback should proceed; otherwise false if the
  511. * rollback should fail.
  512. * @param GetDeploymentOptions $options The optional parameters.
  513. *
  514. * @return none
  515. *
  516. * @see http://msdn.microsoft.com/en-us/library/windowsazure/hh403977.aspx
  517. */
  518. public function rollbackUpdateOrUpgrade($name, $mode, $force, $options);
  519. }