azure_mgmt_storage 0.22.0 → 0.23.0

Sign up to get free protection for your applications and to get access to all the features.
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,138 @@
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 PrivateLinkResources
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the PrivateLinkResources 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
+ # Gets the private link resources that need to be created for a storage
26
+ # account.
27
+ #
28
+ # @param resource_group_name [String] The name of the resource group within the
29
+ # user's subscription. The name is case insensitive.
30
+ # @param account_name [String] The name of the storage account within the
31
+ # specified resource group. Storage account names must be between 3 and 24
32
+ # characters in length and use numbers and lower-case letters only.
33
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
34
+ # will be added to the HTTP request.
35
+ #
36
+ # @return [PrivateLinkResourceListResult] operation results.
37
+ #
38
+ def list_by_storage_account(resource_group_name, account_name, custom_headers:nil)
39
+ response = list_by_storage_account_async(resource_group_name, account_name, custom_headers:custom_headers).value!
40
+ response.body unless response.nil?
41
+ end
42
+
43
+ #
44
+ # Gets the private link resources that need to be created for a storage
45
+ # account.
46
+ #
47
+ # @param resource_group_name [String] The name of the resource group within the
48
+ # user's subscription. The name is case insensitive.
49
+ # @param account_name [String] The name of the storage account within the
50
+ # specified resource group. Storage account names must be between 3 and 24
51
+ # characters in length and use numbers and lower-case letters only.
52
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
53
+ # will be added to the HTTP request.
54
+ #
55
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
56
+ #
57
+ def list_by_storage_account_with_http_info(resource_group_name, account_name, custom_headers:nil)
58
+ list_by_storage_account_async(resource_group_name, account_name, custom_headers:custom_headers).value!
59
+ end
60
+
61
+ #
62
+ # Gets the private link resources that need to be created for a storage
63
+ # account.
64
+ #
65
+ # @param resource_group_name [String] The name of the resource group within the
66
+ # user's subscription. The name is case insensitive.
67
+ # @param account_name [String] The name of the storage account within the
68
+ # specified resource group. Storage account names must be between 3 and 24
69
+ # characters in length and use numbers and lower-case letters only.
70
+ # @param [Hash{String => String}] A hash of custom headers that will be added
71
+ # to the HTTP request.
72
+ #
73
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
74
+ #
75
+ def list_by_storage_account_async(resource_group_name, account_name, custom_headers:nil)
76
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
77
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
78
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
79
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
80
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
81
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
82
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
83
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
84
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
85
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
86
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
87
+
88
+
89
+ request_headers = {}
90
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
91
+
92
+ # Set Headers
93
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
94
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
95
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateLinkResources'
96
+
97
+ request_url = @base_url || @client.base_url
98
+
99
+ options = {
100
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
101
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
102
+ query_params: {'api-version' => @client.api_version},
103
+ headers: request_headers.merge(custom_headers || {}),
104
+ base_url: request_url
105
+ }
106
+ promise = @client.make_request_async(:get, path_template, options)
107
+
108
+ promise = promise.then do |result|
109
+ http_response = result.response
110
+ status_code = http_response.status
111
+ response_content = http_response.body
112
+ unless status_code == 200
113
+ error_model = JSON.load(response_content)
114
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
115
+ end
116
+
117
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
118
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
119
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
120
+ # Deserialize Response
121
+ if status_code == 200
122
+ begin
123
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
124
+ result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::PrivateLinkResourceListResult.mapper()
125
+ result.body = @client.deserialize(result_mapper, parsed_response)
126
+ rescue Exception => e
127
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
128
+ end
129
+ end
130
+
131
+ result
132
+ end
133
+
134
+ promise.execute
135
+ end
136
+
137
+ end
138
+ end
@@ -0,0 +1,805 @@
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 Queue
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Queue 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
+ # Creates a new queue with the specified queue name, under the specified
26
+ # account.
27
+ #
28
+ # @param resource_group_name [String] The name of the resource group within the
29
+ # user's subscription. The name is case insensitive.
30
+ # @param account_name [String] The name of the storage account within the
31
+ # specified resource group. Storage account names must be between 3 and 24
32
+ # characters in length and use numbers and lower-case letters only.
33
+ # @param queue_name [String] A queue name must be unique within a storage
34
+ # account and must be between 3 and 63 characters.The name must comprise of
35
+ # lowercase alphanumeric and dash(-) characters only, it should begin and end
36
+ # with an alphanumeric character and it cannot have two consecutive dash(-)
37
+ # characters.
38
+ # @param queue [StorageQueue] Queue properties and metadata to be created with
39
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
40
+ # will be added to the HTTP request.
41
+ #
42
+ # @return [StorageQueue] operation results.
43
+ #
44
+ def create(resource_group_name, account_name, queue_name, queue, custom_headers:nil)
45
+ response = create_async(resource_group_name, account_name, queue_name, queue, custom_headers:custom_headers).value!
46
+ response.body unless response.nil?
47
+ end
48
+
49
+ #
50
+ # Creates a new queue with the specified queue name, under the specified
51
+ # account.
52
+ #
53
+ # @param resource_group_name [String] The name of the resource group within the
54
+ # user's subscription. The name is case insensitive.
55
+ # @param account_name [String] The name of the storage account within the
56
+ # specified resource group. Storage account names must be between 3 and 24
57
+ # characters in length and use numbers and lower-case letters only.
58
+ # @param queue_name [String] A queue name must be unique within a storage
59
+ # account and must be between 3 and 63 characters.The name must comprise of
60
+ # lowercase alphanumeric and dash(-) characters only, it should begin and end
61
+ # with an alphanumeric character and it cannot have two consecutive dash(-)
62
+ # characters.
63
+ # @param queue [StorageQueue] Queue properties and metadata to be created with
64
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
65
+ # will be added to the HTTP request.
66
+ #
67
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
68
+ #
69
+ def create_with_http_info(resource_group_name, account_name, queue_name, queue, custom_headers:nil)
70
+ create_async(resource_group_name, account_name, queue_name, queue, custom_headers:custom_headers).value!
71
+ end
72
+
73
+ #
74
+ # Creates a new queue with the specified queue name, under the specified
75
+ # account.
76
+ #
77
+ # @param resource_group_name [String] The name of the resource group within the
78
+ # user's subscription. The name is case insensitive.
79
+ # @param account_name [String] The name of the storage account within the
80
+ # specified resource group. Storage account names must be between 3 and 24
81
+ # characters in length and use numbers and lower-case letters only.
82
+ # @param queue_name [String] A queue name must be unique within a storage
83
+ # account and must be between 3 and 63 characters.The name must comprise of
84
+ # lowercase alphanumeric and dash(-) characters only, it should begin and end
85
+ # with an alphanumeric character and it cannot have two consecutive dash(-)
86
+ # characters.
87
+ # @param queue [StorageQueue] Queue properties and metadata to be created with
88
+ # @param [Hash{String => String}] A hash of custom headers that will be added
89
+ # to the HTTP request.
90
+ #
91
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
92
+ #
93
+ def create_async(resource_group_name, account_name, queue_name, queue, custom_headers:nil)
94
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
95
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
96
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
97
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
98
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
99
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
100
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
101
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
102
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
103
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
104
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
105
+ fail ArgumentError, 'queue_name is nil' if queue_name.nil?
106
+ fail ArgumentError, "'queue_name' should satisfy the constraint - 'MaxLength': '63'" if !queue_name.nil? && queue_name.length > 63
107
+ fail ArgumentError, "'queue_name' should satisfy the constraint - 'MinLength': '3'" if !queue_name.nil? && queue_name.length < 3
108
+ fail ArgumentError, "'queue_name' should satisfy the constraint - 'Pattern': '^[a-z0-9]([a-z0-9]|(-(?!-))){1,61}[a-z0-9]$'" if !queue_name.nil? && queue_name.match(Regexp.new('^^[a-z0-9]([a-z0-9]|(-(?!-))){1,61}[a-z0-9]$$')).nil?
109
+ fail ArgumentError, 'queue is nil' if queue.nil?
110
+
111
+
112
+ request_headers = {}
113
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
114
+
115
+ # Set Headers
116
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
117
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
118
+
119
+ # Serialize Request
120
+ request_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::StorageQueue.mapper()
121
+ request_content = @client.serialize(request_mapper, queue)
122
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
123
+
124
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}'
125
+
126
+ request_url = @base_url || @client.base_url
127
+
128
+ options = {
129
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
130
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id,'queueName' => queue_name},
131
+ query_params: {'api-version' => @client.api_version},
132
+ body: request_content,
133
+ headers: request_headers.merge(custom_headers || {}),
134
+ base_url: request_url
135
+ }
136
+ promise = @client.make_request_async(:put, path_template, options)
137
+
138
+ promise = promise.then do |result|
139
+ http_response = result.response
140
+ status_code = http_response.status
141
+ response_content = http_response.body
142
+ unless status_code == 200
143
+ error_model = JSON.load(response_content)
144
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
145
+ end
146
+
147
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
148
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
149
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
150
+ # Deserialize Response
151
+ if status_code == 200
152
+ begin
153
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
154
+ result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::StorageQueue.mapper()
155
+ result.body = @client.deserialize(result_mapper, parsed_response)
156
+ rescue Exception => e
157
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
158
+ end
159
+ end
160
+
161
+ result
162
+ end
163
+
164
+ promise.execute
165
+ end
166
+
167
+ #
168
+ # Creates a new queue with the specified queue name, under the specified
169
+ # account.
170
+ #
171
+ # @param resource_group_name [String] The name of the resource group within the
172
+ # user's subscription. The name is case insensitive.
173
+ # @param account_name [String] The name of the storage account within the
174
+ # specified resource group. Storage account names must be between 3 and 24
175
+ # characters in length and use numbers and lower-case letters only.
176
+ # @param queue_name [String] A queue name must be unique within a storage
177
+ # account and must be between 3 and 63 characters.The name must comprise of
178
+ # lowercase alphanumeric and dash(-) characters only, it should begin and end
179
+ # with an alphanumeric character and it cannot have two consecutive dash(-)
180
+ # characters.
181
+ # @param queue [StorageQueue] Queue properties and metadata to be created with
182
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
183
+ # will be added to the HTTP request.
184
+ #
185
+ # @return [StorageQueue] operation results.
186
+ #
187
+ def update(resource_group_name, account_name, queue_name, queue, custom_headers:nil)
188
+ response = update_async(resource_group_name, account_name, queue_name, queue, custom_headers:custom_headers).value!
189
+ response.body unless response.nil?
190
+ end
191
+
192
+ #
193
+ # Creates a new queue with the specified queue name, under the specified
194
+ # account.
195
+ #
196
+ # @param resource_group_name [String] The name of the resource group within the
197
+ # user's subscription. The name is case insensitive.
198
+ # @param account_name [String] The name of the storage account within the
199
+ # specified resource group. Storage account names must be between 3 and 24
200
+ # characters in length and use numbers and lower-case letters only.
201
+ # @param queue_name [String] A queue name must be unique within a storage
202
+ # account and must be between 3 and 63 characters.The name must comprise of
203
+ # lowercase alphanumeric and dash(-) characters only, it should begin and end
204
+ # with an alphanumeric character and it cannot have two consecutive dash(-)
205
+ # characters.
206
+ # @param queue [StorageQueue] Queue properties and metadata to be created with
207
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
208
+ # will be added to the HTTP request.
209
+ #
210
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
211
+ #
212
+ def update_with_http_info(resource_group_name, account_name, queue_name, queue, custom_headers:nil)
213
+ update_async(resource_group_name, account_name, queue_name, queue, custom_headers:custom_headers).value!
214
+ end
215
+
216
+ #
217
+ # Creates a new queue with the specified queue name, under the specified
218
+ # account.
219
+ #
220
+ # @param resource_group_name [String] The name of the resource group within the
221
+ # user's subscription. The name is case insensitive.
222
+ # @param account_name [String] The name of the storage account within the
223
+ # specified resource group. Storage account names must be between 3 and 24
224
+ # characters in length and use numbers and lower-case letters only.
225
+ # @param queue_name [String] A queue name must be unique within a storage
226
+ # account and must be between 3 and 63 characters.The name must comprise of
227
+ # lowercase alphanumeric and dash(-) characters only, it should begin and end
228
+ # with an alphanumeric character and it cannot have two consecutive dash(-)
229
+ # characters.
230
+ # @param queue [StorageQueue] Queue properties and metadata to be created with
231
+ # @param [Hash{String => String}] A hash of custom headers that will be added
232
+ # to the HTTP request.
233
+ #
234
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
235
+ #
236
+ def update_async(resource_group_name, account_name, queue_name, queue, custom_headers:nil)
237
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
238
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
239
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
240
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
241
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
242
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
243
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
244
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
245
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
246
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
247
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
248
+ fail ArgumentError, 'queue_name is nil' if queue_name.nil?
249
+ fail ArgumentError, "'queue_name' should satisfy the constraint - 'MaxLength': '63'" if !queue_name.nil? && queue_name.length > 63
250
+ fail ArgumentError, "'queue_name' should satisfy the constraint - 'MinLength': '3'" if !queue_name.nil? && queue_name.length < 3
251
+ fail ArgumentError, "'queue_name' should satisfy the constraint - 'Pattern': '^[a-z0-9]([a-z0-9]|(-(?!-))){1,61}[a-z0-9]$'" if !queue_name.nil? && queue_name.match(Regexp.new('^^[a-z0-9]([a-z0-9]|(-(?!-))){1,61}[a-z0-9]$$')).nil?
252
+ fail ArgumentError, 'queue is nil' if queue.nil?
253
+
254
+
255
+ request_headers = {}
256
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
257
+
258
+ # Set Headers
259
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
260
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
261
+
262
+ # Serialize Request
263
+ request_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::StorageQueue.mapper()
264
+ request_content = @client.serialize(request_mapper, queue)
265
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
266
+
267
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}'
268
+
269
+ request_url = @base_url || @client.base_url
270
+
271
+ options = {
272
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
273
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id,'queueName' => queue_name},
274
+ query_params: {'api-version' => @client.api_version},
275
+ body: request_content,
276
+ headers: request_headers.merge(custom_headers || {}),
277
+ base_url: request_url
278
+ }
279
+ promise = @client.make_request_async(:patch, path_template, options)
280
+
281
+ promise = promise.then do |result|
282
+ http_response = result.response
283
+ status_code = http_response.status
284
+ response_content = http_response.body
285
+ unless status_code == 200
286
+ error_model = JSON.load(response_content)
287
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
288
+ end
289
+
290
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
291
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
292
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
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::StorageQueue.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
+ # Gets the queue with the specified queue name, under the specified account if
312
+ # it exists.
313
+ #
314
+ # @param resource_group_name [String] The name of the resource group within the
315
+ # user's subscription. The name is case insensitive.
316
+ # @param account_name [String] The name of the storage account within the
317
+ # specified resource group. Storage account names must be between 3 and 24
318
+ # characters in length and use numbers and lower-case letters only.
319
+ # @param queue_name [String] A queue name must be unique within a storage
320
+ # account and must be between 3 and 63 characters.The name must comprise of
321
+ # lowercase alphanumeric and dash(-) characters only, it should begin and end
322
+ # with an alphanumeric character and it cannot have two consecutive dash(-)
323
+ # characters.
324
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
325
+ # will be added to the HTTP request.
326
+ #
327
+ # @return [StorageQueue] operation results.
328
+ #
329
+ def get(resource_group_name, account_name, queue_name, custom_headers:nil)
330
+ response = get_async(resource_group_name, account_name, queue_name, custom_headers:custom_headers).value!
331
+ response.body unless response.nil?
332
+ end
333
+
334
+ #
335
+ # Gets the queue with the specified queue name, under the specified account if
336
+ # it exists.
337
+ #
338
+ # @param resource_group_name [String] The name of the resource group within the
339
+ # user's subscription. The name is case insensitive.
340
+ # @param account_name [String] The name of the storage account within the
341
+ # specified resource group. Storage account names must be between 3 and 24
342
+ # characters in length and use numbers and lower-case letters only.
343
+ # @param queue_name [String] A queue name must be unique within a storage
344
+ # account and must be between 3 and 63 characters.The name must comprise of
345
+ # lowercase alphanumeric and dash(-) characters only, it should begin and end
346
+ # with an alphanumeric character and it cannot have two consecutive dash(-)
347
+ # characters.
348
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
349
+ # will be added to the HTTP request.
350
+ #
351
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
352
+ #
353
+ def get_with_http_info(resource_group_name, account_name, queue_name, custom_headers:nil)
354
+ get_async(resource_group_name, account_name, queue_name, custom_headers:custom_headers).value!
355
+ end
356
+
357
+ #
358
+ # Gets the queue with the specified queue name, under the specified account if
359
+ # it exists.
360
+ #
361
+ # @param resource_group_name [String] The name of the resource group within the
362
+ # user's subscription. The name is case insensitive.
363
+ # @param account_name [String] The name of the storage account within the
364
+ # specified resource group. Storage account names must be between 3 and 24
365
+ # characters in length and use numbers and lower-case letters only.
366
+ # @param queue_name [String] A queue name must be unique within a storage
367
+ # account and must be between 3 and 63 characters.The name must comprise of
368
+ # lowercase alphanumeric and dash(-) characters only, it should begin and end
369
+ # with an alphanumeric character and it cannot have two consecutive dash(-)
370
+ # characters.
371
+ # @param [Hash{String => String}] A hash of custom headers that will be added
372
+ # to the HTTP request.
373
+ #
374
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
375
+ #
376
+ def get_async(resource_group_name, account_name, queue_name, custom_headers:nil)
377
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
378
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
379
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
380
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
381
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
382
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
383
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
384
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
385
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
386
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
387
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
388
+ fail ArgumentError, 'queue_name is nil' if queue_name.nil?
389
+ fail ArgumentError, "'queue_name' should satisfy the constraint - 'MaxLength': '63'" if !queue_name.nil? && queue_name.length > 63
390
+ fail ArgumentError, "'queue_name' should satisfy the constraint - 'MinLength': '3'" if !queue_name.nil? && queue_name.length < 3
391
+ fail ArgumentError, "'queue_name' should satisfy the constraint - 'Pattern': '^[a-z0-9]([a-z0-9]|(-(?!-))){1,61}[a-z0-9]$'" if !queue_name.nil? && queue_name.match(Regexp.new('^^[a-z0-9]([a-z0-9]|(-(?!-))){1,61}[a-z0-9]$$')).nil?
392
+
393
+
394
+ request_headers = {}
395
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
396
+
397
+ # Set Headers
398
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
399
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
400
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}'
401
+
402
+ request_url = @base_url || @client.base_url
403
+
404
+ options = {
405
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
406
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id,'queueName' => queue_name},
407
+ query_params: {'api-version' => @client.api_version},
408
+ headers: request_headers.merge(custom_headers || {}),
409
+ base_url: request_url
410
+ }
411
+ promise = @client.make_request_async(:get, path_template, options)
412
+
413
+ promise = promise.then do |result|
414
+ http_response = result.response
415
+ status_code = http_response.status
416
+ response_content = http_response.body
417
+ unless status_code == 200
418
+ error_model = JSON.load(response_content)
419
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
420
+ end
421
+
422
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
423
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
424
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
425
+ # Deserialize Response
426
+ if status_code == 200
427
+ begin
428
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
429
+ result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::StorageQueue.mapper()
430
+ result.body = @client.deserialize(result_mapper, parsed_response)
431
+ rescue Exception => e
432
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
433
+ end
434
+ end
435
+
436
+ result
437
+ end
438
+
439
+ promise.execute
440
+ end
441
+
442
+ #
443
+ # Deletes the queue with the specified queue name, under the specified account
444
+ # if it exists.
445
+ #
446
+ # @param resource_group_name [String] The name of the resource group within the
447
+ # user's subscription. The name is case insensitive.
448
+ # @param account_name [String] The name of the storage account within the
449
+ # specified resource group. Storage account names must be between 3 and 24
450
+ # characters in length and use numbers and lower-case letters only.
451
+ # @param queue_name [String] A queue name must be unique within a storage
452
+ # account and must be between 3 and 63 characters.The name must comprise of
453
+ # lowercase alphanumeric and dash(-) characters only, it should begin and end
454
+ # with an alphanumeric character and it cannot have two consecutive dash(-)
455
+ # characters.
456
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
457
+ # will be added to the HTTP request.
458
+ #
459
+ #
460
+ def delete(resource_group_name, account_name, queue_name, custom_headers:nil)
461
+ response = delete_async(resource_group_name, account_name, queue_name, custom_headers:custom_headers).value!
462
+ nil
463
+ end
464
+
465
+ #
466
+ # Deletes the queue with the specified queue name, under the specified account
467
+ # if it exists.
468
+ #
469
+ # @param resource_group_name [String] The name of the resource group within the
470
+ # user's subscription. The name is case insensitive.
471
+ # @param account_name [String] The name of the storage account within the
472
+ # specified resource group. Storage account names must be between 3 and 24
473
+ # characters in length and use numbers and lower-case letters only.
474
+ # @param queue_name [String] A queue name must be unique within a storage
475
+ # account and must be between 3 and 63 characters.The name must comprise of
476
+ # lowercase alphanumeric and dash(-) characters only, it should begin and end
477
+ # with an alphanumeric character and it cannot have two consecutive dash(-)
478
+ # characters.
479
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
480
+ # will be added to the HTTP request.
481
+ #
482
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
483
+ #
484
+ def delete_with_http_info(resource_group_name, account_name, queue_name, custom_headers:nil)
485
+ delete_async(resource_group_name, account_name, queue_name, custom_headers:custom_headers).value!
486
+ end
487
+
488
+ #
489
+ # Deletes the queue with the specified queue name, under the specified account
490
+ # if it exists.
491
+ #
492
+ # @param resource_group_name [String] The name of the resource group within the
493
+ # user's subscription. The name is case insensitive.
494
+ # @param account_name [String] The name of the storage account within the
495
+ # specified resource group. Storage account names must be between 3 and 24
496
+ # characters in length and use numbers and lower-case letters only.
497
+ # @param queue_name [String] A queue name must be unique within a storage
498
+ # account and must be between 3 and 63 characters.The name must comprise of
499
+ # lowercase alphanumeric and dash(-) characters only, it should begin and end
500
+ # with an alphanumeric character and it cannot have two consecutive dash(-)
501
+ # characters.
502
+ # @param [Hash{String => String}] A hash of custom headers that will be added
503
+ # to the HTTP request.
504
+ #
505
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
506
+ #
507
+ def delete_async(resource_group_name, account_name, queue_name, custom_headers:nil)
508
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
509
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
510
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
511
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
512
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
513
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
514
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
515
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
516
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
517
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
518
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
519
+ fail ArgumentError, 'queue_name is nil' if queue_name.nil?
520
+ fail ArgumentError, "'queue_name' should satisfy the constraint - 'MaxLength': '63'" if !queue_name.nil? && queue_name.length > 63
521
+ fail ArgumentError, "'queue_name' should satisfy the constraint - 'MinLength': '3'" if !queue_name.nil? && queue_name.length < 3
522
+ fail ArgumentError, "'queue_name' should satisfy the constraint - 'Pattern': '^[a-z0-9]([a-z0-9]|(-(?!-))){1,61}[a-z0-9]$'" if !queue_name.nil? && queue_name.match(Regexp.new('^^[a-z0-9]([a-z0-9]|(-(?!-))){1,61}[a-z0-9]$$')).nil?
523
+
524
+
525
+ request_headers = {}
526
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
527
+
528
+ # Set Headers
529
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
530
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
531
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}'
532
+
533
+ request_url = @base_url || @client.base_url
534
+
535
+ options = {
536
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
537
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id,'queueName' => queue_name},
538
+ query_params: {'api-version' => @client.api_version},
539
+ headers: request_headers.merge(custom_headers || {}),
540
+ base_url: request_url
541
+ }
542
+ promise = @client.make_request_async(:delete, path_template, options)
543
+
544
+ promise = promise.then do |result|
545
+ http_response = result.response
546
+ status_code = http_response.status
547
+ response_content = http_response.body
548
+ unless status_code == 204
549
+ error_model = JSON.load(response_content)
550
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
551
+ end
552
+
553
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
554
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
555
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
556
+
557
+ result
558
+ end
559
+
560
+ promise.execute
561
+ end
562
+
563
+ #
564
+ # Gets a list of all the queues under the specified storage account
565
+ #
566
+ # @param resource_group_name [String] The name of the resource group within the
567
+ # user's subscription. The name is case insensitive.
568
+ # @param account_name [String] The name of the storage account within the
569
+ # specified resource group. Storage account names must be between 3 and 24
570
+ # characters in length and use numbers and lower-case letters only.
571
+ # @param maxpagesize [String] Optional, a maximum number of queues that should
572
+ # be included in a list queue response
573
+ # @param filter [String] Optional, When specified, only the queues with a name
574
+ # starting with the given filter will be listed.
575
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
576
+ # will be added to the HTTP request.
577
+ #
578
+ # @return [Array<ListQueue>] operation results.
579
+ #
580
+ def list(resource_group_name, account_name, maxpagesize:nil, filter:nil, custom_headers:nil)
581
+ first_page = list_as_lazy(resource_group_name, account_name, maxpagesize:maxpagesize, filter:filter, custom_headers:custom_headers)
582
+ first_page.get_all_items
583
+ end
584
+
585
+ #
586
+ # Gets a list of all the queues under the specified storage account
587
+ #
588
+ # @param resource_group_name [String] The name of the resource group within the
589
+ # user's subscription. The name is case insensitive.
590
+ # @param account_name [String] The name of the storage account within the
591
+ # specified resource group. Storage account names must be between 3 and 24
592
+ # characters in length and use numbers and lower-case letters only.
593
+ # @param maxpagesize [String] Optional, a maximum number of queues that should
594
+ # be included in a list queue response
595
+ # @param filter [String] Optional, When specified, only the queues with a name
596
+ # starting with the given filter will be listed.
597
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
598
+ # will be added to the HTTP request.
599
+ #
600
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
601
+ #
602
+ def list_with_http_info(resource_group_name, account_name, maxpagesize:nil, filter:nil, custom_headers:nil)
603
+ list_async(resource_group_name, account_name, maxpagesize:maxpagesize, filter:filter, custom_headers:custom_headers).value!
604
+ end
605
+
606
+ #
607
+ # Gets a list of all the queues under the specified storage account
608
+ #
609
+ # @param resource_group_name [String] The name of the resource group within the
610
+ # user's subscription. The name is case insensitive.
611
+ # @param account_name [String] The name of the storage account within the
612
+ # specified resource group. Storage account names must be between 3 and 24
613
+ # characters in length and use numbers and lower-case letters only.
614
+ # @param maxpagesize [String] Optional, a maximum number of queues that should
615
+ # be included in a list queue response
616
+ # @param filter [String] Optional, When specified, only the queues with a name
617
+ # starting with the given filter will be listed.
618
+ # @param [Hash{String => String}] A hash of custom headers that will be added
619
+ # to the HTTP request.
620
+ #
621
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
622
+ #
623
+ def list_async(resource_group_name, account_name, maxpagesize:nil, filter:nil, custom_headers:nil)
624
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
625
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
626
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
627
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
628
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
629
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
630
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
631
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
632
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
633
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
634
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
635
+
636
+
637
+ request_headers = {}
638
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
639
+
640
+ # Set Headers
641
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
642
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
643
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues'
644
+
645
+ request_url = @base_url || @client.base_url
646
+
647
+ options = {
648
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
649
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
650
+ query_params: {'api-version' => @client.api_version,'$maxpagesize' => maxpagesize,'$filter' => filter},
651
+ headers: request_headers.merge(custom_headers || {}),
652
+ base_url: request_url
653
+ }
654
+ promise = @client.make_request_async(:get, path_template, options)
655
+
656
+ promise = promise.then do |result|
657
+ http_response = result.response
658
+ status_code = http_response.status
659
+ response_content = http_response.body
660
+ unless status_code == 200
661
+ error_model = JSON.load(response_content)
662
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
663
+ end
664
+
665
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
666
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
667
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
668
+ # Deserialize Response
669
+ if status_code == 200
670
+ begin
671
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
672
+ result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::ListQueueResource.mapper()
673
+ result.body = @client.deserialize(result_mapper, parsed_response)
674
+ rescue Exception => e
675
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
676
+ end
677
+ end
678
+
679
+ result
680
+ end
681
+
682
+ promise.execute
683
+ end
684
+
685
+ #
686
+ # Gets a list of all the queues under the specified storage account
687
+ #
688
+ # @param next_page_link [String] The NextLink from the previous successful call
689
+ # to List operation.
690
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
691
+ # will be added to the HTTP request.
692
+ #
693
+ # @return [ListQueueResource] operation results.
694
+ #
695
+ def list_next(next_page_link, custom_headers:nil)
696
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
697
+ response.body unless response.nil?
698
+ end
699
+
700
+ #
701
+ # Gets a list of all the queues under the specified storage account
702
+ #
703
+ # @param next_page_link [String] The NextLink from the previous successful call
704
+ # to List operation.
705
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
706
+ # will be added to the HTTP request.
707
+ #
708
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
709
+ #
710
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
711
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
712
+ end
713
+
714
+ #
715
+ # Gets a list of all the queues under the specified storage account
716
+ #
717
+ # @param next_page_link [String] The NextLink from the previous successful call
718
+ # to List operation.
719
+ # @param [Hash{String => String}] A hash of custom headers that will be added
720
+ # to the HTTP request.
721
+ #
722
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
723
+ #
724
+ def list_next_async(next_page_link, custom_headers:nil)
725
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
726
+
727
+
728
+ request_headers = {}
729
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
730
+
731
+ # Set Headers
732
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
733
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
734
+ path_template = '{nextLink}'
735
+
736
+ request_url = @base_url || @client.base_url
737
+
738
+ options = {
739
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
740
+ skip_encoding_path_params: {'nextLink' => next_page_link},
741
+ headers: request_headers.merge(custom_headers || {}),
742
+ base_url: request_url
743
+ }
744
+ promise = @client.make_request_async(:get, path_template, options)
745
+
746
+ promise = promise.then do |result|
747
+ http_response = result.response
748
+ status_code = http_response.status
749
+ response_content = http_response.body
750
+ unless status_code == 200
751
+ error_model = JSON.load(response_content)
752
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
753
+ end
754
+
755
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
756
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
757
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
758
+ # Deserialize Response
759
+ if status_code == 200
760
+ begin
761
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
762
+ result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::ListQueueResource.mapper()
763
+ result.body = @client.deserialize(result_mapper, parsed_response)
764
+ rescue Exception => e
765
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
766
+ end
767
+ end
768
+
769
+ result
770
+ end
771
+
772
+ promise.execute
773
+ end
774
+
775
+ #
776
+ # Gets a list of all the queues under the specified storage account
777
+ #
778
+ # @param resource_group_name [String] The name of the resource group within the
779
+ # user's subscription. The name is case insensitive.
780
+ # @param account_name [String] The name of the storage account within the
781
+ # specified resource group. Storage account names must be between 3 and 24
782
+ # characters in length and use numbers and lower-case letters only.
783
+ # @param maxpagesize [String] Optional, a maximum number of queues that should
784
+ # be included in a list queue response
785
+ # @param filter [String] Optional, When specified, only the queues with a name
786
+ # starting with the given filter will be listed.
787
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
788
+ # will be added to the HTTP request.
789
+ #
790
+ # @return [ListQueueResource] which provide lazy access to pages of the
791
+ # response.
792
+ #
793
+ def list_as_lazy(resource_group_name, account_name, maxpagesize:nil, filter:nil, custom_headers:nil)
794
+ response = list_async(resource_group_name, account_name, maxpagesize:maxpagesize, filter:filter, custom_headers:custom_headers).value!
795
+ unless response.nil?
796
+ page = response.body
797
+ page.next_method = Proc.new do |next_page_link|
798
+ list_next_async(next_page_link, custom_headers:custom_headers)
799
+ end
800
+ page
801
+ end
802
+ end
803
+
804
+ end
805
+ end