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,204 @@
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
+ # A service client - single point of access to the REST API.
9
+ #
10
+ class StorageManagementClient < MsRestAzure::AzureServiceClient
11
+ include MsRestAzure
12
+ include MsRestAzure::Serialization
13
+
14
+ # @return [String] the base URI of the service.
15
+ attr_accessor :base_url
16
+
17
+ # @return Credentials needed for the client to connect to Azure.
18
+ attr_reader :credentials
19
+
20
+ # @return [String] The ID of the target subscription.
21
+ attr_accessor :subscription_id
22
+
23
+ # @return [String] The API version to use for this operation.
24
+ attr_reader :api_version
25
+
26
+ # @return [String] The preferred language for the response.
27
+ attr_accessor :accept_language
28
+
29
+ # @return [Integer] The retry timeout in seconds for Long Running
30
+ # Operations. Default value is 30.
31
+ attr_accessor :long_running_operation_retry_timeout
32
+
33
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
34
+ # generated. When set to true a unique x-ms-client-request-id value is
35
+ # generated and included in each request. Default is true.
36
+ attr_accessor :generate_client_request_id
37
+
38
+ # @return [Operations] operations
39
+ attr_reader :operations
40
+
41
+ # @return [Skus] skus
42
+ attr_reader :skus
43
+
44
+ # @return [StorageAccounts] storage_accounts
45
+ attr_reader :storage_accounts
46
+
47
+ # @return [DeletedAccounts] deleted_accounts
48
+ attr_reader :deleted_accounts
49
+
50
+ # @return [Usages] usages
51
+ attr_reader :usages
52
+
53
+ # @return [ManagementPolicies] management_policies
54
+ attr_reader :management_policies
55
+
56
+ # @return [BlobInventoryPolicies] blob_inventory_policies
57
+ attr_reader :blob_inventory_policies
58
+
59
+ # @return [PrivateEndpointConnections] private_endpoint_connections
60
+ attr_reader :private_endpoint_connections
61
+
62
+ # @return [PrivateLinkResources] private_link_resources
63
+ attr_reader :private_link_resources
64
+
65
+ # @return [ObjectReplicationPoliciesOperations]
66
+ # object_replication_policies_operations
67
+ attr_reader :object_replication_policies_operations
68
+
69
+ # @return [EncryptionScopes] encryption_scopes
70
+ attr_reader :encryption_scopes
71
+
72
+ # @return [BlobServices] blob_services
73
+ attr_reader :blob_services
74
+
75
+ # @return [BlobContainers] blob_containers
76
+ attr_reader :blob_containers
77
+
78
+ # @return [FileServices] file_services
79
+ attr_reader :file_services
80
+
81
+ # @return [FileShares] file_shares
82
+ attr_reader :file_shares
83
+
84
+ # @return [QueueServices] queue_services
85
+ attr_reader :queue_services
86
+
87
+ # @return [Queue] queue
88
+ attr_reader :queue
89
+
90
+ # @return [TableServices] table_services
91
+ attr_reader :table_services
92
+
93
+ # @return [TableOperations] table_operations
94
+ attr_reader :table_operations
95
+
96
+ #
97
+ # Creates initializes a new instance of the StorageManagementClient class.
98
+ # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
99
+ # @param base_url [String] the base URI of the service.
100
+ # @param options [Array] filters to be applied to the HTTP requests.
101
+ #
102
+ def initialize(credentials = nil, base_url = nil, options = nil)
103
+ super(credentials, options)
104
+ @base_url = base_url || 'https://management.azure.com'
105
+
106
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
107
+ @credentials = credentials
108
+
109
+ @operations = Operations.new(self)
110
+ @skus = Skus.new(self)
111
+ @storage_accounts = StorageAccounts.new(self)
112
+ @deleted_accounts = DeletedAccounts.new(self)
113
+ @usages = Usages.new(self)
114
+ @management_policies = ManagementPolicies.new(self)
115
+ @blob_inventory_policies = BlobInventoryPolicies.new(self)
116
+ @private_endpoint_connections = PrivateEndpointConnections.new(self)
117
+ @private_link_resources = PrivateLinkResources.new(self)
118
+ @object_replication_policies_operations = ObjectReplicationPoliciesOperations.new(self)
119
+ @encryption_scopes = EncryptionScopes.new(self)
120
+ @blob_services = BlobServices.new(self)
121
+ @blob_containers = BlobContainers.new(self)
122
+ @file_services = FileServices.new(self)
123
+ @file_shares = FileShares.new(self)
124
+ @queue_services = QueueServices.new(self)
125
+ @queue = Queue.new(self)
126
+ @table_services = TableServices.new(self)
127
+ @table_operations = TableOperations.new(self)
128
+ @api_version = '2021-01-01'
129
+ @accept_language = 'en-US'
130
+ @long_running_operation_retry_timeout = 30
131
+ @generate_client_request_id = true
132
+ add_telemetry
133
+ end
134
+
135
+ #
136
+ # Makes a request and returns the body of the response.
137
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
138
+ # @param path [String] the path, relative to {base_url}.
139
+ # @param options [Hash{String=>String}] specifying any request options like :body.
140
+ # @return [Hash{String=>String}] containing the body of the response.
141
+ # Example:
142
+ #
143
+ # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
144
+ # path = "/path"
145
+ # options = {
146
+ # body: request_content,
147
+ # query_params: {'api-version' => '2016-02-01'}
148
+ # }
149
+ # result = @client.make_request(:put, path, options)
150
+ #
151
+ def make_request(method, path, options = {})
152
+ result = make_request_with_http_info(method, path, options)
153
+ result.body unless result.nil?
154
+ end
155
+
156
+ #
157
+ # Makes a request and returns the operation response.
158
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
159
+ # @param path [String] the path, relative to {base_url}.
160
+ # @param options [Hash{String=>String}] specifying any request options like :body.
161
+ # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
162
+ #
163
+ def make_request_with_http_info(method, path, options = {})
164
+ result = make_request_async(method, path, options).value!
165
+ result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
166
+ result
167
+ end
168
+
169
+ #
170
+ # Makes a request asynchronously.
171
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
172
+ # @param path [String] the path, relative to {base_url}.
173
+ # @param options [Hash{String=>String}] specifying any request options like :body.
174
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
175
+ #
176
+ def make_request_async(method, path, options = {})
177
+ fail ArgumentError, 'method is nil' if method.nil?
178
+ fail ArgumentError, 'path is nil' if path.nil?
179
+
180
+ request_url = options[:base_url] || @base_url
181
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
182
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
183
+ end
184
+
185
+ request_headers = @request_headers
186
+ request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
187
+ options.merge!({headers: request_headers.merge(options[:headers] || {})})
188
+ options.merge!({credentials: @credentials}) unless @credentials.nil?
189
+
190
+ super(request_url, method, path, options)
191
+ end
192
+
193
+
194
+ private
195
+ #
196
+ # Adds telemetry information.
197
+ #
198
+ def add_telemetry
199
+ sdk_information = 'azure_mgmt_storage'
200
+ sdk_information = "#{sdk_information}/0.23.0"
201
+ add_user_agent_information(sdk_information)
202
+ end
203
+ end
204
+ end
@@ -0,0 +1,743 @@
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 TableOperations
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the TableOperations 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 table with the specified table 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 table_name [String] A table name must be unique within a storage
34
+ # account and must be between 3 and 63 characters.The name must comprise of
35
+ # only alphanumeric characters and it cannot begin with a numeric character.
36
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
37
+ # will be added to the HTTP request.
38
+ #
39
+ # @return [Table] operation results.
40
+ #
41
+ def create(resource_group_name, account_name, table_name, custom_headers:nil)
42
+ response = create_async(resource_group_name, account_name, table_name, custom_headers:custom_headers).value!
43
+ response.body unless response.nil?
44
+ end
45
+
46
+ #
47
+ # Creates a new table with the specified table name, under the specified
48
+ # account.
49
+ #
50
+ # @param resource_group_name [String] The name of the resource group within the
51
+ # user's subscription. The name is case insensitive.
52
+ # @param account_name [String] The name of the storage account within the
53
+ # specified resource group. Storage account names must be between 3 and 24
54
+ # characters in length and use numbers and lower-case letters only.
55
+ # @param table_name [String] A table name must be unique within a storage
56
+ # account and must be between 3 and 63 characters.The name must comprise of
57
+ # only alphanumeric characters and it cannot begin with a numeric character.
58
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
59
+ # will be added to the HTTP request.
60
+ #
61
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
62
+ #
63
+ def create_with_http_info(resource_group_name, account_name, table_name, custom_headers:nil)
64
+ create_async(resource_group_name, account_name, table_name, custom_headers:custom_headers).value!
65
+ end
66
+
67
+ #
68
+ # Creates a new table with the specified table name, under the specified
69
+ # account.
70
+ #
71
+ # @param resource_group_name [String] The name of the resource group within the
72
+ # user's subscription. The name is case insensitive.
73
+ # @param account_name [String] The name of the storage account within the
74
+ # specified resource group. Storage account names must be between 3 and 24
75
+ # characters in length and use numbers and lower-case letters only.
76
+ # @param table_name [String] A table name must be unique within a storage
77
+ # account and must be between 3 and 63 characters.The name must comprise of
78
+ # only alphanumeric characters and it cannot begin with a numeric character.
79
+ # @param [Hash{String => String}] A hash of custom headers that will be added
80
+ # to the HTTP request.
81
+ #
82
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
83
+ #
84
+ def create_async(resource_group_name, account_name, table_name, custom_headers:nil)
85
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
86
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
87
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
88
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
89
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
90
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
91
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
92
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
93
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
94
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
95
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
96
+ fail ArgumentError, 'table_name is nil' if table_name.nil?
97
+ fail ArgumentError, "'table_name' should satisfy the constraint - 'MaxLength': '63'" if !table_name.nil? && table_name.length > 63
98
+ fail ArgumentError, "'table_name' should satisfy the constraint - 'MinLength': '3'" if !table_name.nil? && table_name.length < 3
99
+ fail ArgumentError, "'table_name' should satisfy the constraint - 'Pattern': '^[A-Za-z][A-Za-z0-9]{2,62}$'" if !table_name.nil? && table_name.match(Regexp.new('^^[A-Za-z][A-Za-z0-9]{2,62}$$')).nil?
100
+
101
+
102
+ request_headers = {}
103
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
104
+
105
+ # Set Headers
106
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
107
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
108
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}'
109
+
110
+ request_url = @base_url || @client.base_url
111
+
112
+ options = {
113
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
114
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id,'tableName' => table_name},
115
+ query_params: {'api-version' => @client.api_version},
116
+ headers: request_headers.merge(custom_headers || {}),
117
+ base_url: request_url
118
+ }
119
+ promise = @client.make_request_async(:put, path_template, options)
120
+
121
+ promise = promise.then do |result|
122
+ http_response = result.response
123
+ status_code = http_response.status
124
+ response_content = http_response.body
125
+ unless status_code == 200
126
+ error_model = JSON.load(response_content)
127
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
128
+ end
129
+
130
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
131
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
132
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
133
+ # Deserialize Response
134
+ if status_code == 200
135
+ begin
136
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
137
+ result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::Table.mapper()
138
+ result.body = @client.deserialize(result_mapper, parsed_response)
139
+ rescue Exception => e
140
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
141
+ end
142
+ end
143
+
144
+ result
145
+ end
146
+
147
+ promise.execute
148
+ end
149
+
150
+ #
151
+ # Creates a new table with the specified table name, under the specified
152
+ # account.
153
+ #
154
+ # @param resource_group_name [String] The name of the resource group within the
155
+ # user's subscription. The name is case insensitive.
156
+ # @param account_name [String] The name of the storage account within the
157
+ # specified resource group. Storage account names must be between 3 and 24
158
+ # characters in length and use numbers and lower-case letters only.
159
+ # @param table_name [String] A table name must be unique within a storage
160
+ # account and must be between 3 and 63 characters.The name must comprise of
161
+ # only alphanumeric characters and it cannot begin with a numeric character.
162
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
163
+ # will be added to the HTTP request.
164
+ #
165
+ # @return [Table] operation results.
166
+ #
167
+ def update(resource_group_name, account_name, table_name, custom_headers:nil)
168
+ response = update_async(resource_group_name, account_name, table_name, custom_headers:custom_headers).value!
169
+ response.body unless response.nil?
170
+ end
171
+
172
+ #
173
+ # Creates a new table with the specified table name, under the specified
174
+ # account.
175
+ #
176
+ # @param resource_group_name [String] The name of the resource group within the
177
+ # user's subscription. The name is case insensitive.
178
+ # @param account_name [String] The name of the storage account within the
179
+ # specified resource group. Storage account names must be between 3 and 24
180
+ # characters in length and use numbers and lower-case letters only.
181
+ # @param table_name [String] A table name must be unique within a storage
182
+ # account and must be between 3 and 63 characters.The name must comprise of
183
+ # only alphanumeric characters and it cannot begin with a numeric character.
184
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
185
+ # will be added to the HTTP request.
186
+ #
187
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
188
+ #
189
+ def update_with_http_info(resource_group_name, account_name, table_name, custom_headers:nil)
190
+ update_async(resource_group_name, account_name, table_name, custom_headers:custom_headers).value!
191
+ end
192
+
193
+ #
194
+ # Creates a new table with the specified table name, under the specified
195
+ # account.
196
+ #
197
+ # @param resource_group_name [String] The name of the resource group within the
198
+ # user's subscription. The name is case insensitive.
199
+ # @param account_name [String] The name of the storage account within the
200
+ # specified resource group. Storage account names must be between 3 and 24
201
+ # characters in length and use numbers and lower-case letters only.
202
+ # @param table_name [String] A table name must be unique within a storage
203
+ # account and must be between 3 and 63 characters.The name must comprise of
204
+ # only alphanumeric characters and it cannot begin with a numeric character.
205
+ # @param [Hash{String => String}] A hash of custom headers that will be added
206
+ # to the HTTP request.
207
+ #
208
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
209
+ #
210
+ def update_async(resource_group_name, account_name, table_name, custom_headers:nil)
211
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
212
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
213
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
214
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
215
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
216
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
217
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
218
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
219
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
220
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
221
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
222
+ fail ArgumentError, 'table_name is nil' if table_name.nil?
223
+ fail ArgumentError, "'table_name' should satisfy the constraint - 'MaxLength': '63'" if !table_name.nil? && table_name.length > 63
224
+ fail ArgumentError, "'table_name' should satisfy the constraint - 'MinLength': '3'" if !table_name.nil? && table_name.length < 3
225
+ fail ArgumentError, "'table_name' should satisfy the constraint - 'Pattern': '^[A-Za-z][A-Za-z0-9]{2,62}$'" if !table_name.nil? && table_name.match(Regexp.new('^^[A-Za-z][A-Za-z0-9]{2,62}$$')).nil?
226
+
227
+
228
+ request_headers = {}
229
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
230
+
231
+ # Set Headers
232
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
233
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
234
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}'
235
+
236
+ request_url = @base_url || @client.base_url
237
+
238
+ options = {
239
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
240
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id,'tableName' => table_name},
241
+ query_params: {'api-version' => @client.api_version},
242
+ headers: request_headers.merge(custom_headers || {}),
243
+ base_url: request_url
244
+ }
245
+ promise = @client.make_request_async(:patch, path_template, options)
246
+
247
+ promise = promise.then do |result|
248
+ http_response = result.response
249
+ status_code = http_response.status
250
+ response_content = http_response.body
251
+ unless status_code == 200
252
+ error_model = JSON.load(response_content)
253
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
254
+ end
255
+
256
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
257
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
258
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
259
+ # Deserialize Response
260
+ if status_code == 200
261
+ begin
262
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
263
+ result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::Table.mapper()
264
+ result.body = @client.deserialize(result_mapper, parsed_response)
265
+ rescue Exception => e
266
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
267
+ end
268
+ end
269
+
270
+ result
271
+ end
272
+
273
+ promise.execute
274
+ end
275
+
276
+ #
277
+ # Gets the table with the specified table name, under the specified account if
278
+ # it exists.
279
+ #
280
+ # @param resource_group_name [String] The name of the resource group within the
281
+ # user's subscription. The name is case insensitive.
282
+ # @param account_name [String] The name of the storage account within the
283
+ # specified resource group. Storage account names must be between 3 and 24
284
+ # characters in length and use numbers and lower-case letters only.
285
+ # @param table_name [String] A table name must be unique within a storage
286
+ # account and must be between 3 and 63 characters.The name must comprise of
287
+ # only alphanumeric characters and it cannot begin with a numeric character.
288
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
289
+ # will be added to the HTTP request.
290
+ #
291
+ # @return [Table] operation results.
292
+ #
293
+ def get(resource_group_name, account_name, table_name, custom_headers:nil)
294
+ response = get_async(resource_group_name, account_name, table_name, custom_headers:custom_headers).value!
295
+ response.body unless response.nil?
296
+ end
297
+
298
+ #
299
+ # Gets the table with the specified table name, under the specified account if
300
+ # it exists.
301
+ #
302
+ # @param resource_group_name [String] The name of the resource group within the
303
+ # user's subscription. The name is case insensitive.
304
+ # @param account_name [String] The name of the storage account within the
305
+ # specified resource group. Storage account names must be between 3 and 24
306
+ # characters in length and use numbers and lower-case letters only.
307
+ # @param table_name [String] A table name must be unique within a storage
308
+ # account and must be between 3 and 63 characters.The name must comprise of
309
+ # only alphanumeric characters and it cannot begin with a numeric character.
310
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
311
+ # will be added to the HTTP request.
312
+ #
313
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
314
+ #
315
+ def get_with_http_info(resource_group_name, account_name, table_name, custom_headers:nil)
316
+ get_async(resource_group_name, account_name, table_name, custom_headers:custom_headers).value!
317
+ end
318
+
319
+ #
320
+ # Gets the table with the specified table name, under the specified account if
321
+ # it exists.
322
+ #
323
+ # @param resource_group_name [String] The name of the resource group within the
324
+ # user's subscription. The name is case insensitive.
325
+ # @param account_name [String] The name of the storage account within the
326
+ # specified resource group. Storage account names must be between 3 and 24
327
+ # characters in length and use numbers and lower-case letters only.
328
+ # @param table_name [String] A table name must be unique within a storage
329
+ # account and must be between 3 and 63 characters.The name must comprise of
330
+ # only alphanumeric characters and it cannot begin with a numeric character.
331
+ # @param [Hash{String => String}] A hash of custom headers that will be added
332
+ # to the HTTP request.
333
+ #
334
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
335
+ #
336
+ def get_async(resource_group_name, account_name, table_name, custom_headers:nil)
337
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
338
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
339
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
340
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
341
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
342
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
343
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
344
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
345
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
346
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
347
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
348
+ fail ArgumentError, 'table_name is nil' if table_name.nil?
349
+ fail ArgumentError, "'table_name' should satisfy the constraint - 'MaxLength': '63'" if !table_name.nil? && table_name.length > 63
350
+ fail ArgumentError, "'table_name' should satisfy the constraint - 'MinLength': '3'" if !table_name.nil? && table_name.length < 3
351
+ fail ArgumentError, "'table_name' should satisfy the constraint - 'Pattern': '^[A-Za-z][A-Za-z0-9]{2,62}$'" if !table_name.nil? && table_name.match(Regexp.new('^^[A-Za-z][A-Za-z0-9]{2,62}$$')).nil?
352
+
353
+
354
+ request_headers = {}
355
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
356
+
357
+ # Set Headers
358
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
359
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
360
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}'
361
+
362
+ request_url = @base_url || @client.base_url
363
+
364
+ options = {
365
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
366
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id,'tableName' => table_name},
367
+ query_params: {'api-version' => @client.api_version},
368
+ headers: request_headers.merge(custom_headers || {}),
369
+ base_url: request_url
370
+ }
371
+ promise = @client.make_request_async(:get, path_template, options)
372
+
373
+ promise = promise.then do |result|
374
+ http_response = result.response
375
+ status_code = http_response.status
376
+ response_content = http_response.body
377
+ unless status_code == 200
378
+ error_model = JSON.load(response_content)
379
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
380
+ end
381
+
382
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
383
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
384
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
385
+ # Deserialize Response
386
+ if status_code == 200
387
+ begin
388
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
389
+ result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::Table.mapper()
390
+ result.body = @client.deserialize(result_mapper, parsed_response)
391
+ rescue Exception => e
392
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
393
+ end
394
+ end
395
+
396
+ result
397
+ end
398
+
399
+ promise.execute
400
+ end
401
+
402
+ #
403
+ # Deletes the table with the specified table name, under the specified account
404
+ # if it exists.
405
+ #
406
+ # @param resource_group_name [String] The name of the resource group within the
407
+ # user's subscription. The name is case insensitive.
408
+ # @param account_name [String] The name of the storage account within the
409
+ # specified resource group. Storage account names must be between 3 and 24
410
+ # characters in length and use numbers and lower-case letters only.
411
+ # @param table_name [String] A table name must be unique within a storage
412
+ # account and must be between 3 and 63 characters.The name must comprise of
413
+ # only alphanumeric characters and it cannot begin with a numeric character.
414
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
415
+ # will be added to the HTTP request.
416
+ #
417
+ #
418
+ def delete(resource_group_name, account_name, table_name, custom_headers:nil)
419
+ response = delete_async(resource_group_name, account_name, table_name, custom_headers:custom_headers).value!
420
+ nil
421
+ end
422
+
423
+ #
424
+ # Deletes the table with the specified table name, under the specified account
425
+ # if it exists.
426
+ #
427
+ # @param resource_group_name [String] The name of the resource group within the
428
+ # user's subscription. The name is case insensitive.
429
+ # @param account_name [String] The name of the storage account within the
430
+ # specified resource group. Storage account names must be between 3 and 24
431
+ # characters in length and use numbers and lower-case letters only.
432
+ # @param table_name [String] A table name must be unique within a storage
433
+ # account and must be between 3 and 63 characters.The name must comprise of
434
+ # only alphanumeric characters and it cannot begin with a numeric character.
435
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
436
+ # will be added to the HTTP request.
437
+ #
438
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
439
+ #
440
+ def delete_with_http_info(resource_group_name, account_name, table_name, custom_headers:nil)
441
+ delete_async(resource_group_name, account_name, table_name, custom_headers:custom_headers).value!
442
+ end
443
+
444
+ #
445
+ # Deletes the table with the specified table name, under the specified account
446
+ # if it exists.
447
+ #
448
+ # @param resource_group_name [String] The name of the resource group within the
449
+ # user's subscription. The name is case insensitive.
450
+ # @param account_name [String] The name of the storage account within the
451
+ # specified resource group. Storage account names must be between 3 and 24
452
+ # characters in length and use numbers and lower-case letters only.
453
+ # @param table_name [String] A table name must be unique within a storage
454
+ # account and must be between 3 and 63 characters.The name must comprise of
455
+ # only alphanumeric characters and it cannot begin with a numeric character.
456
+ # @param [Hash{String => String}] A hash of custom headers that will be added
457
+ # to the HTTP request.
458
+ #
459
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
460
+ #
461
+ def delete_async(resource_group_name, account_name, table_name, custom_headers:nil)
462
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
463
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
464
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
465
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
466
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
467
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
468
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
469
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
470
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
471
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
472
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
473
+ fail ArgumentError, 'table_name is nil' if table_name.nil?
474
+ fail ArgumentError, "'table_name' should satisfy the constraint - 'MaxLength': '63'" if !table_name.nil? && table_name.length > 63
475
+ fail ArgumentError, "'table_name' should satisfy the constraint - 'MinLength': '3'" if !table_name.nil? && table_name.length < 3
476
+ fail ArgumentError, "'table_name' should satisfy the constraint - 'Pattern': '^[A-Za-z][A-Za-z0-9]{2,62}$'" if !table_name.nil? && table_name.match(Regexp.new('^^[A-Za-z][A-Za-z0-9]{2,62}$$')).nil?
477
+
478
+
479
+ request_headers = {}
480
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
481
+
482
+ # Set Headers
483
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
484
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
485
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}'
486
+
487
+ request_url = @base_url || @client.base_url
488
+
489
+ options = {
490
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
491
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id,'tableName' => table_name},
492
+ query_params: {'api-version' => @client.api_version},
493
+ headers: request_headers.merge(custom_headers || {}),
494
+ base_url: request_url
495
+ }
496
+ promise = @client.make_request_async(:delete, path_template, options)
497
+
498
+ promise = promise.then do |result|
499
+ http_response = result.response
500
+ status_code = http_response.status
501
+ response_content = http_response.body
502
+ unless status_code == 204
503
+ error_model = JSON.load(response_content)
504
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
505
+ end
506
+
507
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
508
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
509
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
510
+
511
+ result
512
+ end
513
+
514
+ promise.execute
515
+ end
516
+
517
+ #
518
+ # Gets a list of all the tables under the specified storage account
519
+ #
520
+ # @param resource_group_name [String] The name of the resource group within the
521
+ # user's subscription. The name is case insensitive.
522
+ # @param account_name [String] The name of the storage account within the
523
+ # specified resource group. Storage account names must be between 3 and 24
524
+ # characters in length and use numbers and lower-case letters only.
525
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
526
+ # will be added to the HTTP request.
527
+ #
528
+ # @return [Array<Table>] operation results.
529
+ #
530
+ def list(resource_group_name, account_name, custom_headers:nil)
531
+ first_page = list_as_lazy(resource_group_name, account_name, custom_headers:custom_headers)
532
+ first_page.get_all_items
533
+ end
534
+
535
+ #
536
+ # Gets a list of all the tables under the specified storage account
537
+ #
538
+ # @param resource_group_name [String] The name of the resource group within the
539
+ # user's subscription. The name is case insensitive.
540
+ # @param account_name [String] The name of the storage account within the
541
+ # specified resource group. Storage account names must be between 3 and 24
542
+ # characters in length and use numbers and lower-case letters only.
543
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
544
+ # will be added to the HTTP request.
545
+ #
546
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
547
+ #
548
+ def list_with_http_info(resource_group_name, account_name, custom_headers:nil)
549
+ list_async(resource_group_name, account_name, custom_headers:custom_headers).value!
550
+ end
551
+
552
+ #
553
+ # Gets a list of all the tables under the specified storage account
554
+ #
555
+ # @param resource_group_name [String] The name of the resource group within the
556
+ # user's subscription. The name is case insensitive.
557
+ # @param account_name [String] The name of the storage account within the
558
+ # specified resource group. Storage account names must be between 3 and 24
559
+ # characters in length and use numbers and lower-case letters only.
560
+ # @param [Hash{String => String}] A hash of custom headers that will be added
561
+ # to the HTTP request.
562
+ #
563
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
564
+ #
565
+ def list_async(resource_group_name, account_name, custom_headers:nil)
566
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
567
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
568
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
569
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
570
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
571
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '24'" if !account_name.nil? && account_name.length > 24
572
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
573
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
574
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
575
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
576
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
577
+
578
+
579
+ request_headers = {}
580
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
581
+
582
+ # Set Headers
583
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
584
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
585
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables'
586
+
587
+ request_url = @base_url || @client.base_url
588
+
589
+ options = {
590
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
591
+ path_params: {'resourceGroupName' => resource_group_name,'accountName' => account_name,'subscriptionId' => @client.subscription_id},
592
+ query_params: {'api-version' => @client.api_version},
593
+ headers: request_headers.merge(custom_headers || {}),
594
+ base_url: request_url
595
+ }
596
+ promise = @client.make_request_async(:get, path_template, options)
597
+
598
+ promise = promise.then do |result|
599
+ http_response = result.response
600
+ status_code = http_response.status
601
+ response_content = http_response.body
602
+ unless status_code == 200
603
+ error_model = JSON.load(response_content)
604
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
605
+ end
606
+
607
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
608
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
609
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
610
+ # Deserialize Response
611
+ if status_code == 200
612
+ begin
613
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
614
+ result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::ListTableResource.mapper()
615
+ result.body = @client.deserialize(result_mapper, parsed_response)
616
+ rescue Exception => e
617
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
618
+ end
619
+ end
620
+
621
+ result
622
+ end
623
+
624
+ promise.execute
625
+ end
626
+
627
+ #
628
+ # Gets a list of all the tables under the specified storage account
629
+ #
630
+ # @param next_page_link [String] The NextLink from the previous successful call
631
+ # to List operation.
632
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
633
+ # will be added to the HTTP request.
634
+ #
635
+ # @return [ListTableResource] operation results.
636
+ #
637
+ def list_next(next_page_link, custom_headers:nil)
638
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
639
+ response.body unless response.nil?
640
+ end
641
+
642
+ #
643
+ # Gets a list of all the tables under the specified storage account
644
+ #
645
+ # @param next_page_link [String] The NextLink from the previous successful call
646
+ # to List operation.
647
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
648
+ # will be added to the HTTP request.
649
+ #
650
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
651
+ #
652
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
653
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
654
+ end
655
+
656
+ #
657
+ # Gets a list of all the tables under the specified storage account
658
+ #
659
+ # @param next_page_link [String] The NextLink from the previous successful call
660
+ # to List operation.
661
+ # @param [Hash{String => String}] A hash of custom headers that will be added
662
+ # to the HTTP request.
663
+ #
664
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
665
+ #
666
+ def list_next_async(next_page_link, custom_headers:nil)
667
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
668
+
669
+
670
+ request_headers = {}
671
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
672
+
673
+ # Set Headers
674
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
675
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
676
+ path_template = '{nextLink}'
677
+
678
+ request_url = @base_url || @client.base_url
679
+
680
+ options = {
681
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
682
+ skip_encoding_path_params: {'nextLink' => next_page_link},
683
+ headers: request_headers.merge(custom_headers || {}),
684
+ base_url: request_url
685
+ }
686
+ promise = @client.make_request_async(:get, path_template, options)
687
+
688
+ promise = promise.then do |result|
689
+ http_response = result.response
690
+ status_code = http_response.status
691
+ response_content = http_response.body
692
+ unless status_code == 200
693
+ error_model = JSON.load(response_content)
694
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
695
+ end
696
+
697
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
698
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
699
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
700
+ # Deserialize Response
701
+ if status_code == 200
702
+ begin
703
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
704
+ result_mapper = Azure::Storage::Mgmt::V2021_01_01::Models::ListTableResource.mapper()
705
+ result.body = @client.deserialize(result_mapper, parsed_response)
706
+ rescue Exception => e
707
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
708
+ end
709
+ end
710
+
711
+ result
712
+ end
713
+
714
+ promise.execute
715
+ end
716
+
717
+ #
718
+ # Gets a list of all the tables under the specified storage account
719
+ #
720
+ # @param resource_group_name [String] The name of the resource group within the
721
+ # user's subscription. The name is case insensitive.
722
+ # @param account_name [String] The name of the storage account within the
723
+ # specified resource group. Storage account names must be between 3 and 24
724
+ # characters in length and use numbers and lower-case letters only.
725
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
726
+ # will be added to the HTTP request.
727
+ #
728
+ # @return [ListTableResource] which provide lazy access to pages of the
729
+ # response.
730
+ #
731
+ def list_as_lazy(resource_group_name, account_name, custom_headers:nil)
732
+ response = list_async(resource_group_name, account_name, custom_headers:custom_headers).value!
733
+ unless response.nil?
734
+ page = response.body
735
+ page.next_method = Proc.new do |next_page_link|
736
+ list_next_async(next_page_link, custom_headers:custom_headers)
737
+ end
738
+ page
739
+ end
740
+ end
741
+
742
+ end
743
+ end