azure_mgmt_netapp 0.18.3 → 0.20.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (419) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +20 -20
  3. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp.rb +0 -0
  4. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/accounts.rb +0 -0
  5. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb +1 -1
  6. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/models/active_directory.rb +0 -0
  7. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/models/capacity_pool.rb +0 -0
  8. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/models/capacity_pool_list.rb +0 -0
  9. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/models/capacity_pool_patch.rb +0 -0
  10. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/models/dimension.rb +0 -0
  11. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/models/error.rb +0 -0
  12. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/models/export_policy_rule.rb +0 -0
  13. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/models/metric_specification.rb +0 -0
  14. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/models/mount_target.rb +0 -0
  15. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/models/mount_target_list.rb +0 -0
  16. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/models/net_app_account.rb +0 -0
  17. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/models/net_app_account_list.rb +0 -0
  18. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/models/net_app_account_patch.rb +0 -0
  19. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/models/operation.rb +0 -0
  20. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/models/operation_display.rb +0 -0
  21. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/models/operation_list_result.rb +0 -0
  22. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/models/service_level.rb +0 -0
  23. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/models/service_specification.rb +0 -0
  24. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/models/snapshot.rb +0 -0
  25. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/models/snapshot_patch.rb +0 -0
  26. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/models/snapshots_list.rb +0 -0
  27. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/models/volume.rb +0 -0
  28. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/models/volume_list.rb +0 -0
  29. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/models/volume_patch.rb +0 -0
  30. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/models/volume_patch_properties_export_policy.rb +0 -0
  31. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/models/volume_properties_export_policy.rb +0 -0
  32. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/module_definition.rb +0 -0
  33. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/mount_targets.rb +0 -0
  34. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/operations.rb +0 -0
  35. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/pools.rb +0 -0
  36. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/snapshots.rb +0 -0
  37. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/volumes.rb +0 -0
  38. data/lib/2019-05-01/generated/azure_mgmt_netapp.rb +0 -0
  39. data/lib/2019-05-01/generated/azure_mgmt_netapp/accounts.rb +0 -0
  40. data/lib/2019-05-01/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb +1 -1
  41. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/active_directory.rb +0 -0
  42. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/capacity_pool.rb +0 -0
  43. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/capacity_pool_list.rb +0 -0
  44. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/capacity_pool_patch.rb +0 -0
  45. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/check_name_resource_types.rb +0 -0
  46. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/dimension.rb +0 -0
  47. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/export_policy_rule.rb +0 -0
  48. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/in_availability_reason_type.rb +0 -0
  49. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/metric_specification.rb +0 -0
  50. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/mount_target.rb +0 -0
  51. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/mount_target_list.rb +0 -0
  52. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/net_app_account.rb +0 -0
  53. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/net_app_account_list.rb +0 -0
  54. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/net_app_account_patch.rb +0 -0
  55. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/operation.rb +0 -0
  56. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/operation_display.rb +0 -0
  57. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/operation_list_result.rb +0 -0
  58. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/resource_name_availability.rb +0 -0
  59. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/resource_name_availability_request.rb +0 -0
  60. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/service_level.rb +0 -0
  61. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/service_specification.rb +0 -0
  62. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/snapshot.rb +0 -0
  63. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/snapshot_patch.rb +0 -0
  64. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/snapshots_list.rb +0 -0
  65. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/volume.rb +0 -0
  66. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/volume_list.rb +0 -0
  67. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/volume_patch.rb +0 -0
  68. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/volume_patch_properties_export_policy.rb +0 -0
  69. data/lib/2019-05-01/generated/azure_mgmt_netapp/models/volume_properties_export_policy.rb +0 -0
  70. data/lib/2019-05-01/generated/azure_mgmt_netapp/module_definition.rb +0 -0
  71. data/lib/2019-05-01/generated/azure_mgmt_netapp/mount_targets.rb +0 -0
  72. data/lib/2019-05-01/generated/azure_mgmt_netapp/operations.rb +0 -0
  73. data/lib/2019-05-01/generated/azure_mgmt_netapp/pools.rb +0 -0
  74. data/lib/2019-05-01/generated/azure_mgmt_netapp/snapshots.rb +0 -0
  75. data/lib/2019-05-01/generated/azure_mgmt_netapp/volumes.rb +0 -0
  76. data/lib/2019-06-01/generated/azure_mgmt_netapp.rb +0 -0
  77. data/lib/2019-06-01/generated/azure_mgmt_netapp/accounts.rb +0 -0
  78. data/lib/2019-06-01/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb +1 -1
  79. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/active_directory.rb +0 -0
  80. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/capacity_pool.rb +0 -0
  81. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/capacity_pool_list.rb +0 -0
  82. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/capacity_pool_patch.rb +0 -0
  83. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/check_name_resource_types.rb +0 -0
  84. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/dimension.rb +0 -0
  85. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/export_policy_rule.rb +0 -0
  86. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/in_availability_reason_type.rb +0 -0
  87. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/metric_specification.rb +0 -0
  88. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/mount_target.rb +0 -0
  89. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/mount_target_list.rb +0 -0
  90. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/net_app_account.rb +0 -0
  91. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/net_app_account_list.rb +0 -0
  92. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/net_app_account_patch.rb +0 -0
  93. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/operation.rb +0 -0
  94. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/operation_display.rb +0 -0
  95. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/operation_list_result.rb +0 -0
  96. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/resource_name_availability.rb +0 -0
  97. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/resource_name_availability_request.rb +0 -0
  98. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/service_level.rb +0 -0
  99. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/service_specification.rb +0 -0
  100. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/snapshot.rb +0 -0
  101. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/snapshot_patch.rb +0 -0
  102. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/snapshots_list.rb +0 -0
  103. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/volume.rb +0 -0
  104. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/volume_list.rb +0 -0
  105. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/volume_patch.rb +0 -0
  106. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/volume_patch_properties_export_policy.rb +0 -0
  107. data/lib/2019-06-01/generated/azure_mgmt_netapp/models/volume_properties_export_policy.rb +0 -0
  108. data/lib/2019-06-01/generated/azure_mgmt_netapp/module_definition.rb +0 -0
  109. data/lib/2019-06-01/generated/azure_mgmt_netapp/mount_targets.rb +0 -0
  110. data/lib/2019-06-01/generated/azure_mgmt_netapp/operations.rb +0 -0
  111. data/lib/2019-06-01/generated/azure_mgmt_netapp/pools.rb +0 -0
  112. data/lib/2019-06-01/generated/azure_mgmt_netapp/snapshots.rb +0 -0
  113. data/lib/2019-06-01/generated/azure_mgmt_netapp/volumes.rb +0 -0
  114. data/lib/2019-07-01/generated/azure_mgmt_netapp.rb +0 -0
  115. data/lib/2019-07-01/generated/azure_mgmt_netapp/accounts.rb +0 -0
  116. data/lib/2019-07-01/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb +1 -1
  117. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/active_directory.rb +0 -0
  118. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/capacity_pool.rb +0 -0
  119. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/capacity_pool_list.rb +0 -0
  120. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/capacity_pool_patch.rb +0 -0
  121. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/check_name_resource_types.rb +0 -0
  122. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/dimension.rb +0 -0
  123. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/export_policy_rule.rb +0 -0
  124. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/in_availability_reason_type.rb +0 -0
  125. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/metric_specification.rb +0 -0
  126. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/mount_target.rb +0 -0
  127. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/mount_target_list.rb +0 -0
  128. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/net_app_account.rb +0 -0
  129. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/net_app_account_list.rb +0 -0
  130. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/net_app_account_patch.rb +0 -0
  131. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/operation.rb +0 -0
  132. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/operation_display.rb +0 -0
  133. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/operation_list_result.rb +0 -0
  134. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/resource_name_availability.rb +0 -0
  135. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/resource_name_availability_request.rb +0 -0
  136. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/service_level.rb +0 -0
  137. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/service_specification.rb +0 -0
  138. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/snapshot.rb +0 -0
  139. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/snapshot_patch.rb +0 -0
  140. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/snapshots_list.rb +0 -0
  141. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/volume.rb +0 -0
  142. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/volume_list.rb +0 -0
  143. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/volume_patch.rb +0 -0
  144. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/volume_patch_properties_export_policy.rb +0 -0
  145. data/lib/2019-07-01/generated/azure_mgmt_netapp/models/volume_properties_export_policy.rb +0 -0
  146. data/lib/2019-07-01/generated/azure_mgmt_netapp/module_definition.rb +0 -0
  147. data/lib/2019-07-01/generated/azure_mgmt_netapp/mount_targets.rb +0 -0
  148. data/lib/2019-07-01/generated/azure_mgmt_netapp/operations.rb +0 -0
  149. data/lib/2019-07-01/generated/azure_mgmt_netapp/pools.rb +0 -0
  150. data/lib/2019-07-01/generated/azure_mgmt_netapp/snapshots.rb +0 -0
  151. data/lib/2019-07-01/generated/azure_mgmt_netapp/volumes.rb +0 -0
  152. data/lib/2019-08-01/generated/azure_mgmt_netapp.rb +0 -0
  153. data/lib/2019-08-01/generated/azure_mgmt_netapp/accounts.rb +0 -0
  154. data/lib/2019-08-01/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb +1 -1
  155. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/active_directory.rb +0 -0
  156. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/capacity_pool.rb +0 -0
  157. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/capacity_pool_list.rb +0 -0
  158. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/capacity_pool_patch.rb +0 -0
  159. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/check_name_resource_types.rb +0 -0
  160. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/dimension.rb +0 -0
  161. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/export_policy_rule.rb +0 -0
  162. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/in_availability_reason_type.rb +0 -0
  163. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/metric_specification.rb +0 -0
  164. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/mount_target.rb +0 -0
  165. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/mount_target_list.rb +0 -0
  166. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/net_app_account.rb +0 -0
  167. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/net_app_account_list.rb +0 -0
  168. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/net_app_account_patch.rb +0 -0
  169. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/operation.rb +0 -0
  170. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/operation_display.rb +0 -0
  171. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/operation_list_result.rb +0 -0
  172. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/replication_object.rb +0 -0
  173. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/resource_name_availability.rb +0 -0
  174. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/resource_name_availability_request.rb +0 -0
  175. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/service_level.rb +0 -0
  176. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/service_specification.rb +0 -0
  177. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/snapshot.rb +0 -0
  178. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/snapshot_patch.rb +0 -0
  179. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/snapshots_list.rb +0 -0
  180. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/volume.rb +0 -0
  181. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/volume_list.rb +0 -0
  182. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/volume_patch.rb +0 -0
  183. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/volume_patch_properties_export_policy.rb +0 -0
  184. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/volume_properties_data_protection.rb +0 -0
  185. data/lib/2019-08-01/generated/azure_mgmt_netapp/models/volume_properties_export_policy.rb +0 -0
  186. data/lib/2019-08-01/generated/azure_mgmt_netapp/module_definition.rb +0 -0
  187. data/lib/2019-08-01/generated/azure_mgmt_netapp/mount_targets.rb +0 -0
  188. data/lib/2019-08-01/generated/azure_mgmt_netapp/net_app_resource.rb +0 -0
  189. data/lib/2019-08-01/generated/azure_mgmt_netapp/operations.rb +0 -0
  190. data/lib/2019-08-01/generated/azure_mgmt_netapp/pools.rb +0 -0
  191. data/lib/2019-08-01/generated/azure_mgmt_netapp/snapshots.rb +0 -0
  192. data/lib/2019-08-01/generated/azure_mgmt_netapp/volumes.rb +0 -0
  193. data/lib/2019-10-01/generated/azure_mgmt_netapp.rb +0 -0
  194. data/lib/2019-10-01/generated/azure_mgmt_netapp/accounts.rb +0 -0
  195. data/lib/2019-10-01/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb +1 -1
  196. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/active_directory.rb +0 -0
  197. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/authorize_request.rb +0 -0
  198. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/capacity_pool.rb +0 -0
  199. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/capacity_pool_list.rb +0 -0
  200. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/capacity_pool_patch.rb +0 -0
  201. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/check_name_resource_types.rb +0 -0
  202. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/dimension.rb +0 -0
  203. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/endpoint_type.rb +0 -0
  204. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/export_policy_rule.rb +0 -0
  205. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/in_availability_reason_type.rb +0 -0
  206. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/metric_specification.rb +0 -0
  207. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/mirror_state.rb +0 -0
  208. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/mount_target.rb +0 -0
  209. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/mount_target_list.rb +0 -0
  210. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/net_app_account.rb +0 -0
  211. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/net_app_account_list.rb +0 -0
  212. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/net_app_account_patch.rb +0 -0
  213. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/operation.rb +0 -0
  214. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/operation_display.rb +0 -0
  215. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/operation_list_result.rb +0 -0
  216. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/relationship_status.rb +0 -0
  217. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/replication_object.rb +0 -0
  218. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/replication_schedule.rb +0 -0
  219. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/replication_status.rb +0 -0
  220. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/resource_name_availability.rb +0 -0
  221. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/resource_name_availability_request.rb +0 -0
  222. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/service_level.rb +0 -0
  223. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/service_specification.rb +0 -0
  224. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/snapshot.rb +0 -0
  225. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/snapshot_patch.rb +0 -0
  226. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/snapshots_list.rb +0 -0
  227. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/volume.rb +0 -0
  228. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/volume_list.rb +0 -0
  229. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/volume_patch.rb +0 -0
  230. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/volume_patch_properties_export_policy.rb +0 -0
  231. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/volume_properties_data_protection.rb +0 -0
  232. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/volume_properties_export_policy.rb +0 -0
  233. data/lib/2019-10-01/generated/azure_mgmt_netapp/module_definition.rb +0 -0
  234. data/lib/2019-10-01/generated/azure_mgmt_netapp/mount_targets.rb +0 -0
  235. data/lib/2019-10-01/generated/azure_mgmt_netapp/net_app_resource.rb +0 -0
  236. data/lib/2019-10-01/generated/azure_mgmt_netapp/operations.rb +0 -0
  237. data/lib/2019-10-01/generated/azure_mgmt_netapp/pools.rb +0 -0
  238. data/lib/2019-10-01/generated/azure_mgmt_netapp/snapshots.rb +0 -0
  239. data/lib/2019-10-01/generated/azure_mgmt_netapp/volumes.rb +0 -0
  240. data/lib/2019-11-01/generated/azure_mgmt_netapp.rb +70 -0
  241. data/lib/2019-11-01/generated/azure_mgmt_netapp/accounts.rb +651 -0
  242. data/lib/2019-11-01/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb +153 -0
  243. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/active_directory.rb +139 -0
  244. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/authorize_request.rb +46 -0
  245. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/capacity_pool.rb +161 -0
  246. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/capacity_pool_list.rb +55 -0
  247. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/capacity_pool_patch.rb +133 -0
  248. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/check_name_resource_types.rb +18 -0
  249. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/dimension.rb +57 -0
  250. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/endpoint_type.rb +16 -0
  251. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/export_policy_rule.rb +113 -0
  252. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/in_availability_reason_type.rb +16 -0
  253. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/metric_specification.rb +145 -0
  254. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/mirror_state.rb +17 -0
  255. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/mount_target.rb +218 -0
  256. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/mount_target_properties.rb +152 -0
  257. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/net_app_account.rb +133 -0
  258. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/net_app_account_list.rb +55 -0
  259. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/net_app_account_patch.rb +133 -0
  260. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/operation.rb +83 -0
  261. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/operation_display.rb +79 -0
  262. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/operation_list_result.rb +57 -0
  263. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/relationship_status.rb +16 -0
  264. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/replication_object.rb +94 -0
  265. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/replication_schedule.rb +19 -0
  266. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/replication_status.rb +93 -0
  267. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/resource_name_availability.rb +78 -0
  268. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/resource_name_availability_request.rb +72 -0
  269. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/service_level.rb +17 -0
  270. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/service_specification.rb +56 -0
  271. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/snapshot.rb +139 -0
  272. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/snapshots_list.rb +55 -0
  273. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/volume.rb +315 -0
  274. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/volume_list.rb +55 -0
  275. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/volume_patch.rb +147 -0
  276. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/volume_patch_properties_export_policy.rb +58 -0
  277. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/volume_properties_data_protection.rb +50 -0
  278. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/volume_properties_export_policy.rb +58 -0
  279. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/volume_revert.rb +46 -0
  280. data/lib/2019-11-01/generated/azure_mgmt_netapp/module_definition.rb +9 -0
  281. data/lib/2019-11-01/generated/azure_mgmt_netapp/net_app_resource.rb +291 -0
  282. data/lib/2019-11-01/generated/azure_mgmt_netapp/operations.rb +115 -0
  283. data/lib/2019-11-01/generated/azure_mgmt_netapp/pools.rb +737 -0
  284. data/lib/2019-11-01/generated/azure_mgmt_netapp/snapshots.rb +794 -0
  285. data/lib/2019-11-01/generated/azure_mgmt_netapp/volumes.rb +1688 -0
  286. data/lib/2020-02-01/generated/azure_mgmt_netapp.rb +71 -0
  287. data/lib/2020-02-01/generated/azure_mgmt_netapp/accounts.rb +709 -0
  288. data/lib/2020-02-01/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb +153 -0
  289. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/active_directory.rb +160 -0
  290. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/authorize_request.rb +46 -0
  291. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/capacity_pool.rb +161 -0
  292. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/capacity_pool_list.rb +55 -0
  293. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/capacity_pool_patch.rb +133 -0
  294. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/check_name_resource_types.rb +18 -0
  295. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/dimension.rb +57 -0
  296. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/endpoint_type.rb +16 -0
  297. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/export_policy_rule.rb +115 -0
  298. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/in_availability_reason_type.rb +16 -0
  299. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/metric_specification.rb +145 -0
  300. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/mirror_state.rb +17 -0
  301. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/mount_target.rb +218 -0
  302. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/mount_target_properties.rb +152 -0
  303. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/net_app_account.rb +133 -0
  304. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/net_app_account_list.rb +55 -0
  305. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/net_app_account_patch.rb +133 -0
  306. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/operation.rb +83 -0
  307. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/operation_display.rb +79 -0
  308. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/operation_list_result.rb +57 -0
  309. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/relationship_status.rb +16 -0
  310. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/replication_object.rb +94 -0
  311. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/replication_schedule.rb +19 -0
  312. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/replication_status.rb +93 -0
  313. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/resource_name_availability.rb +78 -0
  314. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/resource_name_availability_request.rb +72 -0
  315. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/service_level.rb +17 -0
  316. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/service_specification.rb +56 -0
  317. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/snapshot.rb +123 -0
  318. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/snapshots_list.rb +55 -0
  319. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/volume.rb +328 -0
  320. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/volume_list.rb +55 -0
  321. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/volume_patch.rb +147 -0
  322. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/volume_patch_properties_export_policy.rb +58 -0
  323. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/volume_properties_data_protection.rb +62 -0
  324. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/volume_properties_export_policy.rb +58 -0
  325. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/volume_revert.rb +46 -0
  326. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/volume_snapshot_properties.rb +46 -0
  327. data/lib/2020-02-01/generated/azure_mgmt_netapp/module_definition.rb +9 -0
  328. data/lib/2020-02-01/generated/azure_mgmt_netapp/net_app_resource.rb +291 -0
  329. data/lib/2020-02-01/generated/azure_mgmt_netapp/operations.rb +115 -0
  330. data/lib/2020-02-01/generated/azure_mgmt_netapp/pools.rb +737 -0
  331. data/lib/2020-02-01/generated/azure_mgmt_netapp/snapshots.rb +794 -0
  332. data/lib/2020-02-01/generated/azure_mgmt_netapp/volumes.rb +1688 -0
  333. data/lib/2020-06-01/generated/azure_mgmt_netapp.rb +104 -0
  334. data/lib/2020-06-01/generated/azure_mgmt_netapp/account_backups.rb +373 -0
  335. data/lib/2020-06-01/generated/azure_mgmt_netapp/accounts.rb +709 -0
  336. data/lib/2020-06-01/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb +173 -0
  337. data/lib/2020-06-01/generated/azure_mgmt_netapp/backup_policies.rb +691 -0
  338. data/lib/2020-06-01/generated/azure_mgmt_netapp/backups.rb +747 -0
  339. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/active_directory.rb +229 -0
  340. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/active_directory_status.rb +19 -0
  341. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/authorize_request.rb +46 -0
  342. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/backup.rb +141 -0
  343. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/backup_patch.rb +113 -0
  344. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/backup_policies_list.rb +55 -0
  345. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/backup_policy.rb +212 -0
  346. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/backup_policy_details.rb +212 -0
  347. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/backup_policy_patch.rb +157 -0
  348. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/backups_list.rb +55 -0
  349. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/break_replication_request.rb +47 -0
  350. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/capacity_pool.rb +204 -0
  351. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/capacity_pool_list.rb +55 -0
  352. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/capacity_pool_patch.rb +132 -0
  353. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/check_availability_response.rb +78 -0
  354. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/check_name_resource_types.rb +18 -0
  355. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/check_quota_name_resource_types.rb +18 -0
  356. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/daily_schedule.rb +81 -0
  357. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/dimension.rb +57 -0
  358. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/endpoint_type.rb +16 -0
  359. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/export_policy_rule.rb +205 -0
  360. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/hourly_schedule.rb +69 -0
  361. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/in_availability_reason_type.rb +16 -0
  362. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/metric_specification.rb +145 -0
  363. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/mirror_state.rb +17 -0
  364. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/monthly_schedule.rb +93 -0
  365. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/mount_target.rb +159 -0
  366. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/mount_target_properties.rb +93 -0
  367. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/net_app_account.rb +133 -0
  368. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/net_app_account_list.rb +55 -0
  369. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/net_app_account_patch.rb +133 -0
  370. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/operation.rb +83 -0
  371. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/operation_display.rb +79 -0
  372. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/operation_list_result.rb +57 -0
  373. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/pool_change_request.rb +46 -0
  374. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/qos_type.rb +16 -0
  375. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/quota_availability_request.rb +73 -0
  376. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/relationship_status.rb +16 -0
  377. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/replication_object.rb +94 -0
  378. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/replication_schedule.rb +19 -0
  379. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/replication_status.rb +93 -0
  380. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/resource_name_availability_request.rb +72 -0
  381. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/security_style.rb +16 -0
  382. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/service_level.rb +17 -0
  383. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/service_specification.rb +56 -0
  384. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/snapshot.rb +123 -0
  385. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/snapshot_policies_list.rb +55 -0
  386. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/snapshot_policy.rb +156 -0
  387. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/snapshot_policy_details.rb +156 -0
  388. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/snapshot_policy_patch.rb +156 -0
  389. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/snapshot_policy_volume_list.rb +54 -0
  390. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/snapshots_list.rb +55 -0
  391. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/vault.rb +93 -0
  392. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/vault_list.rb +55 -0
  393. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/volume.rb +387 -0
  394. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/volume_backup_properties.rb +79 -0
  395. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/volume_backups.rb +68 -0
  396. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/volume_list.rb +55 -0
  397. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/volume_patch.rb +178 -0
  398. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/volume_patch_properties_data_protection.rb +50 -0
  399. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/volume_patch_properties_export_policy.rb +58 -0
  400. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/volume_properties_data_protection.rb +74 -0
  401. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/volume_properties_export_policy.rb +58 -0
  402. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/volume_revert.rb +46 -0
  403. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/volume_snapshot_properties.rb +46 -0
  404. data/lib/2020-06-01/generated/azure_mgmt_netapp/models/weekly_schedule.rb +94 -0
  405. data/lib/2020-06-01/generated/azure_mgmt_netapp/module_definition.rb +9 -0
  406. data/lib/2020-06-01/generated/azure_mgmt_netapp/net_app_resource.rb +424 -0
  407. data/lib/2020-06-01/generated/azure_mgmt_netapp/operations.rb +115 -0
  408. data/lib/2020-06-01/generated/azure_mgmt_netapp/pools.rb +737 -0
  409. data/lib/2020-06-01/generated/azure_mgmt_netapp/snapshot_policies.rb +700 -0
  410. data/lib/2020-06-01/generated/azure_mgmt_netapp/snapshots.rb +794 -0
  411. data/lib/2020-06-01/generated/azure_mgmt_netapp/vaults.rb +128 -0
  412. data/lib/2020-06-01/generated/azure_mgmt_netapp/volumes.rb +2023 -0
  413. data/lib/azure_mgmt_netapp.rb +5 -2
  414. data/lib/module_definition.rb +9 -9
  415. data/lib/profiles/latest/modules/netapp_profile_module.rb +231 -107
  416. data/lib/profiles/latest/netapp_latest_profile_client.rb +40 -40
  417. data/lib/profiles/latest/netapp_module_definition.rb +8 -8
  418. data/lib/version.rb +1 -1
  419. metadata +179 -5
@@ -0,0 +1,128 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::NetApp::Mgmt::V2020_06_01
7
+ #
8
+ # Microsoft NetApp Azure Resource Provider specification
9
+ #
10
+ class Vaults
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Vaults class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [AzureNetAppFilesManagementClient] reference to the AzureNetAppFilesManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # List vaults
26
+ #
27
+ # List vaults for a Netapp Account
28
+ #
29
+ # @param resource_group_name [String] The name of the resource group.
30
+ # @param account_name [String] The name of the NetApp account
31
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
32
+ # will be added to the HTTP request.
33
+ #
34
+ # @return [VaultList] operation results.
35
+ #
36
+ def list(resource_group_name, account_name, custom_headers:nil)
37
+ response = list_async(resource_group_name, account_name, custom_headers:custom_headers).value!
38
+ response.body unless response.nil?
39
+ end
40
+
41
+ #
42
+ # List vaults
43
+ #
44
+ # List vaults for a Netapp Account
45
+ #
46
+ # @param resource_group_name [String] The name of the resource group.
47
+ # @param account_name [String] The name of the NetApp account
48
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
49
+ # will be added to the HTTP request.
50
+ #
51
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
52
+ #
53
+ def list_with_http_info(resource_group_name, account_name, custom_headers:nil)
54
+ list_async(resource_group_name, account_name, custom_headers:custom_headers).value!
55
+ end
56
+
57
+ #
58
+ # List vaults
59
+ #
60
+ # List vaults for a Netapp Account
61
+ #
62
+ # @param resource_group_name [String] The name of the resource group.
63
+ # @param account_name [String] The name of the NetApp account
64
+ # @param [Hash{String => String}] A hash of custom headers that will be added
65
+ # to the HTTP request.
66
+ #
67
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
68
+ #
69
+ def list_async(resource_group_name, account_name, custom_headers:nil)
70
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
71
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
72
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
73
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
74
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
75
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
76
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
77
+
78
+
79
+ request_headers = {}
80
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
81
+
82
+ # Set Headers
83
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
84
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
85
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/vaults'
86
+
87
+ request_url = @base_url || @client.base_url
88
+
89
+ options = {
90
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
91
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
92
+ query_params: {'api-version' => @client.api_version},
93
+ headers: request_headers.merge(custom_headers || {}),
94
+ base_url: request_url
95
+ }
96
+ promise = @client.make_request_async(:get, path_template, options)
97
+
98
+ promise = promise.then do |result|
99
+ http_response = result.response
100
+ status_code = http_response.status
101
+ response_content = http_response.body
102
+ unless status_code == 200
103
+ error_model = JSON.load(response_content)
104
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
105
+ end
106
+
107
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
108
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
109
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
110
+ # Deserialize Response
111
+ if status_code == 200
112
+ begin
113
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
114
+ result_mapper = Azure::NetApp::Mgmt::V2020_06_01::Models::VaultList.mapper()
115
+ result.body = @client.deserialize(result_mapper, parsed_response)
116
+ rescue Exception => e
117
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
118
+ end
119
+ end
120
+
121
+ result
122
+ end
123
+
124
+ promise.execute
125
+ end
126
+
127
+ end
128
+ end
@@ -0,0 +1,2023 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::NetApp::Mgmt::V2020_06_01
7
+ #
8
+ # Microsoft NetApp Azure Resource Provider specification
9
+ #
10
+ class Volumes
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Volumes class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [AzureNetAppFilesManagementClient] reference to the AzureNetAppFilesManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Describe all volumes
26
+ #
27
+ # List all volumes within the capacity pool
28
+ #
29
+ # @param resource_group_name [String] The name of the resource group.
30
+ # @param account_name [String] The name of the NetApp account
31
+ # @param pool_name [String] The name of the capacity pool
32
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
+ # will be added to the HTTP request.
34
+ #
35
+ # @return [VolumeList] operation results.
36
+ #
37
+ def list(resource_group_name, account_name, pool_name, custom_headers:nil)
38
+ response = list_async(resource_group_name, account_name, pool_name, custom_headers:custom_headers).value!
39
+ response.body unless response.nil?
40
+ end
41
+
42
+ #
43
+ # Describe all volumes
44
+ #
45
+ # List all volumes within the capacity pool
46
+ #
47
+ # @param resource_group_name [String] The name of the resource group.
48
+ # @param account_name [String] The name of the NetApp account
49
+ # @param pool_name [String] The name of the capacity pool
50
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
51
+ # will be added to the HTTP request.
52
+ #
53
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
54
+ #
55
+ def list_with_http_info(resource_group_name, account_name, pool_name, custom_headers:nil)
56
+ list_async(resource_group_name, account_name, pool_name, custom_headers:custom_headers).value!
57
+ end
58
+
59
+ #
60
+ # Describe all volumes
61
+ #
62
+ # List all volumes within the capacity pool
63
+ #
64
+ # @param resource_group_name [String] The name of the resource group.
65
+ # @param account_name [String] The name of the NetApp account
66
+ # @param pool_name [String] The name of the capacity pool
67
+ # @param [Hash{String => String}] A hash of custom headers that will be added
68
+ # to the HTTP request.
69
+ #
70
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
71
+ #
72
+ def list_async(resource_group_name, account_name, pool_name, custom_headers:nil)
73
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
74
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
75
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
76
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
77
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
78
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
79
+ fail ArgumentError, 'pool_name is nil' if pool_name.nil?
80
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'MaxLength': '64'" if !pool_name.nil? && pool_name.length > 64
81
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'MinLength': '1'" if !pool_name.nil? && pool_name.length < 1
82
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'" if !pool_name.nil? && pool_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$$')).nil?
83
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
84
+
85
+
86
+ request_headers = {}
87
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
88
+
89
+ # Set Headers
90
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
91
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
92
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes'
93
+
94
+ request_url = @base_url || @client.base_url
95
+
96
+ options = {
97
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
98
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'poolName' => pool_name},
99
+ query_params: {'api-version' => @client.api_version},
100
+ headers: request_headers.merge(custom_headers || {}),
101
+ base_url: request_url
102
+ }
103
+ promise = @client.make_request_async(:get, path_template, options)
104
+
105
+ promise = promise.then do |result|
106
+ http_response = result.response
107
+ status_code = http_response.status
108
+ response_content = http_response.body
109
+ unless status_code == 200
110
+ error_model = JSON.load(response_content)
111
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
112
+ end
113
+
114
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
115
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
116
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
117
+ # Deserialize Response
118
+ if status_code == 200
119
+ begin
120
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
121
+ result_mapper = Azure::NetApp::Mgmt::V2020_06_01::Models::VolumeList.mapper()
122
+ result.body = @client.deserialize(result_mapper, parsed_response)
123
+ rescue Exception => e
124
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
125
+ end
126
+ end
127
+
128
+ result
129
+ end
130
+
131
+ promise.execute
132
+ end
133
+
134
+ #
135
+ # Describe a volume
136
+ #
137
+ # Get the details of the specified volume
138
+ #
139
+ # @param resource_group_name [String] The name of the resource group.
140
+ # @param account_name [String] The name of the NetApp account
141
+ # @param pool_name [String] The name of the capacity pool
142
+ # @param volume_name [String] The name of the volume
143
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
144
+ # will be added to the HTTP request.
145
+ #
146
+ # @return [Volume] operation results.
147
+ #
148
+ def get(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
149
+ response = get_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers).value!
150
+ response.body unless response.nil?
151
+ end
152
+
153
+ #
154
+ # Describe a volume
155
+ #
156
+ # Get the details of the specified volume
157
+ #
158
+ # @param resource_group_name [String] The name of the resource group.
159
+ # @param account_name [String] The name of the NetApp account
160
+ # @param pool_name [String] The name of the capacity pool
161
+ # @param volume_name [String] The name of the volume
162
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
163
+ # will be added to the HTTP request.
164
+ #
165
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
166
+ #
167
+ def get_with_http_info(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
168
+ get_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers).value!
169
+ end
170
+
171
+ #
172
+ # Describe a volume
173
+ #
174
+ # Get the details of the specified volume
175
+ #
176
+ # @param resource_group_name [String] The name of the resource group.
177
+ # @param account_name [String] The name of the NetApp account
178
+ # @param pool_name [String] The name of the capacity pool
179
+ # @param volume_name [String] The name of the volume
180
+ # @param [Hash{String => String}] A hash of custom headers that will be added
181
+ # to the HTTP request.
182
+ #
183
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
184
+ #
185
+ def get_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
186
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
187
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
188
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
189
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
190
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
191
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
192
+ fail ArgumentError, 'pool_name is nil' if pool_name.nil?
193
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'MaxLength': '64'" if !pool_name.nil? && pool_name.length > 64
194
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'MinLength': '1'" if !pool_name.nil? && pool_name.length < 1
195
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'" if !pool_name.nil? && pool_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$$')).nil?
196
+ fail ArgumentError, 'volume_name is nil' if volume_name.nil?
197
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'MaxLength': '64'" if !volume_name.nil? && volume_name.length > 64
198
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'MinLength': '1'" if !volume_name.nil? && volume_name.length < 1
199
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$'" if !volume_name.nil? && volume_name.match(Regexp.new('^^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$$')).nil?
200
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
201
+
202
+
203
+ request_headers = {}
204
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
205
+
206
+ # Set Headers
207
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
208
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
209
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}'
210
+
211
+ request_url = @base_url || @client.base_url
212
+
213
+ options = {
214
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
215
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'poolName' => pool_name,'volumeName' => volume_name},
216
+ query_params: {'api-version' => @client.api_version},
217
+ headers: request_headers.merge(custom_headers || {}),
218
+ base_url: request_url
219
+ }
220
+ promise = @client.make_request_async(:get, path_template, options)
221
+
222
+ promise = promise.then do |result|
223
+ http_response = result.response
224
+ status_code = http_response.status
225
+ response_content = http_response.body
226
+ unless status_code == 200
227
+ error_model = JSON.load(response_content)
228
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
229
+ end
230
+
231
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
232
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
233
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
234
+ # Deserialize Response
235
+ if status_code == 200
236
+ begin
237
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
238
+ result_mapper = Azure::NetApp::Mgmt::V2020_06_01::Models::Volume.mapper()
239
+ result.body = @client.deserialize(result_mapper, parsed_response)
240
+ rescue Exception => e
241
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
242
+ end
243
+ end
244
+
245
+ result
246
+ end
247
+
248
+ promise.execute
249
+ end
250
+
251
+ #
252
+ # Create or Update a volume
253
+ #
254
+ # Create or update the specified volume within the capacity pool
255
+ #
256
+ # @param body [Volume] Volume object supplied in the body of the operation.
257
+ # @param resource_group_name [String] The name of the resource group.
258
+ # @param account_name [String] The name of the NetApp account
259
+ # @param pool_name [String] The name of the capacity pool
260
+ # @param volume_name [String] The name of the volume
261
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
262
+ # will be added to the HTTP request.
263
+ #
264
+ # @return [Volume] operation results.
265
+ #
266
+ def create_or_update(body, resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
267
+ response = create_or_update_async(body, resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers).value!
268
+ response.body unless response.nil?
269
+ end
270
+
271
+ #
272
+ # @param body [Volume] Volume object supplied in the body of the operation.
273
+ # @param resource_group_name [String] The name of the resource group.
274
+ # @param account_name [String] The name of the NetApp account
275
+ # @param pool_name [String] The name of the capacity pool
276
+ # @param volume_name [String] The name of the volume
277
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
278
+ # will be added to the HTTP request.
279
+ #
280
+ # @return [Concurrent::Promise] promise which provides async access to http
281
+ # response.
282
+ #
283
+ def create_or_update_async(body, resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
284
+ # Send request
285
+ promise = begin_create_or_update_async(body, resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers)
286
+
287
+ promise = promise.then do |response|
288
+ # Defining deserialization method.
289
+ deserialize_method = lambda do |parsed_response|
290
+ result_mapper = Azure::NetApp::Mgmt::V2020_06_01::Models::Volume.mapper()
291
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
292
+ end
293
+
294
+ # Waiting for response.
295
+ @client.get_long_running_operation_result(response, deserialize_method)
296
+ end
297
+
298
+ promise
299
+ end
300
+
301
+ #
302
+ # Update a volume
303
+ #
304
+ # Patch the specified volume
305
+ #
306
+ # @param body [VolumePatch] Volume object supplied in the body of the
307
+ # operation.
308
+ # @param resource_group_name [String] The name of the resource group.
309
+ # @param account_name [String] The name of the NetApp account
310
+ # @param pool_name [String] The name of the capacity pool
311
+ # @param volume_name [String] The name of the volume
312
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
313
+ # will be added to the HTTP request.
314
+ #
315
+ # @return [Volume] operation results.
316
+ #
317
+ def update(body, resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
318
+ response = update_async(body, resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers).value!
319
+ response.body unless response.nil?
320
+ end
321
+
322
+ #
323
+ # @param body [VolumePatch] Volume object supplied in the body of the
324
+ # operation.
325
+ # @param resource_group_name [String] The name of the resource group.
326
+ # @param account_name [String] The name of the NetApp account
327
+ # @param pool_name [String] The name of the capacity pool
328
+ # @param volume_name [String] The name of the volume
329
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
330
+ # will be added to the HTTP request.
331
+ #
332
+ # @return [Concurrent::Promise] promise which provides async access to http
333
+ # response.
334
+ #
335
+ def update_async(body, resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
336
+ # Send request
337
+ promise = begin_update_async(body, resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers)
338
+
339
+ promise = promise.then do |response|
340
+ # Defining deserialization method.
341
+ deserialize_method = lambda do |parsed_response|
342
+ result_mapper = Azure::NetApp::Mgmt::V2020_06_01::Models::Volume.mapper()
343
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
344
+ end
345
+
346
+ # Waiting for response.
347
+ @client.get_long_running_operation_result(response, deserialize_method)
348
+ end
349
+
350
+ promise
351
+ end
352
+
353
+ #
354
+ # Delete a volume
355
+ #
356
+ # Delete the specified volume
357
+ #
358
+ # @param resource_group_name [String] The name of the resource group.
359
+ # @param account_name [String] The name of the NetApp account
360
+ # @param pool_name [String] The name of the capacity pool
361
+ # @param volume_name [String] The name of the volume
362
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
363
+ # will be added to the HTTP request.
364
+ #
365
+ def delete(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
366
+ response = delete_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers).value!
367
+ nil
368
+ end
369
+
370
+ #
371
+ # @param resource_group_name [String] The name of the resource group.
372
+ # @param account_name [String] The name of the NetApp account
373
+ # @param pool_name [String] The name of the capacity pool
374
+ # @param volume_name [String] The name of the volume
375
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
376
+ # will be added to the HTTP request.
377
+ #
378
+ # @return [Concurrent::Promise] promise which provides async access to http
379
+ # response.
380
+ #
381
+ def delete_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
382
+ # Send request
383
+ promise = begin_delete_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers)
384
+
385
+ promise = promise.then do |response|
386
+ # Defining deserialization method.
387
+ deserialize_method = lambda do |parsed_response|
388
+ end
389
+
390
+ # Waiting for response.
391
+ @client.get_long_running_operation_result(response, deserialize_method)
392
+ end
393
+
394
+ promise
395
+ end
396
+
397
+ #
398
+ # Revert a volume to one of its snapshots
399
+ #
400
+ # Revert a volume to the snapshot specified in the body
401
+ #
402
+ # @param resource_group_name [String] The name of the resource group.
403
+ # @param account_name [String] The name of the NetApp account
404
+ # @param pool_name [String] The name of the capacity pool
405
+ # @param volume_name [String] The name of the volume
406
+ # @param body [VolumeRevert] Object for snapshot to revert supplied in the body
407
+ # of the operation.
408
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
409
+ # will be added to the HTTP request.
410
+ #
411
+ def revert(resource_group_name, account_name, pool_name, volume_name, body, custom_headers:nil)
412
+ response = revert_async(resource_group_name, account_name, pool_name, volume_name, body, custom_headers:custom_headers).value!
413
+ nil
414
+ end
415
+
416
+ #
417
+ # @param resource_group_name [String] The name of the resource group.
418
+ # @param account_name [String] The name of the NetApp account
419
+ # @param pool_name [String] The name of the capacity pool
420
+ # @param volume_name [String] The name of the volume
421
+ # @param body [VolumeRevert] Object for snapshot to revert supplied in the body
422
+ # of the operation.
423
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
424
+ # will be added to the HTTP request.
425
+ #
426
+ # @return [Concurrent::Promise] promise which provides async access to http
427
+ # response.
428
+ #
429
+ def revert_async(resource_group_name, account_name, pool_name, volume_name, body, custom_headers:nil)
430
+ # Send request
431
+ promise = begin_revert_async(resource_group_name, account_name, pool_name, volume_name, body, custom_headers:custom_headers)
432
+
433
+ promise = promise.then do |response|
434
+ # Defining deserialization method.
435
+ deserialize_method = lambda do |parsed_response|
436
+ end
437
+
438
+ # Waiting for response.
439
+ @client.get_long_running_operation_result(response, deserialize_method)
440
+ end
441
+
442
+ promise
443
+ end
444
+
445
+ #
446
+ # Break volume replication
447
+ #
448
+ # Break the replication connection on the destination volume
449
+ #
450
+ # @param resource_group_name [String] The name of the resource group.
451
+ # @param account_name [String] The name of the NetApp account
452
+ # @param pool_name [String] The name of the capacity pool
453
+ # @param volume_name [String] The name of the volume
454
+ # @param body [BreakReplicationRequest] Optional body to force break the
455
+ # replication.
456
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
457
+ # will be added to the HTTP request.
458
+ #
459
+ def break_replication(resource_group_name, account_name, pool_name, volume_name, body:nil, custom_headers:nil)
460
+ response = break_replication_async(resource_group_name, account_name, pool_name, volume_name, body:body, custom_headers:custom_headers).value!
461
+ nil
462
+ end
463
+
464
+ #
465
+ # @param resource_group_name [String] The name of the resource group.
466
+ # @param account_name [String] The name of the NetApp account
467
+ # @param pool_name [String] The name of the capacity pool
468
+ # @param volume_name [String] The name of the volume
469
+ # @param body [BreakReplicationRequest] Optional body to force break the
470
+ # replication.
471
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
472
+ # will be added to the HTTP request.
473
+ #
474
+ # @return [Concurrent::Promise] promise which provides async access to http
475
+ # response.
476
+ #
477
+ def break_replication_async(resource_group_name, account_name, pool_name, volume_name, body:nil, custom_headers:nil)
478
+ # Send request
479
+ promise = begin_break_replication_async(resource_group_name, account_name, pool_name, volume_name, body:body, custom_headers:custom_headers)
480
+
481
+ promise = promise.then do |response|
482
+ # Defining deserialization method.
483
+ deserialize_method = lambda do |parsed_response|
484
+ end
485
+
486
+ # Waiting for response.
487
+ @client.get_long_running_operation_result(response, deserialize_method)
488
+ end
489
+
490
+ promise
491
+ end
492
+
493
+ #
494
+ # Get volume replication status
495
+ #
496
+ # Get the status of the replication
497
+ #
498
+ # @param resource_group_name [String] The name of the resource group.
499
+ # @param account_name [String] The name of the NetApp account
500
+ # @param pool_name [String] The name of the capacity pool
501
+ # @param volume_name [String] The name of the volume
502
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
503
+ # will be added to the HTTP request.
504
+ #
505
+ # @return [ReplicationStatus] operation results.
506
+ #
507
+ def replication_status_method(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
508
+ response = replication_status_method_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers).value!
509
+ response.body unless response.nil?
510
+ end
511
+
512
+ #
513
+ # Get volume replication status
514
+ #
515
+ # Get the status of the replication
516
+ #
517
+ # @param resource_group_name [String] The name of the resource group.
518
+ # @param account_name [String] The name of the NetApp account
519
+ # @param pool_name [String] The name of the capacity pool
520
+ # @param volume_name [String] The name of the volume
521
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
522
+ # will be added to the HTTP request.
523
+ #
524
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
525
+ #
526
+ def replication_status_method_with_http_info(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
527
+ replication_status_method_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers).value!
528
+ end
529
+
530
+ #
531
+ # Get volume replication status
532
+ #
533
+ # Get the status of the replication
534
+ #
535
+ # @param resource_group_name [String] The name of the resource group.
536
+ # @param account_name [String] The name of the NetApp account
537
+ # @param pool_name [String] The name of the capacity pool
538
+ # @param volume_name [String] The name of the volume
539
+ # @param [Hash{String => String}] A hash of custom headers that will be added
540
+ # to the HTTP request.
541
+ #
542
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
543
+ #
544
+ def replication_status_method_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
545
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
546
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
547
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
548
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
549
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
550
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
551
+ fail ArgumentError, 'pool_name is nil' if pool_name.nil?
552
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'MaxLength': '64'" if !pool_name.nil? && pool_name.length > 64
553
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'MinLength': '1'" if !pool_name.nil? && pool_name.length < 1
554
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'" if !pool_name.nil? && pool_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$$')).nil?
555
+ fail ArgumentError, 'volume_name is nil' if volume_name.nil?
556
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'MaxLength': '64'" if !volume_name.nil? && volume_name.length > 64
557
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'MinLength': '1'" if !volume_name.nil? && volume_name.length < 1
558
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$'" if !volume_name.nil? && volume_name.match(Regexp.new('^^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$$')).nil?
559
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
560
+
561
+
562
+ request_headers = {}
563
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
564
+
565
+ # Set Headers
566
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
567
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
568
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/replicationStatus'
569
+
570
+ request_url = @base_url || @client.base_url
571
+
572
+ options = {
573
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
574
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'poolName' => pool_name,'volumeName' => volume_name},
575
+ query_params: {'api-version' => @client.api_version},
576
+ headers: request_headers.merge(custom_headers || {}),
577
+ base_url: request_url
578
+ }
579
+ promise = @client.make_request_async(:get, path_template, options)
580
+
581
+ promise = promise.then do |result|
582
+ http_response = result.response
583
+ status_code = http_response.status
584
+ response_content = http_response.body
585
+ unless status_code == 200
586
+ error_model = JSON.load(response_content)
587
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
588
+ end
589
+
590
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
591
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
592
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
593
+ # Deserialize Response
594
+ if status_code == 200
595
+ begin
596
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
597
+ result_mapper = Azure::NetApp::Mgmt::V2020_06_01::Models::ReplicationStatus.mapper()
598
+ result.body = @client.deserialize(result_mapper, parsed_response)
599
+ rescue Exception => e
600
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
601
+ end
602
+ end
603
+
604
+ result
605
+ end
606
+
607
+ promise.execute
608
+ end
609
+
610
+ #
611
+ # Resync volume replication
612
+ #
613
+ # Resync the connection on the destination volume. If the operation is ran on
614
+ # the source volume it will reverse-resync the connection and sync from source
615
+ # to destination.
616
+ #
617
+ # @param resource_group_name [String] The name of the resource group.
618
+ # @param account_name [String] The name of the NetApp account
619
+ # @param pool_name [String] The name of the capacity pool
620
+ # @param volume_name [String] The name of the volume
621
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
622
+ # will be added to the HTTP request.
623
+ #
624
+ def resync_replication(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
625
+ response = resync_replication_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers).value!
626
+ nil
627
+ end
628
+
629
+ #
630
+ # @param resource_group_name [String] The name of the resource group.
631
+ # @param account_name [String] The name of the NetApp account
632
+ # @param pool_name [String] The name of the capacity pool
633
+ # @param volume_name [String] The name of the volume
634
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
635
+ # will be added to the HTTP request.
636
+ #
637
+ # @return [Concurrent::Promise] promise which provides async access to http
638
+ # response.
639
+ #
640
+ def resync_replication_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
641
+ # Send request
642
+ promise = begin_resync_replication_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers)
643
+
644
+ promise = promise.then do |response|
645
+ # Defining deserialization method.
646
+ deserialize_method = lambda do |parsed_response|
647
+ end
648
+
649
+ # Waiting for response.
650
+ @client.get_long_running_operation_result(response, deserialize_method)
651
+ end
652
+
653
+ promise
654
+ end
655
+
656
+ #
657
+ # Delete volume replication
658
+ #
659
+ # Delete the replication connection on the destination volume, and send release
660
+ # to the source replication
661
+ #
662
+ # @param resource_group_name [String] The name of the resource group.
663
+ # @param account_name [String] The name of the NetApp account
664
+ # @param pool_name [String] The name of the capacity pool
665
+ # @param volume_name [String] The name of the volume
666
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
667
+ # will be added to the HTTP request.
668
+ #
669
+ def delete_replication(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
670
+ response = delete_replication_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers).value!
671
+ nil
672
+ end
673
+
674
+ #
675
+ # @param resource_group_name [String] The name of the resource group.
676
+ # @param account_name [String] The name of the NetApp account
677
+ # @param pool_name [String] The name of the capacity pool
678
+ # @param volume_name [String] The name of the volume
679
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
680
+ # will be added to the HTTP request.
681
+ #
682
+ # @return [Concurrent::Promise] promise which provides async access to http
683
+ # response.
684
+ #
685
+ def delete_replication_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
686
+ # Send request
687
+ promise = begin_delete_replication_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers)
688
+
689
+ promise = promise.then do |response|
690
+ # Defining deserialization method.
691
+ deserialize_method = lambda do |parsed_response|
692
+ end
693
+
694
+ # Waiting for response.
695
+ @client.get_long_running_operation_result(response, deserialize_method)
696
+ end
697
+
698
+ promise
699
+ end
700
+
701
+ #
702
+ # Authorize source volume replication
703
+ #
704
+ # Authorize the replication connection on the source volume
705
+ #
706
+ # @param resource_group_name [String] The name of the resource group.
707
+ # @param account_name [String] The name of the NetApp account
708
+ # @param pool_name [String] The name of the capacity pool
709
+ # @param volume_name [String] The name of the volume
710
+ # @param body [AuthorizeRequest] Authorize request object supplied in the body
711
+ # of the operation.
712
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
713
+ # will be added to the HTTP request.
714
+ #
715
+ def authorize_replication(resource_group_name, account_name, pool_name, volume_name, body, custom_headers:nil)
716
+ response = authorize_replication_async(resource_group_name, account_name, pool_name, volume_name, body, custom_headers:custom_headers).value!
717
+ nil
718
+ end
719
+
720
+ #
721
+ # @param resource_group_name [String] The name of the resource group.
722
+ # @param account_name [String] The name of the NetApp account
723
+ # @param pool_name [String] The name of the capacity pool
724
+ # @param volume_name [String] The name of the volume
725
+ # @param body [AuthorizeRequest] Authorize request object supplied in the body
726
+ # of the operation.
727
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
728
+ # will be added to the HTTP request.
729
+ #
730
+ # @return [Concurrent::Promise] promise which provides async access to http
731
+ # response.
732
+ #
733
+ def authorize_replication_async(resource_group_name, account_name, pool_name, volume_name, body, custom_headers:nil)
734
+ # Send request
735
+ promise = begin_authorize_replication_async(resource_group_name, account_name, pool_name, volume_name, body, custom_headers:custom_headers)
736
+
737
+ promise = promise.then do |response|
738
+ # Defining deserialization method.
739
+ deserialize_method = lambda do |parsed_response|
740
+ end
741
+
742
+ # Waiting for response.
743
+ @client.get_long_running_operation_result(response, deserialize_method)
744
+ end
745
+
746
+ promise
747
+ end
748
+
749
+ #
750
+ # ReInitialize volume replication
751
+ #
752
+ # Re-Initializes the replication connection on the destination volume
753
+ #
754
+ # @param resource_group_name [String] The name of the resource group.
755
+ # @param account_name [String] The name of the NetApp account
756
+ # @param pool_name [String] The name of the capacity pool
757
+ # @param volume_name [String] The name of the volume
758
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
759
+ # will be added to the HTTP request.
760
+ #
761
+ def re_initialize_replication(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
762
+ response = re_initialize_replication_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers).value!
763
+ nil
764
+ end
765
+
766
+ #
767
+ # @param resource_group_name [String] The name of the resource group.
768
+ # @param account_name [String] The name of the NetApp account
769
+ # @param pool_name [String] The name of the capacity pool
770
+ # @param volume_name [String] The name of the volume
771
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
772
+ # will be added to the HTTP request.
773
+ #
774
+ # @return [Concurrent::Promise] promise which provides async access to http
775
+ # response.
776
+ #
777
+ def re_initialize_replication_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
778
+ # Send request
779
+ promise = begin_re_initialize_replication_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers)
780
+
781
+ promise = promise.then do |response|
782
+ # Defining deserialization method.
783
+ deserialize_method = lambda do |parsed_response|
784
+ end
785
+
786
+ # Waiting for response.
787
+ @client.get_long_running_operation_result(response, deserialize_method)
788
+ end
789
+
790
+ promise
791
+ end
792
+
793
+ #
794
+ # Change pool for volume
795
+ #
796
+ # Moves volume to another pool
797
+ #
798
+ # @param resource_group_name [String] The name of the resource group.
799
+ # @param account_name [String] The name of the NetApp account
800
+ # @param pool_name [String] The name of the capacity pool
801
+ # @param volume_name [String] The name of the volume
802
+ # @param body [PoolChangeRequest] Move volume to the pool supplied in the body
803
+ # of the operation.
804
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
805
+ # will be added to the HTTP request.
806
+ #
807
+ def pool_change(resource_group_name, account_name, pool_name, volume_name, body, custom_headers:nil)
808
+ response = pool_change_async(resource_group_name, account_name, pool_name, volume_name, body, custom_headers:custom_headers).value!
809
+ nil
810
+ end
811
+
812
+ #
813
+ # @param resource_group_name [String] The name of the resource group.
814
+ # @param account_name [String] The name of the NetApp account
815
+ # @param pool_name [String] The name of the capacity pool
816
+ # @param volume_name [String] The name of the volume
817
+ # @param body [PoolChangeRequest] Move volume to the pool supplied in the body
818
+ # of the operation.
819
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
820
+ # will be added to the HTTP request.
821
+ #
822
+ # @return [Concurrent::Promise] promise which provides async access to http
823
+ # response.
824
+ #
825
+ def pool_change_async(resource_group_name, account_name, pool_name, volume_name, body, custom_headers:nil)
826
+ # Send request
827
+ promise = begin_pool_change_async(resource_group_name, account_name, pool_name, volume_name, body, custom_headers:custom_headers)
828
+
829
+ promise = promise.then do |response|
830
+ # Defining deserialization method.
831
+ deserialize_method = lambda do |parsed_response|
832
+ end
833
+
834
+ # Waiting for response.
835
+ @client.get_long_running_operation_result(response, deserialize_method)
836
+ end
837
+
838
+ promise
839
+ end
840
+
841
+ #
842
+ # Create or Update a volume
843
+ #
844
+ # Create or update the specified volume within the capacity pool
845
+ #
846
+ # @param body [Volume] Volume object supplied in the body of the operation.
847
+ # @param resource_group_name [String] The name of the resource group.
848
+ # @param account_name [String] The name of the NetApp account
849
+ # @param pool_name [String] The name of the capacity pool
850
+ # @param volume_name [String] The name of the volume
851
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
852
+ # will be added to the HTTP request.
853
+ #
854
+ # @return [Volume] operation results.
855
+ #
856
+ def begin_create_or_update(body, resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
857
+ response = begin_create_or_update_async(body, resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers).value!
858
+ response.body unless response.nil?
859
+ end
860
+
861
+ #
862
+ # Create or Update a volume
863
+ #
864
+ # Create or update the specified volume within the capacity pool
865
+ #
866
+ # @param body [Volume] Volume object supplied in the body of the operation.
867
+ # @param resource_group_name [String] The name of the resource group.
868
+ # @param account_name [String] The name of the NetApp account
869
+ # @param pool_name [String] The name of the capacity pool
870
+ # @param volume_name [String] The name of the volume
871
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
872
+ # will be added to the HTTP request.
873
+ #
874
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
875
+ #
876
+ def begin_create_or_update_with_http_info(body, resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
877
+ begin_create_or_update_async(body, resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers).value!
878
+ end
879
+
880
+ #
881
+ # Create or Update a volume
882
+ #
883
+ # Create or update the specified volume within the capacity pool
884
+ #
885
+ # @param body [Volume] Volume object supplied in the body of the operation.
886
+ # @param resource_group_name [String] The name of the resource group.
887
+ # @param account_name [String] The name of the NetApp account
888
+ # @param pool_name [String] The name of the capacity pool
889
+ # @param volume_name [String] The name of the volume
890
+ # @param [Hash{String => String}] A hash of custom headers that will be added
891
+ # to the HTTP request.
892
+ #
893
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
894
+ #
895
+ def begin_create_or_update_async(body, resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
896
+ fail ArgumentError, 'body is nil' if body.nil?
897
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
898
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
899
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
900
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
901
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
902
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
903
+ fail ArgumentError, 'pool_name is nil' if pool_name.nil?
904
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'MaxLength': '64'" if !pool_name.nil? && pool_name.length > 64
905
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'MinLength': '1'" if !pool_name.nil? && pool_name.length < 1
906
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'" if !pool_name.nil? && pool_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$$')).nil?
907
+ fail ArgumentError, 'volume_name is nil' if volume_name.nil?
908
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'MaxLength': '64'" if !volume_name.nil? && volume_name.length > 64
909
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'MinLength': '1'" if !volume_name.nil? && volume_name.length < 1
910
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$'" if !volume_name.nil? && volume_name.match(Regexp.new('^^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$$')).nil?
911
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
912
+
913
+
914
+ request_headers = {}
915
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
916
+
917
+ # Set Headers
918
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
919
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
920
+
921
+ # Serialize Request
922
+ request_mapper = Azure::NetApp::Mgmt::V2020_06_01::Models::Volume.mapper()
923
+ request_content = @client.serialize(request_mapper, body)
924
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
925
+
926
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}'
927
+
928
+ request_url = @base_url || @client.base_url
929
+
930
+ options = {
931
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
932
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'poolName' => pool_name,'volumeName' => volume_name},
933
+ query_params: {'api-version' => @client.api_version},
934
+ body: request_content,
935
+ headers: request_headers.merge(custom_headers || {}),
936
+ base_url: request_url
937
+ }
938
+ promise = @client.make_request_async(:put, path_template, options)
939
+
940
+ promise = promise.then do |result|
941
+ http_response = result.response
942
+ status_code = http_response.status
943
+ response_content = http_response.body
944
+ unless status_code == 200 || status_code == 201 || status_code == 202
945
+ error_model = JSON.load(response_content)
946
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
947
+ end
948
+
949
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
950
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
951
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
952
+ # Deserialize Response
953
+ if status_code == 200
954
+ begin
955
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
956
+ result_mapper = Azure::NetApp::Mgmt::V2020_06_01::Models::Volume.mapper()
957
+ result.body = @client.deserialize(result_mapper, parsed_response)
958
+ rescue Exception => e
959
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
960
+ end
961
+ end
962
+ # Deserialize Response
963
+ if status_code == 201
964
+ begin
965
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
966
+ result_mapper = Azure::NetApp::Mgmt::V2020_06_01::Models::Volume.mapper()
967
+ result.body = @client.deserialize(result_mapper, parsed_response)
968
+ rescue Exception => e
969
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
970
+ end
971
+ end
972
+
973
+ result
974
+ end
975
+
976
+ promise.execute
977
+ end
978
+
979
+ #
980
+ # Update a volume
981
+ #
982
+ # Patch the specified volume
983
+ #
984
+ # @param body [VolumePatch] Volume object supplied in the body of the
985
+ # operation.
986
+ # @param resource_group_name [String] The name of the resource group.
987
+ # @param account_name [String] The name of the NetApp account
988
+ # @param pool_name [String] The name of the capacity pool
989
+ # @param volume_name [String] The name of the volume
990
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
991
+ # will be added to the HTTP request.
992
+ #
993
+ # @return [Volume] operation results.
994
+ #
995
+ def begin_update(body, resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
996
+ response = begin_update_async(body, resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers).value!
997
+ response.body unless response.nil?
998
+ end
999
+
1000
+ #
1001
+ # Update a volume
1002
+ #
1003
+ # Patch the specified volume
1004
+ #
1005
+ # @param body [VolumePatch] Volume object supplied in the body of the
1006
+ # operation.
1007
+ # @param resource_group_name [String] The name of the resource group.
1008
+ # @param account_name [String] The name of the NetApp account
1009
+ # @param pool_name [String] The name of the capacity pool
1010
+ # @param volume_name [String] The name of the volume
1011
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1012
+ # will be added to the HTTP request.
1013
+ #
1014
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1015
+ #
1016
+ def begin_update_with_http_info(body, resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
1017
+ begin_update_async(body, resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers).value!
1018
+ end
1019
+
1020
+ #
1021
+ # Update a volume
1022
+ #
1023
+ # Patch the specified volume
1024
+ #
1025
+ # @param body [VolumePatch] Volume object supplied in the body of the
1026
+ # operation.
1027
+ # @param resource_group_name [String] The name of the resource group.
1028
+ # @param account_name [String] The name of the NetApp account
1029
+ # @param pool_name [String] The name of the capacity pool
1030
+ # @param volume_name [String] The name of the volume
1031
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1032
+ # to the HTTP request.
1033
+ #
1034
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1035
+ #
1036
+ def begin_update_async(body, resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
1037
+ fail ArgumentError, 'body is nil' if body.nil?
1038
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1039
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1040
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1041
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1042
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1043
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1044
+ fail ArgumentError, 'pool_name is nil' if pool_name.nil?
1045
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'MaxLength': '64'" if !pool_name.nil? && pool_name.length > 64
1046
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'MinLength': '1'" if !pool_name.nil? && pool_name.length < 1
1047
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'" if !pool_name.nil? && pool_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$$')).nil?
1048
+ fail ArgumentError, 'volume_name is nil' if volume_name.nil?
1049
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'MaxLength': '64'" if !volume_name.nil? && volume_name.length > 64
1050
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'MinLength': '1'" if !volume_name.nil? && volume_name.length < 1
1051
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$'" if !volume_name.nil? && volume_name.match(Regexp.new('^^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$$')).nil?
1052
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1053
+
1054
+
1055
+ request_headers = {}
1056
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1057
+
1058
+ # Set Headers
1059
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1060
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1061
+
1062
+ # Serialize Request
1063
+ request_mapper = Azure::NetApp::Mgmt::V2020_06_01::Models::VolumePatch.mapper()
1064
+ request_content = @client.serialize(request_mapper, body)
1065
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1066
+
1067
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}'
1068
+
1069
+ request_url = @base_url || @client.base_url
1070
+
1071
+ options = {
1072
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1073
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'poolName' => pool_name,'volumeName' => volume_name},
1074
+ query_params: {'api-version' => @client.api_version},
1075
+ body: request_content,
1076
+ headers: request_headers.merge(custom_headers || {}),
1077
+ base_url: request_url
1078
+ }
1079
+ promise = @client.make_request_async(:patch, path_template, options)
1080
+
1081
+ promise = promise.then do |result|
1082
+ http_response = result.response
1083
+ status_code = http_response.status
1084
+ response_content = http_response.body
1085
+ unless status_code == 200 || status_code == 202
1086
+ error_model = JSON.load(response_content)
1087
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1088
+ end
1089
+
1090
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1091
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1092
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1093
+ # Deserialize Response
1094
+ if status_code == 200
1095
+ begin
1096
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1097
+ result_mapper = Azure::NetApp::Mgmt::V2020_06_01::Models::Volume.mapper()
1098
+ result.body = @client.deserialize(result_mapper, parsed_response)
1099
+ rescue Exception => e
1100
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1101
+ end
1102
+ end
1103
+
1104
+ result
1105
+ end
1106
+
1107
+ promise.execute
1108
+ end
1109
+
1110
+ #
1111
+ # Delete a volume
1112
+ #
1113
+ # Delete the specified volume
1114
+ #
1115
+ # @param resource_group_name [String] The name of the resource group.
1116
+ # @param account_name [String] The name of the NetApp account
1117
+ # @param pool_name [String] The name of the capacity pool
1118
+ # @param volume_name [String] The name of the volume
1119
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1120
+ # will be added to the HTTP request.
1121
+ #
1122
+ #
1123
+ def begin_delete(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
1124
+ response = begin_delete_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers).value!
1125
+ nil
1126
+ end
1127
+
1128
+ #
1129
+ # Delete a volume
1130
+ #
1131
+ # Delete the specified volume
1132
+ #
1133
+ # @param resource_group_name [String] The name of the resource group.
1134
+ # @param account_name [String] The name of the NetApp account
1135
+ # @param pool_name [String] The name of the capacity pool
1136
+ # @param volume_name [String] The name of the volume
1137
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1138
+ # will be added to the HTTP request.
1139
+ #
1140
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1141
+ #
1142
+ def begin_delete_with_http_info(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
1143
+ begin_delete_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers).value!
1144
+ end
1145
+
1146
+ #
1147
+ # Delete a volume
1148
+ #
1149
+ # Delete the specified volume
1150
+ #
1151
+ # @param resource_group_name [String] The name of the resource group.
1152
+ # @param account_name [String] The name of the NetApp account
1153
+ # @param pool_name [String] The name of the capacity pool
1154
+ # @param volume_name [String] The name of the volume
1155
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1156
+ # to the HTTP request.
1157
+ #
1158
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1159
+ #
1160
+ def begin_delete_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
1161
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1162
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1163
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1164
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1165
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1166
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1167
+ fail ArgumentError, 'pool_name is nil' if pool_name.nil?
1168
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'MaxLength': '64'" if !pool_name.nil? && pool_name.length > 64
1169
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'MinLength': '1'" if !pool_name.nil? && pool_name.length < 1
1170
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'" if !pool_name.nil? && pool_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$$')).nil?
1171
+ fail ArgumentError, 'volume_name is nil' if volume_name.nil?
1172
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'MaxLength': '64'" if !volume_name.nil? && volume_name.length > 64
1173
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'MinLength': '1'" if !volume_name.nil? && volume_name.length < 1
1174
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$'" if !volume_name.nil? && volume_name.match(Regexp.new('^^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$$')).nil?
1175
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1176
+
1177
+
1178
+ request_headers = {}
1179
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1180
+
1181
+ # Set Headers
1182
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1183
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1184
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}'
1185
+
1186
+ request_url = @base_url || @client.base_url
1187
+
1188
+ options = {
1189
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1190
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'poolName' => pool_name,'volumeName' => volume_name},
1191
+ query_params: {'api-version' => @client.api_version},
1192
+ headers: request_headers.merge(custom_headers || {}),
1193
+ base_url: request_url
1194
+ }
1195
+ promise = @client.make_request_async(:delete, path_template, options)
1196
+
1197
+ promise = promise.then do |result|
1198
+ http_response = result.response
1199
+ status_code = http_response.status
1200
+ response_content = http_response.body
1201
+ unless status_code == 202 || status_code == 204
1202
+ error_model = JSON.load(response_content)
1203
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1204
+ end
1205
+
1206
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1207
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1208
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1209
+
1210
+ result
1211
+ end
1212
+
1213
+ promise.execute
1214
+ end
1215
+
1216
+ #
1217
+ # Revert a volume to one of its snapshots
1218
+ #
1219
+ # Revert a volume to the snapshot specified in the body
1220
+ #
1221
+ # @param resource_group_name [String] The name of the resource group.
1222
+ # @param account_name [String] The name of the NetApp account
1223
+ # @param pool_name [String] The name of the capacity pool
1224
+ # @param volume_name [String] The name of the volume
1225
+ # @param body [VolumeRevert] Object for snapshot to revert supplied in the body
1226
+ # of the operation.
1227
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1228
+ # will be added to the HTTP request.
1229
+ #
1230
+ #
1231
+ def begin_revert(resource_group_name, account_name, pool_name, volume_name, body, custom_headers:nil)
1232
+ response = begin_revert_async(resource_group_name, account_name, pool_name, volume_name, body, custom_headers:custom_headers).value!
1233
+ nil
1234
+ end
1235
+
1236
+ #
1237
+ # Revert a volume to one of its snapshots
1238
+ #
1239
+ # Revert a volume to the snapshot specified in the body
1240
+ #
1241
+ # @param resource_group_name [String] The name of the resource group.
1242
+ # @param account_name [String] The name of the NetApp account
1243
+ # @param pool_name [String] The name of the capacity pool
1244
+ # @param volume_name [String] The name of the volume
1245
+ # @param body [VolumeRevert] Object for snapshot to revert supplied in the body
1246
+ # of the operation.
1247
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1248
+ # will be added to the HTTP request.
1249
+ #
1250
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1251
+ #
1252
+ def begin_revert_with_http_info(resource_group_name, account_name, pool_name, volume_name, body, custom_headers:nil)
1253
+ begin_revert_async(resource_group_name, account_name, pool_name, volume_name, body, custom_headers:custom_headers).value!
1254
+ end
1255
+
1256
+ #
1257
+ # Revert a volume to one of its snapshots
1258
+ #
1259
+ # Revert a volume to the snapshot specified in the body
1260
+ #
1261
+ # @param resource_group_name [String] The name of the resource group.
1262
+ # @param account_name [String] The name of the NetApp account
1263
+ # @param pool_name [String] The name of the capacity pool
1264
+ # @param volume_name [String] The name of the volume
1265
+ # @param body [VolumeRevert] Object for snapshot to revert supplied in the body
1266
+ # of the operation.
1267
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1268
+ # to the HTTP request.
1269
+ #
1270
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1271
+ #
1272
+ def begin_revert_async(resource_group_name, account_name, pool_name, volume_name, body, custom_headers:nil)
1273
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1274
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1275
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1276
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1277
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1278
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1279
+ fail ArgumentError, 'pool_name is nil' if pool_name.nil?
1280
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'MaxLength': '64'" if !pool_name.nil? && pool_name.length > 64
1281
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'MinLength': '1'" if !pool_name.nil? && pool_name.length < 1
1282
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'" if !pool_name.nil? && pool_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$$')).nil?
1283
+ fail ArgumentError, 'volume_name is nil' if volume_name.nil?
1284
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'MaxLength': '64'" if !volume_name.nil? && volume_name.length > 64
1285
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'MinLength': '1'" if !volume_name.nil? && volume_name.length < 1
1286
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$'" if !volume_name.nil? && volume_name.match(Regexp.new('^^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$$')).nil?
1287
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1288
+ fail ArgumentError, 'body is nil' if body.nil?
1289
+
1290
+
1291
+ request_headers = {}
1292
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1293
+
1294
+ # Set Headers
1295
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1296
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1297
+
1298
+ # Serialize Request
1299
+ request_mapper = Azure::NetApp::Mgmt::V2020_06_01::Models::VolumeRevert.mapper()
1300
+ request_content = @client.serialize(request_mapper, body)
1301
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1302
+
1303
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/revert'
1304
+
1305
+ request_url = @base_url || @client.base_url
1306
+
1307
+ options = {
1308
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1309
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'poolName' => pool_name,'volumeName' => volume_name},
1310
+ query_params: {'api-version' => @client.api_version},
1311
+ body: request_content,
1312
+ headers: request_headers.merge(custom_headers || {}),
1313
+ base_url: request_url
1314
+ }
1315
+ promise = @client.make_request_async(:post, path_template, options)
1316
+
1317
+ promise = promise.then do |result|
1318
+ http_response = result.response
1319
+ status_code = http_response.status
1320
+ response_content = http_response.body
1321
+ unless status_code == 200 || status_code == 202
1322
+ error_model = JSON.load(response_content)
1323
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1324
+ end
1325
+
1326
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1327
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1328
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1329
+
1330
+ result
1331
+ end
1332
+
1333
+ promise.execute
1334
+ end
1335
+
1336
+ #
1337
+ # Break volume replication
1338
+ #
1339
+ # Break the replication connection on the destination volume
1340
+ #
1341
+ # @param resource_group_name [String] The name of the resource group.
1342
+ # @param account_name [String] The name of the NetApp account
1343
+ # @param pool_name [String] The name of the capacity pool
1344
+ # @param volume_name [String] The name of the volume
1345
+ # @param body [BreakReplicationRequest] Optional body to force break the
1346
+ # replication.
1347
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1348
+ # will be added to the HTTP request.
1349
+ #
1350
+ #
1351
+ def begin_break_replication(resource_group_name, account_name, pool_name, volume_name, body:nil, custom_headers:nil)
1352
+ response = begin_break_replication_async(resource_group_name, account_name, pool_name, volume_name, body:body, custom_headers:custom_headers).value!
1353
+ nil
1354
+ end
1355
+
1356
+ #
1357
+ # Break volume replication
1358
+ #
1359
+ # Break the replication connection on the destination volume
1360
+ #
1361
+ # @param resource_group_name [String] The name of the resource group.
1362
+ # @param account_name [String] The name of the NetApp account
1363
+ # @param pool_name [String] The name of the capacity pool
1364
+ # @param volume_name [String] The name of the volume
1365
+ # @param body [BreakReplicationRequest] Optional body to force break the
1366
+ # replication.
1367
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1368
+ # will be added to the HTTP request.
1369
+ #
1370
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1371
+ #
1372
+ def begin_break_replication_with_http_info(resource_group_name, account_name, pool_name, volume_name, body:nil, custom_headers:nil)
1373
+ begin_break_replication_async(resource_group_name, account_name, pool_name, volume_name, body:body, custom_headers:custom_headers).value!
1374
+ end
1375
+
1376
+ #
1377
+ # Break volume replication
1378
+ #
1379
+ # Break the replication connection on the destination volume
1380
+ #
1381
+ # @param resource_group_name [String] The name of the resource group.
1382
+ # @param account_name [String] The name of the NetApp account
1383
+ # @param pool_name [String] The name of the capacity pool
1384
+ # @param volume_name [String] The name of the volume
1385
+ # @param body [BreakReplicationRequest] Optional body to force break the
1386
+ # replication.
1387
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1388
+ # to the HTTP request.
1389
+ #
1390
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1391
+ #
1392
+ def begin_break_replication_async(resource_group_name, account_name, pool_name, volume_name, body:nil, custom_headers:nil)
1393
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1394
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1395
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1396
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1397
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1398
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1399
+ fail ArgumentError, 'pool_name is nil' if pool_name.nil?
1400
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'MaxLength': '64'" if !pool_name.nil? && pool_name.length > 64
1401
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'MinLength': '1'" if !pool_name.nil? && pool_name.length < 1
1402
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'" if !pool_name.nil? && pool_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$$')).nil?
1403
+ fail ArgumentError, 'volume_name is nil' if volume_name.nil?
1404
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'MaxLength': '64'" if !volume_name.nil? && volume_name.length > 64
1405
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'MinLength': '1'" if !volume_name.nil? && volume_name.length < 1
1406
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$'" if !volume_name.nil? && volume_name.match(Regexp.new('^^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$$')).nil?
1407
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1408
+
1409
+
1410
+ request_headers = {}
1411
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1412
+
1413
+ # Set Headers
1414
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1415
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1416
+
1417
+ # Serialize Request
1418
+ request_mapper = Azure::NetApp::Mgmt::V2020_06_01::Models::BreakReplicationRequest.mapper()
1419
+ request_content = @client.serialize(request_mapper, body)
1420
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1421
+
1422
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/breakReplication'
1423
+
1424
+ request_url = @base_url || @client.base_url
1425
+
1426
+ options = {
1427
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1428
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'poolName' => pool_name,'volumeName' => volume_name},
1429
+ query_params: {'api-version' => @client.api_version},
1430
+ body: request_content,
1431
+ headers: request_headers.merge(custom_headers || {}),
1432
+ base_url: request_url
1433
+ }
1434
+ promise = @client.make_request_async(:post, path_template, options)
1435
+
1436
+ promise = promise.then do |result|
1437
+ http_response = result.response
1438
+ status_code = http_response.status
1439
+ response_content = http_response.body
1440
+ unless status_code == 200 || status_code == 202
1441
+ error_model = JSON.load(response_content)
1442
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1443
+ end
1444
+
1445
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1446
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1447
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1448
+
1449
+ result
1450
+ end
1451
+
1452
+ promise.execute
1453
+ end
1454
+
1455
+ #
1456
+ # Resync volume replication
1457
+ #
1458
+ # Resync the connection on the destination volume. If the operation is ran on
1459
+ # the source volume it will reverse-resync the connection and sync from source
1460
+ # to destination.
1461
+ #
1462
+ # @param resource_group_name [String] The name of the resource group.
1463
+ # @param account_name [String] The name of the NetApp account
1464
+ # @param pool_name [String] The name of the capacity pool
1465
+ # @param volume_name [String] The name of the volume
1466
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1467
+ # will be added to the HTTP request.
1468
+ #
1469
+ #
1470
+ def begin_resync_replication(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
1471
+ response = begin_resync_replication_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers).value!
1472
+ nil
1473
+ end
1474
+
1475
+ #
1476
+ # Resync volume replication
1477
+ #
1478
+ # Resync the connection on the destination volume. If the operation is ran on
1479
+ # the source volume it will reverse-resync the connection and sync from source
1480
+ # to destination.
1481
+ #
1482
+ # @param resource_group_name [String] The name of the resource group.
1483
+ # @param account_name [String] The name of the NetApp account
1484
+ # @param pool_name [String] The name of the capacity pool
1485
+ # @param volume_name [String] The name of the volume
1486
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1487
+ # will be added to the HTTP request.
1488
+ #
1489
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1490
+ #
1491
+ def begin_resync_replication_with_http_info(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
1492
+ begin_resync_replication_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers).value!
1493
+ end
1494
+
1495
+ #
1496
+ # Resync volume replication
1497
+ #
1498
+ # Resync the connection on the destination volume. If the operation is ran on
1499
+ # the source volume it will reverse-resync the connection and sync from source
1500
+ # to destination.
1501
+ #
1502
+ # @param resource_group_name [String] The name of the resource group.
1503
+ # @param account_name [String] The name of the NetApp account
1504
+ # @param pool_name [String] The name of the capacity pool
1505
+ # @param volume_name [String] The name of the volume
1506
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1507
+ # to the HTTP request.
1508
+ #
1509
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1510
+ #
1511
+ def begin_resync_replication_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
1512
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1513
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1514
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1515
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1516
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1517
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1518
+ fail ArgumentError, 'pool_name is nil' if pool_name.nil?
1519
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'MaxLength': '64'" if !pool_name.nil? && pool_name.length > 64
1520
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'MinLength': '1'" if !pool_name.nil? && pool_name.length < 1
1521
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'" if !pool_name.nil? && pool_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$$')).nil?
1522
+ fail ArgumentError, 'volume_name is nil' if volume_name.nil?
1523
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'MaxLength': '64'" if !volume_name.nil? && volume_name.length > 64
1524
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'MinLength': '1'" if !volume_name.nil? && volume_name.length < 1
1525
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$'" if !volume_name.nil? && volume_name.match(Regexp.new('^^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$$')).nil?
1526
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1527
+
1528
+
1529
+ request_headers = {}
1530
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1531
+
1532
+ # Set Headers
1533
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1534
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1535
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/resyncReplication'
1536
+
1537
+ request_url = @base_url || @client.base_url
1538
+
1539
+ options = {
1540
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1541
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'poolName' => pool_name,'volumeName' => volume_name},
1542
+ query_params: {'api-version' => @client.api_version},
1543
+ headers: request_headers.merge(custom_headers || {}),
1544
+ base_url: request_url
1545
+ }
1546
+ promise = @client.make_request_async(:post, path_template, options)
1547
+
1548
+ promise = promise.then do |result|
1549
+ http_response = result.response
1550
+ status_code = http_response.status
1551
+ response_content = http_response.body
1552
+ unless status_code == 200 || status_code == 202
1553
+ error_model = JSON.load(response_content)
1554
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1555
+ end
1556
+
1557
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1558
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1559
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1560
+
1561
+ result
1562
+ end
1563
+
1564
+ promise.execute
1565
+ end
1566
+
1567
+ #
1568
+ # Delete volume replication
1569
+ #
1570
+ # Delete the replication connection on the destination volume, and send release
1571
+ # to the source replication
1572
+ #
1573
+ # @param resource_group_name [String] The name of the resource group.
1574
+ # @param account_name [String] The name of the NetApp account
1575
+ # @param pool_name [String] The name of the capacity pool
1576
+ # @param volume_name [String] The name of the volume
1577
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1578
+ # will be added to the HTTP request.
1579
+ #
1580
+ #
1581
+ def begin_delete_replication(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
1582
+ response = begin_delete_replication_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers).value!
1583
+ nil
1584
+ end
1585
+
1586
+ #
1587
+ # Delete volume replication
1588
+ #
1589
+ # Delete the replication connection on the destination volume, and send release
1590
+ # to the source replication
1591
+ #
1592
+ # @param resource_group_name [String] The name of the resource group.
1593
+ # @param account_name [String] The name of the NetApp account
1594
+ # @param pool_name [String] The name of the capacity pool
1595
+ # @param volume_name [String] The name of the volume
1596
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1597
+ # will be added to the HTTP request.
1598
+ #
1599
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1600
+ #
1601
+ def begin_delete_replication_with_http_info(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
1602
+ begin_delete_replication_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers).value!
1603
+ end
1604
+
1605
+ #
1606
+ # Delete volume replication
1607
+ #
1608
+ # Delete the replication connection on the destination volume, and send release
1609
+ # to the source replication
1610
+ #
1611
+ # @param resource_group_name [String] The name of the resource group.
1612
+ # @param account_name [String] The name of the NetApp account
1613
+ # @param pool_name [String] The name of the capacity pool
1614
+ # @param volume_name [String] The name of the volume
1615
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1616
+ # to the HTTP request.
1617
+ #
1618
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1619
+ #
1620
+ def begin_delete_replication_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
1621
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1622
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1623
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1624
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1625
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1626
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1627
+ fail ArgumentError, 'pool_name is nil' if pool_name.nil?
1628
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'MaxLength': '64'" if !pool_name.nil? && pool_name.length > 64
1629
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'MinLength': '1'" if !pool_name.nil? && pool_name.length < 1
1630
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'" if !pool_name.nil? && pool_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$$')).nil?
1631
+ fail ArgumentError, 'volume_name is nil' if volume_name.nil?
1632
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'MaxLength': '64'" if !volume_name.nil? && volume_name.length > 64
1633
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'MinLength': '1'" if !volume_name.nil? && volume_name.length < 1
1634
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$'" if !volume_name.nil? && volume_name.match(Regexp.new('^^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$$')).nil?
1635
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1636
+
1637
+
1638
+ request_headers = {}
1639
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1640
+
1641
+ # Set Headers
1642
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1643
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1644
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/deleteReplication'
1645
+
1646
+ request_url = @base_url || @client.base_url
1647
+
1648
+ options = {
1649
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1650
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'poolName' => pool_name,'volumeName' => volume_name},
1651
+ query_params: {'api-version' => @client.api_version},
1652
+ headers: request_headers.merge(custom_headers || {}),
1653
+ base_url: request_url
1654
+ }
1655
+ promise = @client.make_request_async(:post, path_template, options)
1656
+
1657
+ promise = promise.then do |result|
1658
+ http_response = result.response
1659
+ status_code = http_response.status
1660
+ response_content = http_response.body
1661
+ unless status_code == 200 || status_code == 202
1662
+ error_model = JSON.load(response_content)
1663
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1664
+ end
1665
+
1666
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1667
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1668
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1669
+
1670
+ result
1671
+ end
1672
+
1673
+ promise.execute
1674
+ end
1675
+
1676
+ #
1677
+ # Authorize source volume replication
1678
+ #
1679
+ # Authorize the replication connection on the source volume
1680
+ #
1681
+ # @param resource_group_name [String] The name of the resource group.
1682
+ # @param account_name [String] The name of the NetApp account
1683
+ # @param pool_name [String] The name of the capacity pool
1684
+ # @param volume_name [String] The name of the volume
1685
+ # @param body [AuthorizeRequest] Authorize request object supplied in the body
1686
+ # of the operation.
1687
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1688
+ # will be added to the HTTP request.
1689
+ #
1690
+ #
1691
+ def begin_authorize_replication(resource_group_name, account_name, pool_name, volume_name, body, custom_headers:nil)
1692
+ response = begin_authorize_replication_async(resource_group_name, account_name, pool_name, volume_name, body, custom_headers:custom_headers).value!
1693
+ nil
1694
+ end
1695
+
1696
+ #
1697
+ # Authorize source volume replication
1698
+ #
1699
+ # Authorize the replication connection on the source volume
1700
+ #
1701
+ # @param resource_group_name [String] The name of the resource group.
1702
+ # @param account_name [String] The name of the NetApp account
1703
+ # @param pool_name [String] The name of the capacity pool
1704
+ # @param volume_name [String] The name of the volume
1705
+ # @param body [AuthorizeRequest] Authorize request object supplied in the body
1706
+ # of the operation.
1707
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1708
+ # will be added to the HTTP request.
1709
+ #
1710
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1711
+ #
1712
+ def begin_authorize_replication_with_http_info(resource_group_name, account_name, pool_name, volume_name, body, custom_headers:nil)
1713
+ begin_authorize_replication_async(resource_group_name, account_name, pool_name, volume_name, body, custom_headers:custom_headers).value!
1714
+ end
1715
+
1716
+ #
1717
+ # Authorize source volume replication
1718
+ #
1719
+ # Authorize the replication connection on the source volume
1720
+ #
1721
+ # @param resource_group_name [String] The name of the resource group.
1722
+ # @param account_name [String] The name of the NetApp account
1723
+ # @param pool_name [String] The name of the capacity pool
1724
+ # @param volume_name [String] The name of the volume
1725
+ # @param body [AuthorizeRequest] Authorize request object supplied in the body
1726
+ # of the operation.
1727
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1728
+ # to the HTTP request.
1729
+ #
1730
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1731
+ #
1732
+ def begin_authorize_replication_async(resource_group_name, account_name, pool_name, volume_name, body, custom_headers:nil)
1733
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1734
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1735
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1736
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1737
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1738
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1739
+ fail ArgumentError, 'pool_name is nil' if pool_name.nil?
1740
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'MaxLength': '64'" if !pool_name.nil? && pool_name.length > 64
1741
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'MinLength': '1'" if !pool_name.nil? && pool_name.length < 1
1742
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'" if !pool_name.nil? && pool_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$$')).nil?
1743
+ fail ArgumentError, 'volume_name is nil' if volume_name.nil?
1744
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'MaxLength': '64'" if !volume_name.nil? && volume_name.length > 64
1745
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'MinLength': '1'" if !volume_name.nil? && volume_name.length < 1
1746
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$'" if !volume_name.nil? && volume_name.match(Regexp.new('^^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$$')).nil?
1747
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1748
+ fail ArgumentError, 'body is nil' if body.nil?
1749
+
1750
+
1751
+ request_headers = {}
1752
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1753
+
1754
+ # Set Headers
1755
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1756
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1757
+
1758
+ # Serialize Request
1759
+ request_mapper = Azure::NetApp::Mgmt::V2020_06_01::Models::AuthorizeRequest.mapper()
1760
+ request_content = @client.serialize(request_mapper, body)
1761
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1762
+
1763
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/authorizeReplication'
1764
+
1765
+ request_url = @base_url || @client.base_url
1766
+
1767
+ options = {
1768
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1769
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'poolName' => pool_name,'volumeName' => volume_name},
1770
+ query_params: {'api-version' => @client.api_version},
1771
+ body: request_content,
1772
+ headers: request_headers.merge(custom_headers || {}),
1773
+ base_url: request_url
1774
+ }
1775
+ promise = @client.make_request_async(:post, path_template, options)
1776
+
1777
+ promise = promise.then do |result|
1778
+ http_response = result.response
1779
+ status_code = http_response.status
1780
+ response_content = http_response.body
1781
+ unless status_code == 200 || status_code == 202
1782
+ error_model = JSON.load(response_content)
1783
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1784
+ end
1785
+
1786
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1787
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1788
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1789
+
1790
+ result
1791
+ end
1792
+
1793
+ promise.execute
1794
+ end
1795
+
1796
+ #
1797
+ # ReInitialize volume replication
1798
+ #
1799
+ # Re-Initializes the replication connection on the destination volume
1800
+ #
1801
+ # @param resource_group_name [String] The name of the resource group.
1802
+ # @param account_name [String] The name of the NetApp account
1803
+ # @param pool_name [String] The name of the capacity pool
1804
+ # @param volume_name [String] The name of the volume
1805
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1806
+ # will be added to the HTTP request.
1807
+ #
1808
+ #
1809
+ def begin_re_initialize_replication(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
1810
+ response = begin_re_initialize_replication_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers).value!
1811
+ nil
1812
+ end
1813
+
1814
+ #
1815
+ # ReInitialize volume replication
1816
+ #
1817
+ # Re-Initializes the replication connection on the destination volume
1818
+ #
1819
+ # @param resource_group_name [String] The name of the resource group.
1820
+ # @param account_name [String] The name of the NetApp account
1821
+ # @param pool_name [String] The name of the capacity pool
1822
+ # @param volume_name [String] The name of the volume
1823
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1824
+ # will be added to the HTTP request.
1825
+ #
1826
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1827
+ #
1828
+ def begin_re_initialize_replication_with_http_info(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
1829
+ begin_re_initialize_replication_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:custom_headers).value!
1830
+ end
1831
+
1832
+ #
1833
+ # ReInitialize volume replication
1834
+ #
1835
+ # Re-Initializes the replication connection on the destination volume
1836
+ #
1837
+ # @param resource_group_name [String] The name of the resource group.
1838
+ # @param account_name [String] The name of the NetApp account
1839
+ # @param pool_name [String] The name of the capacity pool
1840
+ # @param volume_name [String] The name of the volume
1841
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1842
+ # to the HTTP request.
1843
+ #
1844
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1845
+ #
1846
+ def begin_re_initialize_replication_async(resource_group_name, account_name, pool_name, volume_name, custom_headers:nil)
1847
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1848
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1849
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1850
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1851
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1852
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1853
+ fail ArgumentError, 'pool_name is nil' if pool_name.nil?
1854
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'MaxLength': '64'" if !pool_name.nil? && pool_name.length > 64
1855
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'MinLength': '1'" if !pool_name.nil? && pool_name.length < 1
1856
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'" if !pool_name.nil? && pool_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$$')).nil?
1857
+ fail ArgumentError, 'volume_name is nil' if volume_name.nil?
1858
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'MaxLength': '64'" if !volume_name.nil? && volume_name.length > 64
1859
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'MinLength': '1'" if !volume_name.nil? && volume_name.length < 1
1860
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$'" if !volume_name.nil? && volume_name.match(Regexp.new('^^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$$')).nil?
1861
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1862
+
1863
+
1864
+ request_headers = {}
1865
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1866
+
1867
+ # Set Headers
1868
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1869
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1870
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/reinitializeReplication'
1871
+
1872
+ request_url = @base_url || @client.base_url
1873
+
1874
+ options = {
1875
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1876
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'poolName' => pool_name,'volumeName' => volume_name},
1877
+ query_params: {'api-version' => @client.api_version},
1878
+ headers: request_headers.merge(custom_headers || {}),
1879
+ base_url: request_url
1880
+ }
1881
+ promise = @client.make_request_async(:post, path_template, options)
1882
+
1883
+ promise = promise.then do |result|
1884
+ http_response = result.response
1885
+ status_code = http_response.status
1886
+ response_content = http_response.body
1887
+ unless status_code == 200 || status_code == 202
1888
+ error_model = JSON.load(response_content)
1889
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1890
+ end
1891
+
1892
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1893
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1894
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1895
+
1896
+ result
1897
+ end
1898
+
1899
+ promise.execute
1900
+ end
1901
+
1902
+ #
1903
+ # Change pool for volume
1904
+ #
1905
+ # Moves volume to another pool
1906
+ #
1907
+ # @param resource_group_name [String] The name of the resource group.
1908
+ # @param account_name [String] The name of the NetApp account
1909
+ # @param pool_name [String] The name of the capacity pool
1910
+ # @param volume_name [String] The name of the volume
1911
+ # @param body [PoolChangeRequest] Move volume to the pool supplied in the body
1912
+ # of the operation.
1913
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1914
+ # will be added to the HTTP request.
1915
+ #
1916
+ #
1917
+ def begin_pool_change(resource_group_name, account_name, pool_name, volume_name, body, custom_headers:nil)
1918
+ response = begin_pool_change_async(resource_group_name, account_name, pool_name, volume_name, body, custom_headers:custom_headers).value!
1919
+ nil
1920
+ end
1921
+
1922
+ #
1923
+ # Change pool for volume
1924
+ #
1925
+ # Moves volume to another pool
1926
+ #
1927
+ # @param resource_group_name [String] The name of the resource group.
1928
+ # @param account_name [String] The name of the NetApp account
1929
+ # @param pool_name [String] The name of the capacity pool
1930
+ # @param volume_name [String] The name of the volume
1931
+ # @param body [PoolChangeRequest] Move volume to the pool supplied in the body
1932
+ # of the operation.
1933
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1934
+ # will be added to the HTTP request.
1935
+ #
1936
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1937
+ #
1938
+ def begin_pool_change_with_http_info(resource_group_name, account_name, pool_name, volume_name, body, custom_headers:nil)
1939
+ begin_pool_change_async(resource_group_name, account_name, pool_name, volume_name, body, custom_headers:custom_headers).value!
1940
+ end
1941
+
1942
+ #
1943
+ # Change pool for volume
1944
+ #
1945
+ # Moves volume to another pool
1946
+ #
1947
+ # @param resource_group_name [String] The name of the resource group.
1948
+ # @param account_name [String] The name of the NetApp account
1949
+ # @param pool_name [String] The name of the capacity pool
1950
+ # @param volume_name [String] The name of the volume
1951
+ # @param body [PoolChangeRequest] Move volume to the pool supplied in the body
1952
+ # of the operation.
1953
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1954
+ # to the HTTP request.
1955
+ #
1956
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1957
+ #
1958
+ def begin_pool_change_async(resource_group_name, account_name, pool_name, volume_name, body, custom_headers:nil)
1959
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1960
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1961
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1962
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1963
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1964
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1965
+ fail ArgumentError, 'pool_name is nil' if pool_name.nil?
1966
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'MaxLength': '64'" if !pool_name.nil? && pool_name.length > 64
1967
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'MinLength': '1'" if !pool_name.nil? && pool_name.length < 1
1968
+ fail ArgumentError, "'pool_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$'" if !pool_name.nil? && pool_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,63}$$')).nil?
1969
+ fail ArgumentError, 'volume_name is nil' if volume_name.nil?
1970
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'MaxLength': '64'" if !volume_name.nil? && volume_name.length > 64
1971
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'MinLength': '1'" if !volume_name.nil? && volume_name.length < 1
1972
+ fail ArgumentError, "'volume_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$'" if !volume_name.nil? && volume_name.match(Regexp.new('^^[a-zA-Z][a-zA-Z0-9\-_]{0,63}$$')).nil?
1973
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1974
+ fail ArgumentError, 'body is nil' if body.nil?
1975
+
1976
+
1977
+ request_headers = {}
1978
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1979
+
1980
+ # Set Headers
1981
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1982
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1983
+
1984
+ # Serialize Request
1985
+ request_mapper = Azure::NetApp::Mgmt::V2020_06_01::Models::PoolChangeRequest.mapper()
1986
+ request_content = @client.serialize(request_mapper, body)
1987
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1988
+
1989
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/poolChange'
1990
+
1991
+ request_url = @base_url || @client.base_url
1992
+
1993
+ options = {
1994
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1995
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'poolName' => pool_name,'volumeName' => volume_name},
1996
+ query_params: {'api-version' => @client.api_version},
1997
+ body: request_content,
1998
+ headers: request_headers.merge(custom_headers || {}),
1999
+ base_url: request_url
2000
+ }
2001
+ promise = @client.make_request_async(:post, path_template, options)
2002
+
2003
+ promise = promise.then do |result|
2004
+ http_response = result.response
2005
+ status_code = http_response.status
2006
+ response_content = http_response.body
2007
+ unless status_code == 200 || status_code == 202
2008
+ error_model = JSON.load(response_content)
2009
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2010
+ end
2011
+
2012
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2013
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2014
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2015
+
2016
+ result
2017
+ end
2018
+
2019
+ promise.execute
2020
+ end
2021
+
2022
+ end
2023
+ end