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,691 @@
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 EncryptionScopes
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the EncryptionScopes 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
+ # Synchronously creates or updates an encryption scope under the specified
26
+ # storage account. If an encryption scope is already created and a subsequent
27
+ # request is issued with different properties, the encryption scope properties
28
+ # will be updated per the specified request.
29
+ #
30
+ # @param resource_group_name [String] The name of the resource group within the
31
+ # user's subscription. The name is case insensitive.
32
+ # @param account_name [String] The name of the storage account within the
33
+ # specified resource group. Storage account names must be between 3 and 24
34
+ # characters in length and use numbers and lower-case letters only.
35
+ # @param encryption_scope_name [String] The name of the encryption scope within
36
+ # the specified storage account. Encryption scope names must be between 3 and
37
+ # 63 characters in length and use numbers, lower-case letters and dash (-)
38
+ # only. Every dash (-) character must be immediately preceded and followed by a
39
+ # letter or number.
40
+ # @param encryption_scope [EncryptionScope] Encryption scope properties to be
41
+ # used for the create or update.
42
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
43
+ # will be added to the HTTP request.
44
+ #
45
+ # @return [EncryptionScope] operation results.
46
+ #
47
+ def put(resource_group_name, account_name, encryption_scope_name, encryption_scope, custom_headers:nil)
48
+ response = put_async(resource_group_name, account_name, encryption_scope_name, encryption_scope, custom_headers:custom_headers).value!
49
+ response.body unless response.nil?
50
+ end
51
+
52
+ #
53
+ # Synchronously creates or updates an encryption scope under the specified
54
+ # storage account. If an encryption scope is already created and a subsequent
55
+ # request is issued with different properties, the encryption scope properties
56
+ # will be updated per the specified request.
57
+ #
58
+ # @param resource_group_name [String] The name of the resource group within the
59
+ # user's subscription. The name is case insensitive.
60
+ # @param account_name [String] The name of the storage account within the
61
+ # specified resource group. Storage account names must be between 3 and 24
62
+ # characters in length and use numbers and lower-case letters only.
63
+ # @param encryption_scope_name [String] The name of the encryption scope within
64
+ # the specified storage account. Encryption scope names must be between 3 and
65
+ # 63 characters in length and use numbers, lower-case letters and dash (-)
66
+ # only. Every dash (-) character must be immediately preceded and followed by a
67
+ # letter or number.
68
+ # @param encryption_scope [EncryptionScope] Encryption scope properties to be
69
+ # used for the create or update.
70
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
71
+ # will be added to the HTTP request.
72
+ #
73
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
74
+ #
75
+ def put_with_http_info(resource_group_name, account_name, encryption_scope_name, encryption_scope, custom_headers:nil)
76
+ put_async(resource_group_name, account_name, encryption_scope_name, encryption_scope, custom_headers:custom_headers).value!
77
+ end
78
+
79
+ #
80
+ # Synchronously creates or updates an encryption scope under the specified
81
+ # storage account. If an encryption scope is already created and a subsequent
82
+ # request is issued with different properties, the encryption scope properties
83
+ # will be updated per the specified request.
84
+ #
85
+ # @param resource_group_name [String] The name of the resource group within the
86
+ # user's subscription. The name is case insensitive.
87
+ # @param account_name [String] The name of the storage account within the
88
+ # specified resource group. Storage account names must be between 3 and 24
89
+ # characters in length and use numbers and lower-case letters only.
90
+ # @param encryption_scope_name [String] The name of the encryption scope within
91
+ # the specified storage account. Encryption scope names must be between 3 and
92
+ # 63 characters in length and use numbers, lower-case letters and dash (-)
93
+ # only. Every dash (-) character must be immediately preceded and followed by a
94
+ # letter or number.
95
+ # @param encryption_scope [EncryptionScope] Encryption scope properties to be
96
+ # used for the create or update.
97
+ # @param [Hash{String => String}] A hash of custom headers that will be added
98
+ # to the HTTP request.
99
+ #
100
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
101
+ #
102
+ def put_async(resource_group_name, account_name, encryption_scope_name, encryption_scope, custom_headers:nil)
103
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
104
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
105
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
106
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
107
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
108
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
109
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
110
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
111
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
112
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
113
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
114
+ fail ArgumentError, 'encryption_scope_name is nil' if encryption_scope_name.nil?
115
+ fail ArgumentError, "'encryption_scope_name' should satisfy the constraint - 'MaxLength': '63'" if !encryption_scope_name.nil? && encryption_scope_name.length > 63
116
+ fail ArgumentError, "'encryption_scope_name' should satisfy the constraint - 'MinLength': '3'" if !encryption_scope_name.nil? && encryption_scope_name.length < 3
117
+ fail ArgumentError, 'encryption_scope is nil' if encryption_scope.nil?
118
+
119
+
120
+ request_headers = {}
121
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
122
+
123
+ # Set Headers
124
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
125
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
126
+
127
+ # Serialize Request
128
+ request_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::EncryptionScope.mapper()
129
+ request_content = @client.serialize(request_mapper, encryption_scope)
130
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
131
+
132
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}'
133
+
134
+ request_url = @base_url || @client.base_url
135
+
136
+ options = {
137
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
138
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id,'encryptionScopeName' => encryption_scope_name},
139
+ query_params: {'api-version' => @client.api_version},
140
+ body: request_content,
141
+ headers: request_headers.merge(custom_headers || {}),
142
+ base_url: request_url
143
+ }
144
+ promise = @client.make_request_async(:put, path_template, options)
145
+
146
+ promise = promise.then do |result|
147
+ http_response = result.response
148
+ status_code = http_response.status
149
+ response_content = http_response.body
150
+ unless status_code == 201 || status_code == 200
151
+ error_model = JSON.load(response_content)
152
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
153
+ end
154
+
155
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
156
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
157
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
158
+ # Deserialize Response
159
+ if status_code == 201
160
+ begin
161
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
162
+ result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::EncryptionScope.mapper()
163
+ result.body = @client.deserialize(result_mapper, parsed_response)
164
+ rescue Exception => e
165
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
166
+ end
167
+ end
168
+ # Deserialize Response
169
+ if status_code == 200
170
+ begin
171
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
172
+ result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::EncryptionScope.mapper()
173
+ result.body = @client.deserialize(result_mapper, parsed_response)
174
+ rescue Exception => e
175
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
176
+ end
177
+ end
178
+
179
+ result
180
+ end
181
+
182
+ promise.execute
183
+ end
184
+
185
+ #
186
+ # Update encryption scope properties as specified in the request body. Update
187
+ # fails if the specified encryption scope does not already exist.
188
+ #
189
+ # @param resource_group_name [String] The name of the resource group within the
190
+ # user's subscription. The name is case insensitive.
191
+ # @param account_name [String] The name of the storage account within the
192
+ # specified resource group. Storage account names must be between 3 and 24
193
+ # characters in length and use numbers and lower-case letters only.
194
+ # @param encryption_scope_name [String] The name of the encryption scope within
195
+ # the specified storage account. Encryption scope names must be between 3 and
196
+ # 63 characters in length and use numbers, lower-case letters and dash (-)
197
+ # only. Every dash (-) character must be immediately preceded and followed by a
198
+ # letter or number.
199
+ # @param encryption_scope [EncryptionScope] Encryption scope properties to be
200
+ # used for the update.
201
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
202
+ # will be added to the HTTP request.
203
+ #
204
+ # @return [EncryptionScope] operation results.
205
+ #
206
+ def patch(resource_group_name, account_name, encryption_scope_name, encryption_scope, custom_headers:nil)
207
+ response = patch_async(resource_group_name, account_name, encryption_scope_name, encryption_scope, custom_headers:custom_headers).value!
208
+ response.body unless response.nil?
209
+ end
210
+
211
+ #
212
+ # Update encryption scope properties as specified in the request body. Update
213
+ # fails if the specified encryption scope does not already exist.
214
+ #
215
+ # @param resource_group_name [String] The name of the resource group within the
216
+ # user's subscription. The name is case insensitive.
217
+ # @param account_name [String] The name of the storage account within the
218
+ # specified resource group. Storage account names must be between 3 and 24
219
+ # characters in length and use numbers and lower-case letters only.
220
+ # @param encryption_scope_name [String] The name of the encryption scope within
221
+ # the specified storage account. Encryption scope names must be between 3 and
222
+ # 63 characters in length and use numbers, lower-case letters and dash (-)
223
+ # only. Every dash (-) character must be immediately preceded and followed by a
224
+ # letter or number.
225
+ # @param encryption_scope [EncryptionScope] Encryption scope properties to be
226
+ # used for the update.
227
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
228
+ # will be added to the HTTP request.
229
+ #
230
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
231
+ #
232
+ def patch_with_http_info(resource_group_name, account_name, encryption_scope_name, encryption_scope, custom_headers:nil)
233
+ patch_async(resource_group_name, account_name, encryption_scope_name, encryption_scope, custom_headers:custom_headers).value!
234
+ end
235
+
236
+ #
237
+ # Update encryption scope properties as specified in the request body. Update
238
+ # fails if the specified encryption scope does not already exist.
239
+ #
240
+ # @param resource_group_name [String] The name of the resource group within the
241
+ # user's subscription. The name is case insensitive.
242
+ # @param account_name [String] The name of the storage account within the
243
+ # specified resource group. Storage account names must be between 3 and 24
244
+ # characters in length and use numbers and lower-case letters only.
245
+ # @param encryption_scope_name [String] The name of the encryption scope within
246
+ # the specified storage account. Encryption scope names must be between 3 and
247
+ # 63 characters in length and use numbers, lower-case letters and dash (-)
248
+ # only. Every dash (-) character must be immediately preceded and followed by a
249
+ # letter or number.
250
+ # @param encryption_scope [EncryptionScope] Encryption scope properties to be
251
+ # used for the update.
252
+ # @param [Hash{String => String}] A hash of custom headers that will be added
253
+ # to the HTTP request.
254
+ #
255
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
256
+ #
257
+ def patch_async(resource_group_name, account_name, encryption_scope_name, encryption_scope, custom_headers:nil)
258
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
259
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
260
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
261
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
262
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
263
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
264
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
265
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
266
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
267
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
268
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
269
+ fail ArgumentError, 'encryption_scope_name is nil' if encryption_scope_name.nil?
270
+ fail ArgumentError, "'encryption_scope_name' should satisfy the constraint - 'MaxLength': '63'" if !encryption_scope_name.nil? && encryption_scope_name.length > 63
271
+ fail ArgumentError, "'encryption_scope_name' should satisfy the constraint - 'MinLength': '3'" if !encryption_scope_name.nil? && encryption_scope_name.length < 3
272
+ fail ArgumentError, 'encryption_scope is nil' if encryption_scope.nil?
273
+
274
+
275
+ request_headers = {}
276
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
277
+
278
+ # Set Headers
279
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
280
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
281
+
282
+ # Serialize Request
283
+ request_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::EncryptionScope.mapper()
284
+ request_content = @client.serialize(request_mapper, encryption_scope)
285
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
286
+
287
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}'
288
+
289
+ request_url = @base_url || @client.base_url
290
+
291
+ options = {
292
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
293
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id,'encryptionScopeName' => encryption_scope_name},
294
+ query_params: {'api-version' => @client.api_version},
295
+ body: request_content,
296
+ headers: request_headers.merge(custom_headers || {}),
297
+ base_url: request_url
298
+ }
299
+ promise = @client.make_request_async(:patch, path_template, options)
300
+
301
+ promise = promise.then do |result|
302
+ http_response = result.response
303
+ status_code = http_response.status
304
+ response_content = http_response.body
305
+ unless status_code == 200
306
+ error_model = JSON.load(response_content)
307
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
308
+ end
309
+
310
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
311
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
312
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
313
+ # Deserialize Response
314
+ if status_code == 200
315
+ begin
316
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
317
+ result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::EncryptionScope.mapper()
318
+ result.body = @client.deserialize(result_mapper, parsed_response)
319
+ rescue Exception => e
320
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
321
+ end
322
+ end
323
+
324
+ result
325
+ end
326
+
327
+ promise.execute
328
+ end
329
+
330
+ #
331
+ # Returns the properties for the specified encryption scope.
332
+ #
333
+ # @param resource_group_name [String] The name of the resource group within the
334
+ # user's subscription. The name is case insensitive.
335
+ # @param account_name [String] The name of the storage account within the
336
+ # specified resource group. Storage account names must be between 3 and 24
337
+ # characters in length and use numbers and lower-case letters only.
338
+ # @param encryption_scope_name [String] The name of the encryption scope within
339
+ # the specified storage account. Encryption scope names must be between 3 and
340
+ # 63 characters in length and use numbers, lower-case letters and dash (-)
341
+ # only. Every dash (-) character must be immediately preceded and followed by a
342
+ # letter or number.
343
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
344
+ # will be added to the HTTP request.
345
+ #
346
+ # @return [EncryptionScope] operation results.
347
+ #
348
+ def get(resource_group_name, account_name, encryption_scope_name, custom_headers:nil)
349
+ response = get_async(resource_group_name, account_name, encryption_scope_name, custom_headers:custom_headers).value!
350
+ response.body unless response.nil?
351
+ end
352
+
353
+ #
354
+ # Returns the properties for the specified encryption scope.
355
+ #
356
+ # @param resource_group_name [String] The name of the resource group within the
357
+ # user's subscription. The name is case insensitive.
358
+ # @param account_name [String] The name of the storage account within the
359
+ # specified resource group. Storage account names must be between 3 and 24
360
+ # characters in length and use numbers and lower-case letters only.
361
+ # @param encryption_scope_name [String] The name of the encryption scope within
362
+ # the specified storage account. Encryption scope names must be between 3 and
363
+ # 63 characters in length and use numbers, lower-case letters and dash (-)
364
+ # only. Every dash (-) character must be immediately preceded and followed by a
365
+ # letter or number.
366
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
367
+ # will be added to the HTTP request.
368
+ #
369
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
370
+ #
371
+ def get_with_http_info(resource_group_name, account_name, encryption_scope_name, custom_headers:nil)
372
+ get_async(resource_group_name, account_name, encryption_scope_name, custom_headers:custom_headers).value!
373
+ end
374
+
375
+ #
376
+ # Returns the properties for the specified encryption scope.
377
+ #
378
+ # @param resource_group_name [String] The name of the resource group within the
379
+ # user's subscription. The name is case insensitive.
380
+ # @param account_name [String] The name of the storage account within the
381
+ # specified resource group. Storage account names must be between 3 and 24
382
+ # characters in length and use numbers and lower-case letters only.
383
+ # @param encryption_scope_name [String] The name of the encryption scope within
384
+ # the specified storage account. Encryption scope names must be between 3 and
385
+ # 63 characters in length and use numbers, lower-case letters and dash (-)
386
+ # only. Every dash (-) character must be immediately preceded and followed by a
387
+ # letter or number.
388
+ # @param [Hash{String => String}] A hash of custom headers that will be added
389
+ # to the HTTP request.
390
+ #
391
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
392
+ #
393
+ def get_async(resource_group_name, account_name, encryption_scope_name, custom_headers:nil)
394
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
395
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
396
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
397
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
398
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
399
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
400
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
401
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
402
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
403
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
404
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
405
+ fail ArgumentError, 'encryption_scope_name is nil' if encryption_scope_name.nil?
406
+ fail ArgumentError, "'encryption_scope_name' should satisfy the constraint - 'MaxLength': '63'" if !encryption_scope_name.nil? && encryption_scope_name.length > 63
407
+ fail ArgumentError, "'encryption_scope_name' should satisfy the constraint - 'MinLength': '3'" if !encryption_scope_name.nil? && encryption_scope_name.length < 3
408
+
409
+
410
+ request_headers = {}
411
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
412
+
413
+ # Set Headers
414
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
415
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
416
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}'
417
+
418
+ request_url = @base_url || @client.base_url
419
+
420
+ options = {
421
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
422
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id,'encryptionScopeName' => encryption_scope_name},
423
+ query_params: {'api-version' => @client.api_version},
424
+ headers: request_headers.merge(custom_headers || {}),
425
+ base_url: request_url
426
+ }
427
+ promise = @client.make_request_async(:get, path_template, options)
428
+
429
+ promise = promise.then do |result|
430
+ http_response = result.response
431
+ status_code = http_response.status
432
+ response_content = http_response.body
433
+ unless status_code == 200
434
+ error_model = JSON.load(response_content)
435
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
436
+ end
437
+
438
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
439
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
440
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
441
+ # Deserialize Response
442
+ if status_code == 200
443
+ begin
444
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
445
+ result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::EncryptionScope.mapper()
446
+ result.body = @client.deserialize(result_mapper, parsed_response)
447
+ rescue Exception => e
448
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
449
+ end
450
+ end
451
+
452
+ result
453
+ end
454
+
455
+ promise.execute
456
+ end
457
+
458
+ #
459
+ # Lists all the encryption scopes available under the specified storage
460
+ # account.
461
+ #
462
+ # @param resource_group_name [String] The name of the resource group within the
463
+ # user's subscription. The name is case insensitive.
464
+ # @param account_name [String] The name of the storage account within the
465
+ # specified resource group. Storage account names must be between 3 and 24
466
+ # characters in length and use numbers and lower-case letters only.
467
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
468
+ # will be added to the HTTP request.
469
+ #
470
+ # @return [Array<EncryptionScope>] operation results.
471
+ #
472
+ def list(resource_group_name, account_name, custom_headers:nil)
473
+ first_page = list_as_lazy(resource_group_name, account_name, custom_headers:custom_headers)
474
+ first_page.get_all_items
475
+ end
476
+
477
+ #
478
+ # Lists all the encryption scopes available under the specified storage
479
+ # account.
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 custom_headers [Hash{String => String}] A hash of custom headers that
487
+ # will be added to the HTTP request.
488
+ #
489
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
490
+ #
491
+ def list_with_http_info(resource_group_name, account_name, custom_headers:nil)
492
+ list_async(resource_group_name, account_name, custom_headers:custom_headers).value!
493
+ end
494
+
495
+ #
496
+ # Lists all the encryption scopes available under the specified storage
497
+ # account.
498
+ #
499
+ # @param resource_group_name [String] The name of the resource group within the
500
+ # user's subscription. The name is case insensitive.
501
+ # @param account_name [String] The name of the storage account within the
502
+ # specified resource group. Storage account names must be between 3 and 24
503
+ # characters in length and use numbers and lower-case letters only.
504
+ # @param [Hash{String => String}] A hash of custom headers that will be added
505
+ # to the HTTP request.
506
+ #
507
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
508
+ #
509
+ def list_async(resource_group_name, account_name, custom_headers:nil)
510
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
511
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
512
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
513
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
514
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
515
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
516
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
517
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
518
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
519
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
520
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
521
+
522
+
523
+ request_headers = {}
524
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
525
+
526
+ # Set Headers
527
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
528
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
529
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes'
530
+
531
+ request_url = @base_url || @client.base_url
532
+
533
+ options = {
534
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
535
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
536
+ query_params: {'api-version' => @client.api_version},
537
+ headers: request_headers.merge(custom_headers || {}),
538
+ base_url: request_url
539
+ }
540
+ promise = @client.make_request_async(:get, path_template, options)
541
+
542
+ promise = promise.then do |result|
543
+ http_response = result.response
544
+ status_code = http_response.status
545
+ response_content = http_response.body
546
+ unless status_code == 200
547
+ error_model = JSON.load(response_content)
548
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
549
+ end
550
+
551
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
552
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
553
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
554
+ # Deserialize Response
555
+ if status_code == 200
556
+ begin
557
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
558
+ result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::EncryptionScopeListResult.mapper()
559
+ result.body = @client.deserialize(result_mapper, parsed_response)
560
+ rescue Exception => e
561
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
562
+ end
563
+ end
564
+
565
+ result
566
+ end
567
+
568
+ promise.execute
569
+ end
570
+
571
+ #
572
+ # Lists all the encryption scopes available under the specified storage
573
+ # account.
574
+ #
575
+ # @param next_page_link [String] The NextLink from the previous successful call
576
+ # to List operation.
577
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
578
+ # will be added to the HTTP request.
579
+ #
580
+ # @return [EncryptionScopeListResult] operation results.
581
+ #
582
+ def list_next(next_page_link, custom_headers:nil)
583
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
584
+ response.body unless response.nil?
585
+ end
586
+
587
+ #
588
+ # Lists all the encryption scopes available under the specified storage
589
+ # account.
590
+ #
591
+ # @param next_page_link [String] The NextLink from the previous successful call
592
+ # to List operation.
593
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
594
+ # will be added to the HTTP request.
595
+ #
596
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
597
+ #
598
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
599
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
600
+ end
601
+
602
+ #
603
+ # Lists all the encryption scopes available under the specified storage
604
+ # account.
605
+ #
606
+ # @param next_page_link [String] The NextLink from the previous successful call
607
+ # to List operation.
608
+ # @param [Hash{String => String}] A hash of custom headers that will be added
609
+ # to the HTTP request.
610
+ #
611
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
612
+ #
613
+ def list_next_async(next_page_link, custom_headers:nil)
614
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
615
+
616
+
617
+ request_headers = {}
618
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
619
+
620
+ # Set Headers
621
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
622
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
623
+ path_template = '{nextLink}'
624
+
625
+ request_url = @base_url || @client.base_url
626
+
627
+ options = {
628
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
629
+ skip_encoding_path_params: {'nextLink' => next_page_link},
630
+ headers: request_headers.merge(custom_headers || {}),
631
+ base_url: request_url
632
+ }
633
+ promise = @client.make_request_async(:get, path_template, options)
634
+
635
+ promise = promise.then do |result|
636
+ http_response = result.response
637
+ status_code = http_response.status
638
+ response_content = http_response.body
639
+ unless status_code == 200
640
+ error_model = JSON.load(response_content)
641
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
642
+ end
643
+
644
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
645
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
646
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
647
+ # Deserialize Response
648
+ if status_code == 200
649
+ begin
650
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
651
+ result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::EncryptionScopeListResult.mapper()
652
+ result.body = @client.deserialize(result_mapper, parsed_response)
653
+ rescue Exception => e
654
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
655
+ end
656
+ end
657
+
658
+ result
659
+ end
660
+
661
+ promise.execute
662
+ end
663
+
664
+ #
665
+ # Lists all the encryption scopes available under the specified storage
666
+ # account.
667
+ #
668
+ # @param resource_group_name [String] The name of the resource group within the
669
+ # user's subscription. The name is case insensitive.
670
+ # @param account_name [String] The name of the storage account within the
671
+ # specified resource group. Storage account names must be between 3 and 24
672
+ # characters in length and use numbers and lower-case letters only.
673
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
674
+ # will be added to the HTTP request.
675
+ #
676
+ # @return [EncryptionScopeListResult] which provide lazy access to pages of the
677
+ # response.
678
+ #
679
+ def list_as_lazy(resource_group_name, account_name, custom_headers:nil)
680
+ response = list_async(resource_group_name, account_name, custom_headers:custom_headers).value!
681
+ unless response.nil?
682
+ page = response.body
683
+ page.next_method = Proc.new do |next_page_link|
684
+ list_next_async(next_page_link, custom_headers:custom_headers)
685
+ end
686
+ page
687
+ end
688
+ end
689
+
690
+ end
691
+ end