azure_mgmt_storage 0.22.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) 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/storage_management_client.rb +1 -1
  15. data/lib/2021-01-01/generated/azure_mgmt_storage.rb +223 -0
  16. data/lib/2021-01-01/generated/azure_mgmt_storage/blob_containers.rb +2046 -0
  17. data/lib/2021-01-01/generated/azure_mgmt_storage/blob_inventory_policies.rb +474 -0
  18. data/lib/2021-01-01/generated/azure_mgmt_storage/blob_services.rb +383 -0
  19. data/lib/2021-01-01/generated/azure_mgmt_storage/deleted_accounts.rb +321 -0
  20. data/lib/2021-01-01/generated/azure_mgmt_storage/encryption_scopes.rb +691 -0
  21. data/lib/2021-01-01/generated/azure_mgmt_storage/file_services.rb +377 -0
  22. data/lib/2021-01-01/generated/azure_mgmt_storage/file_shares.rb +957 -0
  23. data/lib/2021-01-01/generated/azure_mgmt_storage/management_policies.rb +361 -0
  24. data/lib/2021-01-01/generated/azure_mgmt_storage/models/access_tier.rb +16 -0
  25. data/lib/2021-01-01/generated/azure_mgmt_storage/models/account_sas_parameters.rb +136 -0
  26. data/lib/2021-01-01/generated/azure_mgmt_storage/models/account_status.rb +16 -0
  27. data/lib/2021-01-01/generated/azure_mgmt_storage/models/action.rb +15 -0
  28. data/lib/2021-01-01/generated/azure_mgmt_storage/models/active_directory_properties.rb +103 -0
  29. data/lib/2021-01-01/generated/azure_mgmt_storage/models/azure_entity_resource.rb +77 -0
  30. data/lib/2021-01-01/generated/azure_mgmt_storage/models/azure_files_identity_based_authentication.rb +59 -0
  31. data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_container.rb +290 -0
  32. data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_inventory_policy.rb +101 -0
  33. data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_inventory_policy_definition.rb +49 -0
  34. data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_inventory_policy_filter.rb +100 -0
  35. data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_inventory_policy_rule.rb +73 -0
  36. data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_inventory_policy_schema.rb +93 -0
  37. data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_restore_parameters.rb +66 -0
  38. data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_restore_progress_status.rb +17 -0
  39. data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_restore_range.rb +59 -0
  40. data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_restore_status.rb +88 -0
  41. data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_service_items.rb +57 -0
  42. data/lib/2021-01-01/generated/azure_mgmt_storage/models/blob_service_properties.rb +191 -0
  43. data/lib/2021-01-01/generated/azure_mgmt_storage/models/bypass.rb +18 -0
  44. data/lib/2021-01-01/generated/azure_mgmt_storage/models/change_feed.rb +65 -0
  45. data/lib/2021-01-01/generated/azure_mgmt_storage/models/check_name_availability_result.rb +77 -0
  46. data/lib/2021-01-01/generated/azure_mgmt_storage/models/cors_rule.rb +128 -0
  47. data/lib/2021-01-01/generated/azure_mgmt_storage/models/cors_rules.rb +57 -0
  48. data/lib/2021-01-01/generated/azure_mgmt_storage/models/created_by_type.rb +18 -0
  49. data/lib/2021-01-01/generated/azure_mgmt_storage/models/custom_domain.rb +60 -0
  50. data/lib/2021-01-01/generated/azure_mgmt_storage/models/date_after_creation.rb +50 -0
  51. data/lib/2021-01-01/generated/azure_mgmt_storage/models/date_after_modification.rb +70 -0
  52. data/lib/2021-01-01/generated/azure_mgmt_storage/models/default_action.rb +16 -0
  53. data/lib/2021-01-01/generated/azure_mgmt_storage/models/delete_retention_policy.rb +63 -0
  54. data/lib/2021-01-01/generated/azure_mgmt_storage/models/deleted_account.rb +123 -0
  55. data/lib/2021-01-01/generated/azure_mgmt_storage/models/deleted_account_list_result.rb +103 -0
  56. data/lib/2021-01-01/generated/azure_mgmt_storage/models/deleted_share.rb +59 -0
  57. data/lib/2021-01-01/generated/azure_mgmt_storage/models/dimension.rb +57 -0
  58. data/lib/2021-01-01/generated/azure_mgmt_storage/models/directory_service_options.rb +17 -0
  59. data/lib/2021-01-01/generated/azure_mgmt_storage/models/enabled_protocols.rb +16 -0
  60. data/lib/2021-01-01/generated/azure_mgmt_storage/models/encryption.rb +100 -0
  61. data/lib/2021-01-01/generated/azure_mgmt_storage/models/encryption_identity.rb +47 -0
  62. data/lib/2021-01-01/generated/azure_mgmt_storage/models/encryption_scope.rb +142 -0
  63. data/lib/2021-01-01/generated/azure_mgmt_storage/models/encryption_scope_key_vault_properties.rb +76 -0
  64. data/lib/2021-01-01/generated/azure_mgmt_storage/models/encryption_scope_list_result.rb +103 -0
  65. data/lib/2021-01-01/generated/azure_mgmt_storage/models/encryption_scope_source.rb +16 -0
  66. data/lib/2021-01-01/generated/azure_mgmt_storage/models/encryption_scope_state.rb +16 -0
  67. data/lib/2021-01-01/generated/azure_mgmt_storage/models/encryption_service.rb +76 -0
  68. data/lib/2021-01-01/generated/azure_mgmt_storage/models/encryption_services.rb +87 -0
  69. data/lib/2021-01-01/generated/azure_mgmt_storage/models/endpoints.rb +134 -0
  70. data/lib/2021-01-01/generated/azure_mgmt_storage/models/error_response.rb +48 -0
  71. data/lib/2021-01-01/generated/azure_mgmt_storage/models/error_response_body.rb +59 -0
  72. data/lib/2021-01-01/generated/azure_mgmt_storage/models/extended_location.rb +58 -0
  73. data/lib/2021-01-01/generated/azure_mgmt_storage/models/extended_location_types.rb +15 -0
  74. data/lib/2021-01-01/generated/azure_mgmt_storage/models/file_service_items.rb +57 -0
  75. data/lib/2021-01-01/generated/azure_mgmt_storage/models/file_service_properties.rb +115 -0
  76. data/lib/2021-01-01/generated/azure_mgmt_storage/models/file_share.rb +264 -0
  77. data/lib/2021-01-01/generated/azure_mgmt_storage/models/file_share_item.rb +263 -0
  78. data/lib/2021-01-01/generated/azure_mgmt_storage/models/file_share_items.rb +103 -0
  79. data/lib/2021-01-01/generated/azure_mgmt_storage/models/geo_replication_stats.rb +85 -0
  80. data/lib/2021-01-01/generated/azure_mgmt_storage/models/geo_replication_status.rb +17 -0
  81. data/lib/2021-01-01/generated/azure_mgmt_storage/models/get_share_expand.rb +15 -0
  82. data/lib/2021-01-01/generated/azure_mgmt_storage/models/http_protocol.rb +16 -0
  83. data/lib/2021-01-01/generated/azure_mgmt_storage/models/identity.rb +95 -0
  84. data/lib/2021-01-01/generated/azure_mgmt_storage/models/identity_type.rb +18 -0
  85. data/lib/2021-01-01/generated/azure_mgmt_storage/models/immutability_policy.rb +114 -0
  86. data/lib/2021-01-01/generated/azure_mgmt_storage/models/immutability_policy_properties.rb +111 -0
  87. data/lib/2021-01-01/generated/azure_mgmt_storage/models/immutability_policy_state.rb +16 -0
  88. data/lib/2021-01-01/generated/azure_mgmt_storage/models/immutability_policy_update_type.rb +17 -0
  89. data/lib/2021-01-01/generated/azure_mgmt_storage/models/iprule.rb +61 -0
  90. data/lib/2021-01-01/generated/azure_mgmt_storage/models/key_permission.rb +16 -0
  91. data/lib/2021-01-01/generated/azure_mgmt_storage/models/key_source.rb +16 -0
  92. data/lib/2021-01-01/generated/azure_mgmt_storage/models/key_type.rb +16 -0
  93. data/lib/2021-01-01/generated/azure_mgmt_storage/models/key_vault_properties.rb +93 -0
  94. data/lib/2021-01-01/generated/azure_mgmt_storage/models/kind.rb +19 -0
  95. data/lib/2021-01-01/generated/azure_mgmt_storage/models/large_file_shares_state.rb +16 -0
  96. data/lib/2021-01-01/generated/azure_mgmt_storage/models/last_access_time_tracking_policy.rb +94 -0
  97. data/lib/2021-01-01/generated/azure_mgmt_storage/models/lease_container_request.rb +97 -0
  98. data/lib/2021-01-01/generated/azure_mgmt_storage/models/lease_container_response.rb +60 -0
  99. data/lib/2021-01-01/generated/azure_mgmt_storage/models/lease_duration.rb +16 -0
  100. data/lib/2021-01-01/generated/azure_mgmt_storage/models/lease_state.rb +19 -0
  101. data/lib/2021-01-01/generated/azure_mgmt_storage/models/lease_status.rb +16 -0
  102. data/lib/2021-01-01/generated/azure_mgmt_storage/models/legal_hold.rb +71 -0
  103. data/lib/2021-01-01/generated/azure_mgmt_storage/models/legal_hold_properties.rb +72 -0
  104. data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_account_sas_response.rb +47 -0
  105. data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_blob_inventory_policy.rb +56 -0
  106. data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_container_item.rb +289 -0
  107. data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_container_items.rb +103 -0
  108. data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_containers_include.rb +15 -0
  109. data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_key_expand.rb +15 -0
  110. data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_queue.rb +83 -0
  111. data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_queue_resource.rb +101 -0
  112. data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_queue_services.rb +58 -0
  113. data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_service_sas_response.rb +47 -0
  114. data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_shares_expand.rb +16 -0
  115. data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_table_resource.rb +101 -0
  116. data/lib/2021-01-01/generated/azure_mgmt_storage/models/list_table_services.rb +58 -0
  117. data/lib/2021-01-01/generated/azure_mgmt_storage/models/management_policy.rb +89 -0
  118. data/lib/2021-01-01/generated/azure_mgmt_storage/models/management_policy_action.rb +75 -0
  119. data/lib/2021-01-01/generated/azure_mgmt_storage/models/management_policy_base_blob.rb +86 -0
  120. data/lib/2021-01-01/generated/azure_mgmt_storage/models/management_policy_definition.rb +60 -0
  121. data/lib/2021-01-01/generated/azure_mgmt_storage/models/management_policy_filter.rb +98 -0
  122. data/lib/2021-01-01/generated/azure_mgmt_storage/models/management_policy_rule.rb +87 -0
  123. data/lib/2021-01-01/generated/azure_mgmt_storage/models/management_policy_schema.rb +58 -0
  124. data/lib/2021-01-01/generated/azure_mgmt_storage/models/management_policy_snap_shot.rb +73 -0
  125. data/lib/2021-01-01/generated/azure_mgmt_storage/models/management_policy_version.rb +73 -0
  126. data/lib/2021-01-01/generated/azure_mgmt_storage/models/metric_specification.rb +145 -0
  127. data/lib/2021-01-01/generated/azure_mgmt_storage/models/minimum_tls_version.rb +17 -0
  128. data/lib/2021-01-01/generated/azure_mgmt_storage/models/multichannel.rb +46 -0
  129. data/lib/2021-01-01/generated/azure_mgmt_storage/models/name.rb +15 -0
  130. data/lib/2021-01-01/generated/azure_mgmt_storage/models/network_rule_set.rb +126 -0
  131. data/lib/2021-01-01/generated/azure_mgmt_storage/models/object_replication_policies.rb +56 -0
  132. data/lib/2021-01-01/generated/azure_mgmt_storage/models/object_replication_policy.rb +131 -0
  133. data/lib/2021-01-01/generated/azure_mgmt_storage/models/object_replication_policy_filter.rb +70 -0
  134. data/lib/2021-01-01/generated/azure_mgmt_storage/models/object_replication_policy_rule.rb +82 -0
  135. data/lib/2021-01-01/generated/azure_mgmt_storage/models/operation.rb +83 -0
  136. data/lib/2021-01-01/generated/azure_mgmt_storage/models/operation_display.rb +79 -0
  137. data/lib/2021-01-01/generated/azure_mgmt_storage/models/operation_list_result.rb +57 -0
  138. data/lib/2021-01-01/generated/azure_mgmt_storage/models/permissions.rb +22 -0
  139. data/lib/2021-01-01/generated/azure_mgmt_storage/models/private_endpoint.rb +47 -0
  140. data/lib/2021-01-01/generated/azure_mgmt_storage/models/private_endpoint_connection.rb +101 -0
  141. data/lib/2021-01-01/generated/azure_mgmt_storage/models/private_endpoint_connection_list_result.rb +57 -0
  142. data/lib/2021-01-01/generated/azure_mgmt_storage/models/private_endpoint_connection_provisioning_state.rb +18 -0
  143. data/lib/2021-01-01/generated/azure_mgmt_storage/models/private_endpoint_service_connection_status.rb +17 -0
  144. data/lib/2021-01-01/generated/azure_mgmt_storage/models/private_link_resource.rb +115 -0
  145. data/lib/2021-01-01/generated/azure_mgmt_storage/models/private_link_resource_list_result.rb +55 -0
  146. data/lib/2021-01-01/generated/azure_mgmt_storage/models/private_link_service_connection_state.rb +72 -0
  147. data/lib/2021-01-01/generated/azure_mgmt_storage/models/protocol_settings.rb +47 -0
  148. data/lib/2021-01-01/generated/azure_mgmt_storage/models/provisioning_state.rb +17 -0
  149. data/lib/2021-01-01/generated/azure_mgmt_storage/models/proxy_resource.rb +65 -0
  150. data/lib/2021-01-01/generated/azure_mgmt_storage/models/public_access.rb +17 -0
  151. data/lib/2021-01-01/generated/azure_mgmt_storage/models/put_shares_expand.rb +15 -0
  152. data/lib/2021-01-01/generated/azure_mgmt_storage/models/queue_service_properties.rb +77 -0
  153. data/lib/2021-01-01/generated/azure_mgmt_storage/models/reason.rb +16 -0
  154. data/lib/2021-01-01/generated/azure_mgmt_storage/models/reason_code.rb +16 -0
  155. data/lib/2021-01-01/generated/azure_mgmt_storage/models/resource.rb +86 -0
  156. data/lib/2021-01-01/generated/azure_mgmt_storage/models/resource_access_rule.rb +57 -0
  157. data/lib/2021-01-01/generated/azure_mgmt_storage/models/restore_policy_properties.rb +87 -0
  158. data/lib/2021-01-01/generated/azure_mgmt_storage/models/restriction.rb +85 -0
  159. data/lib/2021-01-01/generated/azure_mgmt_storage/models/root_squash_type.rb +17 -0
  160. data/lib/2021-01-01/generated/azure_mgmt_storage/models/routing_choice.rb +16 -0
  161. data/lib/2021-01-01/generated/azure_mgmt_storage/models/routing_preference.rb +74 -0
  162. data/lib/2021-01-01/generated/azure_mgmt_storage/models/service_sas_parameters.rb +247 -0
  163. data/lib/2021-01-01/generated/azure_mgmt_storage/models/service_specification.rb +56 -0
  164. data/lib/2021-01-01/generated/azure_mgmt_storage/models/services.rb +18 -0
  165. data/lib/2021-01-01/generated/azure_mgmt_storage/models/share_access_tier.rb +18 -0
  166. data/lib/2021-01-01/generated/azure_mgmt_storage/models/signed_resource.rb +18 -0
  167. data/lib/2021-01-01/generated/azure_mgmt_storage/models/signed_resource_types.rb +17 -0
  168. data/lib/2021-01-01/generated/azure_mgmt_storage/models/sku.rb +60 -0
  169. data/lib/2021-01-01/generated/azure_mgmt_storage/models/sku_information.rb +153 -0
  170. data/lib/2021-01-01/generated/azure_mgmt_storage/models/sku_name.rb +22 -0
  171. data/lib/2021-01-01/generated/azure_mgmt_storage/models/sku_tier.rb +16 -0
  172. data/lib/2021-01-01/generated/azure_mgmt_storage/models/skucapability.rb +63 -0
  173. data/lib/2021-01-01/generated/azure_mgmt_storage/models/smb_setting.rb +100 -0
  174. data/lib/2021-01-01/generated/azure_mgmt_storage/models/state.rb +19 -0
  175. data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account.rb +500 -0
  176. data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_check_name_availability_parameters.rb +63 -0
  177. data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_create_parameters.rb +294 -0
  178. data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_expand.rb +16 -0
  179. data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_internet_endpoints.rb +84 -0
  180. data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_key.rb +73 -0
  181. data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_list_keys_result.rb +57 -0
  182. data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_list_result.rb +103 -0
  183. data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_microsoft_endpoints.rb +108 -0
  184. data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_regenerate_key_parameters.rb +47 -0
  185. data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_account_update_parameters.rb +246 -0
  186. data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_queue.rb +97 -0
  187. data/lib/2021-01-01/generated/azure_mgmt_storage/models/storage_sku_list_result.rb +57 -0
  188. data/lib/2021-01-01/generated/azure_mgmt_storage/models/system_data.rb +105 -0
  189. data/lib/2021-01-01/generated/azure_mgmt_storage/models/table.rb +74 -0
  190. data/lib/2021-01-01/generated/azure_mgmt_storage/models/table_service_properties.rb +77 -0
  191. data/lib/2021-01-01/generated/azure_mgmt_storage/models/tag_filter.rb +80 -0
  192. data/lib/2021-01-01/generated/azure_mgmt_storage/models/tag_property.rb +97 -0
  193. data/lib/2021-01-01/generated/azure_mgmt_storage/models/tracked_resource.rb +95 -0
  194. data/lib/2021-01-01/generated/azure_mgmt_storage/models/update_history_property.rb +114 -0
  195. data/lib/2021-01-01/generated/azure_mgmt_storage/models/usage.rb +89 -0
  196. data/lib/2021-01-01/generated/azure_mgmt_storage/models/usage_list_result.rb +56 -0
  197. data/lib/2021-01-01/generated/azure_mgmt_storage/models/usage_name.rb +59 -0
  198. data/lib/2021-01-01/generated/azure_mgmt_storage/models/usage_unit.rb +20 -0
  199. data/lib/2021-01-01/generated/azure_mgmt_storage/models/user_assigned_identity.rb +59 -0
  200. data/lib/2021-01-01/generated/azure_mgmt_storage/models/virtual_network_rule.rb +74 -0
  201. data/lib/2021-01-01/generated/azure_mgmt_storage/module_definition.rb +9 -0
  202. data/lib/2021-01-01/generated/azure_mgmt_storage/object_replication_policies_operations.rb +495 -0
  203. data/lib/2021-01-01/generated/azure_mgmt_storage/operations.rb +110 -0
  204. data/lib/2021-01-01/generated/azure_mgmt_storage/private_endpoint_connections.rb +501 -0
  205. data/lib/2021-01-01/generated/azure_mgmt_storage/private_link_resources.rb +138 -0
  206. data/lib/2021-01-01/generated/azure_mgmt_storage/queue.rb +805 -0
  207. data/lib/2021-01-01/generated/azure_mgmt_storage/queue_services.rb +386 -0
  208. data/lib/2021-01-01/generated/azure_mgmt_storage/skus.rb +116 -0
  209. data/lib/2021-01-01/generated/azure_mgmt_storage/storage_accounts.rb +2059 -0
  210. data/lib/2021-01-01/generated/azure_mgmt_storage/storage_management_client.rb +204 -0
  211. data/lib/2021-01-01/generated/azure_mgmt_storage/table_operations.rb +743 -0
  212. data/lib/2021-01-01/generated/azure_mgmt_storage/table_services.rb +386 -0
  213. data/lib/2021-01-01/generated/azure_mgmt_storage/usages.rb +120 -0
  214. data/lib/azure_mgmt_storage.rb +1 -0
  215. data/lib/profiles/latest/modules/storage_profile_module.rb +480 -394
  216. data/lib/version.rb +1 -1
  217. metadata +201 -2
@@ -0,0 +1,377 @@
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::V2021_01_01
7
+ #
8
+ # The Azure Storage Management API.
9
+ #
10
+ class FileServices
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the FileServices 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 all file services in storage accounts
26
+ #
27
+ # @param resource_group_name [String] The name of the resource group within the
28
+ # user's subscription. The name is case insensitive.
29
+ # @param account_name [String] The name of the storage account within the
30
+ # specified resource group. Storage account names must be between 3 and 24
31
+ # characters in length and use numbers and lower-case letters only.
32
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
33
+ # will be added to the HTTP request.
34
+ #
35
+ # @return [FileServiceItems] operation results.
36
+ #
37
+ def list(resource_group_name, account_name, custom_headers:nil)
38
+ response = list_async(resource_group_name, account_name, custom_headers:custom_headers).value!
39
+ response.body unless response.nil?
40
+ end
41
+
42
+ #
43
+ # List all file services in storage accounts
44
+ #
45
+ # @param resource_group_name [String] The name of the resource group within the
46
+ # user's subscription. The name is case insensitive.
47
+ # @param account_name [String] The name of the storage account within the
48
+ # specified resource group. Storage account names must be between 3 and 24
49
+ # characters in length and use numbers and lower-case letters only.
50
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
51
+ # will be added to the HTTP request.
52
+ #
53
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
54
+ #
55
+ def list_with_http_info(resource_group_name, account_name, custom_headers:nil)
56
+ list_async(resource_group_name, account_name, custom_headers:custom_headers).value!
57
+ end
58
+
59
+ #
60
+ # List all file services in storage accounts
61
+ #
62
+ # @param resource_group_name [String] The name of the resource group within the
63
+ # user's subscription. The name is case insensitive.
64
+ # @param account_name [String] The name of the storage account within the
65
+ # specified resource group. Storage account names must be between 3 and 24
66
+ # characters in length and use numbers and lower-case letters only.
67
+ # @param [Hash{String => String}] A hash of custom headers that will be added
68
+ # to the HTTP request.
69
+ #
70
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
71
+ #
72
+ def list_async(resource_group_name, account_name, custom_headers:nil)
73
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
74
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
75
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
76
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
77
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
78
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
79
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
80
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
81
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
82
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
83
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
84
+
85
+
86
+ request_headers = {}
87
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
88
+
89
+ # Set Headers
90
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
91
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
92
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices'
93
+
94
+ request_url = @base_url || @client.base_url
95
+
96
+ options = {
97
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
98
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
99
+ query_params: {'api-version' => @client.api_version},
100
+ headers: request_headers.merge(custom_headers || {}),
101
+ base_url: request_url
102
+ }
103
+ promise = @client.make_request_async(:get, path_template, options)
104
+
105
+ promise = promise.then do |result|
106
+ http_response = result.response
107
+ status_code = http_response.status
108
+ response_content = http_response.body
109
+ unless status_code == 200
110
+ error_model = JSON.load(response_content)
111
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
112
+ end
113
+
114
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
115
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
116
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
117
+ # Deserialize Response
118
+ if status_code == 200
119
+ begin
120
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
121
+ result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::FileServiceItems.mapper()
122
+ result.body = @client.deserialize(result_mapper, parsed_response)
123
+ rescue Exception => e
124
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
125
+ end
126
+ end
127
+
128
+ result
129
+ end
130
+
131
+ promise.execute
132
+ end
133
+
134
+ #
135
+ # Sets the properties of file services in storage accounts, including CORS
136
+ # (Cross-Origin Resource Sharing) rules.
137
+ #
138
+ # @param resource_group_name [String] The name of the resource group within the
139
+ # user's subscription. The name is case insensitive.
140
+ # @param account_name [String] The name of the storage account within the
141
+ # specified resource group. Storage account names must be between 3 and 24
142
+ # characters in length and use numbers and lower-case letters only.
143
+ # @param parameters [FileServiceProperties] The properties of file services in
144
+ # storage accounts, including CORS (Cross-Origin Resource Sharing) rules.
145
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
146
+ # will be added to the HTTP request.
147
+ #
148
+ # @return [FileServiceProperties] operation results.
149
+ #
150
+ def set_service_properties(resource_group_name, account_name, parameters, custom_headers:nil)
151
+ response = set_service_properties_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value!
152
+ response.body unless response.nil?
153
+ end
154
+
155
+ #
156
+ # Sets the properties of file services in storage accounts, including CORS
157
+ # (Cross-Origin Resource Sharing) rules.
158
+ #
159
+ # @param resource_group_name [String] The name of the resource group within the
160
+ # user's subscription. The name is case insensitive.
161
+ # @param account_name [String] The name of the storage account within the
162
+ # specified resource group. Storage account names must be between 3 and 24
163
+ # characters in length and use numbers and lower-case letters only.
164
+ # @param parameters [FileServiceProperties] The properties of file services in
165
+ # storage accounts, including CORS (Cross-Origin Resource Sharing) rules.
166
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
167
+ # will be added to the HTTP request.
168
+ #
169
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
170
+ #
171
+ def set_service_properties_with_http_info(resource_group_name, account_name, parameters, custom_headers:nil)
172
+ set_service_properties_async(resource_group_name, account_name, parameters, custom_headers:custom_headers).value!
173
+ end
174
+
175
+ #
176
+ # Sets the properties of file services in storage accounts, including CORS
177
+ # (Cross-Origin Resource Sharing) rules.
178
+ #
179
+ # @param resource_group_name [String] The name of the resource group within the
180
+ # user's subscription. The name is case insensitive.
181
+ # @param account_name [String] The name of the storage account within the
182
+ # specified resource group. Storage account names must be between 3 and 24
183
+ # characters in length and use numbers and lower-case letters only.
184
+ # @param parameters [FileServiceProperties] The properties of file services in
185
+ # storage accounts, including CORS (Cross-Origin Resource Sharing) rules.
186
+ # @param [Hash{String => String}] A hash of custom headers that will be added
187
+ # to the HTTP request.
188
+ #
189
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
190
+ #
191
+ def set_service_properties_async(resource_group_name, account_name, parameters, custom_headers:nil)
192
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
193
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
194
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
195
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
196
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
197
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
198
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
199
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
200
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
201
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
202
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
203
+ file_services_name = 'default'
204
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
205
+
206
+
207
+ request_headers = {}
208
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
209
+
210
+ # Set Headers
211
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
212
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
213
+
214
+ # Serialize Request
215
+ request_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::FileServiceProperties.mapper()
216
+ request_content = @client.serialize(request_mapper, parameters)
217
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
218
+
219
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}'
220
+
221
+ request_url = @base_url || @client.base_url
222
+
223
+ options = {
224
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
225
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id,'FileServicesName' => file_services_name},
226
+ query_params: {'api-version' => @client.api_version},
227
+ body: request_content,
228
+ headers: request_headers.merge(custom_headers || {}),
229
+ base_url: request_url
230
+ }
231
+ promise = @client.make_request_async(:put, path_template, options)
232
+
233
+ promise = promise.then do |result|
234
+ http_response = result.response
235
+ status_code = http_response.status
236
+ response_content = http_response.body
237
+ unless status_code == 200
238
+ error_model = JSON.load(response_content)
239
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
240
+ end
241
+
242
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
243
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
244
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
245
+ # Deserialize Response
246
+ if status_code == 200
247
+ begin
248
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
249
+ result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::FileServiceProperties.mapper()
250
+ result.body = @client.deserialize(result_mapper, parsed_response)
251
+ rescue Exception => e
252
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
253
+ end
254
+ end
255
+
256
+ result
257
+ end
258
+
259
+ promise.execute
260
+ end
261
+
262
+ #
263
+ # Gets the properties of file services in storage accounts, including CORS
264
+ # (Cross-Origin Resource Sharing) rules.
265
+ #
266
+ # @param resource_group_name [String] The name of the resource group within the
267
+ # user's subscription. The name is case insensitive.
268
+ # @param account_name [String] The name of the storage account within the
269
+ # specified resource group. Storage account names must be between 3 and 24
270
+ # characters in length and use numbers and lower-case letters only.
271
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
272
+ # will be added to the HTTP request.
273
+ #
274
+ # @return [FileServiceProperties] operation results.
275
+ #
276
+ def get_service_properties(resource_group_name, account_name, custom_headers:nil)
277
+ response = get_service_properties_async(resource_group_name, account_name, custom_headers:custom_headers).value!
278
+ response.body unless response.nil?
279
+ end
280
+
281
+ #
282
+ # Gets the properties of file services in storage accounts, including CORS
283
+ # (Cross-Origin Resource Sharing) rules.
284
+ #
285
+ # @param resource_group_name [String] The name of the resource group within the
286
+ # user's subscription. The name is case insensitive.
287
+ # @param account_name [String] The name of the storage account within the
288
+ # specified resource group. Storage account names must be between 3 and 24
289
+ # characters in length and use numbers and lower-case letters only.
290
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
291
+ # will be added to the HTTP request.
292
+ #
293
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
294
+ #
295
+ def get_service_properties_with_http_info(resource_group_name, account_name, custom_headers:nil)
296
+ get_service_properties_async(resource_group_name, account_name, custom_headers:custom_headers).value!
297
+ end
298
+
299
+ #
300
+ # Gets the properties of file services in storage accounts, including CORS
301
+ # (Cross-Origin Resource Sharing) rules.
302
+ #
303
+ # @param resource_group_name [String] The name of the resource group within the
304
+ # user's subscription. The name is case insensitive.
305
+ # @param account_name [String] The name of the storage account within the
306
+ # specified resource group. Storage account names must be between 3 and 24
307
+ # characters in length and use numbers and lower-case letters only.
308
+ # @param [Hash{String => String}] A hash of custom headers that will be added
309
+ # to the HTTP request.
310
+ #
311
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
312
+ #
313
+ def get_service_properties_async(resource_group_name, account_name, custom_headers:nil)
314
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
315
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
316
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
317
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
318
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
319
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
320
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
321
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
322
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
323
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
324
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
325
+ file_services_name = 'default'
326
+
327
+
328
+ request_headers = {}
329
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
330
+
331
+ # Set Headers
332
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
333
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
334
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/{FileServicesName}'
335
+
336
+ request_url = @base_url || @client.base_url
337
+
338
+ options = {
339
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
340
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id,'FileServicesName' => file_services_name},
341
+ query_params: {'api-version' => @client.api_version},
342
+ headers: request_headers.merge(custom_headers || {}),
343
+ base_url: request_url
344
+ }
345
+ promise = @client.make_request_async(:get, path_template, options)
346
+
347
+ promise = promise.then do |result|
348
+ http_response = result.response
349
+ status_code = http_response.status
350
+ response_content = http_response.body
351
+ unless status_code == 200
352
+ error_model = JSON.load(response_content)
353
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
354
+ end
355
+
356
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
357
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
358
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
359
+ # Deserialize Response
360
+ if status_code == 200
361
+ begin
362
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
363
+ result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::FileServiceProperties.mapper()
364
+ result.body = @client.deserialize(result_mapper, parsed_response)
365
+ rescue Exception => e
366
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
367
+ end
368
+ end
369
+
370
+ result
371
+ end
372
+
373
+ promise.execute
374
+ end
375
+
376
+ end
377
+ end
@@ -0,0 +1,957 @@
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::V2021_01_01
7
+ #
8
+ # The Azure Storage Management API.
9
+ #
10
+ class FileShares
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the FileShares 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 all shares.
26
+ #
27
+ # @param resource_group_name [String] The name of the resource group within the
28
+ # user's subscription. The name is case insensitive.
29
+ # @param account_name [String] The name of the storage account within the
30
+ # specified resource group. Storage account names must be between 3 and 24
31
+ # characters in length and use numbers and lower-case letters only.
32
+ # @param maxpagesize [String] Optional. Specified maximum number of shares that
33
+ # can be included in the list.
34
+ # @param filter [String] Optional. When specified, only share names starting
35
+ # with the filter will be listed.
36
+ # @param expand [ListSharesExpand] Optional, used to expand the properties
37
+ # within share's properties. Possible values include: 'deleted', 'snapshots'
38
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
39
+ # will be added to the HTTP request.
40
+ #
41
+ # @return [Array<FileShareItem>] operation results.
42
+ #
43
+ def list(resource_group_name, account_name, maxpagesize:nil, filter:nil, expand:nil, custom_headers:nil)
44
+ first_page = list_as_lazy(resource_group_name, account_name, maxpagesize:maxpagesize, filter:filter, expand:expand, custom_headers:custom_headers)
45
+ first_page.get_all_items
46
+ end
47
+
48
+ #
49
+ # Lists all shares.
50
+ #
51
+ # @param resource_group_name [String] The name of the resource group within the
52
+ # user's subscription. The name is case insensitive.
53
+ # @param account_name [String] The name of the storage account within the
54
+ # specified resource group. Storage account names must be between 3 and 24
55
+ # characters in length and use numbers and lower-case letters only.
56
+ # @param maxpagesize [String] Optional. Specified maximum number of shares that
57
+ # can be included in the list.
58
+ # @param filter [String] Optional. When specified, only share names starting
59
+ # with the filter will be listed.
60
+ # @param expand [ListSharesExpand] Optional, used to expand the properties
61
+ # within share's properties. Possible values include: 'deleted', 'snapshots'
62
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
63
+ # will be added to the HTTP request.
64
+ #
65
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
66
+ #
67
+ def list_with_http_info(resource_group_name, account_name, maxpagesize:nil, filter:nil, expand:nil, custom_headers:nil)
68
+ list_async(resource_group_name, account_name, maxpagesize:maxpagesize, filter:filter, expand:expand, custom_headers:custom_headers).value!
69
+ end
70
+
71
+ #
72
+ # Lists all shares.
73
+ #
74
+ # @param resource_group_name [String] The name of the resource group within the
75
+ # user's subscription. The name is case insensitive.
76
+ # @param account_name [String] The name of the storage account within the
77
+ # specified resource group. Storage account names must be between 3 and 24
78
+ # characters in length and use numbers and lower-case letters only.
79
+ # @param maxpagesize [String] Optional. Specified maximum number of shares that
80
+ # can be included in the list.
81
+ # @param filter [String] Optional. When specified, only share names starting
82
+ # with the filter will be listed.
83
+ # @param expand [ListSharesExpand] Optional, used to expand the properties
84
+ # within share's properties. Possible values include: 'deleted', 'snapshots'
85
+ # @param [Hash{String => String}] A hash of custom headers that will be added
86
+ # to the HTTP request.
87
+ #
88
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
89
+ #
90
+ def list_async(resource_group_name, account_name, maxpagesize:nil, filter:nil, expand:nil, custom_headers:nil)
91
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
92
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
93
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
94
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
95
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
96
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
97
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
98
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
99
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
100
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
101
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
102
+
103
+
104
+ request_headers = {}
105
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
106
+
107
+ # Set Headers
108
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
109
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
110
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares'
111
+
112
+ request_url = @base_url || @client.base_url
113
+
114
+ options = {
115
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
116
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
117
+ query_params: {'api-version' => @client.api_version,'$maxpagesize' => maxpagesize,'$filter' => filter,'$expand' => expand},
118
+ headers: request_headers.merge(custom_headers || {}),
119
+ base_url: request_url
120
+ }
121
+ promise = @client.make_request_async(:get, path_template, options)
122
+
123
+ promise = promise.then do |result|
124
+ http_response = result.response
125
+ status_code = http_response.status
126
+ response_content = http_response.body
127
+ unless status_code == 200
128
+ error_model = JSON.load(response_content)
129
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
130
+ end
131
+
132
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
133
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
134
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
135
+ # Deserialize Response
136
+ if status_code == 200
137
+ begin
138
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
139
+ result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::FileShareItems.mapper()
140
+ result.body = @client.deserialize(result_mapper, parsed_response)
141
+ rescue Exception => e
142
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
143
+ end
144
+ end
145
+
146
+ result
147
+ end
148
+
149
+ promise.execute
150
+ end
151
+
152
+ #
153
+ # Creates a new share under the specified account as described by request body.
154
+ # The share resource includes metadata and properties for that share. It does
155
+ # not include a list of the files contained by the share.
156
+ #
157
+ # @param resource_group_name [String] The name of the resource group within the
158
+ # user's subscription. The name is case insensitive.
159
+ # @param account_name [String] The name of the storage account within the
160
+ # specified resource group. Storage account names must be between 3 and 24
161
+ # characters in length and use numbers and lower-case letters only.
162
+ # @param share_name [String] The name of the file share within the specified
163
+ # storage account. File share names must be between 3 and 63 characters in
164
+ # length and use numbers, lower-case letters and dash (-) only. Every dash (-)
165
+ # character must be immediately preceded and followed by a letter or number.
166
+ # @param file_share [FileShare] Properties of the file share to create.
167
+ # @param expand [PutSharesExpand] Optional, used to create a snapshot. Possible
168
+ # values include: 'snapshots'
169
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
170
+ # will be added to the HTTP request.
171
+ #
172
+ # @return [FileShare] operation results.
173
+ #
174
+ def create(resource_group_name, account_name, share_name, file_share, expand:nil, custom_headers:nil)
175
+ response = create_async(resource_group_name, account_name, share_name, file_share, expand:expand, custom_headers:custom_headers).value!
176
+ response.body unless response.nil?
177
+ end
178
+
179
+ #
180
+ # Creates a new share under the specified account as described by request body.
181
+ # The share resource includes metadata and properties for that share. It does
182
+ # not include a list of the files contained by the share.
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 share_name [String] The name of the file share within the specified
190
+ # storage account. File share names must be between 3 and 63 characters in
191
+ # length and use numbers, lower-case letters and dash (-) only. Every dash (-)
192
+ # character must be immediately preceded and followed by a letter or number.
193
+ # @param file_share [FileShare] Properties of the file share to create.
194
+ # @param expand [PutSharesExpand] Optional, used to create a snapshot. Possible
195
+ # values include: 'snapshots'
196
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
197
+ # will be added to the HTTP request.
198
+ #
199
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
200
+ #
201
+ def create_with_http_info(resource_group_name, account_name, share_name, file_share, expand:nil, custom_headers:nil)
202
+ create_async(resource_group_name, account_name, share_name, file_share, expand:expand, custom_headers:custom_headers).value!
203
+ end
204
+
205
+ #
206
+ # Creates a new share under the specified account as described by request body.
207
+ # The share resource includes metadata and properties for that share. It does
208
+ # not include a list of the files contained by the share.
209
+ #
210
+ # @param resource_group_name [String] The name of the resource group within the
211
+ # user's subscription. The name is case insensitive.
212
+ # @param account_name [String] The name of the storage account within the
213
+ # specified resource group. Storage account names must be between 3 and 24
214
+ # characters in length and use numbers and lower-case letters only.
215
+ # @param share_name [String] The name of the file share within the specified
216
+ # storage account. File share names must be between 3 and 63 characters in
217
+ # length and use numbers, lower-case letters and dash (-) only. Every dash (-)
218
+ # character must be immediately preceded and followed by a letter or number.
219
+ # @param file_share [FileShare] Properties of the file share to create.
220
+ # @param expand [PutSharesExpand] Optional, used to create a snapshot. Possible
221
+ # values include: 'snapshots'
222
+ # @param [Hash{String => String}] A hash of custom headers that will be added
223
+ # to the HTTP request.
224
+ #
225
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
226
+ #
227
+ def create_async(resource_group_name, account_name, share_name, file_share, expand:nil, custom_headers:nil)
228
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
229
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
230
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
231
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
232
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
233
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
234
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
235
+ fail ArgumentError, 'share_name is nil' if share_name.nil?
236
+ fail ArgumentError, "'share_name' should satisfy the constraint - 'MaxLength': '63'" if !share_name.nil? && share_name.length > 63
237
+ fail ArgumentError, "'share_name' should satisfy the constraint - 'MinLength': '3'" if !share_name.nil? && share_name.length < 3
238
+ fail ArgumentError, 'file_share is nil' if file_share.nil?
239
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
240
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
241
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
242
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
243
+
244
+
245
+ request_headers = {}
246
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
247
+
248
+ # Set Headers
249
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
250
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
251
+
252
+ # Serialize Request
253
+ request_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::FileShare.mapper()
254
+ request_content = @client.serialize(request_mapper, file_share)
255
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
256
+
257
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}'
258
+
259
+ request_url = @base_url || @client.base_url
260
+
261
+ options = {
262
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
263
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'shareName' => share_name,'subscriptionId' => @client.subscription_id},
264
+ query_params: {'$expand' => expand,'api-version' => @client.api_version},
265
+ body: request_content,
266
+ headers: request_headers.merge(custom_headers || {}),
267
+ base_url: request_url
268
+ }
269
+ promise = @client.make_request_async(:put, 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 == 201 || status_code == 200
276
+ error_model = JSON.load(response_content)
277
+ fail MsRestAzure::AzureOperationError.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 == 201
285
+ begin
286
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
287
+ result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::FileShare.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
+ # Deserialize Response
294
+ if status_code == 200
295
+ begin
296
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
297
+ result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::FileShare.mapper()
298
+ result.body = @client.deserialize(result_mapper, parsed_response)
299
+ rescue Exception => e
300
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
301
+ end
302
+ end
303
+
304
+ result
305
+ end
306
+
307
+ promise.execute
308
+ end
309
+
310
+ #
311
+ # Updates share properties as specified in request body. Properties not
312
+ # mentioned in the request will not be changed. Update fails if the specified
313
+ # share does not already exist.
314
+ #
315
+ # @param resource_group_name [String] The name of the resource group within the
316
+ # user's subscription. The name is case insensitive.
317
+ # @param account_name [String] The name of the storage account within the
318
+ # specified resource group. Storage account names must be between 3 and 24
319
+ # characters in length and use numbers and lower-case letters only.
320
+ # @param share_name [String] The name of the file share within the specified
321
+ # storage account. File share names must be between 3 and 63 characters in
322
+ # length and use numbers, lower-case letters and dash (-) only. Every dash (-)
323
+ # character must be immediately preceded and followed by a letter or number.
324
+ # @param file_share [FileShare] Properties to update for the file share.
325
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
326
+ # will be added to the HTTP request.
327
+ #
328
+ # @return [FileShare] operation results.
329
+ #
330
+ def update(resource_group_name, account_name, share_name, file_share, custom_headers:nil)
331
+ response = update_async(resource_group_name, account_name, share_name, file_share, custom_headers:custom_headers).value!
332
+ response.body unless response.nil?
333
+ end
334
+
335
+ #
336
+ # Updates share properties as specified in request body. Properties not
337
+ # mentioned in the request will not be changed. Update fails if the specified
338
+ # share does not already exist.
339
+ #
340
+ # @param resource_group_name [String] The name of the resource group within the
341
+ # user's subscription. The name is case insensitive.
342
+ # @param account_name [String] The name of the storage account within the
343
+ # specified resource group. Storage account names must be between 3 and 24
344
+ # characters in length and use numbers and lower-case letters only.
345
+ # @param share_name [String] The name of the file share within the specified
346
+ # storage account. File share names must be between 3 and 63 characters in
347
+ # length and use numbers, lower-case letters and dash (-) only. Every dash (-)
348
+ # character must be immediately preceded and followed by a letter or number.
349
+ # @param file_share [FileShare] Properties to update for the file share.
350
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
351
+ # will be added to the HTTP request.
352
+ #
353
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
354
+ #
355
+ def update_with_http_info(resource_group_name, account_name, share_name, file_share, custom_headers:nil)
356
+ update_async(resource_group_name, account_name, share_name, file_share, custom_headers:custom_headers).value!
357
+ end
358
+
359
+ #
360
+ # Updates share properties as specified in request body. Properties not
361
+ # mentioned in the request will not be changed. Update fails if the specified
362
+ # share does not already exist.
363
+ #
364
+ # @param resource_group_name [String] The name of the resource group within the
365
+ # user's subscription. The name is case insensitive.
366
+ # @param account_name [String] The name of the storage account within the
367
+ # specified resource group. Storage account names must be between 3 and 24
368
+ # characters in length and use numbers and lower-case letters only.
369
+ # @param share_name [String] The name of the file share within the specified
370
+ # storage account. File share names must be between 3 and 63 characters in
371
+ # length and use numbers, lower-case letters and dash (-) only. Every dash (-)
372
+ # character must be immediately preceded and followed by a letter or number.
373
+ # @param file_share [FileShare] Properties to update for the file share.
374
+ # @param [Hash{String => String}] A hash of custom headers that will be added
375
+ # to the HTTP request.
376
+ #
377
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
378
+ #
379
+ def update_async(resource_group_name, account_name, share_name, file_share, custom_headers:nil)
380
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
381
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
382
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
383
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
384
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
385
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
386
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
387
+ fail ArgumentError, 'share_name is nil' if share_name.nil?
388
+ fail ArgumentError, "'share_name' should satisfy the constraint - 'MaxLength': '63'" if !share_name.nil? && share_name.length > 63
389
+ fail ArgumentError, "'share_name' should satisfy the constraint - 'MinLength': '3'" if !share_name.nil? && share_name.length < 3
390
+ fail ArgumentError, 'file_share is nil' if file_share.nil?
391
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
392
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
393
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
394
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
395
+
396
+
397
+ request_headers = {}
398
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
399
+
400
+ # Set Headers
401
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
402
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
403
+
404
+ # Serialize Request
405
+ request_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::FileShare.mapper()
406
+ request_content = @client.serialize(request_mapper, file_share)
407
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
408
+
409
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}'
410
+
411
+ request_url = @base_url || @client.base_url
412
+
413
+ options = {
414
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
415
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'shareName' => share_name,'subscriptionId' => @client.subscription_id},
416
+ query_params: {'api-version' => @client.api_version},
417
+ body: request_content,
418
+ headers: request_headers.merge(custom_headers || {}),
419
+ base_url: request_url
420
+ }
421
+ promise = @client.make_request_async(:patch, path_template, options)
422
+
423
+ promise = promise.then do |result|
424
+ http_response = result.response
425
+ status_code = http_response.status
426
+ response_content = http_response.body
427
+ unless status_code == 200
428
+ error_model = JSON.load(response_content)
429
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
430
+ end
431
+
432
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
433
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
434
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
435
+ # Deserialize Response
436
+ if status_code == 200
437
+ begin
438
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
439
+ result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::FileShare.mapper()
440
+ result.body = @client.deserialize(result_mapper, parsed_response)
441
+ rescue Exception => e
442
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
443
+ end
444
+ end
445
+
446
+ result
447
+ end
448
+
449
+ promise.execute
450
+ end
451
+
452
+ #
453
+ # Gets properties of a specified share.
454
+ #
455
+ # @param resource_group_name [String] The name of the resource group within the
456
+ # user's subscription. The name is case insensitive.
457
+ # @param account_name [String] The name of the storage account within the
458
+ # specified resource group. Storage account names must be between 3 and 24
459
+ # characters in length and use numbers and lower-case letters only.
460
+ # @param share_name [String] The name of the file share within the specified
461
+ # storage account. File share names must be between 3 and 63 characters in
462
+ # length and use numbers, lower-case letters and dash (-) only. Every dash (-)
463
+ # character must be immediately preceded and followed by a letter or number.
464
+ # @param expand [GetShareExpand] Optional, used to expand the properties within
465
+ # share's properties. Possible values include: 'stats'
466
+ # @param x_ms_snapshot [String] Optional, used to retrieve properties of a
467
+ # snapshot.
468
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
469
+ # will be added to the HTTP request.
470
+ #
471
+ # @return [FileShare] operation results.
472
+ #
473
+ def get(resource_group_name, account_name, share_name, expand:nil, x_ms_snapshot:nil, custom_headers:nil)
474
+ response = get_async(resource_group_name, account_name, share_name, expand:expand, x_ms_snapshot:x_ms_snapshot, custom_headers:custom_headers).value!
475
+ response.body unless response.nil?
476
+ end
477
+
478
+ #
479
+ # Gets properties of a specified share.
480
+ #
481
+ # @param resource_group_name [String] The name of the resource group within the
482
+ # user's subscription. The name is case insensitive.
483
+ # @param account_name [String] The name of the storage account within the
484
+ # specified resource group. Storage account names must be between 3 and 24
485
+ # characters in length and use numbers and lower-case letters only.
486
+ # @param share_name [String] The name of the file share within the specified
487
+ # storage account. File share names must be between 3 and 63 characters in
488
+ # length and use numbers, lower-case letters and dash (-) only. Every dash (-)
489
+ # character must be immediately preceded and followed by a letter or number.
490
+ # @param expand [GetShareExpand] Optional, used to expand the properties within
491
+ # share's properties. Possible values include: 'stats'
492
+ # @param x_ms_snapshot [String] Optional, used to retrieve properties of a
493
+ # snapshot.
494
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
495
+ # will be added to the HTTP request.
496
+ #
497
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
498
+ #
499
+ def get_with_http_info(resource_group_name, account_name, share_name, expand:nil, x_ms_snapshot:nil, custom_headers:nil)
500
+ get_async(resource_group_name, account_name, share_name, expand:expand, x_ms_snapshot:x_ms_snapshot, custom_headers:custom_headers).value!
501
+ end
502
+
503
+ #
504
+ # Gets properties of a specified share.
505
+ #
506
+ # @param resource_group_name [String] The name of the resource group within the
507
+ # user's subscription. The name is case insensitive.
508
+ # @param account_name [String] The name of the storage account within the
509
+ # specified resource group. Storage account names must be between 3 and 24
510
+ # characters in length and use numbers and lower-case letters only.
511
+ # @param share_name [String] The name of the file share within the specified
512
+ # storage account. File share names must be between 3 and 63 characters in
513
+ # length and use numbers, lower-case letters and dash (-) only. Every dash (-)
514
+ # character must be immediately preceded and followed by a letter or number.
515
+ # @param expand [GetShareExpand] Optional, used to expand the properties within
516
+ # share's properties. Possible values include: 'stats'
517
+ # @param x_ms_snapshot [String] Optional, used to retrieve properties of a
518
+ # snapshot.
519
+ # @param [Hash{String => String}] A hash of custom headers that will be added
520
+ # to the HTTP request.
521
+ #
522
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
523
+ #
524
+ def get_async(resource_group_name, account_name, share_name, expand:nil, x_ms_snapshot:nil, custom_headers:nil)
525
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
526
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
527
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
528
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
529
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
530
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
531
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
532
+ fail ArgumentError, 'share_name is nil' if share_name.nil?
533
+ fail ArgumentError, "'share_name' should satisfy the constraint - 'MaxLength': '63'" if !share_name.nil? && share_name.length > 63
534
+ fail ArgumentError, "'share_name' should satisfy the constraint - 'MinLength': '3'" if !share_name.nil? && share_name.length < 3
535
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
536
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
537
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
538
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
539
+
540
+
541
+ request_headers = {}
542
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
543
+
544
+ # Set Headers
545
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
546
+ request_headers['x-ms-snapshot'] = x_ms_snapshot unless x_ms_snapshot.nil?
547
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
548
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}'
549
+
550
+ request_url = @base_url || @client.base_url
551
+
552
+ options = {
553
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
554
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'shareName' => share_name,'subscriptionId' => @client.subscription_id},
555
+ query_params: {'api-version' => @client.api_version,'$expand' => expand},
556
+ headers: request_headers.merge(custom_headers || {}),
557
+ base_url: request_url
558
+ }
559
+ promise = @client.make_request_async(:get, path_template, options)
560
+
561
+ promise = promise.then do |result|
562
+ http_response = result.response
563
+ status_code = http_response.status
564
+ response_content = http_response.body
565
+ unless status_code == 200
566
+ error_model = JSON.load(response_content)
567
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
568
+ end
569
+
570
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
571
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
572
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
573
+ # Deserialize Response
574
+ if status_code == 200
575
+ begin
576
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
577
+ result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::FileShare.mapper()
578
+ result.body = @client.deserialize(result_mapper, parsed_response)
579
+ rescue Exception => e
580
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
581
+ end
582
+ end
583
+
584
+ result
585
+ end
586
+
587
+ promise.execute
588
+ end
589
+
590
+ #
591
+ # Deletes specified share under its account.
592
+ #
593
+ # @param resource_group_name [String] The name of the resource group within the
594
+ # user's subscription. The name is case insensitive.
595
+ # @param account_name [String] The name of the storage account within the
596
+ # specified resource group. Storage account names must be between 3 and 24
597
+ # characters in length and use numbers and lower-case letters only.
598
+ # @param share_name [String] The name of the file share within the specified
599
+ # storage account. File share names must be between 3 and 63 characters in
600
+ # length and use numbers, lower-case letters and dash (-) only. Every dash (-)
601
+ # character must be immediately preceded and followed by a letter or number.
602
+ # @param x_ms_snapshot [String] Optional, used to delete a snapshot.
603
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
604
+ # will be added to the HTTP request.
605
+ #
606
+ #
607
+ def delete(resource_group_name, account_name, share_name, x_ms_snapshot:nil, custom_headers:nil)
608
+ response = delete_async(resource_group_name, account_name, share_name, x_ms_snapshot:x_ms_snapshot, custom_headers:custom_headers).value!
609
+ nil
610
+ end
611
+
612
+ #
613
+ # Deletes specified share under its account.
614
+ #
615
+ # @param resource_group_name [String] The name of the resource group within the
616
+ # user's subscription. The name is case insensitive.
617
+ # @param account_name [String] The name of the storage account within the
618
+ # specified resource group. Storage account names must be between 3 and 24
619
+ # characters in length and use numbers and lower-case letters only.
620
+ # @param share_name [String] The name of the file share within the specified
621
+ # storage account. File share names must be between 3 and 63 characters in
622
+ # length and use numbers, lower-case letters and dash (-) only. Every dash (-)
623
+ # character must be immediately preceded and followed by a letter or number.
624
+ # @param x_ms_snapshot [String] Optional, used to delete a snapshot.
625
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
626
+ # will be added to the HTTP request.
627
+ #
628
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
629
+ #
630
+ def delete_with_http_info(resource_group_name, account_name, share_name, x_ms_snapshot:nil, custom_headers:nil)
631
+ delete_async(resource_group_name, account_name, share_name, x_ms_snapshot:x_ms_snapshot, custom_headers:custom_headers).value!
632
+ end
633
+
634
+ #
635
+ # Deletes specified share under its account.
636
+ #
637
+ # @param resource_group_name [String] The name of the resource group within the
638
+ # user's subscription. The name is case insensitive.
639
+ # @param account_name [String] The name of the storage account within the
640
+ # specified resource group. Storage account names must be between 3 and 24
641
+ # characters in length and use numbers and lower-case letters only.
642
+ # @param share_name [String] The name of the file share within the specified
643
+ # storage account. File share names must be between 3 and 63 characters in
644
+ # length and use numbers, lower-case letters and dash (-) only. Every dash (-)
645
+ # character must be immediately preceded and followed by a letter or number.
646
+ # @param x_ms_snapshot [String] Optional, used to delete a snapshot.
647
+ # @param [Hash{String => String}] A hash of custom headers that will be added
648
+ # to the HTTP request.
649
+ #
650
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
651
+ #
652
+ def delete_async(resource_group_name, account_name, share_name, x_ms_snapshot:nil, custom_headers:nil)
653
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
654
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
655
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
656
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
657
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
658
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
659
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
660
+ fail ArgumentError, 'share_name is nil' if share_name.nil?
661
+ fail ArgumentError, "'share_name' should satisfy the constraint - 'MaxLength': '63'" if !share_name.nil? && share_name.length > 63
662
+ fail ArgumentError, "'share_name' should satisfy the constraint - 'MinLength': '3'" if !share_name.nil? && share_name.length < 3
663
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
664
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
665
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
666
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
667
+
668
+
669
+ request_headers = {}
670
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
671
+
672
+ # Set Headers
673
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
674
+ request_headers['x-ms-snapshot'] = x_ms_snapshot unless x_ms_snapshot.nil?
675
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
676
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}'
677
+
678
+ request_url = @base_url || @client.base_url
679
+
680
+ options = {
681
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
682
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'shareName' => share_name,'subscriptionId' => @client.subscription_id},
683
+ query_params: {'api-version' => @client.api_version},
684
+ headers: request_headers.merge(custom_headers || {}),
685
+ base_url: request_url
686
+ }
687
+ promise = @client.make_request_async(:delete, path_template, options)
688
+
689
+ promise = promise.then do |result|
690
+ http_response = result.response
691
+ status_code = http_response.status
692
+ response_content = http_response.body
693
+ unless status_code == 200 || status_code == 204
694
+ error_model = JSON.load(response_content)
695
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
696
+ end
697
+
698
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
699
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
700
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
701
+
702
+ result
703
+ end
704
+
705
+ promise.execute
706
+ end
707
+
708
+ #
709
+ # Restore a file share within a valid retention days if share soft delete is
710
+ # enabled
711
+ #
712
+ # @param resource_group_name [String] The name of the resource group within the
713
+ # user's subscription. The name is case insensitive.
714
+ # @param account_name [String] The name of the storage account within the
715
+ # specified resource group. Storage account names must be between 3 and 24
716
+ # characters in length and use numbers and lower-case letters only.
717
+ # @param share_name [String] The name of the file share within the specified
718
+ # storage account. File share names must be between 3 and 63 characters in
719
+ # length and use numbers, lower-case letters and dash (-) only. Every dash (-)
720
+ # character must be immediately preceded and followed by a letter or number.
721
+ # @param deleted_share [DeletedShare]
722
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
723
+ # will be added to the HTTP request.
724
+ #
725
+ #
726
+ def restore(resource_group_name, account_name, share_name, deleted_share, custom_headers:nil)
727
+ response = restore_async(resource_group_name, account_name, share_name, deleted_share, custom_headers:custom_headers).value!
728
+ nil
729
+ end
730
+
731
+ #
732
+ # Restore a file share within a valid retention days if share soft delete is
733
+ # enabled
734
+ #
735
+ # @param resource_group_name [String] The name of the resource group within the
736
+ # user's subscription. The name is case insensitive.
737
+ # @param account_name [String] The name of the storage account within the
738
+ # specified resource group. Storage account names must be between 3 and 24
739
+ # characters in length and use numbers and lower-case letters only.
740
+ # @param share_name [String] The name of the file share within the specified
741
+ # storage account. File share names must be between 3 and 63 characters in
742
+ # length and use numbers, lower-case letters and dash (-) only. Every dash (-)
743
+ # character must be immediately preceded and followed by a letter or number.
744
+ # @param deleted_share [DeletedShare]
745
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
746
+ # will be added to the HTTP request.
747
+ #
748
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
749
+ #
750
+ def restore_with_http_info(resource_group_name, account_name, share_name, deleted_share, custom_headers:nil)
751
+ restore_async(resource_group_name, account_name, share_name, deleted_share, custom_headers:custom_headers).value!
752
+ end
753
+
754
+ #
755
+ # Restore a file share within a valid retention days if share soft delete is
756
+ # enabled
757
+ #
758
+ # @param resource_group_name [String] The name of the resource group within the
759
+ # user's subscription. The name is case insensitive.
760
+ # @param account_name [String] The name of the storage account within the
761
+ # specified resource group. Storage account names must be between 3 and 24
762
+ # characters in length and use numbers and lower-case letters only.
763
+ # @param share_name [String] The name of the file share within the specified
764
+ # storage account. File share names must be between 3 and 63 characters in
765
+ # length and use numbers, lower-case letters and dash (-) only. Every dash (-)
766
+ # character must be immediately preceded and followed by a letter or number.
767
+ # @param deleted_share [DeletedShare]
768
+ # @param [Hash{String => String}] A hash of custom headers that will be added
769
+ # to the HTTP request.
770
+ #
771
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
772
+ #
773
+ def restore_async(resource_group_name, account_name, share_name, deleted_share, custom_headers:nil)
774
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
775
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
776
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
777
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
778
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
779
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
780
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
781
+ fail ArgumentError, 'share_name is nil' if share_name.nil?
782
+ fail ArgumentError, "'share_name' should satisfy the constraint - 'MaxLength': '63'" if !share_name.nil? && share_name.length > 63
783
+ fail ArgumentError, "'share_name' should satisfy the constraint - 'MinLength': '3'" if !share_name.nil? && share_name.length < 3
784
+ fail ArgumentError, 'deleted_share is nil' if deleted_share.nil?
785
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
786
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
787
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
788
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
789
+
790
+
791
+ request_headers = {}
792
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
793
+
794
+ # Set Headers
795
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
796
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
797
+
798
+ # Serialize Request
799
+ request_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::DeletedShare.mapper()
800
+ request_content = @client.serialize(request_mapper, deleted_share)
801
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
802
+
803
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}/restore'
804
+
805
+ request_url = @base_url || @client.base_url
806
+
807
+ options = {
808
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
809
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'shareName' => share_name,'subscriptionId' => @client.subscription_id},
810
+ query_params: {'api-version' => @client.api_version},
811
+ body: request_content,
812
+ headers: request_headers.merge(custom_headers || {}),
813
+ base_url: request_url
814
+ }
815
+ promise = @client.make_request_async(:post, path_template, options)
816
+
817
+ promise = promise.then do |result|
818
+ http_response = result.response
819
+ status_code = http_response.status
820
+ response_content = http_response.body
821
+ unless status_code == 200
822
+ error_model = JSON.load(response_content)
823
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
824
+ end
825
+
826
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
827
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
828
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
829
+
830
+ result
831
+ end
832
+
833
+ promise.execute
834
+ end
835
+
836
+ #
837
+ # Lists all shares.
838
+ #
839
+ # @param next_page_link [String] The NextLink from the previous successful call
840
+ # to List operation.
841
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
842
+ # will be added to the HTTP request.
843
+ #
844
+ # @return [FileShareItems] operation results.
845
+ #
846
+ def list_next(next_page_link, custom_headers:nil)
847
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
848
+ response.body unless response.nil?
849
+ end
850
+
851
+ #
852
+ # Lists all shares.
853
+ #
854
+ # @param next_page_link [String] The NextLink from the previous successful call
855
+ # to List operation.
856
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
857
+ # will be added to the HTTP request.
858
+ #
859
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
860
+ #
861
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
862
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
863
+ end
864
+
865
+ #
866
+ # Lists all shares.
867
+ #
868
+ # @param next_page_link [String] The NextLink from the previous successful call
869
+ # to List operation.
870
+ # @param [Hash{String => String}] A hash of custom headers that will be added
871
+ # to the HTTP request.
872
+ #
873
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
874
+ #
875
+ def list_next_async(next_page_link, custom_headers:nil)
876
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
877
+
878
+
879
+ request_headers = {}
880
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
881
+
882
+ # Set Headers
883
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
884
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
885
+ path_template = '{nextLink}'
886
+
887
+ request_url = @base_url || @client.base_url
888
+
889
+ options = {
890
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
891
+ skip_encoding_path_params: {'nextLink' => next_page_link},
892
+ headers: request_headers.merge(custom_headers || {}),
893
+ base_url: request_url
894
+ }
895
+ promise = @client.make_request_async(:get, path_template, options)
896
+
897
+ promise = promise.then do |result|
898
+ http_response = result.response
899
+ status_code = http_response.status
900
+ response_content = http_response.body
901
+ unless status_code == 200
902
+ error_model = JSON.load(response_content)
903
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
904
+ end
905
+
906
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
907
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
908
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
909
+ # Deserialize Response
910
+ if status_code == 200
911
+ begin
912
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
913
+ result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::FileShareItems.mapper()
914
+ result.body = @client.deserialize(result_mapper, parsed_response)
915
+ rescue Exception => e
916
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
917
+ end
918
+ end
919
+
920
+ result
921
+ end
922
+
923
+ promise.execute
924
+ end
925
+
926
+ #
927
+ # Lists all shares.
928
+ #
929
+ # @param resource_group_name [String] The name of the resource group within the
930
+ # user's subscription. The name is case insensitive.
931
+ # @param account_name [String] The name of the storage account within the
932
+ # specified resource group. Storage account names must be between 3 and 24
933
+ # characters in length and use numbers and lower-case letters only.
934
+ # @param maxpagesize [String] Optional. Specified maximum number of shares that
935
+ # can be included in the list.
936
+ # @param filter [String] Optional. When specified, only share names starting
937
+ # with the filter will be listed.
938
+ # @param expand [ListSharesExpand] Optional, used to expand the properties
939
+ # within share's properties. Possible values include: 'deleted', 'snapshots'
940
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
941
+ # will be added to the HTTP request.
942
+ #
943
+ # @return [FileShareItems] which provide lazy access to pages of the response.
944
+ #
945
+ def list_as_lazy(resource_group_name, account_name, maxpagesize:nil, filter:nil, expand:nil, custom_headers:nil)
946
+ response = list_async(resource_group_name, account_name, maxpagesize:maxpagesize, filter:filter, expand:expand, custom_headers:custom_headers).value!
947
+ unless response.nil?
948
+ page = response.body
949
+ page.next_method = Proc.new do |next_page_link|
950
+ list_next_async(next_page_link, custom_headers:custom_headers)
951
+ end
952
+ page
953
+ end
954
+ end
955
+
956
+ end
957
+ end