azure_mgmt_recovery_services_backup 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (198) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generated/azure_mgmt_recovery_services_backup.rb +158 -111
  3. data/lib/generated/azure_mgmt_recovery_services_backup/backup_engines.rb +163 -64
  4. data/lib/generated/azure_mgmt_recovery_services_backup/backup_jobs.rb +240 -0
  5. data/lib/generated/azure_mgmt_recovery_services_backup/backup_operation_results.rb +38 -35
  6. data/lib/generated/azure_mgmt_recovery_services_backup/backup_operation_statuses.rb +28 -25
  7. data/lib/generated/azure_mgmt_recovery_services_backup/backup_policies.rb +244 -0
  8. data/lib/generated/azure_mgmt_recovery_services_backup/{protectable_items.rb → backup_protectable_items.rb} +48 -76
  9. data/lib/generated/azure_mgmt_recovery_services_backup/backup_protected_items.rb +248 -0
  10. data/lib/generated/azure_mgmt_recovery_services_backup/backup_protection_containers.rb +237 -0
  11. data/lib/generated/azure_mgmt_recovery_services_backup/backup_resource_storage_configs.rb +206 -0
  12. data/lib/generated/azure_mgmt_recovery_services_backup/backup_resource_vault_configs.rb +230 -0
  13. data/lib/generated/azure_mgmt_recovery_services_backup/backup_usage_summaries.rb +129 -0
  14. data/lib/generated/azure_mgmt_recovery_services_backup/backups.rb +46 -46
  15. data/lib/generated/azure_mgmt_recovery_services_backup/export_jobs_operation_results.rb +31 -22
  16. data/lib/generated/azure_mgmt_recovery_services_backup/item_level_recovery_connections.rb +108 -111
  17. data/lib/generated/azure_mgmt_recovery_services_backup/job_cancellations.rb +23 -20
  18. data/lib/generated/azure_mgmt_recovery_services_backup/job_details.rb +25 -22
  19. data/lib/generated/azure_mgmt_recovery_services_backup/job_operation_results.rb +32 -23
  20. data/lib/generated/azure_mgmt_recovery_services_backup/jobs.rb +26 -277
  21. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_backup_server_container.rb +177 -0
  22. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_backup_server_engine.rb +51 -4
  23. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_sclassic_compute_vmcontainer.rb +9 -5
  24. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_sclassic_compute_vmprotectable_item.rb +9 -4
  25. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_sclassic_compute_vmprotected_item.rb +47 -8
  26. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_scompute_vmcontainer.rb +9 -5
  27. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_scompute_vmprotectable_item.rb +9 -4
  28. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_scompute_vmprotected_item.rb +47 -9
  29. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmerror_info.rb +10 -4
  30. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmhealth_details.rb +86 -0
  31. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmjob.rb +15 -11
  32. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmjob_extended_info.rb +8 -3
  33. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmjob_task_details.rb +9 -4
  34. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmprotected_item.rb +67 -19
  35. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmprotected_item_extended_info.rb +10 -6
  36. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmprotection_policy.rb +22 -6
  37. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_sql_container.rb +8 -4
  38. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_sql_protected_item.rb +20 -11
  39. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_sql_protected_item_extended_info.rb +11 -6
  40. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_sql_protection_policy.rb +8 -3
  41. data/lib/generated/azure_mgmt_recovery_services_backup/models/backup_engine_base.rb +80 -14
  42. data/lib/generated/azure_mgmt_recovery_services_backup/models/backup_engine_base_resource.rb +11 -3
  43. data/lib/generated/azure_mgmt_recovery_services_backup/models/backup_engine_base_resource_list.rb +6 -1
  44. data/lib/generated/azure_mgmt_recovery_services_backup/models/backup_engine_extended_info.rb +119 -0
  45. data/lib/generated/azure_mgmt_recovery_services_backup/models/backup_item_type.rb +9 -2
  46. data/lib/generated/azure_mgmt_recovery_services_backup/models/backup_management_type.rb +5 -1
  47. data/lib/generated/azure_mgmt_recovery_services_backup/models/backup_management_usage.rb +102 -0
  48. data/lib/generated/azure_mgmt_recovery_services_backup/models/backup_management_usage_list.rb +58 -0
  49. data/lib/generated/azure_mgmt_recovery_services_backup/models/backup_request.rb +8 -3
  50. data/lib/generated/azure_mgmt_recovery_services_backup/models/backup_request_resource.rb +11 -3
  51. data/lib/generated/azure_mgmt_recovery_services_backup/models/backup_resource_config.rb +62 -0
  52. data/lib/generated/azure_mgmt_recovery_services_backup/models/backup_resource_config_resource.rb +102 -0
  53. data/lib/generated/azure_mgmt_recovery_services_backup/models/backup_resource_vault_config.rb +73 -0
  54. data/lib/generated/azure_mgmt_recovery_services_backup/models/backup_resource_vault_config_resource.rb +103 -0
  55. data/lib/generated/azure_mgmt_recovery_services_backup/models/bekdetails.rb +9 -5
  56. data/lib/generated/azure_mgmt_recovery_services_backup/models/bmsbackup_engine_query_object.rb +12 -10
  57. data/lib/generated/azure_mgmt_recovery_services_backup/models/bmsbackup_engines_query_object.rb +71 -0
  58. data/lib/generated/azure_mgmt_recovery_services_backup/models/bmsbackup_summaries_query_object.rb +51 -0
  59. data/lib/generated/azure_mgmt_recovery_services_backup/models/bmscontainer_query_object.rb +35 -8
  60. data/lib/generated/azure_mgmt_recovery_services_backup/models/bmspoquery_object.rb +13 -9
  61. data/lib/generated/azure_mgmt_recovery_services_backup/models/bmsrpquery_object.rb +9 -4
  62. data/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_display.rb +79 -0
  63. data/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_for_log_specification.rb +69 -0
  64. data/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_for_properties.rb +50 -0
  65. data/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_for_service_specification.rb +59 -0
  66. data/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_response.rb +99 -0
  67. data/lib/generated/azure_mgmt_recovery_services_backup/models/client_discovery_value_for_single_api.rb +83 -0
  68. data/lib/generated/azure_mgmt_recovery_services_backup/models/client_script_for_connect.rb +35 -7
  69. data/lib/generated/azure_mgmt_recovery_services_backup/models/container_type.rb +29 -0
  70. data/lib/generated/azure_mgmt_recovery_services_backup/models/daily_retention_format.rb +6 -1
  71. data/lib/generated/azure_mgmt_recovery_services_backup/models/daily_retention_schedule.rb +8 -3
  72. data/lib/generated/azure_mgmt_recovery_services_backup/models/data_source_type.rb +9 -2
  73. data/lib/generated/azure_mgmt_recovery_services_backup/models/day.rb +8 -3
  74. data/lib/generated/azure_mgmt_recovery_services_backup/models/day_of_week.rb +5 -1
  75. data/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_backup_engine.rb +51 -5
  76. data/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_container.rb +177 -0
  77. data/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_error_info.rb +8 -3
  78. data/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_job.rb +15 -11
  79. data/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_job_extended_info.rb +7 -2
  80. data/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_job_task_details.rb +7 -2
  81. data/lib/generated/azure_mgmt_recovery_services_backup/models/dpmcontainer_extended_info.rb +49 -0
  82. data/lib/generated/azure_mgmt_recovery_services_backup/models/dpmprotected_item.rb +150 -0
  83. data/lib/generated/azure_mgmt_recovery_services_backup/models/dpmprotected_item_extended_info.rb +187 -0
  84. data/lib/generated/azure_mgmt_recovery_services_backup/models/encryption_details.rb +11 -8
  85. data/lib/generated/azure_mgmt_recovery_services_backup/models/enhanced_security_state.rb +21 -0
  86. data/lib/generated/azure_mgmt_recovery_services_backup/models/export_jobs_operation_result_info.rb +9 -5
  87. data/lib/generated/azure_mgmt_recovery_services_backup/models/generic_recovery_point.rb +7 -2
  88. data/lib/generated/azure_mgmt_recovery_services_backup/models/get_protected_item_query_object.rb +7 -2
  89. data/lib/generated/azure_mgmt_recovery_services_backup/models/health_state.rb +22 -0
  90. data/lib/generated/azure_mgmt_recovery_services_backup/models/health_status.rb +22 -0
  91. data/lib/generated/azure_mgmt_recovery_services_backup/models/http_status_code.rb +5 -1
  92. data/lib/generated/azure_mgmt_recovery_services_backup/models/iaa_svmcontainer.rb +12 -9
  93. data/lib/generated/azure_mgmt_recovery_services_backup/models/iaa_svmprotectable_item.rb +9 -7
  94. data/lib/generated/azure_mgmt_recovery_services_backup/models/iaas_vmbackup_request.rb +9 -5
  95. data/lib/generated/azure_mgmt_recovery_services_backup/models/iaas_vmilrregistration_request.rb +14 -10
  96. data/lib/generated/azure_mgmt_recovery_services_backup/models/iaas_vmrecovery_point.rb +50 -7
  97. data/lib/generated/azure_mgmt_recovery_services_backup/models/iaas_vmrestore_request.rb +39 -37
  98. data/lib/generated/azure_mgmt_recovery_services_backup/models/ilrrequest.rb +7 -2
  99. data/lib/generated/azure_mgmt_recovery_services_backup/models/ilrrequest_resource.rb +11 -3
  100. data/lib/generated/azure_mgmt_recovery_services_backup/models/instant_item_recovery_target.rb +7 -2
  101. data/lib/generated/azure_mgmt_recovery_services_backup/models/job.rb +12 -8
  102. data/lib/generated/azure_mgmt_recovery_services_backup/models/job_operation_type.rb +7 -1
  103. data/lib/generated/azure_mgmt_recovery_services_backup/models/job_query_object.rb +16 -14
  104. data/lib/generated/azure_mgmt_recovery_services_backup/models/job_resource.rb +11 -3
  105. data/lib/generated/azure_mgmt_recovery_services_backup/models/job_resource_list.rb +7 -2
  106. data/lib/generated/azure_mgmt_recovery_services_backup/models/job_status.rb +5 -1
  107. data/lib/generated/azure_mgmt_recovery_services_backup/models/job_supported_action.rb +5 -1
  108. data/lib/generated/azure_mgmt_recovery_services_backup/models/kekdetails.rb +10 -8
  109. data/lib/generated/azure_mgmt_recovery_services_backup/models/key_and_secret_details.rb +14 -11
  110. data/lib/generated/azure_mgmt_recovery_services_backup/models/long_term_retention_policy.rb +12 -7
  111. data/lib/generated/azure_mgmt_recovery_services_backup/models/long_term_schedule_policy.rb +7 -2
  112. data/lib/generated/azure_mgmt_recovery_services_backup/models/mab_container.rb +14 -10
  113. data/lib/generated/azure_mgmt_recovery_services_backup/models/mab_container_extended_info.rb +15 -10
  114. data/lib/generated/azure_mgmt_recovery_services_backup/models/mab_error_info.rb +7 -2
  115. data/lib/generated/azure_mgmt_recovery_services_backup/models/mab_file_folder_protected_item.rb +34 -14
  116. data/lib/generated/azure_mgmt_recovery_services_backup/models/mab_file_folder_protected_item_extended_info.rb +10 -6
  117. data/lib/generated/azure_mgmt_recovery_services_backup/models/mab_job.rb +20 -18
  118. data/lib/generated/azure_mgmt_recovery_services_backup/models/mab_job_extended_info.rb +8 -3
  119. data/lib/generated/azure_mgmt_recovery_services_backup/models/mab_job_task_details.rb +7 -2
  120. data/lib/generated/azure_mgmt_recovery_services_backup/models/mab_protection_policy.rb +9 -5
  121. data/lib/generated/azure_mgmt_recovery_services_backup/models/mab_server_type.rb +8 -4
  122. data/lib/generated/azure_mgmt_recovery_services_backup/models/month_of_year.rb +5 -1
  123. data/lib/generated/azure_mgmt_recovery_services_backup/models/monthly_retention_schedule.rb +12 -8
  124. data/lib/generated/azure_mgmt_recovery_services_backup/models/name_info.rb +59 -0
  125. data/lib/generated/azure_mgmt_recovery_services_backup/models/operation_result_info.rb +7 -2
  126. data/lib/generated/azure_mgmt_recovery_services_backup/models/operation_result_info_base.rb +8 -3
  127. data/lib/generated/azure_mgmt_recovery_services_backup/models/operation_result_info_base_resource.rb +12 -6
  128. data/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status.rb +9 -7
  129. data/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_error.rb +9 -4
  130. data/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_extended_info.rb +8 -3
  131. data/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_job_extended_info.rb +8 -3
  132. data/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_jobs_extended_info.rb +8 -3
  133. data/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_provision_ilrextended_info.rb +9 -5
  134. data/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_values.rb +5 -1
  135. data/lib/generated/azure_mgmt_recovery_services_backup/models/operation_worker_response.rb +20 -15
  136. data/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item.rb +34 -19
  137. data/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item_query_object.rb +49 -14
  138. data/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item_resource.rb +11 -3
  139. data/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item_resource_list.rb +8 -3
  140. data/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item_state.rb +5 -1
  141. data/lib/generated/azure_mgmt_recovery_services_backup/models/protection_container.rb +25 -17
  142. data/lib/generated/azure_mgmt_recovery_services_backup/models/protection_container_resource.rb +11 -3
  143. data/lib/generated/azure_mgmt_recovery_services_backup/models/protection_container_resource_list.rb +11 -6
  144. data/lib/generated/azure_mgmt_recovery_services_backup/models/protection_policy.rb +9 -4
  145. data/lib/generated/azure_mgmt_recovery_services_backup/models/protection_policy_query_object.rb +11 -7
  146. data/lib/generated/azure_mgmt_recovery_services_backup/models/protection_policy_resource.rb +11 -3
  147. data/lib/generated/azure_mgmt_recovery_services_backup/models/protection_policy_resource_list.rb +11 -6
  148. data/lib/generated/azure_mgmt_recovery_services_backup/models/protection_state.rb +5 -1
  149. data/lib/generated/azure_mgmt_recovery_services_backup/models/protection_status.rb +5 -1
  150. data/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point.rb +9 -4
  151. data/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point_resource.rb +12 -4
  152. data/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point_resource_list.rb +11 -6
  153. data/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point_tier_information.rb +63 -0
  154. data/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point_tier_status.rb +22 -0
  155. data/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point_tier_type.rb +21 -0
  156. data/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_type.rb +5 -1
  157. data/lib/generated/azure_mgmt_recovery_services_backup/models/resource.rb +10 -2
  158. data/lib/generated/azure_mgmt_recovery_services_backup/models/resource_list.rb +8 -3
  159. data/lib/generated/azure_mgmt_recovery_services_backup/models/restore_request.rb +8 -3
  160. data/lib/generated/azure_mgmt_recovery_services_backup/models/restore_request_resource.rb +12 -4
  161. data/lib/generated/azure_mgmt_recovery_services_backup/models/retention_duration.rb +14 -10
  162. data/lib/generated/azure_mgmt_recovery_services_backup/models/retention_duration_type.rb +5 -1
  163. data/lib/generated/azure_mgmt_recovery_services_backup/models/retention_policy.rb +8 -3
  164. data/lib/generated/azure_mgmt_recovery_services_backup/models/retention_schedule_format.rb +5 -1
  165. data/lib/generated/azure_mgmt_recovery_services_backup/models/schedule_policy.rb +7 -2
  166. data/lib/generated/azure_mgmt_recovery_services_backup/models/schedule_run_type.rb +5 -1
  167. data/lib/generated/azure_mgmt_recovery_services_backup/models/simple_retention_policy.rb +6 -1
  168. data/lib/generated/azure_mgmt_recovery_services_backup/models/simple_schedule_policy.rb +14 -11
  169. data/lib/generated/azure_mgmt_recovery_services_backup/models/storage_type.rb +21 -0
  170. data/lib/generated/azure_mgmt_recovery_services_backup/models/storage_type_state.rb +21 -0
  171. data/lib/generated/azure_mgmt_recovery_services_backup/models/token_information.rb +69 -0
  172. data/lib/generated/azure_mgmt_recovery_services_backup/models/type.rb +21 -0
  173. data/lib/generated/azure_mgmt_recovery_services_backup/models/usages_unit.rb +24 -0
  174. data/lib/generated/azure_mgmt_recovery_services_backup/models/week_of_month.rb +5 -1
  175. data/lib/generated/azure_mgmt_recovery_services_backup/models/weekly_retention_format.rb +7 -2
  176. data/lib/generated/azure_mgmt_recovery_services_backup/models/weekly_retention_schedule.rb +10 -5
  177. data/lib/generated/azure_mgmt_recovery_services_backup/models/workload_protectable_item.rb +15 -11
  178. data/lib/generated/azure_mgmt_recovery_services_backup/models/workload_protectable_item_resource.rb +13 -4
  179. data/lib/generated/azure_mgmt_recovery_services_backup/models/workload_protectable_item_resource_list.rb +7 -2
  180. data/lib/generated/azure_mgmt_recovery_services_backup/models/workload_type.rb +9 -2
  181. data/lib/generated/azure_mgmt_recovery_services_backup/models/yearly_retention_schedule.rb +15 -13
  182. data/lib/generated/azure_mgmt_recovery_services_backup/module_definition.rb +5 -1
  183. data/lib/generated/azure_mgmt_recovery_services_backup/operations.rb +217 -0
  184. data/lib/generated/azure_mgmt_recovery_services_backup/protected_item_operation_results.rb +40 -34
  185. data/lib/generated/azure_mgmt_recovery_services_backup/protected_item_operation_statuses.rb +43 -37
  186. data/lib/generated/azure_mgmt_recovery_services_backup/protected_items.rb +112 -350
  187. data/lib/generated/azure_mgmt_recovery_services_backup/protection_container_operation_results.rb +37 -31
  188. data/lib/generated/azure_mgmt_recovery_services_backup/protection_container_refresh_operation_results.rb +26 -20
  189. data/lib/generated/azure_mgmt_recovery_services_backup/protection_containers.rb +57 -365
  190. data/lib/generated/azure_mgmt_recovery_services_backup/protection_policies.rb +87 -313
  191. data/lib/generated/azure_mgmt_recovery_services_backup/protection_policy_operation_results.rb +31 -25
  192. data/lib/generated/azure_mgmt_recovery_services_backup/protection_policy_operation_statuses.rb +43 -37
  193. data/lib/generated/azure_mgmt_recovery_services_backup/recovery_points.rb +110 -114
  194. data/lib/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb +95 -55
  195. data/lib/generated/azure_mgmt_recovery_services_backup/restores.rb +46 -46
  196. data/lib/generated/azure_mgmt_recovery_services_backup/security_pins.rb +123 -0
  197. data/lib/generated/azure_mgmt_recovery_services_backup/version.rb +6 -2
  198. metadata +48 -5
@@ -0,0 +1,248 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for
4
+ # license information.
5
+ #
6
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
7
+ # Changes may cause incorrect behavior and will be lost if the code is
8
+ # regenerated.
9
+
10
+ module Azure::ARM::RecoveryServicesBackup
11
+ #
12
+ # Open API 2.0 Specs for Azure RecoveryServices Backup service
13
+ #
14
+ class BackupProtectedItems
15
+ include MsRestAzure
16
+
17
+ #
18
+ # Creates and initializes a new instance of the BackupProtectedItems class.
19
+ # @param client service class for accessing basic functionality.
20
+ #
21
+ def initialize(client)
22
+ @client = client
23
+ end
24
+
25
+ # @return [RecoveryServicesBackupClient] reference to the RecoveryServicesBackupClient
26
+ attr_reader :client
27
+
28
+ #
29
+ # Provides a pageable list of all items that can be backed up within a
30
+ # subscription.
31
+ #
32
+ # @param vault_name [String] The name of the recovery services vault.
33
+ # @param resource_group_name [String] The name of the resource group where the
34
+ # recovery services vault is present.
35
+ # @param filter [String] OData filter options.
36
+ # @param skip_token [String] skipToken Filter.
37
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
38
+ # will be added to the HTTP request.
39
+ #
40
+ # @return [Array<ProtectedItemResource>] operation results.
41
+ #
42
+ def list(vault_name, resource_group_name, filter = nil, skip_token = nil, custom_headers = nil)
43
+ first_page = list_as_lazy(vault_name, resource_group_name, filter, skip_token, custom_headers)
44
+ first_page.get_all_items
45
+ end
46
+
47
+ #
48
+ # Provides a pageable list of all items that can be backed up within a
49
+ # subscription.
50
+ #
51
+ # @param vault_name [String] The name of the recovery services vault.
52
+ # @param resource_group_name [String] The name of the resource group where the
53
+ # recovery services vault is present.
54
+ # @param filter [String] OData filter options.
55
+ # @param skip_token [String] skipToken Filter.
56
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
57
+ # will be added to the HTTP request.
58
+ #
59
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
60
+ #
61
+ def list_with_http_info(vault_name, resource_group_name, filter = nil, skip_token = nil, custom_headers = nil)
62
+ list_async(vault_name, resource_group_name, filter, skip_token, custom_headers).value!
63
+ end
64
+
65
+ #
66
+ # Provides a pageable list of all items that can be backed up within a
67
+ # subscription.
68
+ #
69
+ # @param vault_name [String] The name of the recovery services vault.
70
+ # @param resource_group_name [String] The name of the resource group where the
71
+ # recovery services vault is present.
72
+ # @param filter [String] OData filter options.
73
+ # @param skip_token [String] skipToken Filter.
74
+ # @param [Hash{String => String}] A hash of custom headers that will be added
75
+ # to the HTTP request.
76
+ #
77
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
78
+ #
79
+ def list_async(vault_name, resource_group_name, filter = nil, skip_token = nil, custom_headers = nil)
80
+ api_version = '2016-12-01'
81
+ fail ArgumentError, 'vault_name is nil' if vault_name.nil?
82
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
83
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
84
+
85
+
86
+ request_headers = {}
87
+
88
+ # Set Headers
89
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
90
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
91
+ path_template = 'Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectedItems'
92
+
93
+ request_url = @base_url || @client.base_url
94
+
95
+ options = {
96
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
97
+ path_params: {'vaultName' => vault_name,'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
98
+ query_params: {'api-version' => api_version,'$filter' => filter,'$skipToken' => skip_token},
99
+ headers: request_headers.merge(custom_headers || {}),
100
+ base_url: request_url
101
+ }
102
+ promise = @client.make_request_async(:get, path_template, options)
103
+
104
+ promise = promise.then do |result|
105
+ http_response = result.response
106
+ status_code = http_response.status
107
+ response_content = http_response.body
108
+ unless status_code == 200
109
+ error_model = JSON.load(response_content)
110
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
111
+ end
112
+
113
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
114
+ # Deserialize Response
115
+ if status_code == 200
116
+ begin
117
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
118
+ result_mapper = Azure::ARM::RecoveryServicesBackup::Models::ProtectedItemResourceList.mapper()
119
+ result.body = @client.deserialize(result_mapper, parsed_response)
120
+ rescue Exception => e
121
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
122
+ end
123
+ end
124
+
125
+ result
126
+ end
127
+
128
+ promise.execute
129
+ end
130
+
131
+ #
132
+ # Provides a pageable list of all items that can be backed up within a
133
+ # subscription.
134
+ #
135
+ # @param next_page_link [String] The NextLink from the previous successful call
136
+ # to List operation.
137
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
138
+ # will be added to the HTTP request.
139
+ #
140
+ # @return [ProtectedItemResourceList] operation results.
141
+ #
142
+ def list_next(next_page_link, custom_headers = nil)
143
+ response = list_next_async(next_page_link, custom_headers).value!
144
+ response.body unless response.nil?
145
+ end
146
+
147
+ #
148
+ # Provides a pageable list of all items that can be backed up within a
149
+ # subscription.
150
+ #
151
+ # @param next_page_link [String] The NextLink from the previous successful call
152
+ # to List operation.
153
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
154
+ # will be added to the HTTP request.
155
+ #
156
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
157
+ #
158
+ def list_next_with_http_info(next_page_link, custom_headers = nil)
159
+ list_next_async(next_page_link, custom_headers).value!
160
+ end
161
+
162
+ #
163
+ # Provides a pageable list of all items that can be backed up within a
164
+ # subscription.
165
+ #
166
+ # @param next_page_link [String] The NextLink from the previous successful call
167
+ # to List operation.
168
+ # @param [Hash{String => String}] A hash of custom headers that will be added
169
+ # to the HTTP request.
170
+ #
171
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
172
+ #
173
+ def list_next_async(next_page_link, custom_headers = nil)
174
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
175
+
176
+
177
+ request_headers = {}
178
+
179
+ # Set Headers
180
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
181
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
182
+ path_template = '{nextLink}'
183
+
184
+ request_url = @base_url || @client.base_url
185
+
186
+ options = {
187
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
188
+ skip_encoding_path_params: {'nextLink' => next_page_link},
189
+ headers: request_headers.merge(custom_headers || {}),
190
+ base_url: request_url
191
+ }
192
+ promise = @client.make_request_async(:get, path_template, options)
193
+
194
+ promise = promise.then do |result|
195
+ http_response = result.response
196
+ status_code = http_response.status
197
+ response_content = http_response.body
198
+ unless status_code == 200
199
+ error_model = JSON.load(response_content)
200
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
201
+ end
202
+
203
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
204
+ # Deserialize Response
205
+ if status_code == 200
206
+ begin
207
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
208
+ result_mapper = Azure::ARM::RecoveryServicesBackup::Models::ProtectedItemResourceList.mapper()
209
+ result.body = @client.deserialize(result_mapper, parsed_response)
210
+ rescue Exception => e
211
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
212
+ end
213
+ end
214
+
215
+ result
216
+ end
217
+
218
+ promise.execute
219
+ end
220
+
221
+ #
222
+ # Provides a pageable list of all items that can be backed up within a
223
+ # subscription.
224
+ #
225
+ # @param vault_name [String] The name of the recovery services vault.
226
+ # @param resource_group_name [String] The name of the resource group where the
227
+ # recovery services vault is present.
228
+ # @param filter [String] OData filter options.
229
+ # @param skip_token [String] skipToken Filter.
230
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
231
+ # will be added to the HTTP request.
232
+ #
233
+ # @return [ProtectedItemResourceList] which provide lazy access to pages of the
234
+ # response.
235
+ #
236
+ def list_as_lazy(vault_name, resource_group_name, filter = nil, skip_token = nil, custom_headers = nil)
237
+ response = list_async(vault_name, resource_group_name, filter, skip_token, custom_headers).value!
238
+ unless response.nil?
239
+ page = response.body
240
+ page.next_method = Proc.new do |next_page_link|
241
+ list_next_async(next_page_link, custom_headers)
242
+ end
243
+ page
244
+ end
245
+ end
246
+
247
+ end
248
+ end
@@ -0,0 +1,237 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for
4
+ # license information.
5
+ #
6
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
7
+ # Changes may cause incorrect behavior and will be lost if the code is
8
+ # regenerated.
9
+
10
+ module Azure::ARM::RecoveryServicesBackup
11
+ #
12
+ # Open API 2.0 Specs for Azure RecoveryServices Backup service
13
+ #
14
+ class BackupProtectionContainers
15
+ include MsRestAzure
16
+
17
+ #
18
+ # Creates and initializes a new instance of the BackupProtectionContainers class.
19
+ # @param client service class for accessing basic functionality.
20
+ #
21
+ def initialize(client)
22
+ @client = client
23
+ end
24
+
25
+ # @return [RecoveryServicesBackupClient] reference to the RecoveryServicesBackupClient
26
+ attr_reader :client
27
+
28
+ #
29
+ # Lists the containers registered to Recovery Services Vault.
30
+ #
31
+ # @param vault_name [String] The name of the recovery services vault.
32
+ # @param resource_group_name [String] The name of the resource group where the
33
+ # recovery services vault is present.
34
+ # @param filter [String] OData filter options.
35
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
36
+ # will be added to the HTTP request.
37
+ #
38
+ # @return [Array<ProtectionContainerResource>] operation results.
39
+ #
40
+ def list(vault_name, resource_group_name, filter = nil, custom_headers = nil)
41
+ first_page = list_as_lazy(vault_name, resource_group_name, filter, custom_headers)
42
+ first_page.get_all_items
43
+ end
44
+
45
+ #
46
+ # Lists the containers registered to Recovery Services Vault.
47
+ #
48
+ # @param vault_name [String] The name of the recovery services vault.
49
+ # @param resource_group_name [String] The name of the resource group where the
50
+ # recovery services vault is present.
51
+ # @param filter [String] OData filter options.
52
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
53
+ # will be added to the HTTP request.
54
+ #
55
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
56
+ #
57
+ def list_with_http_info(vault_name, resource_group_name, filter = nil, custom_headers = nil)
58
+ list_async(vault_name, resource_group_name, filter, custom_headers).value!
59
+ end
60
+
61
+ #
62
+ # Lists the containers registered to Recovery Services Vault.
63
+ #
64
+ # @param vault_name [String] The name of the recovery services vault.
65
+ # @param resource_group_name [String] The name of the resource group where the
66
+ # recovery services vault is present.
67
+ # @param filter [String] OData filter options.
68
+ # @param [Hash{String => String}] A hash of custom headers that will be added
69
+ # to the HTTP request.
70
+ #
71
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
72
+ #
73
+ def list_async(vault_name, resource_group_name, filter = nil, custom_headers = nil)
74
+ api_version = '2016-12-01'
75
+ fail ArgumentError, 'vault_name is nil' if vault_name.nil?
76
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
77
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
78
+
79
+
80
+ request_headers = {}
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.RecoveryServices/vaults/{vaultName}/backupProtectionContainers'
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: {'vaultName' => vault_name,'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
92
+ query_params: {'api-version' => api_version,'$filter' => filter},
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
+ # Deserialize Response
109
+ if status_code == 200
110
+ begin
111
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
112
+ result_mapper = Azure::ARM::RecoveryServicesBackup::Models::ProtectionContainerResourceList.mapper()
113
+ result.body = @client.deserialize(result_mapper, parsed_response)
114
+ rescue Exception => e
115
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
116
+ end
117
+ end
118
+
119
+ result
120
+ end
121
+
122
+ promise.execute
123
+ end
124
+
125
+ #
126
+ # Lists the containers registered to Recovery Services Vault.
127
+ #
128
+ # @param next_page_link [String] The NextLink from the previous successful call
129
+ # to List operation.
130
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
131
+ # will be added to the HTTP request.
132
+ #
133
+ # @return [ProtectionContainerResourceList] operation results.
134
+ #
135
+ def list_next(next_page_link, custom_headers = nil)
136
+ response = list_next_async(next_page_link, custom_headers).value!
137
+ response.body unless response.nil?
138
+ end
139
+
140
+ #
141
+ # Lists the containers registered to Recovery Services Vault.
142
+ #
143
+ # @param next_page_link [String] The NextLink from the previous successful call
144
+ # to List operation.
145
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
146
+ # will be added to the HTTP request.
147
+ #
148
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
149
+ #
150
+ def list_next_with_http_info(next_page_link, custom_headers = nil)
151
+ list_next_async(next_page_link, custom_headers).value!
152
+ end
153
+
154
+ #
155
+ # Lists the containers registered to Recovery Services Vault.
156
+ #
157
+ # @param next_page_link [String] The NextLink from the previous successful call
158
+ # to List operation.
159
+ # @param [Hash{String => String}] A hash of custom headers that will be added
160
+ # to the HTTP request.
161
+ #
162
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
163
+ #
164
+ def list_next_async(next_page_link, custom_headers = nil)
165
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
166
+
167
+
168
+ request_headers = {}
169
+
170
+ # Set Headers
171
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
172
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
173
+ path_template = '{nextLink}'
174
+
175
+ request_url = @base_url || @client.base_url
176
+
177
+ options = {
178
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
179
+ skip_encoding_path_params: {'nextLink' => next_page_link},
180
+ headers: request_headers.merge(custom_headers || {}),
181
+ base_url: request_url
182
+ }
183
+ promise = @client.make_request_async(:get, path_template, options)
184
+
185
+ promise = promise.then do |result|
186
+ http_response = result.response
187
+ status_code = http_response.status
188
+ response_content = http_response.body
189
+ unless status_code == 200
190
+ error_model = JSON.load(response_content)
191
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
192
+ end
193
+
194
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
195
+ # Deserialize Response
196
+ if status_code == 200
197
+ begin
198
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
199
+ result_mapper = Azure::ARM::RecoveryServicesBackup::Models::ProtectionContainerResourceList.mapper()
200
+ result.body = @client.deserialize(result_mapper, parsed_response)
201
+ rescue Exception => e
202
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
203
+ end
204
+ end
205
+
206
+ result
207
+ end
208
+
209
+ promise.execute
210
+ end
211
+
212
+ #
213
+ # Lists the containers registered to Recovery Services Vault.
214
+ #
215
+ # @param vault_name [String] The name of the recovery services vault.
216
+ # @param resource_group_name [String] The name of the resource group where the
217
+ # recovery services vault is present.
218
+ # @param filter [String] OData filter options.
219
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
220
+ # will be added to the HTTP request.
221
+ #
222
+ # @return [ProtectionContainerResourceList] which provide lazy access to pages
223
+ # of the response.
224
+ #
225
+ def list_as_lazy(vault_name, resource_group_name, filter = nil, custom_headers = nil)
226
+ response = list_async(vault_name, resource_group_name, filter, custom_headers).value!
227
+ unless response.nil?
228
+ page = response.body
229
+ page.next_method = Proc.new do |next_page_link|
230
+ list_next_async(next_page_link, custom_headers)
231
+ end
232
+ page
233
+ end
234
+ end
235
+
236
+ end
237
+ end