azure_mgmt_cosmosdb 0.18.0 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (286) hide show
  1. checksums.yaml +5 -5
  2. data/LICENSE.txt +20 -20
  3. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb.rb +0 -0
  4. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/collection.rb +0 -0
  5. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/collection_partition.rb +0 -0
  6. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/collection_partition_region.rb +0 -0
  7. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/collection_region.rb +0 -0
  8. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/cosmos_db.rb +1 -1
  9. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/database.rb +0 -0
  10. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/database_account_region.rb +0 -0
  11. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/database_accounts.rb +0 -0
  12. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/capability.rb +0 -0
  13. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace.rb +0 -0
  14. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_create_update_parameters.rb +0 -0
  15. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_list_result.rb +0 -0
  16. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_resource.rb +0 -0
  17. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_partition_key.rb +0 -0
  18. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_schema.rb +0 -0
  19. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_table.rb +0 -0
  20. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_table_create_update_parameters.rb +0 -0
  21. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_table_list_result.rb +0 -0
  22. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_table_resource.rb +0 -0
  23. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cluster_key.rb +0 -0
  24. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/column.rb +0 -0
  25. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/conflict_resolution_mode.rb +0 -0
  26. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/conflict_resolution_policy.rb +0 -0
  27. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/connector_offer.rb +0 -0
  28. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/consistency_policy.rb +0 -0
  29. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/container_partition_key.rb +0 -0
  30. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/data_type.rb +0 -0
  31. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account.rb +0 -0
  32. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_connection_string.rb +0 -0
  33. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_create_update_parameters.rb +0 -0
  34. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_kind.rb +0 -0
  35. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_list_connection_strings_result.rb +0 -0
  36. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_list_keys_result.rb +0 -0
  37. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_list_read_only_keys_result.rb +0 -0
  38. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_offer_type.rb +0 -0
  39. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_patch_parameters.rb +0 -0
  40. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_regenerate_key_parameters.rb +0 -0
  41. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_accounts_list_result.rb +0 -0
  42. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/default_consistency_level.rb +0 -0
  43. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/error_response.rb +0 -0
  44. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/excluded_path.rb +0 -0
  45. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/extended_resource_properties.rb +0 -0
  46. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/failover_policies.rb +0 -0
  47. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/failover_policy.rb +0 -0
  48. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/gremlin_database.rb +0 -0
  49. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/gremlin_database_create_update_parameters.rb +0 -0
  50. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/gremlin_database_list_result.rb +0 -0
  51. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/gremlin_database_resource.rb +0 -0
  52. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/gremlin_graph.rb +0 -0
  53. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/gremlin_graph_create_update_parameters.rb +0 -0
  54. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/gremlin_graph_list_result.rb +0 -0
  55. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/gremlin_graph_resource.rb +0 -0
  56. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/included_path.rb +0 -0
  57. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/index_kind.rb +0 -0
  58. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/indexes.rb +0 -0
  59. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/indexing_mode.rb +0 -0
  60. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/indexing_policy.rb +0 -0
  61. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/key_kind.rb +0 -0
  62. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/location.rb +0 -0
  63. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/metric.rb +0 -0
  64. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/metric_availability.rb +0 -0
  65. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/metric_definition.rb +0 -0
  66. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/metric_definitions_list_result.rb +0 -0
  67. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/metric_list_result.rb +0 -0
  68. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/metric_name.rb +0 -0
  69. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/metric_value.rb +0 -0
  70. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection.rb +0 -0
  71. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_create_update_parameters.rb +0 -0
  72. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_list_result.rb +0 -0
  73. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_resource.rb +0 -0
  74. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase.rb +0 -0
  75. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_create_update_parameters.rb +0 -0
  76. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_list_result.rb +0 -0
  77. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_resource.rb +0 -0
  78. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_index.rb +0 -0
  79. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_index_keys.rb +0 -0
  80. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_index_options.rb +0 -0
  81. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/operation.rb +0 -0
  82. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/operation_display.rb +0 -0
  83. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/operation_list_result.rb +0 -0
  84. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/partition_kind.rb +0 -0
  85. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/partition_metric.rb +0 -0
  86. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/partition_metric_list_result.rb +0 -0
  87. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/partition_usage.rb +0 -0
  88. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/partition_usages_result.rb +0 -0
  89. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/percentile_metric.rb +0 -0
  90. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/percentile_metric_list_result.rb +0 -0
  91. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/percentile_metric_value.rb +0 -0
  92. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/primary_aggregation_type.rb +0 -0
  93. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/region_for_online_offline.rb +0 -0
  94. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/resource.rb +0 -0
  95. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/sql_container.rb +0 -0
  96. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/sql_container_create_update_parameters.rb +0 -0
  97. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/sql_container_list_result.rb +0 -0
  98. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/sql_container_resource.rb +0 -0
  99. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/sql_database.rb +0 -0
  100. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/sql_database_create_update_parameters.rb +0 -0
  101. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/sql_database_list_result.rb +0 -0
  102. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/sql_database_resource.rb +0 -0
  103. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/table.rb +0 -0
  104. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/table_create_update_parameters.rb +0 -0
  105. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/table_list_result.rb +0 -0
  106. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/table_resource.rb +0 -0
  107. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/throughput.rb +0 -0
  108. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/throughput_resource.rb +0 -0
  109. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/throughput_update_parameters.rb +0 -0
  110. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/unique_key.rb +0 -0
  111. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/unique_key_policy.rb +0 -0
  112. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/unit_type.rb +0 -0
  113. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/usage.rb +0 -0
  114. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/usages_result.rb +0 -0
  115. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/virtual_network_rule.rb +0 -0
  116. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/module_definition.rb +0 -0
  117. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/operations.rb +0 -0
  118. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/partition_key_range_id.rb +0 -0
  119. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/partition_key_range_id_region.rb +0 -0
  120. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/percentile.rb +0 -0
  121. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/percentile_source_target.rb +0 -0
  122. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/percentile_target.rb +0 -0
  123. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb.rb +41 -0
  124. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/cosmos_db.rb +142 -0
  125. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/armproxy_resource.rb +73 -0
  126. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/azure_entity_resource.rb +75 -0
  127. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/error_response.rb +57 -0
  128. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/private_endpoint_connection.rb +88 -0
  129. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/private_endpoint_connection_list_result.rb +56 -0
  130. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/private_endpoint_property.rb +46 -0
  131. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/private_link_resource.rb +95 -0
  132. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/private_link_resource_list_result.rb +55 -0
  133. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/private_link_service_connection_state_property.rb +71 -0
  134. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/proxy_resource.rb +63 -0
  135. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/resource.rb +83 -0
  136. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/tracked_resource.rb +92 -0
  137. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/module_definition.rb +9 -0
  138. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/private_endpoint_connections.rb +560 -0
  139. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/private_link_resources.rb +235 -0
  140. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb.rb +164 -0
  141. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/cassandra_resources.rb +1628 -0
  142. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/collection.rb +374 -0
  143. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/collection_partition.rb +269 -0
  144. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/collection_partition_region.rb +156 -0
  145. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/collection_region.rb +156 -0
  146. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/cosmos_db.rb +200 -0
  147. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/database.rb +362 -0
  148. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/database_account_region.rb +148 -0
  149. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/database_accounts.rb +2184 -0
  150. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/gremlin_resources.rb +1623 -0
  151. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/armproxy_resource.rb +73 -0
  152. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/armresource_properties.rb +102 -0
  153. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/capability.rb +48 -0
  154. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_create_update_parameters.rb +120 -0
  155. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_get_results.rb +135 -0
  156. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_list_result.rb +58 -0
  157. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_resource.rb +46 -0
  158. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_partition_key.rb +46 -0
  159. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_schema.rb +95 -0
  160. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_create_update_parameters.rb +120 -0
  161. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_get_results.rb +158 -0
  162. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_list_result.rb +58 -0
  163. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_resource.rb +69 -0
  164. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cluster_key.rb +58 -0
  165. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/column.rb +57 -0
  166. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/conflict_resolution_mode.rb +16 -0
  167. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/conflict_resolution_policy.rb +73 -0
  168. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/connector_offer.rb +15 -0
  169. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/consistency_policy.rb +86 -0
  170. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/container_partition_key.rb +85 -0
  171. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/data_type.rb +20 -0
  172. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_connection_string.rb +59 -0
  173. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_create_update_parameters.rb +279 -0
  174. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_get_results.rb +371 -0
  175. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_kind.rb +17 -0
  176. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_list_connection_strings_result.rb +57 -0
  177. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_list_keys_result.rb +77 -0
  178. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_list_read_only_keys_result.rb +59 -0
  179. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_offer_type.rb +15 -0
  180. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_regenerate_key_parameters.rb +47 -0
  181. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_update_parameters.rb +230 -0
  182. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_accounts_list_result.rb +58 -0
  183. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/default_consistency_level.rb +19 -0
  184. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/error_response.rb +57 -0
  185. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/excluded_path.rb +48 -0
  186. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/extended_resource_properties.rb +74 -0
  187. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/failover_policies.rb +55 -0
  188. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/failover_policy.rb +79 -0
  189. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_create_update_parameters.rb +120 -0
  190. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_get_results.rb +135 -0
  191. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_list_result.rb +58 -0
  192. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_resource.rb +46 -0
  193. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_create_update_parameters.rb +120 -0
  194. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_get_results.rb +200 -0
  195. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_list_result.rb +58 -0
  196. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_resource.rb +111 -0
  197. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/included_path.rb +67 -0
  198. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/index_kind.rb +17 -0
  199. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/indexes.rb +73 -0
  200. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/indexing_mode.rb +17 -0
  201. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/indexing_policy.rb +99 -0
  202. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/key_kind.rb +18 -0
  203. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/location.rb +114 -0
  204. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/metric.rb +120 -0
  205. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/metric_availability.rb +60 -0
  206. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/metric_definition.rb +109 -0
  207. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/metric_definitions_list_result.rb +57 -0
  208. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/metric_list_result.rb +56 -0
  209. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/metric_name.rb +59 -0
  210. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/metric_value.rb +107 -0
  211. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_create_update_parameters.rb +120 -0
  212. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_get_results.rb +175 -0
  213. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_list_result.rb +58 -0
  214. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_resource.rb +86 -0
  215. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_create_update_parameters.rb +120 -0
  216. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_get_results.rb +135 -0
  217. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_list_result.rb +58 -0
  218. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_resource.rb +46 -0
  219. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_index.rb +60 -0
  220. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_index_keys.rb +55 -0
  221. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_index_options.rb +57 -0
  222. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/operation.rb +58 -0
  223. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/operation_display.rb +80 -0
  224. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/operation_list_result.rb +101 -0
  225. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/partition_kind.rb +16 -0
  226. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/partition_metric.rb +124 -0
  227. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/partition_metric_list_result.rb +57 -0
  228. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/partition_usage.rb +105 -0
  229. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/partition_usages_result.rb +57 -0
  230. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/percentile_metric.rb +120 -0
  231. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/percentile_metric_list_result.rb +57 -0
  232. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/percentile_metric_value.rb +173 -0
  233. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/primary_aggregation_type.rb +20 -0
  234. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/region_for_online_offline.rb +47 -0
  235. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_container_create_update_parameters.rb +119 -0
  236. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_container_get_results.rb +200 -0
  237. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_container_list_result.rb +58 -0
  238. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_container_resource.rb +111 -0
  239. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_database_create_update_parameters.rb +120 -0
  240. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_database_get_results.rb +159 -0
  241. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_database_list_result.rb +58 -0
  242. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_database_resource.rb +46 -0
  243. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_create_update_parameters.rb +120 -0
  244. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_get_results.rb +146 -0
  245. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_list_result.rb +58 -0
  246. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_resource.rb +57 -0
  247. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_trigger_create_update_parameters.rb +119 -0
  248. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_trigger_get_results.rb +171 -0
  249. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_trigger_list_result.rb +58 -0
  250. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_trigger_resource.rb +82 -0
  251. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_create_update_parameters.rb +121 -0
  252. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_get_results.rb +146 -0
  253. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_list_result.rb +58 -0
  254. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_resource.rb +57 -0
  255. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/table_create_update_parameters.rb +119 -0
  256. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/table_get_results.rb +135 -0
  257. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/table_list_result.rb +57 -0
  258. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/table_resource.rb +46 -0
  259. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/throughput_settings_get_results.rb +121 -0
  260. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/throughput_settings_resource.rb +70 -0
  261. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/throughput_settings_update_parameters.rb +99 -0
  262. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/trigger_operation.rb +19 -0
  263. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/trigger_type.rb +16 -0
  264. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/unique_key.rb +56 -0
  265. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/unique_key_policy.rb +58 -0
  266. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/unit_type.rb +21 -0
  267. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/usage.rb +97 -0
  268. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/usages_result.rb +57 -0
  269. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/virtual_network_rule.rb +59 -0
  270. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/module_definition.rb +9 -0
  271. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/mongo_dbresources.rb +1634 -0
  272. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/operations.rb +219 -0
  273. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/partition_key_range_id.rb +156 -0
  274. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/partition_key_range_id_region.rb +163 -0
  275. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/percentile.rb +141 -0
  276. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/percentile_source_target.rb +158 -0
  277. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/percentile_target.rb +148 -0
  278. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/sql_resources.rb +3289 -0
  279. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/table_resources.rb +804 -0
  280. data/lib/azure_mgmt_cosmosdb.rb +8 -6
  281. data/lib/module_definition.rb +7 -7
  282. data/lib/profiles/latest/cosmosdb_latest_profile_client.rb +40 -40
  283. data/lib/profiles/latest/cosmosdb_module_definition.rb +8 -8
  284. data/lib/profiles/latest/modules/cosmosdb_profile_module.rb +571 -501
  285. data/lib/version.rb +1 -1
  286. metadata +160 -3
@@ -0,0 +1,804 @@
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::Cosmosdb::Mgmt::V2019_08_01
7
+ #
8
+ # Azure Cosmos DB Database Service Resource Provider REST API
9
+ #
10
+ class TableResources
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the TableResources class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [CosmosDB] reference to the CosmosDB
22
+ attr_reader :client
23
+
24
+ #
25
+ # Lists the Tables under an existing Azure Cosmos DB database account.
26
+ #
27
+ # @param resource_group_name [String] Name of an Azure resource group.
28
+ # @param account_name [String] Cosmos DB database account name.
29
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
+ # will be added to the HTTP request.
31
+ #
32
+ # @return [TableListResult] operation results.
33
+ #
34
+ def list_tables(resource_group_name, account_name, custom_headers:nil)
35
+ response = list_tables_async(resource_group_name, account_name, custom_headers:custom_headers).value!
36
+ response.body unless response.nil?
37
+ end
38
+
39
+ #
40
+ # Lists the Tables under an existing Azure Cosmos DB database account.
41
+ #
42
+ # @param resource_group_name [String] Name of an Azure resource group.
43
+ # @param account_name [String] Cosmos DB database account name.
44
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
45
+ # will be added to the HTTP request.
46
+ #
47
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
48
+ #
49
+ def list_tables_with_http_info(resource_group_name, account_name, custom_headers:nil)
50
+ list_tables_async(resource_group_name, account_name, custom_headers:custom_headers).value!
51
+ end
52
+
53
+ #
54
+ # Lists the Tables under an existing Azure Cosmos DB database account.
55
+ #
56
+ # @param resource_group_name [String] Name of an Azure resource group.
57
+ # @param account_name [String] Cosmos DB database account name.
58
+ # @param [Hash{String => String}] A hash of custom headers that will be added
59
+ # to the HTTP request.
60
+ #
61
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
62
+ #
63
+ def list_tables_async(resource_group_name, account_name, custom_headers:nil)
64
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
65
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
66
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
67
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
68
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
69
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
70
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
71
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
72
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[a-z0-9]+(-[a-z0-9]+)*'" if !account_name.nil? && account_name.match(Regexp.new('^^[a-z0-9]+(-[a-z0-9]+)*$')).nil?
73
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
74
+
75
+
76
+ request_headers = {}
77
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
78
+
79
+ # Set Headers
80
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
81
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
82
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables'
83
+
84
+ request_url = @base_url || @client.base_url
85
+
86
+ options = {
87
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
88
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
89
+ query_params: {'api-version' => @client.api_version},
90
+ headers: request_headers.merge(custom_headers || {}),
91
+ base_url: request_url
92
+ }
93
+ promise = @client.make_request_async(:get, path_template, options)
94
+
95
+ promise = promise.then do |result|
96
+ http_response = result.response
97
+ status_code = http_response.status
98
+ response_content = http_response.body
99
+ unless status_code == 200
100
+ error_model = JSON.load(response_content)
101
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
102
+ end
103
+
104
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
105
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
106
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
107
+ # Deserialize Response
108
+ if status_code == 200
109
+ begin
110
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
111
+ result_mapper = Azure::Cosmosdb::Mgmt::V2019_08_01::Models::TableListResult.mapper()
112
+ result.body = @client.deserialize(result_mapper, parsed_response)
113
+ rescue Exception => e
114
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
115
+ end
116
+ end
117
+
118
+ result
119
+ end
120
+
121
+ promise.execute
122
+ end
123
+
124
+ #
125
+ # Gets the Tables under an existing Azure Cosmos DB database account with the
126
+ # provided name.
127
+ #
128
+ # @param resource_group_name [String] Name of an Azure resource group.
129
+ # @param account_name [String] Cosmos DB database account name.
130
+ # @param table_name [String] Cosmos DB table name.
131
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
132
+ # will be added to the HTTP request.
133
+ #
134
+ # @return [TableGetResults] operation results.
135
+ #
136
+ def get_table(resource_group_name, account_name, table_name, custom_headers:nil)
137
+ response = get_table_async(resource_group_name, account_name, table_name, custom_headers:custom_headers).value!
138
+ response.body unless response.nil?
139
+ end
140
+
141
+ #
142
+ # Gets the Tables under an existing Azure Cosmos DB database account with the
143
+ # provided name.
144
+ #
145
+ # @param resource_group_name [String] Name of an Azure resource group.
146
+ # @param account_name [String] Cosmos DB database account name.
147
+ # @param table_name [String] Cosmos DB table name.
148
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
149
+ # will be added to the HTTP request.
150
+ #
151
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
152
+ #
153
+ def get_table_with_http_info(resource_group_name, account_name, table_name, custom_headers:nil)
154
+ get_table_async(resource_group_name, account_name, table_name, custom_headers:custom_headers).value!
155
+ end
156
+
157
+ #
158
+ # Gets the Tables under an existing Azure Cosmos DB database account with the
159
+ # provided name.
160
+ #
161
+ # @param resource_group_name [String] Name of an Azure resource group.
162
+ # @param account_name [String] Cosmos DB database account name.
163
+ # @param table_name [String] Cosmos DB table name.
164
+ # @param [Hash{String => String}] A hash of custom headers that will be added
165
+ # to the HTTP request.
166
+ #
167
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
168
+ #
169
+ def get_table_async(resource_group_name, account_name, table_name, custom_headers:nil)
170
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
171
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
172
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
173
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
174
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
175
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
176
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
177
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
178
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[a-z0-9]+(-[a-z0-9]+)*'" if !account_name.nil? && account_name.match(Regexp.new('^^[a-z0-9]+(-[a-z0-9]+)*$')).nil?
179
+ fail ArgumentError, 'table_name is nil' if table_name.nil?
180
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
181
+
182
+
183
+ request_headers = {}
184
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
185
+
186
+ # Set Headers
187
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
188
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
189
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}'
190
+
191
+ request_url = @base_url || @client.base_url
192
+
193
+ options = {
194
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
195
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'tableName' => table_name},
196
+ query_params: {'api-version' => @client.api_version},
197
+ headers: request_headers.merge(custom_headers || {}),
198
+ base_url: request_url
199
+ }
200
+ promise = @client.make_request_async(:get, path_template, options)
201
+
202
+ promise = promise.then do |result|
203
+ http_response = result.response
204
+ status_code = http_response.status
205
+ response_content = http_response.body
206
+ unless status_code == 200
207
+ error_model = JSON.load(response_content)
208
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
209
+ end
210
+
211
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
212
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
213
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
214
+ # Deserialize Response
215
+ if status_code == 200
216
+ begin
217
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
218
+ result_mapper = Azure::Cosmosdb::Mgmt::V2019_08_01::Models::TableGetResults.mapper()
219
+ result.body = @client.deserialize(result_mapper, parsed_response)
220
+ rescue Exception => e
221
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
222
+ end
223
+ end
224
+
225
+ result
226
+ end
227
+
228
+ promise.execute
229
+ end
230
+
231
+ #
232
+ # Create or update an Azure Cosmos DB Table
233
+ #
234
+ # @param resource_group_name [String] Name of an Azure resource group.
235
+ # @param account_name [String] Cosmos DB database account name.
236
+ # @param table_name [String] Cosmos DB table name.
237
+ # @param create_update_table_parameters [TableCreateUpdateParameters] The
238
+ # parameters to provide for the current Table.
239
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
240
+ # will be added to the HTTP request.
241
+ #
242
+ # @return [TableGetResults] operation results.
243
+ #
244
+ def create_update_table(resource_group_name, account_name, table_name, create_update_table_parameters, custom_headers:nil)
245
+ response = create_update_table_async(resource_group_name, account_name, table_name, create_update_table_parameters, custom_headers:custom_headers).value!
246
+ response.body unless response.nil?
247
+ end
248
+
249
+ #
250
+ # @param resource_group_name [String] Name of an Azure resource group.
251
+ # @param account_name [String] Cosmos DB database account name.
252
+ # @param table_name [String] Cosmos DB table name.
253
+ # @param create_update_table_parameters [TableCreateUpdateParameters] The
254
+ # parameters to provide for the current Table.
255
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
256
+ # will be added to the HTTP request.
257
+ #
258
+ # @return [Concurrent::Promise] promise which provides async access to http
259
+ # response.
260
+ #
261
+ def create_update_table_async(resource_group_name, account_name, table_name, create_update_table_parameters, custom_headers:nil)
262
+ # Send request
263
+ promise = begin_create_update_table_async(resource_group_name, account_name, table_name, create_update_table_parameters, custom_headers:custom_headers)
264
+
265
+ promise = promise.then do |response|
266
+ # Defining deserialization method.
267
+ deserialize_method = lambda do |parsed_response|
268
+ result_mapper = Azure::Cosmosdb::Mgmt::V2019_08_01::Models::TableGetResults.mapper()
269
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
270
+ end
271
+
272
+ # Waiting for response.
273
+ @client.get_long_running_operation_result(response, deserialize_method)
274
+ end
275
+
276
+ promise
277
+ end
278
+
279
+ #
280
+ # Deletes an existing Azure Cosmos DB Table.
281
+ #
282
+ # @param resource_group_name [String] Name of an Azure resource group.
283
+ # @param account_name [String] Cosmos DB database account name.
284
+ # @param table_name [String] Cosmos DB table name.
285
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
286
+ # will be added to the HTTP request.
287
+ #
288
+ def delete_table(resource_group_name, account_name, table_name, custom_headers:nil)
289
+ response = delete_table_async(resource_group_name, account_name, table_name, custom_headers:custom_headers).value!
290
+ nil
291
+ end
292
+
293
+ #
294
+ # @param resource_group_name [String] Name of an Azure resource group.
295
+ # @param account_name [String] Cosmos DB database account name.
296
+ # @param table_name [String] Cosmos DB table name.
297
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
298
+ # will be added to the HTTP request.
299
+ #
300
+ # @return [Concurrent::Promise] promise which provides async access to http
301
+ # response.
302
+ #
303
+ def delete_table_async(resource_group_name, account_name, table_name, custom_headers:nil)
304
+ # Send request
305
+ promise = begin_delete_table_async(resource_group_name, account_name, table_name, custom_headers:custom_headers)
306
+
307
+ promise = promise.then do |response|
308
+ # Defining deserialization method.
309
+ deserialize_method = lambda do |parsed_response|
310
+ end
311
+
312
+ # Waiting for response.
313
+ @client.get_long_running_operation_result(response, deserialize_method)
314
+ end
315
+
316
+ promise
317
+ end
318
+
319
+ #
320
+ # Gets the RUs per second of the Table under an existing Azure Cosmos DB
321
+ # database account with the provided name.
322
+ #
323
+ # @param resource_group_name [String] Name of an Azure resource group.
324
+ # @param account_name [String] Cosmos DB database account name.
325
+ # @param table_name [String] Cosmos DB table name.
326
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
327
+ # will be added to the HTTP request.
328
+ #
329
+ # @return [ThroughputSettingsGetResults] operation results.
330
+ #
331
+ def get_table_throughput(resource_group_name, account_name, table_name, custom_headers:nil)
332
+ response = get_table_throughput_async(resource_group_name, account_name, table_name, custom_headers:custom_headers).value!
333
+ response.body unless response.nil?
334
+ end
335
+
336
+ #
337
+ # Gets the RUs per second of the Table under an existing Azure Cosmos DB
338
+ # database account with the provided name.
339
+ #
340
+ # @param resource_group_name [String] Name of an Azure resource group.
341
+ # @param account_name [String] Cosmos DB database account name.
342
+ # @param table_name [String] Cosmos DB table name.
343
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
344
+ # will be added to the HTTP request.
345
+ #
346
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
347
+ #
348
+ def get_table_throughput_with_http_info(resource_group_name, account_name, table_name, custom_headers:nil)
349
+ get_table_throughput_async(resource_group_name, account_name, table_name, custom_headers:custom_headers).value!
350
+ end
351
+
352
+ #
353
+ # Gets the RUs per second of the Table under an existing Azure Cosmos DB
354
+ # database account with the provided name.
355
+ #
356
+ # @param resource_group_name [String] Name of an Azure resource group.
357
+ # @param account_name [String] Cosmos DB database account name.
358
+ # @param table_name [String] Cosmos DB table name.
359
+ # @param [Hash{String => String}] A hash of custom headers that will be added
360
+ # to the HTTP request.
361
+ #
362
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
363
+ #
364
+ def get_table_throughput_async(resource_group_name, account_name, table_name, custom_headers:nil)
365
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
366
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
367
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
368
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
369
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
370
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
371
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
372
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
373
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[a-z0-9]+(-[a-z0-9]+)*'" if !account_name.nil? && account_name.match(Regexp.new('^^[a-z0-9]+(-[a-z0-9]+)*$')).nil?
374
+ fail ArgumentError, 'table_name is nil' if table_name.nil?
375
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
376
+
377
+
378
+ request_headers = {}
379
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
380
+
381
+ # Set Headers
382
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
383
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
384
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default'
385
+
386
+ request_url = @base_url || @client.base_url
387
+
388
+ options = {
389
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
390
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'tableName' => table_name},
391
+ query_params: {'api-version' => @client.api_version},
392
+ headers: request_headers.merge(custom_headers || {}),
393
+ base_url: request_url
394
+ }
395
+ promise = @client.make_request_async(:get, path_template, options)
396
+
397
+ promise = promise.then do |result|
398
+ http_response = result.response
399
+ status_code = http_response.status
400
+ response_content = http_response.body
401
+ unless status_code == 200
402
+ error_model = JSON.load(response_content)
403
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
404
+ end
405
+
406
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
407
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
408
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
409
+ # Deserialize Response
410
+ if status_code == 200
411
+ begin
412
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
413
+ result_mapper = Azure::Cosmosdb::Mgmt::V2019_08_01::Models::ThroughputSettingsGetResults.mapper()
414
+ result.body = @client.deserialize(result_mapper, parsed_response)
415
+ rescue Exception => e
416
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
417
+ end
418
+ end
419
+
420
+ result
421
+ end
422
+
423
+ promise.execute
424
+ end
425
+
426
+ #
427
+ # Update RUs per second of an Azure Cosmos DB Table
428
+ #
429
+ # @param resource_group_name [String] Name of an Azure resource group.
430
+ # @param account_name [String] Cosmos DB database account name.
431
+ # @param table_name [String] Cosmos DB table name.
432
+ # @param update_throughput_parameters [ThroughputSettingsUpdateParameters] The
433
+ # parameters to provide for the RUs per second of the current Table.
434
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
435
+ # will be added to the HTTP request.
436
+ #
437
+ # @return [ThroughputSettingsGetResults] operation results.
438
+ #
439
+ def update_table_throughput(resource_group_name, account_name, table_name, update_throughput_parameters, custom_headers:nil)
440
+ response = update_table_throughput_async(resource_group_name, account_name, table_name, update_throughput_parameters, custom_headers:custom_headers).value!
441
+ response.body unless response.nil?
442
+ end
443
+
444
+ #
445
+ # @param resource_group_name [String] Name of an Azure resource group.
446
+ # @param account_name [String] Cosmos DB database account name.
447
+ # @param table_name [String] Cosmos DB table name.
448
+ # @param update_throughput_parameters [ThroughputSettingsUpdateParameters] The
449
+ # parameters to provide for the RUs per second of the current Table.
450
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
451
+ # will be added to the HTTP request.
452
+ #
453
+ # @return [Concurrent::Promise] promise which provides async access to http
454
+ # response.
455
+ #
456
+ def update_table_throughput_async(resource_group_name, account_name, table_name, update_throughput_parameters, custom_headers:nil)
457
+ # Send request
458
+ promise = begin_update_table_throughput_async(resource_group_name, account_name, table_name, update_throughput_parameters, custom_headers:custom_headers)
459
+
460
+ promise = promise.then do |response|
461
+ # Defining deserialization method.
462
+ deserialize_method = lambda do |parsed_response|
463
+ result_mapper = Azure::Cosmosdb::Mgmt::V2019_08_01::Models::ThroughputSettingsGetResults.mapper()
464
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
465
+ end
466
+
467
+ # Waiting for response.
468
+ @client.get_long_running_operation_result(response, deserialize_method)
469
+ end
470
+
471
+ promise
472
+ end
473
+
474
+ #
475
+ # Create or update an Azure Cosmos DB Table
476
+ #
477
+ # @param resource_group_name [String] Name of an Azure resource group.
478
+ # @param account_name [String] Cosmos DB database account name.
479
+ # @param table_name [String] Cosmos DB table name.
480
+ # @param create_update_table_parameters [TableCreateUpdateParameters] The
481
+ # parameters to provide for the current Table.
482
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
483
+ # will be added to the HTTP request.
484
+ #
485
+ # @return [TableGetResults] operation results.
486
+ #
487
+ def begin_create_update_table(resource_group_name, account_name, table_name, create_update_table_parameters, custom_headers:nil)
488
+ response = begin_create_update_table_async(resource_group_name, account_name, table_name, create_update_table_parameters, custom_headers:custom_headers).value!
489
+ response.body unless response.nil?
490
+ end
491
+
492
+ #
493
+ # Create or update an Azure Cosmos DB Table
494
+ #
495
+ # @param resource_group_name [String] Name of an Azure resource group.
496
+ # @param account_name [String] Cosmos DB database account name.
497
+ # @param table_name [String] Cosmos DB table name.
498
+ # @param create_update_table_parameters [TableCreateUpdateParameters] The
499
+ # parameters to provide for the current Table.
500
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
501
+ # will be added to the HTTP request.
502
+ #
503
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
504
+ #
505
+ def begin_create_update_table_with_http_info(resource_group_name, account_name, table_name, create_update_table_parameters, custom_headers:nil)
506
+ begin_create_update_table_async(resource_group_name, account_name, table_name, create_update_table_parameters, custom_headers:custom_headers).value!
507
+ end
508
+
509
+ #
510
+ # Create or update an Azure Cosmos DB Table
511
+ #
512
+ # @param resource_group_name [String] Name of an Azure resource group.
513
+ # @param account_name [String] Cosmos DB database account name.
514
+ # @param table_name [String] Cosmos DB table name.
515
+ # @param create_update_table_parameters [TableCreateUpdateParameters] The
516
+ # parameters to provide for the current Table.
517
+ # @param [Hash{String => String}] A hash of custom headers that will be added
518
+ # to the HTTP request.
519
+ #
520
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
521
+ #
522
+ def begin_create_update_table_async(resource_group_name, account_name, table_name, create_update_table_parameters, custom_headers:nil)
523
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
524
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
525
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
526
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
527
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
528
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
529
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
530
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
531
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[a-z0-9]+(-[a-z0-9]+)*'" if !account_name.nil? && account_name.match(Regexp.new('^^[a-z0-9]+(-[a-z0-9]+)*$')).nil?
532
+ fail ArgumentError, 'table_name is nil' if table_name.nil?
533
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
534
+ fail ArgumentError, 'create_update_table_parameters is nil' if create_update_table_parameters.nil?
535
+
536
+
537
+ request_headers = {}
538
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
539
+
540
+ # Set Headers
541
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
542
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
543
+
544
+ # Serialize Request
545
+ request_mapper = Azure::Cosmosdb::Mgmt::V2019_08_01::Models::TableCreateUpdateParameters.mapper()
546
+ request_content = @client.serialize(request_mapper, create_update_table_parameters)
547
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
548
+
549
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}'
550
+
551
+ request_url = @base_url || @client.base_url
552
+
553
+ options = {
554
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
555
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'tableName' => table_name},
556
+ query_params: {'api-version' => @client.api_version},
557
+ body: request_content,
558
+ headers: request_headers.merge(custom_headers || {}),
559
+ base_url: request_url
560
+ }
561
+ promise = @client.make_request_async(:put, path_template, options)
562
+
563
+ promise = promise.then do |result|
564
+ http_response = result.response
565
+ status_code = http_response.status
566
+ response_content = http_response.body
567
+ unless status_code == 202 || status_code == 200
568
+ error_model = JSON.load(response_content)
569
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
570
+ end
571
+
572
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
573
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
574
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
575
+ # Deserialize Response
576
+ if status_code == 200
577
+ begin
578
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
579
+ result_mapper = Azure::Cosmosdb::Mgmt::V2019_08_01::Models::TableGetResults.mapper()
580
+ result.body = @client.deserialize(result_mapper, parsed_response)
581
+ rescue Exception => e
582
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
583
+ end
584
+ end
585
+
586
+ result
587
+ end
588
+
589
+ promise.execute
590
+ end
591
+
592
+ #
593
+ # Deletes an existing Azure Cosmos DB Table.
594
+ #
595
+ # @param resource_group_name [String] Name of an Azure resource group.
596
+ # @param account_name [String] Cosmos DB database account name.
597
+ # @param table_name [String] Cosmos DB table name.
598
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
599
+ # will be added to the HTTP request.
600
+ #
601
+ #
602
+ def begin_delete_table(resource_group_name, account_name, table_name, custom_headers:nil)
603
+ response = begin_delete_table_async(resource_group_name, account_name, table_name, custom_headers:custom_headers).value!
604
+ nil
605
+ end
606
+
607
+ #
608
+ # Deletes an existing Azure Cosmos DB Table.
609
+ #
610
+ # @param resource_group_name [String] Name of an Azure resource group.
611
+ # @param account_name [String] Cosmos DB database account name.
612
+ # @param table_name [String] Cosmos DB table name.
613
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
614
+ # will be added to the HTTP request.
615
+ #
616
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
617
+ #
618
+ def begin_delete_table_with_http_info(resource_group_name, account_name, table_name, custom_headers:nil)
619
+ begin_delete_table_async(resource_group_name, account_name, table_name, custom_headers:custom_headers).value!
620
+ end
621
+
622
+ #
623
+ # Deletes an existing Azure Cosmos DB Table.
624
+ #
625
+ # @param resource_group_name [String] Name of an Azure resource group.
626
+ # @param account_name [String] Cosmos DB database account name.
627
+ # @param table_name [String] Cosmos DB table name.
628
+ # @param [Hash{String => String}] A hash of custom headers that will be added
629
+ # to the HTTP request.
630
+ #
631
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
632
+ #
633
+ def begin_delete_table_async(resource_group_name, account_name, table_name, custom_headers:nil)
634
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
635
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
636
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
637
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
638
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
639
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
640
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
641
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
642
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[a-z0-9]+(-[a-z0-9]+)*'" if !account_name.nil? && account_name.match(Regexp.new('^^[a-z0-9]+(-[a-z0-9]+)*$')).nil?
643
+ fail ArgumentError, 'table_name is nil' if table_name.nil?
644
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
645
+
646
+
647
+ request_headers = {}
648
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
649
+
650
+ # Set Headers
651
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
652
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
653
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}'
654
+
655
+ request_url = @base_url || @client.base_url
656
+
657
+ options = {
658
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
659
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'tableName' => table_name},
660
+ query_params: {'api-version' => @client.api_version},
661
+ headers: request_headers.merge(custom_headers || {}),
662
+ base_url: request_url
663
+ }
664
+ promise = @client.make_request_async(:delete, path_template, options)
665
+
666
+ promise = promise.then do |result|
667
+ http_response = result.response
668
+ status_code = http_response.status
669
+ response_content = http_response.body
670
+ unless status_code == 202 || status_code == 204
671
+ error_model = JSON.load(response_content)
672
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
673
+ end
674
+
675
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
676
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
677
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
678
+
679
+ result
680
+ end
681
+
682
+ promise.execute
683
+ end
684
+
685
+ #
686
+ # Update RUs per second of an Azure Cosmos DB Table
687
+ #
688
+ # @param resource_group_name [String] Name of an Azure resource group.
689
+ # @param account_name [String] Cosmos DB database account name.
690
+ # @param table_name [String] Cosmos DB table name.
691
+ # @param update_throughput_parameters [ThroughputSettingsUpdateParameters] The
692
+ # parameters to provide for the RUs per second of the current Table.
693
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
694
+ # will be added to the HTTP request.
695
+ #
696
+ # @return [ThroughputSettingsGetResults] operation results.
697
+ #
698
+ def begin_update_table_throughput(resource_group_name, account_name, table_name, update_throughput_parameters, custom_headers:nil)
699
+ response = begin_update_table_throughput_async(resource_group_name, account_name, table_name, update_throughput_parameters, custom_headers:custom_headers).value!
700
+ response.body unless response.nil?
701
+ end
702
+
703
+ #
704
+ # Update RUs per second of an Azure Cosmos DB Table
705
+ #
706
+ # @param resource_group_name [String] Name of an Azure resource group.
707
+ # @param account_name [String] Cosmos DB database account name.
708
+ # @param table_name [String] Cosmos DB table name.
709
+ # @param update_throughput_parameters [ThroughputSettingsUpdateParameters] The
710
+ # parameters to provide for the RUs per second of the current Table.
711
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
712
+ # will be added to the HTTP request.
713
+ #
714
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
715
+ #
716
+ def begin_update_table_throughput_with_http_info(resource_group_name, account_name, table_name, update_throughput_parameters, custom_headers:nil)
717
+ begin_update_table_throughput_async(resource_group_name, account_name, table_name, update_throughput_parameters, custom_headers:custom_headers).value!
718
+ end
719
+
720
+ #
721
+ # Update RUs per second of an Azure Cosmos DB Table
722
+ #
723
+ # @param resource_group_name [String] Name of an Azure resource group.
724
+ # @param account_name [String] Cosmos DB database account name.
725
+ # @param table_name [String] Cosmos DB table name.
726
+ # @param update_throughput_parameters [ThroughputSettingsUpdateParameters] The
727
+ # parameters to provide for the RUs per second of the current Table.
728
+ # @param [Hash{String => String}] A hash of custom headers that will be added
729
+ # to the HTTP request.
730
+ #
731
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
732
+ #
733
+ def begin_update_table_throughput_async(resource_group_name, account_name, table_name, update_throughput_parameters, custom_headers:nil)
734
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
735
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
736
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
737
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
738
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
739
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
740
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
741
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
742
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'Pattern': '^[a-z0-9]+(-[a-z0-9]+)*'" if !account_name.nil? && account_name.match(Regexp.new('^^[a-z0-9]+(-[a-z0-9]+)*$')).nil?
743
+ fail ArgumentError, 'table_name is nil' if table_name.nil?
744
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
745
+ fail ArgumentError, 'update_throughput_parameters is nil' if update_throughput_parameters.nil?
746
+
747
+
748
+ request_headers = {}
749
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
750
+
751
+ # Set Headers
752
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
753
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
754
+
755
+ # Serialize Request
756
+ request_mapper = Azure::Cosmosdb::Mgmt::V2019_08_01::Models::ThroughputSettingsUpdateParameters.mapper()
757
+ request_content = @client.serialize(request_mapper, update_throughput_parameters)
758
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
759
+
760
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/throughputSettings/default'
761
+
762
+ request_url = @base_url || @client.base_url
763
+
764
+ options = {
765
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
766
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'tableName' => table_name},
767
+ query_params: {'api-version' => @client.api_version},
768
+ body: request_content,
769
+ headers: request_headers.merge(custom_headers || {}),
770
+ base_url: request_url
771
+ }
772
+ promise = @client.make_request_async(:put, path_template, options)
773
+
774
+ promise = promise.then do |result|
775
+ http_response = result.response
776
+ status_code = http_response.status
777
+ response_content = http_response.body
778
+ unless status_code == 202 || status_code == 200
779
+ error_model = JSON.load(response_content)
780
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
781
+ end
782
+
783
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
784
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
785
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
786
+ # Deserialize Response
787
+ if status_code == 200
788
+ begin
789
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
790
+ result_mapper = Azure::Cosmosdb::Mgmt::V2019_08_01::Models::ThroughputSettingsGetResults.mapper()
791
+ result.body = @client.deserialize(result_mapper, parsed_response)
792
+ rescue Exception => e
793
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
794
+ end
795
+ end
796
+
797
+ result
798
+ end
799
+
800
+ promise.execute
801
+ end
802
+
803
+ end
804
+ end