azure_mgmt_storage 0.21.2 → 0.22.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (194) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-05-01-preview/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  3. data/lib/2015-06-15/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  4. data/lib/2016-01-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  5. data/lib/2016-12-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  6. data/lib/2017-06-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  7. data/lib/2017-10-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  8. data/lib/2018-02-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  9. data/lib/2018-03-01-preview/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  10. data/lib/2018-07-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  11. data/lib/2018-11-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  12. data/lib/2019-04-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  13. data/lib/2019-06-01/generated/azure_mgmt_storage/storage_management_client.rb +1 -1
  14. data/lib/2020-08-01-preview/generated/azure_mgmt_storage.rb +201 -0
  15. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/blob_containers.rb +2046 -0
  16. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/blob_services.rb +383 -0
  17. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/deleted_accounts.rb +321 -0
  18. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/encryption_scopes.rb +691 -0
  19. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/file_services.rb +377 -0
  20. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/file_shares.rb +940 -0
  21. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/management_policies.rb +361 -0
  22. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/access_tier.rb +16 -0
  23. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/account_sas_parameters.rb +136 -0
  24. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/account_status.rb +16 -0
  25. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/action.rb +15 -0
  26. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/active_directory_properties.rb +103 -0
  27. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/azure_entity_resource.rb +75 -0
  28. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/azure_files_identity_based_authentication.rb +59 -0
  29. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/blob_container.rb +290 -0
  30. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/blob_restore_parameters.rb +66 -0
  31. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/blob_restore_progress_status.rb +17 -0
  32. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/blob_restore_range.rb +59 -0
  33. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/blob_restore_status.rb +88 -0
  34. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/blob_service_items.rb +57 -0
  35. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/blob_service_properties.rb +178 -0
  36. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/bypass.rb +18 -0
  37. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/change_feed.rb +47 -0
  38. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/check_name_availability_result.rb +77 -0
  39. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/cors_rule.rb +128 -0
  40. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/cors_rules.rb +57 -0
  41. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/custom_domain.rb +60 -0
  42. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/date_after_creation.rb +50 -0
  43. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/date_after_modification.rb +51 -0
  44. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/default_action.rb +16 -0
  45. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/delete_retention_policy.rb +63 -0
  46. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/deleted_account.rb +123 -0
  47. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/deleted_account_list_result.rb +103 -0
  48. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/deleted_share.rb +59 -0
  49. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/dimension.rb +57 -0
  50. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/directory_service_options.rb +17 -0
  51. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/enabled_protocols.rb +16 -0
  52. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/encryption.rb +87 -0
  53. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/encryption_scope.rb +129 -0
  54. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/encryption_scope_key_vault_properties.rb +51 -0
  55. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/encryption_scope_list_result.rb +103 -0
  56. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/encryption_scope_source.rb +16 -0
  57. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/encryption_scope_state.rb +16 -0
  58. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/encryption_service.rb +76 -0
  59. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/encryption_services.rb +87 -0
  60. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/endpoints.rb +134 -0
  61. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/error_response.rb +48 -0
  62. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/error_response_body.rb +59 -0
  63. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/file_service_items.rb +57 -0
  64. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/file_service_properties.rb +103 -0
  65. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/file_share.rb +251 -0
  66. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/file_share_item.rb +250 -0
  67. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/file_share_items.rb +103 -0
  68. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/geo_replication_stats.rb +85 -0
  69. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/geo_replication_status.rb +17 -0
  70. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/get_share_expand.rb +15 -0
  71. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/http_protocol.rb +16 -0
  72. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/identity.rb +72 -0
  73. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/immutability_policy.rb +114 -0
  74. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/immutability_policy_properties.rb +111 -0
  75. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/immutability_policy_state.rb +16 -0
  76. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/immutability_policy_update_type.rb +17 -0
  77. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/iprule.rb +61 -0
  78. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/key_permission.rb +16 -0
  79. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/key_source.rb +16 -0
  80. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/key_type.rb +16 -0
  81. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/key_vault_properties.rb +93 -0
  82. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/kind.rb +19 -0
  83. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/large_file_shares_state.rb +16 -0
  84. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/lease_container_request.rb +97 -0
  85. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/lease_container_response.rb +60 -0
  86. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/lease_duration.rb +16 -0
  87. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/lease_state.rb +19 -0
  88. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/lease_status.rb +16 -0
  89. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/legal_hold.rb +71 -0
  90. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/legal_hold_properties.rb +72 -0
  91. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/list_account_sas_response.rb +47 -0
  92. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/list_container_item.rb +289 -0
  93. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/list_container_items.rb +103 -0
  94. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/list_containers_include.rb +15 -0
  95. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/list_key_expand.rb +15 -0
  96. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/list_queue.rb +83 -0
  97. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/list_queue_resource.rb +101 -0
  98. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/list_queue_services.rb +58 -0
  99. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/list_service_sas_response.rb +47 -0
  100. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/list_shares_expand.rb +15 -0
  101. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/list_table_resource.rb +101 -0
  102. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/list_table_services.rb +58 -0
  103. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/management_policy.rb +89 -0
  104. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/management_policy_action.rb +62 -0
  105. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/management_policy_base_blob.rb +73 -0
  106. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/management_policy_definition.rb +60 -0
  107. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/management_policy_filter.rb +97 -0
  108. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/management_policy_rule.rb +87 -0
  109. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/management_policy_schema.rb +58 -0
  110. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/management_policy_snap_shot.rb +47 -0
  111. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/metric_specification.rb +145 -0
  112. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/minimum_tls_version.rb +17 -0
  113. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/network_rule_set.rb +106 -0
  114. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/object_replication_policies.rb +56 -0
  115. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/object_replication_policy.rb +131 -0
  116. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/object_replication_policy_filter.rb +70 -0
  117. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/object_replication_policy_rule.rb +82 -0
  118. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/operation.rb +83 -0
  119. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/operation_display.rb +79 -0
  120. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/operation_list_result.rb +57 -0
  121. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/permissions.rb +22 -0
  122. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/private_endpoint.rb +47 -0
  123. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/private_endpoint_connection.rb +101 -0
  124. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/private_endpoint_connection_list_result.rb +57 -0
  125. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/private_endpoint_connection_provisioning_state.rb +18 -0
  126. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/private_endpoint_service_connection_status.rb +17 -0
  127. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/private_link_resource.rb +115 -0
  128. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/private_link_resource_list_result.rb +55 -0
  129. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/private_link_service_connection_state.rb +72 -0
  130. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/provisioning_state.rb +17 -0
  131. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/proxy_resource.rb +63 -0
  132. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/public_access.rb +17 -0
  133. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/queue_service_properties.rb +77 -0
  134. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/reason.rb +16 -0
  135. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/reason_code.rb +16 -0
  136. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/resource.rb +83 -0
  137. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/restore_policy_properties.rb +87 -0
  138. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/restriction.rb +85 -0
  139. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/root_squash_type.rb +17 -0
  140. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/routing_choice.rb +16 -0
  141. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/routing_preference.rb +74 -0
  142. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/service_sas_parameters.rb +247 -0
  143. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/service_specification.rb +56 -0
  144. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/services.rb +18 -0
  145. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/share_access_tier.rb +18 -0
  146. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/signed_resource.rb +18 -0
  147. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/signed_resource_types.rb +17 -0
  148. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/sku.rb +60 -0
  149. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/sku_information.rb +153 -0
  150. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/sku_name.rb +22 -0
  151. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/sku_tier.rb +16 -0
  152. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/skucapability.rb +63 -0
  153. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/state.rb +19 -0
  154. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/storage_account.rb +462 -0
  155. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +63 -0
  156. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/storage_account_create_parameters.rb +254 -0
  157. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/storage_account_expand.rb +16 -0
  158. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/storage_account_internet_endpoints.rb +84 -0
  159. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/storage_account_key.rb +73 -0
  160. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/storage_account_list_keys_result.rb +57 -0
  161. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/storage_account_list_result.rb +103 -0
  162. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/storage_account_microsoft_endpoints.rb +108 -0
  163. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb +47 -0
  164. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/storage_account_update_parameters.rb +231 -0
  165. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/storage_queue.rb +97 -0
  166. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/storage_sku_list_result.rb +57 -0
  167. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/table.rb +74 -0
  168. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/table_service_properties.rb +77 -0
  169. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/tag_filter.rb +80 -0
  170. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/tag_property.rb +97 -0
  171. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/tracked_resource.rb +92 -0
  172. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/update_history_property.rb +114 -0
  173. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/usage.rb +89 -0
  174. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/usage_list_result.rb +56 -0
  175. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/usage_name.rb +59 -0
  176. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/usage_unit.rb +20 -0
  177. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/models/virtual_network_rule.rb +75 -0
  178. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/module_definition.rb +9 -0
  179. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/object_replication_policies_operations.rb +495 -0
  180. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/operations.rb +110 -0
  181. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/private_endpoint_connections.rb +501 -0
  182. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/private_link_resources.rb +138 -0
  183. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/queue.rb +805 -0
  184. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/queue_services.rb +386 -0
  185. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/skus.rb +116 -0
  186. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/storage_accounts.rb +1943 -0
  187. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/storage_management_client.rb +200 -0
  188. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/table_operations.rb +743 -0
  189. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/table_services.rb +386 -0
  190. data/lib/2020-08-01-preview/generated/azure_mgmt_storage/usages.rb +120 -0
  191. data/lib/azure_mgmt_storage.rb +10 -9
  192. data/lib/profiles/latest/modules/storage_profile_module.rb +391 -377
  193. data/lib/version.rb +1 -1
  194. metadata +180 -3
@@ -0,0 +1,383 @@
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::Storage::Mgmt::V2020_08_01_preview
7
+ #
8
+ # The Azure Storage Management API.
9
+ #
10
+ class BlobServices
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the BlobServices class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [StorageManagementClient] reference to the StorageManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # List blob services of storage account. It returns a collection of one object
26
+ # named default.
27
+ #
28
+ # @param resource_group_name [String] The name of the resource group within the
29
+ # user's subscription. The name is case insensitive.
30
+ # @param account_name [String] The name of the storage account within the
31
+ # specified resource group. Storage account names must be between 3 and 24
32
+ # characters in length and use numbers and lower-case letters only.
33
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
34
+ # will be added to the HTTP request.
35
+ #
36
+ # @return [BlobServiceItems] operation results.
37
+ #
38
+ def list(resource_group_name, account_name, custom_headers:nil)
39
+ response = list_async(resource_group_name, account_name, custom_headers:custom_headers).value!
40
+ response.body unless response.nil?
41
+ end
42
+
43
+ #
44
+ # List blob services of storage account. It returns a collection of one object
45
+ # named default.
46
+ #
47
+ # @param resource_group_name [String] The name of the resource group within the
48
+ # user's subscription. The name is case insensitive.
49
+ # @param account_name [String] The name of the storage account within the
50
+ # specified resource group. Storage account names must be between 3 and 24
51
+ # characters in length and use numbers and lower-case letters only.
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(resource_group_name, account_name, custom_headers:nil)
58
+ list_async(resource_group_name, account_name, custom_headers:custom_headers).value!
59
+ end
60
+
61
+ #
62
+ # List blob services of storage account. It returns a collection of one object
63
+ # named default.
64
+ #
65
+ # @param resource_group_name [String] The name of the resource group within the
66
+ # user's subscription. The name is case insensitive.
67
+ # @param account_name [String] The name of the storage account within the
68
+ # specified resource group. Storage account names must be between 3 and 24
69
+ # characters in length and use numbers and lower-case letters only.
70
+ # @param [Hash{String => String}] A hash of custom headers that will be added
71
+ # to the HTTP request.
72
+ #
73
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
74
+ #
75
+ def list_async(resource_group_name, account_name, custom_headers:nil)
76
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
77
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
78
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
79
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
80
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
81
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
82
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
83
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
84
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
85
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
86
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
87
+
88
+
89
+ request_headers = {}
90
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
91
+
92
+ # Set Headers
93
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
94
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
95
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices'
96
+
97
+ request_url = @base_url || @client.base_url
98
+
99
+ options = {
100
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
101
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
102
+ query_params: {'api-version' => @client.api_version},
103
+ headers: request_headers.merge(custom_headers || {}),
104
+ base_url: request_url
105
+ }
106
+ promise = @client.make_request_async(:get, path_template, options)
107
+
108
+ promise = promise.then do |result|
109
+ http_response = result.response
110
+ status_code = http_response.status
111
+ response_content = http_response.body
112
+ unless status_code == 200
113
+ error_model = JSON.load(response_content)
114
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
115
+ end
116
+
117
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
118
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
119
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
120
+ # Deserialize Response
121
+ if status_code == 200
122
+ begin
123
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
124
+ result_mapper = Azure::Storage::Mgmt::V2020_08_01_preview::Models::BlobServiceItems.mapper()
125
+ result.body = @client.deserialize(result_mapper, parsed_response)
126
+ rescue Exception => e
127
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
128
+ end
129
+ end
130
+
131
+ result
132
+ end
133
+
134
+ promise.execute
135
+ end
136
+
137
+ #
138
+ # Sets the properties of a storage account’s Blob service, including properties
139
+ # for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
140
+ #
141
+ # @param resource_group_name [String] The name of the resource group within the
142
+ # user's subscription. The name is case insensitive.
143
+ # @param account_name [String] The name of the storage account within the
144
+ # specified resource group. Storage account names must be between 3 and 24
145
+ # characters in length and use numbers and lower-case letters only.
146
+ # @param parameters [BlobServiceProperties] The properties of a storage
147
+ # account’s Blob service, including properties for Storage Analytics and CORS
148
+ # (Cross-Origin Resource Sharing) rules.
149
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
150
+ # will be added to the HTTP request.
151
+ #
152
+ # @return [BlobServiceProperties] operation results.
153
+ #
154
+ def set_service_properties(resource_group_name, account_name, parameters, custom_headers:nil)
155
+ response = set_service_properties_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value!
156
+ response.body unless response.nil?
157
+ end
158
+
159
+ #
160
+ # Sets the properties of a storage account’s Blob service, including properties
161
+ # for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
162
+ #
163
+ # @param resource_group_name [String] The name of the resource group within the
164
+ # user's subscription. The name is case insensitive.
165
+ # @param account_name [String] The name of the storage account within the
166
+ # specified resource group. Storage account names must be between 3 and 24
167
+ # characters in length and use numbers and lower-case letters only.
168
+ # @param parameters [BlobServiceProperties] The properties of a storage
169
+ # account’s Blob service, including properties for Storage Analytics and CORS
170
+ # (Cross-Origin Resource Sharing) rules.
171
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
172
+ # will be added to the HTTP request.
173
+ #
174
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
175
+ #
176
+ def set_service_properties_with_http_info(resource_group_name, account_name, parameters, custom_headers:nil)
177
+ set_service_properties_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value!
178
+ end
179
+
180
+ #
181
+ # Sets the properties of a storage account’s Blob service, including properties
182
+ # for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
183
+ #
184
+ # @param resource_group_name [String] The name of the resource group within the
185
+ # user's subscription. The name is case insensitive.
186
+ # @param account_name [String] The name of the storage account within the
187
+ # specified resource group. Storage account names must be between 3 and 24
188
+ # characters in length and use numbers and lower-case letters only.
189
+ # @param parameters [BlobServiceProperties] The properties of a storage
190
+ # account’s Blob service, including properties for Storage Analytics and CORS
191
+ # (Cross-Origin Resource Sharing) rules.
192
+ # @param [Hash{String => String}] A hash of custom headers that will be added
193
+ # to the HTTP request.
194
+ #
195
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
196
+ #
197
+ def set_service_properties_async(resource_group_name, account_name, parameters, custom_headers:nil)
198
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
199
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
200
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
201
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
202
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
203
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
204
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
205
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
206
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
207
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
208
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
209
+ blob_services_name = 'default'
210
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
211
+
212
+
213
+ request_headers = {}
214
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
215
+
216
+ # Set Headers
217
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
218
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
219
+
220
+ # Serialize Request
221
+ request_mapper = Azure::Storage::Mgmt::V2020_08_01_preview::Models::BlobServiceProperties.mapper()
222
+ request_content = @client.serialize(request_mapper, parameters)
223
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
224
+
225
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/{BlobServicesName}'
226
+
227
+ request_url = @base_url || @client.base_url
228
+
229
+ options = {
230
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
231
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id,'BlobServicesName' => blob_services_name},
232
+ query_params: {'api-version' => @client.api_version},
233
+ body: request_content,
234
+ headers: request_headers.merge(custom_headers || {}),
235
+ base_url: request_url
236
+ }
237
+ promise = @client.make_request_async(:put, path_template, options)
238
+
239
+ promise = promise.then do |result|
240
+ http_response = result.response
241
+ status_code = http_response.status
242
+ response_content = http_response.body
243
+ unless status_code == 200
244
+ error_model = JSON.load(response_content)
245
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
246
+ end
247
+
248
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
249
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
250
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
251
+ # Deserialize Response
252
+ if status_code == 200
253
+ begin
254
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
255
+ result_mapper = Azure::Storage::Mgmt::V2020_08_01_preview::Models::BlobServiceProperties.mapper()
256
+ result.body = @client.deserialize(result_mapper, parsed_response)
257
+ rescue Exception => e
258
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
259
+ end
260
+ end
261
+
262
+ result
263
+ end
264
+
265
+ promise.execute
266
+ end
267
+
268
+ #
269
+ # Gets the properties of a storage account’s Blob service, including properties
270
+ # for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
271
+ #
272
+ # @param resource_group_name [String] The name of the resource group within the
273
+ # user's subscription. The name is case insensitive.
274
+ # @param account_name [String] The name of the storage account within the
275
+ # specified resource group. Storage account names must be between 3 and 24
276
+ # characters in length and use numbers and lower-case letters only.
277
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
278
+ # will be added to the HTTP request.
279
+ #
280
+ # @return [BlobServiceProperties] operation results.
281
+ #
282
+ def get_service_properties(resource_group_name, account_name, custom_headers:nil)
283
+ response = get_service_properties_async(resource_group_name, account_name, custom_headers:custom_headers).value!
284
+ response.body unless response.nil?
285
+ end
286
+
287
+ #
288
+ # Gets the properties of a storage account’s Blob service, including properties
289
+ # for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
290
+ #
291
+ # @param resource_group_name [String] The name of the resource group within the
292
+ # user's subscription. The name is case insensitive.
293
+ # @param account_name [String] The name of the storage account within the
294
+ # specified resource group. Storage account names must be between 3 and 24
295
+ # characters in length and use numbers and lower-case letters only.
296
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
297
+ # will be added to the HTTP request.
298
+ #
299
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
300
+ #
301
+ def get_service_properties_with_http_info(resource_group_name, account_name, custom_headers:nil)
302
+ get_service_properties_async(resource_group_name, account_name, custom_headers:custom_headers).value!
303
+ end
304
+
305
+ #
306
+ # Gets the properties of a storage account’s Blob service, including properties
307
+ # for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
308
+ #
309
+ # @param resource_group_name [String] The name of the resource group within the
310
+ # user's subscription. The name is case insensitive.
311
+ # @param account_name [String] The name of the storage account within the
312
+ # specified resource group. Storage account names must be between 3 and 24
313
+ # characters in length and use numbers and lower-case letters only.
314
+ # @param [Hash{String => String}] A hash of custom headers that will be added
315
+ # to the HTTP request.
316
+ #
317
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
318
+ #
319
+ def get_service_properties_async(resource_group_name, account_name, custom_headers:nil)
320
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
321
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
322
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
323
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
324
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
325
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
326
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
327
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
328
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
329
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
330
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
331
+ blob_services_name = 'default'
332
+
333
+
334
+ request_headers = {}
335
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
336
+
337
+ # Set Headers
338
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
339
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
340
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/{BlobServicesName}'
341
+
342
+ request_url = @base_url || @client.base_url
343
+
344
+ options = {
345
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
346
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id,'BlobServicesName' => blob_services_name},
347
+ query_params: {'api-version' => @client.api_version},
348
+ headers: request_headers.merge(custom_headers || {}),
349
+ base_url: request_url
350
+ }
351
+ promise = @client.make_request_async(:get, path_template, options)
352
+
353
+ promise = promise.then do |result|
354
+ http_response = result.response
355
+ status_code = http_response.status
356
+ response_content = http_response.body
357
+ unless status_code == 200
358
+ error_model = JSON.load(response_content)
359
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
360
+ end
361
+
362
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
363
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
364
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
365
+ # Deserialize Response
366
+ if status_code == 200
367
+ begin
368
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
369
+ result_mapper = Azure::Storage::Mgmt::V2020_08_01_preview::Models::BlobServiceProperties.mapper()
370
+ result.body = @client.deserialize(result_mapper, parsed_response)
371
+ rescue Exception => e
372
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
373
+ end
374
+ end
375
+
376
+ result
377
+ end
378
+
379
+ promise.execute
380
+ end
381
+
382
+ end
383
+ end
@@ -0,0 +1,321 @@
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::Storage::Mgmt::V2020_08_01_preview
7
+ #
8
+ # The Azure Storage Management API.
9
+ #
10
+ class DeletedAccounts
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the DeletedAccounts class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [StorageManagementClient] reference to the StorageManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Lists deleted accounts under the subscription.
26
+ #
27
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
28
+ # will be added to the HTTP request.
29
+ #
30
+ # @return [Array<DeletedAccount>] operation results.
31
+ #
32
+ def list(custom_headers:nil)
33
+ first_page = list_as_lazy(custom_headers:custom_headers)
34
+ first_page.get_all_items
35
+ end
36
+
37
+ #
38
+ # Lists deleted accounts under the subscription.
39
+ #
40
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
41
+ # will be added to the HTTP request.
42
+ #
43
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
44
+ #
45
+ def list_with_http_info(custom_headers:nil)
46
+ list_async(custom_headers:custom_headers).value!
47
+ end
48
+
49
+ #
50
+ # Lists deleted accounts under the subscription.
51
+ #
52
+ # @param [Hash{String => String}] A hash of custom headers that will be added
53
+ # to the HTTP request.
54
+ #
55
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
56
+ #
57
+ def list_async(custom_headers:nil)
58
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
59
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
60
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
61
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
62
+
63
+
64
+ request_headers = {}
65
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
66
+
67
+ # Set Headers
68
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
69
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
70
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Storage/deletedAccounts'
71
+
72
+ request_url = @base_url || @client.base_url
73
+
74
+ options = {
75
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
76
+ path_params: {'subscriptionId' => @client.subscription_id},
77
+ query_params: {'api-version' => @client.api_version},
78
+ headers: request_headers.merge(custom_headers || {}),
79
+ base_url: request_url
80
+ }
81
+ promise = @client.make_request_async(:get, path_template, options)
82
+
83
+ promise = promise.then do |result|
84
+ http_response = result.response
85
+ status_code = http_response.status
86
+ response_content = http_response.body
87
+ unless status_code == 200
88
+ error_model = JSON.load(response_content)
89
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
90
+ end
91
+
92
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
93
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
94
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
95
+ # Deserialize Response
96
+ if status_code == 200
97
+ begin
98
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
99
+ result_mapper = Azure::Storage::Mgmt::V2020_08_01_preview::Models::DeletedAccountListResult.mapper()
100
+ result.body = @client.deserialize(result_mapper, parsed_response)
101
+ rescue Exception => e
102
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
103
+ end
104
+ end
105
+
106
+ result
107
+ end
108
+
109
+ promise.execute
110
+ end
111
+
112
+ #
113
+ # Get properties of specified deleted account resource.
114
+ #
115
+ # @param deleted_account_name [String] Name of the deleted storage account.
116
+ # @param location [String] The location of the deleted storage account.
117
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
118
+ # will be added to the HTTP request.
119
+ #
120
+ # @return [DeletedAccount] operation results.
121
+ #
122
+ def get(deleted_account_name, location, custom_headers:nil)
123
+ response = get_async(deleted_account_name, location, custom_headers:custom_headers).value!
124
+ response.body unless response.nil?
125
+ end
126
+
127
+ #
128
+ # Get properties of specified deleted account resource.
129
+ #
130
+ # @param deleted_account_name [String] Name of the deleted storage account.
131
+ # @param location [String] The location of the deleted storage account.
132
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
133
+ # will be added to the HTTP request.
134
+ #
135
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
136
+ #
137
+ def get_with_http_info(deleted_account_name, location, custom_headers:nil)
138
+ get_async(deleted_account_name, location, custom_headers:custom_headers).value!
139
+ end
140
+
141
+ #
142
+ # Get properties of specified deleted account resource.
143
+ #
144
+ # @param deleted_account_name [String] Name of the deleted storage account.
145
+ # @param location [String] The location of the deleted storage account.
146
+ # @param [Hash{String => String}] A hash of custom headers that will be added
147
+ # to the HTTP request.
148
+ #
149
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
150
+ #
151
+ def get_async(deleted_account_name, location, custom_headers:nil)
152
+ fail ArgumentError, 'deleted_account_name is nil' if deleted_account_name.nil?
153
+ fail ArgumentError, "'deleted_account_name' should satisfy the constraint - 'MaxLength': '24'" if !deleted_account_name.nil? && deleted_account_name.length > 24
154
+ fail ArgumentError, "'deleted_account_name' should satisfy the constraint - 'MinLength': '3'" if !deleted_account_name.nil? && deleted_account_name.length < 3
155
+ fail ArgumentError, 'location is nil' if location.nil?
156
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
157
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
158
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
159
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
160
+
161
+
162
+ request_headers = {}
163
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
164
+
165
+ # Set Headers
166
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
167
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
168
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.Storage/locations/{location}/deletedAccounts/{deletedAccountName}'
169
+
170
+ request_url = @base_url || @client.base_url
171
+
172
+ options = {
173
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
174
+ path_params: {'deletedAccountName' => deleted_account_name,'location' => location,'subscriptionId' => @client.subscription_id},
175
+ query_params: {'api-version' => @client.api_version},
176
+ headers: request_headers.merge(custom_headers || {}),
177
+ base_url: request_url
178
+ }
179
+ promise = @client.make_request_async(:get, path_template, options)
180
+
181
+ promise = promise.then do |result|
182
+ http_response = result.response
183
+ status_code = http_response.status
184
+ response_content = http_response.body
185
+ unless status_code == 200
186
+ error_model = JSON.load(response_content)
187
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
188
+ end
189
+
190
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
191
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
192
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
193
+ # Deserialize Response
194
+ if status_code == 200
195
+ begin
196
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
197
+ result_mapper = Azure::Storage::Mgmt::V2020_08_01_preview::Models::DeletedAccount.mapper()
198
+ result.body = @client.deserialize(result_mapper, parsed_response)
199
+ rescue Exception => e
200
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
201
+ end
202
+ end
203
+
204
+ result
205
+ end
206
+
207
+ promise.execute
208
+ end
209
+
210
+ #
211
+ # Lists deleted accounts under the subscription.
212
+ #
213
+ # @param next_page_link [String] The NextLink from the previous successful call
214
+ # to List operation.
215
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
216
+ # will be added to the HTTP request.
217
+ #
218
+ # @return [DeletedAccountListResult] operation results.
219
+ #
220
+ def list_next(next_page_link, custom_headers:nil)
221
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
222
+ response.body unless response.nil?
223
+ end
224
+
225
+ #
226
+ # Lists deleted accounts under the subscription.
227
+ #
228
+ # @param next_page_link [String] The NextLink from the previous successful call
229
+ # to List operation.
230
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
231
+ # will be added to the HTTP request.
232
+ #
233
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
234
+ #
235
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
236
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
237
+ end
238
+
239
+ #
240
+ # Lists deleted accounts under the subscription.
241
+ #
242
+ # @param next_page_link [String] The NextLink from the previous successful call
243
+ # to List operation.
244
+ # @param [Hash{String => String}] A hash of custom headers that will be added
245
+ # to the HTTP request.
246
+ #
247
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
248
+ #
249
+ def list_next_async(next_page_link, custom_headers:nil)
250
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
251
+
252
+
253
+ request_headers = {}
254
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
255
+
256
+ # Set Headers
257
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
258
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
259
+ path_template = '{nextLink}'
260
+
261
+ request_url = @base_url || @client.base_url
262
+
263
+ options = {
264
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
265
+ skip_encoding_path_params: {'nextLink' => next_page_link},
266
+ headers: request_headers.merge(custom_headers || {}),
267
+ base_url: request_url
268
+ }
269
+ promise = @client.make_request_async(:get, path_template, options)
270
+
271
+ promise = promise.then do |result|
272
+ http_response = result.response
273
+ status_code = http_response.status
274
+ response_content = http_response.body
275
+ unless status_code == 200
276
+ error_model = JSON.load(response_content)
277
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
278
+ end
279
+
280
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
281
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
282
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
283
+ # Deserialize Response
284
+ if status_code == 200
285
+ begin
286
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
287
+ result_mapper = Azure::Storage::Mgmt::V2020_08_01_preview::Models::DeletedAccountListResult.mapper()
288
+ result.body = @client.deserialize(result_mapper, parsed_response)
289
+ rescue Exception => e
290
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
291
+ end
292
+ end
293
+
294
+ result
295
+ end
296
+
297
+ promise.execute
298
+ end
299
+
300
+ #
301
+ # Lists deleted accounts under the subscription.
302
+ #
303
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
304
+ # will be added to the HTTP request.
305
+ #
306
+ # @return [DeletedAccountListResult] which provide lazy access to pages of the
307
+ # response.
308
+ #
309
+ def list_as_lazy(custom_headers:nil)
310
+ response = list_async(custom_headers:custom_headers).value!
311
+ unless response.nil?
312
+ page = response.body
313
+ page.next_method = Proc.new do |next_page_link|
314
+ list_next_async(next_page_link, custom_headers:custom_headers)
315
+ end
316
+ page
317
+ end
318
+ end
319
+
320
+ end
321
+ end