azure_mgmt_cosmosdb 0.18.0 → 0.21.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (718) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/cosmos_db.rb +1 -1
  3. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb.rb +41 -0
  4. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/cosmos_dbmanagement_client.rb +142 -0
  5. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/armproxy_resource.rb +73 -0
  6. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/azure_entity_resource.rb +75 -0
  7. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/error_response.rb +57 -0
  8. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/private_endpoint_connection.rb +88 -0
  9. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/private_endpoint_connection_list_result.rb +56 -0
  10. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/private_endpoint_property.rb +46 -0
  11. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/private_link_resource.rb +95 -0
  12. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/private_link_resource_list_result.rb +55 -0
  13. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/private_link_service_connection_state_property.rb +71 -0
  14. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/proxy_resource.rb +63 -0
  15. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/resource.rb +83 -0
  16. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/tracked_resource.rb +92 -0
  17. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/module_definition.rb +9 -0
  18. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/private_endpoint_connections.rb +560 -0
  19. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/private_link_resources.rb +235 -0
  20. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb.rb +181 -0
  21. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/cassandra_resources.rb +1628 -0
  22. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/collection.rb +374 -0
  23. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/collection_partition.rb +269 -0
  24. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/collection_partition_region.rb +156 -0
  25. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/collection_region.rb +156 -0
  26. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/cosmos_dbmanagement_client.rb +200 -0
  27. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/database.rb +362 -0
  28. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/database_account_region.rb +148 -0
  29. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/database_accounts.rb +2184 -0
  30. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/gremlin_resources.rb +1623 -0
  31. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/armproxy_resource.rb +73 -0
  32. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/armresource_properties.rb +102 -0
  33. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/capability.rb +48 -0
  34. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_create_update_parameters.rb +120 -0
  35. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_get_properties_resource.rb +85 -0
  36. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_get_results.rb +98 -0
  37. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_list_result.rb +58 -0
  38. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_resource.rb +46 -0
  39. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_partition_key.rb +46 -0
  40. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_schema.rb +95 -0
  41. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_create_update_parameters.rb +120 -0
  42. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_get_properties_resource.rb +108 -0
  43. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_get_results.rb +98 -0
  44. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_list_result.rb +58 -0
  45. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_resource.rb +69 -0
  46. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cluster_key.rb +58 -0
  47. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/column.rb +57 -0
  48. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/composite_path.rb +60 -0
  49. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/composite_path_sort_order.rb +16 -0
  50. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/conflict_resolution_mode.rb +16 -0
  51. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/conflict_resolution_policy.rb +73 -0
  52. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/connector_offer.rb +15 -0
  53. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/consistency_policy.rb +86 -0
  54. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/container_partition_key.rb +85 -0
  55. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/data_type.rb +20 -0
  56. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_connection_string.rb +59 -0
  57. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_create_update_parameters.rb +279 -0
  58. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_get_results.rb +371 -0
  59. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_kind.rb +17 -0
  60. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_list_connection_strings_result.rb +57 -0
  61. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_list_keys_result.rb +77 -0
  62. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_list_read_only_keys_result.rb +59 -0
  63. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_offer_type.rb +15 -0
  64. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_regenerate_key_parameters.rb +47 -0
  65. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_update_parameters.rb +230 -0
  66. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_accounts_list_result.rb +58 -0
  67. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/default_consistency_level.rb +19 -0
  68. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/error_response.rb +57 -0
  69. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/excluded_path.rb +48 -0
  70. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/extended_resource_properties.rb +74 -0
  71. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/failover_policies.rb +55 -0
  72. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/failover_policy.rb +79 -0
  73. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_create_update_parameters.rb +120 -0
  74. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_get_properties_resource.rb +85 -0
  75. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_get_results.rb +98 -0
  76. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_list_result.rb +58 -0
  77. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_resource.rb +46 -0
  78. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_create_update_parameters.rb +120 -0
  79. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_get_properties_resource.rb +150 -0
  80. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_get_results.rb +98 -0
  81. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_list_result.rb +58 -0
  82. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_resource.rb +111 -0
  83. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/included_path.rb +67 -0
  84. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/index_kind.rb +17 -0
  85. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/indexes.rb +73 -0
  86. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/indexing_mode.rb +17 -0
  87. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/indexing_policy.rb +147 -0
  88. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/key_kind.rb +18 -0
  89. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/location.rb +114 -0
  90. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/metric.rb +120 -0
  91. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/metric_availability.rb +60 -0
  92. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/metric_definition.rb +109 -0
  93. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/metric_definitions_list_result.rb +57 -0
  94. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/metric_list_result.rb +56 -0
  95. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/metric_name.rb +59 -0
  96. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/metric_value.rb +107 -0
  97. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_create_update_parameters.rb +120 -0
  98. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_get_properties_resource.rb +125 -0
  99. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_get_results.rb +98 -0
  100. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_list_result.rb +58 -0
  101. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_resource.rb +86 -0
  102. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_create_update_parameters.rb +120 -0
  103. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_get_properties_resource.rb +85 -0
  104. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_get_results.rb +98 -0
  105. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_list_result.rb +58 -0
  106. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_resource.rb +46 -0
  107. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_index.rb +60 -0
  108. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_index_keys.rb +55 -0
  109. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_index_options.rb +57 -0
  110. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/operation.rb +58 -0
  111. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/operation_display.rb +80 -0
  112. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/operation_list_result.rb +101 -0
  113. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/partition_kind.rb +16 -0
  114. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/partition_metric.rb +124 -0
  115. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/partition_metric_list_result.rb +57 -0
  116. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/partition_usage.rb +105 -0
  117. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/partition_usages_result.rb +57 -0
  118. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/percentile_metric.rb +120 -0
  119. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/percentile_metric_list_result.rb +57 -0
  120. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/percentile_metric_value.rb +173 -0
  121. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/primary_aggregation_type.rb +20 -0
  122. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/region_for_online_offline.rb +47 -0
  123. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/spatial_spec.rb +67 -0
  124. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/spatial_type.rb +18 -0
  125. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_container_create_update_parameters.rb +119 -0
  126. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_container_get_properties_resource.rb +150 -0
  127. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_container_get_results.rb +98 -0
  128. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_container_list_result.rb +58 -0
  129. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_container_resource.rb +111 -0
  130. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_database_create_update_parameters.rb +120 -0
  131. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_database_get_properties_resource.rb +109 -0
  132. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_database_get_results.rb +98 -0
  133. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_database_list_result.rb +58 -0
  134. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_database_resource.rb +46 -0
  135. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_create_update_parameters.rb +120 -0
  136. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_get_properties_resource.rb +96 -0
  137. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_get_results.rb +98 -0
  138. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_list_result.rb +58 -0
  139. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_resource.rb +57 -0
  140. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_trigger_create_update_parameters.rb +119 -0
  141. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_trigger_get_properties_resource.rb +121 -0
  142. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_trigger_get_results.rb +98 -0
  143. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_trigger_list_result.rb +58 -0
  144. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_trigger_resource.rb +82 -0
  145. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_create_update_parameters.rb +121 -0
  146. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_get_properties_resource.rb +97 -0
  147. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_get_results.rb +98 -0
  148. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_list_result.rb +58 -0
  149. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_resource.rb +57 -0
  150. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/table_create_update_parameters.rb +119 -0
  151. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/table_get_properties_resource.rb +85 -0
  152. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/table_get_results.rb +98 -0
  153. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/table_list_result.rb +57 -0
  154. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/table_resource.rb +46 -0
  155. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/throughput_settings_get_properties_resource.rb +109 -0
  156. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/throughput_settings_get_results.rb +98 -0
  157. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/throughput_settings_resource.rb +70 -0
  158. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/throughput_settings_update_parameters.rb +99 -0
  159. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/trigger_operation.rb +19 -0
  160. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/trigger_type.rb +16 -0
  161. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/unique_key.rb +56 -0
  162. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/unique_key_policy.rb +58 -0
  163. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/unit_type.rb +21 -0
  164. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/usage.rb +97 -0
  165. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/usages_result.rb +57 -0
  166. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/virtual_network_rule.rb +59 -0
  167. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/module_definition.rb +9 -0
  168. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/mongo_dbresources.rb +1634 -0
  169. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/operations.rb +219 -0
  170. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/partition_key_range_id.rb +156 -0
  171. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/partition_key_range_id_region.rb +163 -0
  172. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/percentile.rb +141 -0
  173. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/percentile_source_target.rb +158 -0
  174. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/percentile_target.rb +148 -0
  175. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/sql_resources.rb +3289 -0
  176. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/table_resources.rb +804 -0
  177. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb.rb +190 -0
  178. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/cassandra_resources.rb +1628 -0
  179. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/collection.rb +374 -0
  180. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/collection_partition.rb +269 -0
  181. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/collection_partition_region.rb +156 -0
  182. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/collection_region.rb +156 -0
  183. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/cosmos_dbmanagement_client.rb +210 -0
  184. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/database.rb +362 -0
  185. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/database_account_region.rb +148 -0
  186. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/database_accounts.rb +2184 -0
  187. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/gremlin_resources.rb +1623 -0
  188. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/armproxy_resource.rb +73 -0
  189. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/armresource_properties.rb +102 -0
  190. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/auto_upgrade_policy_resource.rb +48 -0
  191. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/capability.rb +48 -0
  192. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_create_update_parameters.rb +112 -0
  193. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_get_properties_resource.rb +85 -0
  194. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_get_results.rb +98 -0
  195. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_list_result.rb +58 -0
  196. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_resource.rb +46 -0
  197. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/cassandra_partition_key.rb +46 -0
  198. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/cassandra_schema.rb +95 -0
  199. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/cassandra_table_create_update_parameters.rb +112 -0
  200. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/cassandra_table_get_properties_resource.rb +108 -0
  201. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/cassandra_table_get_results.rb +98 -0
  202. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/cassandra_table_list_result.rb +58 -0
  203. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/cassandra_table_resource.rb +69 -0
  204. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/cluster_key.rb +58 -0
  205. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/column.rb +57 -0
  206. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/composite_path.rb +60 -0
  207. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/composite_path_sort_order.rb +16 -0
  208. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/conflict_resolution_mode.rb +16 -0
  209. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/conflict_resolution_policy.rb +73 -0
  210. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/connector_offer.rb +15 -0
  211. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/consistency_policy.rb +86 -0
  212. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/container_partition_key.rb +85 -0
  213. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/create_update_options.rb +68 -0
  214. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/data_type.rb +20 -0
  215. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/database_account_connection_string.rb +59 -0
  216. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/database_account_create_update_parameters.rb +290 -0
  217. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/database_account_get_results.rb +382 -0
  218. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/database_account_kind.rb +17 -0
  219. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/database_account_list_connection_strings_result.rb +57 -0
  220. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/database_account_list_keys_result.rb +77 -0
  221. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/database_account_list_read_only_keys_result.rb +59 -0
  222. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/database_account_offer_type.rb +15 -0
  223. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/database_account_regenerate_key_parameters.rb +47 -0
  224. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/database_account_update_parameters.rb +241 -0
  225. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/database_accounts_list_result.rb +58 -0
  226. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/default_consistency_level.rb +19 -0
  227. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/error_response.rb +57 -0
  228. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/excluded_path.rb +48 -0
  229. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/extended_resource_properties.rb +74 -0
  230. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/failover_policies.rb +55 -0
  231. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/failover_policy.rb +79 -0
  232. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/gremlin_database_create_update_parameters.rb +112 -0
  233. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/gremlin_database_get_properties_resource.rb +85 -0
  234. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/gremlin_database_get_results.rb +98 -0
  235. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/gremlin_database_list_result.rb +58 -0
  236. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/gremlin_database_resource.rb +46 -0
  237. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/gremlin_graph_create_update_parameters.rb +112 -0
  238. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/gremlin_graph_get_properties_resource.rb +150 -0
  239. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/gremlin_graph_get_results.rb +98 -0
  240. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/gremlin_graph_list_result.rb +58 -0
  241. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/gremlin_graph_resource.rb +111 -0
  242. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/included_path.rb +67 -0
  243. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/index_kind.rb +17 -0
  244. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/indexes.rb +73 -0
  245. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/indexing_mode.rb +17 -0
  246. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/indexing_policy.rb +147 -0
  247. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/key_kind.rb +18 -0
  248. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/location.rb +114 -0
  249. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/metric.rb +120 -0
  250. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/metric_availability.rb +60 -0
  251. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/metric_definition.rb +109 -0
  252. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/metric_definitions_list_result.rb +57 -0
  253. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/metric_list_result.rb +56 -0
  254. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/metric_name.rb +59 -0
  255. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/metric_value.rb +107 -0
  256. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_create_update_parameters.rb +112 -0
  257. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_get_properties_resource.rb +125 -0
  258. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_get_results.rb +98 -0
  259. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_list_result.rb +58 -0
  260. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_resource.rb +86 -0
  261. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_create_update_parameters.rb +112 -0
  262. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_get_properties_resource.rb +85 -0
  263. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_get_results.rb +98 -0
  264. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_list_result.rb +58 -0
  265. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_resource.rb +46 -0
  266. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/mongo_index.rb +60 -0
  267. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/mongo_index_keys.rb +55 -0
  268. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/mongo_index_options.rb +57 -0
  269. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/notebook_workspace.rb +87 -0
  270. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/notebook_workspace_connection_info_result.rb +60 -0
  271. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/notebook_workspace_create_update_parameters.rb +62 -0
  272. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/notebook_workspace_list_result.rb +56 -0
  273. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/operation.rb +58 -0
  274. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/operation_display.rb +80 -0
  275. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/operation_list_result.rb +101 -0
  276. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/partition_kind.rb +16 -0
  277. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/partition_metric.rb +124 -0
  278. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/partition_metric_list_result.rb +57 -0
  279. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/partition_usage.rb +105 -0
  280. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/partition_usages_result.rb +57 -0
  281. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/percentile_metric.rb +120 -0
  282. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/percentile_metric_list_result.rb +57 -0
  283. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/percentile_metric_value.rb +173 -0
  284. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/primary_aggregation_type.rb +20 -0
  285. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/provisioned_throughput_settings_resource.rb +73 -0
  286. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/region_for_online_offline.rb +47 -0
  287. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/spatial_spec.rb +67 -0
  288. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/spatial_type.rb +18 -0
  289. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/sql_container_create_update_parameters.rb +111 -0
  290. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/sql_container_get_properties_resource.rb +150 -0
  291. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/sql_container_get_results.rb +98 -0
  292. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/sql_container_list_result.rb +58 -0
  293. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/sql_container_resource.rb +111 -0
  294. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/sql_database_create_update_parameters.rb +112 -0
  295. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/sql_database_get_properties_resource.rb +109 -0
  296. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/sql_database_get_results.rb +98 -0
  297. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/sql_database_list_result.rb +58 -0
  298. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/sql_database_resource.rb +46 -0
  299. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_create_update_parameters.rb +112 -0
  300. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_get_properties_resource.rb +96 -0
  301. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_get_results.rb +98 -0
  302. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_list_result.rb +58 -0
  303. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_resource.rb +57 -0
  304. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/sql_trigger_create_update_parameters.rb +111 -0
  305. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/sql_trigger_get_properties_resource.rb +121 -0
  306. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/sql_trigger_get_results.rb +98 -0
  307. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/sql_trigger_list_result.rb +58 -0
  308. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/sql_trigger_resource.rb +82 -0
  309. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_create_update_parameters.rb +113 -0
  310. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_get_properties_resource.rb +97 -0
  311. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_get_results.rb +98 -0
  312. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_list_result.rb +58 -0
  313. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_resource.rb +57 -0
  314. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/table_create_update_parameters.rb +111 -0
  315. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/table_get_properties_resource.rb +85 -0
  316. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/table_get_results.rb +98 -0
  317. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/table_list_result.rb +57 -0
  318. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/table_resource.rb +46 -0
  319. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/throughput_policy_resource.rb +59 -0
  320. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/throughput_settings_get_properties_resource.rb +125 -0
  321. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/throughput_settings_get_results.rb +98 -0
  322. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/throughput_settings_resource.rb +87 -0
  323. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/throughput_settings_update_parameters.rb +99 -0
  324. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/trigger_operation.rb +19 -0
  325. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/trigger_type.rb +16 -0
  326. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/unique_key.rb +56 -0
  327. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/unique_key_policy.rb +58 -0
  328. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/unit_type.rb +21 -0
  329. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/usage.rb +97 -0
  330. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/usages_result.rb +57 -0
  331. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/models/virtual_network_rule.rb +59 -0
  332. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/module_definition.rb +9 -0
  333. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/mongo_dbresources.rb +1634 -0
  334. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/notebook_workspaces.rb +907 -0
  335. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/operations.rb +219 -0
  336. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/partition_key_range_id.rb +156 -0
  337. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/partition_key_range_id_region.rb +163 -0
  338. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/percentile.rb +141 -0
  339. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/percentile_source_target.rb +158 -0
  340. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/percentile_target.rb +148 -0
  341. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/sql_resources.rb +3289 -0
  342. data/lib/2019-12-12/generated/azure_mgmt_cosmosdb/table_resources.rb +804 -0
  343. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb.rb +208 -0
  344. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/cassandra_resources.rb +1700 -0
  345. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/collection.rb +389 -0
  346. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/collection_partition.rb +279 -0
  347. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/collection_partition_region.rb +161 -0
  348. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/collection_region.rb +161 -0
  349. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/cosmos_dbmanagement_client.rb +203 -0
  350. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/database.rb +377 -0
  351. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/database_account_region.rb +153 -0
  352. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/database_accounts.rb +2281 -0
  353. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/gremlin_resources.rb +1695 -0
  354. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/armproxy_resource.rb +73 -0
  355. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/armresource_properties.rb +102 -0
  356. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/auto_upgrade_policy_resource.rb +48 -0
  357. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/azure_entity_resource.rb +75 -0
  358. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/capability.rb +48 -0
  359. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_create_update_parameters.rb +112 -0
  360. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_get_properties_options.rb +44 -0
  361. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_get_properties_resource.rb +85 -0
  362. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_get_results.rb +110 -0
  363. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_list_result.rb +58 -0
  364. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_resource.rb +46 -0
  365. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/cassandra_partition_key.rb +46 -0
  366. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/cassandra_schema.rb +95 -0
  367. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_create_update_parameters.rb +112 -0
  368. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_get_properties_options.rb +44 -0
  369. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_get_properties_resource.rb +108 -0
  370. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_get_results.rb +110 -0
  371. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_list_result.rb +58 -0
  372. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_resource.rb +69 -0
  373. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/cluster_key.rb +58 -0
  374. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/column.rb +57 -0
  375. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/composite_path.rb +60 -0
  376. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/composite_path_sort_order.rb +16 -0
  377. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/conflict_resolution_mode.rb +16 -0
  378. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/conflict_resolution_policy.rb +73 -0
  379. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/connector_offer.rb +15 -0
  380. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/consistency_policy.rb +86 -0
  381. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/container_partition_key.rb +85 -0
  382. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/create_update_options.rb +68 -0
  383. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/data_type.rb +20 -0
  384. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/database_account_connection_string.rb +59 -0
  385. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/database_account_create_update_parameters.rb +302 -0
  386. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/database_account_get_results.rb +416 -0
  387. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/database_account_kind.rb +17 -0
  388. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/database_account_list_connection_strings_result.rb +57 -0
  389. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/database_account_list_keys_result.rb +77 -0
  390. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/database_account_list_read_only_keys_result.rb +59 -0
  391. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/database_account_offer_type.rb +15 -0
  392. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/database_account_regenerate_key_parameters.rb +47 -0
  393. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/database_account_update_parameters.rb +253 -0
  394. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/database_accounts_list_result.rb +58 -0
  395. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/default_consistency_level.rb +19 -0
  396. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/error_response.rb +57 -0
  397. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/excluded_path.rb +48 -0
  398. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/extended_resource_properties.rb +74 -0
  399. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/failover_policies.rb +55 -0
  400. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/failover_policy.rb +79 -0
  401. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_create_update_parameters.rb +112 -0
  402. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_get_properties_options.rb +44 -0
  403. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_get_properties_resource.rb +85 -0
  404. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_get_results.rb +110 -0
  405. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_list_result.rb +58 -0
  406. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_resource.rb +46 -0
  407. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_create_update_parameters.rb +112 -0
  408. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_get_properties_options.rb +44 -0
  409. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_get_properties_resource.rb +150 -0
  410. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_get_results.rb +110 -0
  411. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_list_result.rb +58 -0
  412. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_resource.rb +111 -0
  413. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/included_path.rb +67 -0
  414. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/index_kind.rb +17 -0
  415. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/indexes.rb +73 -0
  416. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/indexing_mode.rb +17 -0
  417. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/indexing_policy.rb +147 -0
  418. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/key_kind.rb +18 -0
  419. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/location.rb +114 -0
  420. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/metric.rb +120 -0
  421. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/metric_availability.rb +60 -0
  422. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/metric_definition.rb +109 -0
  423. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/metric_definitions_list_result.rb +57 -0
  424. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/metric_list_result.rb +56 -0
  425. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/metric_name.rb +59 -0
  426. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/metric_value.rb +107 -0
  427. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_create_update_parameters.rb +112 -0
  428. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_get_properties_options.rb +44 -0
  429. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_get_properties_resource.rb +125 -0
  430. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_get_results.rb +110 -0
  431. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_list_result.rb +58 -0
  432. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_resource.rb +86 -0
  433. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_create_update_parameters.rb +112 -0
  434. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_get_properties_options.rb +44 -0
  435. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_get_properties_resource.rb +85 -0
  436. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_get_results.rb +110 -0
  437. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_list_result.rb +58 -0
  438. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_resource.rb +46 -0
  439. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/mongo_index.rb +60 -0
  440. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/mongo_index_keys.rb +55 -0
  441. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/mongo_index_options.rb +57 -0
  442. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/notebook_workspace.rb +87 -0
  443. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/notebook_workspace_connection_info_result.rb +60 -0
  444. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/notebook_workspace_create_update_parameters.rb +62 -0
  445. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/notebook_workspace_list_result.rb +56 -0
  446. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/operation.rb +58 -0
  447. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/operation_display.rb +80 -0
  448. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/operation_list_result.rb +101 -0
  449. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/options_resource.rb +47 -0
  450. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/partition_kind.rb +16 -0
  451. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/partition_metric.rb +124 -0
  452. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/partition_metric_list_result.rb +57 -0
  453. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/partition_usage.rb +105 -0
  454. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/partition_usages_result.rb +57 -0
  455. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/percentile_metric.rb +120 -0
  456. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/percentile_metric_list_result.rb +57 -0
  457. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/percentile_metric_value.rb +173 -0
  458. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/primary_aggregation_type.rb +20 -0
  459. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/private_endpoint_connection.rb +88 -0
  460. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/private_endpoint_property.rb +46 -0
  461. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/private_link_service_connection_state_property.rb +60 -0
  462. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/provisioned_throughput_settings_resource.rb +73 -0
  463. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/proxy_resource.rb +63 -0
  464. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/public_network_access.rb +16 -0
  465. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/region_for_online_offline.rb +47 -0
  466. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/resource.rb +83 -0
  467. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/spatial_spec.rb +67 -0
  468. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/spatial_type.rb +18 -0
  469. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/sql_container_create_update_parameters.rb +111 -0
  470. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/sql_container_get_properties_options.rb +44 -0
  471. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/sql_container_get_properties_resource.rb +150 -0
  472. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/sql_container_get_results.rb +110 -0
  473. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/sql_container_list_result.rb +58 -0
  474. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/sql_container_resource.rb +111 -0
  475. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/sql_database_create_update_parameters.rb +112 -0
  476. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/sql_database_get_properties_options.rb +44 -0
  477. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/sql_database_get_properties_resource.rb +109 -0
  478. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/sql_database_get_results.rb +110 -0
  479. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/sql_database_list_result.rb +58 -0
  480. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/sql_database_resource.rb +46 -0
  481. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_create_update_parameters.rb +112 -0
  482. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_get_properties_resource.rb +96 -0
  483. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_get_results.rb +98 -0
  484. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_list_result.rb +58 -0
  485. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_resource.rb +57 -0
  486. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/sql_trigger_create_update_parameters.rb +111 -0
  487. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/sql_trigger_get_properties_resource.rb +121 -0
  488. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/sql_trigger_get_results.rb +98 -0
  489. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/sql_trigger_list_result.rb +58 -0
  490. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/sql_trigger_resource.rb +82 -0
  491. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_create_update_parameters.rb +113 -0
  492. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_get_properties_resource.rb +97 -0
  493. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_get_results.rb +98 -0
  494. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_list_result.rb +58 -0
  495. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_resource.rb +57 -0
  496. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/table_create_update_parameters.rb +111 -0
  497. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/table_get_properties_options.rb +44 -0
  498. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/table_get_properties_resource.rb +85 -0
  499. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/table_get_results.rb +110 -0
  500. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/table_list_result.rb +57 -0
  501. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/table_resource.rb +46 -0
  502. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/throughput_policy_resource.rb +59 -0
  503. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/throughput_settings_get_properties_resource.rb +125 -0
  504. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/throughput_settings_get_results.rb +98 -0
  505. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/throughput_settings_resource.rb +87 -0
  506. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/throughput_settings_update_parameters.rb +99 -0
  507. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/tracked_resource.rb +92 -0
  508. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/trigger_operation.rb +19 -0
  509. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/trigger_type.rb +16 -0
  510. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/unique_key.rb +56 -0
  511. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/unique_key_policy.rb +58 -0
  512. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/unit_type.rb +21 -0
  513. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/usage.rb +97 -0
  514. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/usages_result.rb +57 -0
  515. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/models/virtual_network_rule.rb +59 -0
  516. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/module_definition.rb +9 -0
  517. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/mongo_dbresources.rb +1706 -0
  518. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/notebook_workspaces.rb +907 -0
  519. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/operations.rb +220 -0
  520. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/partition_key_range_id.rb +161 -0
  521. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/partition_key_range_id_region.rb +168 -0
  522. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/percentile.rb +146 -0
  523. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/percentile_source_target.rb +163 -0
  524. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/percentile_target.rb +153 -0
  525. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/sql_resources.rb +3433 -0
  526. data/lib/2020-03-01/generated/azure_mgmt_cosmosdb/table_resources.rb +840 -0
  527. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb.rb +212 -0
  528. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/cassandra_resources.rb +1700 -0
  529. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/collection.rb +389 -0
  530. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/collection_partition.rb +279 -0
  531. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/collection_partition_region.rb +161 -0
  532. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/collection_region.rb +161 -0
  533. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/cosmos_dbmanagement_client.rb +203 -0
  534. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/database.rb +377 -0
  535. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/database_account_region.rb +153 -0
  536. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/database_accounts.rb +2281 -0
  537. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/gremlin_resources.rb +1695 -0
  538. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/api_properties.rb +48 -0
  539. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/armproxy_resource.rb +73 -0
  540. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/armresource_properties.rb +102 -0
  541. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/auto_upgrade_policy_resource.rb +48 -0
  542. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/autoscale_settings.rb +48 -0
  543. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/autoscale_settings_resource.rb +73 -0
  544. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/azure_entity_resource.rb +75 -0
  545. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/capability.rb +48 -0
  546. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_create_update_parameters.rb +112 -0
  547. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_get_properties_options.rb +53 -0
  548. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_get_properties_resource.rb +85 -0
  549. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_get_results.rb +110 -0
  550. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_list_result.rb +58 -0
  551. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_resource.rb +46 -0
  552. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/cassandra_partition_key.rb +46 -0
  553. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/cassandra_schema.rb +95 -0
  554. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_create_update_parameters.rb +112 -0
  555. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_get_properties_options.rb +53 -0
  556. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_get_properties_resource.rb +119 -0
  557. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_get_results.rb +110 -0
  558. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_list_result.rb +58 -0
  559. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_resource.rb +80 -0
  560. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/cluster_key.rb +58 -0
  561. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/column.rb +57 -0
  562. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/composite_path.rb +60 -0
  563. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/composite_path_sort_order.rb +16 -0
  564. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/conflict_resolution_mode.rb +16 -0
  565. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/conflict_resolution_policy.rb +73 -0
  566. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/connector_offer.rb +15 -0
  567. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/consistency_policy.rb +86 -0
  568. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/container_partition_key.rb +85 -0
  569. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/create_update_options.rb +61 -0
  570. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/data_type.rb +20 -0
  571. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/database_account_connection_string.rb +59 -0
  572. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/database_account_create_update_parameters.rb +342 -0
  573. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/database_account_get_results.rb +455 -0
  574. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/database_account_kind.rb +17 -0
  575. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/database_account_list_connection_strings_result.rb +57 -0
  576. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/database_account_list_keys_result.rb +77 -0
  577. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/database_account_list_read_only_keys_result.rb +59 -0
  578. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/database_account_offer_type.rb +15 -0
  579. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/database_account_regenerate_key_parameters.rb +47 -0
  580. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/database_account_update_parameters.rb +293 -0
  581. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/database_accounts_list_result.rb +58 -0
  582. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/default_consistency_level.rb +19 -0
  583. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/error_response.rb +57 -0
  584. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/excluded_path.rb +48 -0
  585. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/extended_resource_properties.rb +74 -0
  586. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/failover_policies.rb +55 -0
  587. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/failover_policy.rb +79 -0
  588. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_create_update_parameters.rb +112 -0
  589. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_get_properties_options.rb +53 -0
  590. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_get_properties_resource.rb +85 -0
  591. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_get_results.rb +110 -0
  592. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_list_result.rb +58 -0
  593. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_resource.rb +46 -0
  594. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_create_update_parameters.rb +112 -0
  595. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_get_properties_options.rb +53 -0
  596. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_get_properties_resource.rb +150 -0
  597. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_get_results.rb +110 -0
  598. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_list_result.rb +58 -0
  599. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_resource.rb +111 -0
  600. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/included_path.rb +67 -0
  601. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/index_kind.rb +17 -0
  602. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/indexes.rb +73 -0
  603. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/indexing_mode.rb +17 -0
  604. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/indexing_policy.rb +147 -0
  605. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/ip_address_or_range.rb +51 -0
  606. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/key_kind.rb +18 -0
  607. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/location.rb +114 -0
  608. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/metric.rb +120 -0
  609. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/metric_availability.rb +60 -0
  610. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/metric_definition.rb +109 -0
  611. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/metric_definitions_list_result.rb +57 -0
  612. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/metric_list_result.rb +56 -0
  613. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/metric_name.rb +59 -0
  614. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/metric_value.rb +107 -0
  615. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_create_update_parameters.rb +112 -0
  616. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_get_properties_options.rb +53 -0
  617. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_get_properties_resource.rb +136 -0
  618. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_get_results.rb +110 -0
  619. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_list_result.rb +58 -0
  620. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_resource.rb +97 -0
  621. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_create_update_parameters.rb +112 -0
  622. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_get_properties_options.rb +53 -0
  623. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_get_properties_resource.rb +85 -0
  624. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_get_results.rb +110 -0
  625. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_list_result.rb +58 -0
  626. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_resource.rb +46 -0
  627. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/mongo_index.rb +60 -0
  628. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/mongo_index_keys.rb +55 -0
  629. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/mongo_index_options.rb +57 -0
  630. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/notebook_workspace.rb +87 -0
  631. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/notebook_workspace_connection_info_result.rb +60 -0
  632. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/notebook_workspace_create_update_parameters.rb +62 -0
  633. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/notebook_workspace_list_result.rb +56 -0
  634. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/operation.rb +58 -0
  635. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/operation_display.rb +80 -0
  636. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/operation_list_result.rb +101 -0
  637. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/options_resource.rb +60 -0
  638. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/partition_kind.rb +16 -0
  639. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/partition_metric.rb +124 -0
  640. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/partition_metric_list_result.rb +57 -0
  641. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/partition_usage.rb +105 -0
  642. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/partition_usages_result.rb +57 -0
  643. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/percentile_metric.rb +120 -0
  644. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/percentile_metric_list_result.rb +57 -0
  645. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/percentile_metric_value.rb +173 -0
  646. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/primary_aggregation_type.rb +20 -0
  647. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/private_endpoint_connection.rb +88 -0
  648. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/private_endpoint_property.rb +46 -0
  649. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/private_link_service_connection_state_property.rb +60 -0
  650. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/proxy_resource.rb +63 -0
  651. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/public_network_access.rb +16 -0
  652. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/region_for_online_offline.rb +47 -0
  653. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/resource.rb +83 -0
  654. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/server_version.rb +16 -0
  655. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/spatial_spec.rb +67 -0
  656. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/spatial_type.rb +18 -0
  657. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/sql_container_create_update_parameters.rb +111 -0
  658. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/sql_container_get_properties_options.rb +53 -0
  659. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/sql_container_get_properties_resource.rb +150 -0
  660. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/sql_container_get_results.rb +110 -0
  661. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/sql_container_list_result.rb +58 -0
  662. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/sql_container_resource.rb +111 -0
  663. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/sql_database_create_update_parameters.rb +112 -0
  664. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/sql_database_get_properties_options.rb +53 -0
  665. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/sql_database_get_properties_resource.rb +109 -0
  666. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/sql_database_get_results.rb +110 -0
  667. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/sql_database_list_result.rb +58 -0
  668. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/sql_database_resource.rb +46 -0
  669. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_create_update_parameters.rb +112 -0
  670. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_get_properties_resource.rb +96 -0
  671. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_get_results.rb +98 -0
  672. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_list_result.rb +58 -0
  673. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_resource.rb +57 -0
  674. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/sql_trigger_create_update_parameters.rb +111 -0
  675. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/sql_trigger_get_properties_resource.rb +121 -0
  676. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/sql_trigger_get_results.rb +98 -0
  677. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/sql_trigger_list_result.rb +58 -0
  678. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/sql_trigger_resource.rb +82 -0
  679. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_create_update_parameters.rb +113 -0
  680. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_get_properties_resource.rb +97 -0
  681. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_get_results.rb +98 -0
  682. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_list_result.rb +58 -0
  683. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_resource.rb +57 -0
  684. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/table_create_update_parameters.rb +111 -0
  685. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/table_get_properties_options.rb +53 -0
  686. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/table_get_properties_resource.rb +85 -0
  687. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/table_get_results.rb +110 -0
  688. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/table_list_result.rb +57 -0
  689. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/table_resource.rb +46 -0
  690. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/throughput_policy_resource.rb +59 -0
  691. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/throughput_settings_get_properties_resource.rb +124 -0
  692. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/throughput_settings_get_results.rb +98 -0
  693. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/throughput_settings_resource.rb +86 -0
  694. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/throughput_settings_update_parameters.rb +99 -0
  695. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/tracked_resource.rb +92 -0
  696. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/trigger_operation.rb +19 -0
  697. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/trigger_type.rb +16 -0
  698. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/unique_key.rb +56 -0
  699. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/unique_key_policy.rb +58 -0
  700. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/unit_type.rb +21 -0
  701. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/usage.rb +97 -0
  702. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/usages_result.rb +57 -0
  703. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/models/virtual_network_rule.rb +59 -0
  704. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/module_definition.rb +9 -0
  705. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/mongo_dbresources.rb +1706 -0
  706. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/notebook_workspaces.rb +907 -0
  707. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/operations.rb +220 -0
  708. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/partition_key_range_id.rb +161 -0
  709. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/partition_key_range_id_region.rb +168 -0
  710. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/percentile.rb +146 -0
  711. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/percentile_source_target.rb +163 -0
  712. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/percentile_target.rb +153 -0
  713. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/sql_resources.rb +3433 -0
  714. data/lib/2020-04-01/generated/azure_mgmt_cosmosdb/table_resources.rb +840 -0
  715. data/lib/azure_mgmt_cosmosdb.rb +5 -0
  716. data/lib/profiles/latest/modules/cosmosdb_profile_module.rb +489 -299
  717. data/lib/version.rb +1 -1
  718. metadata +716 -4
@@ -0,0 +1,9 @@
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 end
7
+ module Azure::Cosmosdb end
8
+ module Azure::Cosmosdb::Mgmt end
9
+ module Azure::Cosmosdb::Mgmt::V2020_03_01 end
@@ -0,0 +1,1706 @@
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::V2020_03_01
7
+ #
8
+ # Azure Cosmos DB Database Service Resource Provider REST API
9
+ #
10
+ class MongoDBResources
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the MongoDBResources class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [CosmosDBManagementClient] reference to the CosmosDBManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Lists the MongoDB databases under an existing Azure Cosmos DB database
26
+ # account.
27
+ #
28
+ # @param resource_group_name [String] The name of the resource group. The name
29
+ # is case insensitive.
30
+ # @param account_name [String] Cosmos DB database account name.
31
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
32
+ # will be added to the HTTP request.
33
+ #
34
+ # @return [MongoDBDatabaseListResult] operation results.
35
+ #
36
+ def list_mongo_dbdatabases(resource_group_name, account_name, custom_headers:nil)
37
+ response = list_mongo_dbdatabases_async(resource_group_name, account_name, custom_headers:custom_headers).value!
38
+ response.body unless response.nil?
39
+ end
40
+
41
+ #
42
+ # Lists the MongoDB databases under an existing Azure Cosmos DB database
43
+ # account.
44
+ #
45
+ # @param resource_group_name [String] The name of the resource group. The name
46
+ # is case insensitive.
47
+ # @param account_name [String] Cosmos DB database account name.
48
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
49
+ # will be added to the HTTP request.
50
+ #
51
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
52
+ #
53
+ def list_mongo_dbdatabases_with_http_info(resource_group_name, account_name, custom_headers:nil)
54
+ list_mongo_dbdatabases_async(resource_group_name, account_name, custom_headers:custom_headers).value!
55
+ end
56
+
57
+ #
58
+ # Lists the MongoDB databases under an existing Azure Cosmos DB database
59
+ # account.
60
+ #
61
+ # @param resource_group_name [String] The name of the resource group. The name
62
+ # is case insensitive.
63
+ # @param account_name [String] Cosmos DB database account name.
64
+ # @param [Hash{String => String}] A hash of custom headers that will be added
65
+ # to the HTTP request.
66
+ #
67
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
68
+ #
69
+ def list_mongo_dbdatabases_async(resource_group_name, account_name, custom_headers:nil)
70
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
71
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
72
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
73
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
74
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
75
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
76
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
77
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
78
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
79
+ 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?
80
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
81
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
82
+
83
+
84
+ request_headers = {}
85
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
86
+
87
+ # Set Headers
88
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
89
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
90
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases'
91
+
92
+ request_url = @base_url || @client.base_url
93
+
94
+ options = {
95
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
96
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
97
+ query_params: {'api-version' => @client.api_version},
98
+ headers: request_headers.merge(custom_headers || {}),
99
+ base_url: request_url
100
+ }
101
+ promise = @client.make_request_async(:get, path_template, options)
102
+
103
+ promise = promise.then do |result|
104
+ http_response = result.response
105
+ status_code = http_response.status
106
+ response_content = http_response.body
107
+ unless status_code == 200
108
+ error_model = JSON.load(response_content)
109
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
110
+ end
111
+
112
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
113
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
114
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
115
+ # Deserialize Response
116
+ if status_code == 200
117
+ begin
118
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
119
+ result_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::MongoDBDatabaseListResult.mapper()
120
+ result.body = @client.deserialize(result_mapper, parsed_response)
121
+ rescue Exception => e
122
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
123
+ end
124
+ end
125
+
126
+ result
127
+ end
128
+
129
+ promise.execute
130
+ end
131
+
132
+ #
133
+ # Gets the MongoDB databases under an existing Azure Cosmos DB database account
134
+ # with the provided name.
135
+ #
136
+ # @param resource_group_name [String] The name of the resource group. The name
137
+ # is case insensitive.
138
+ # @param account_name [String] Cosmos DB database account name.
139
+ # @param database_name [String] Cosmos DB database name.
140
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
141
+ # will be added to the HTTP request.
142
+ #
143
+ # @return [MongoDBDatabaseGetResults] operation results.
144
+ #
145
+ def get_mongo_dbdatabase(resource_group_name, account_name, database_name, custom_headers:nil)
146
+ response = get_mongo_dbdatabase_async(resource_group_name, account_name, database_name, custom_headers:custom_headers).value!
147
+ response.body unless response.nil?
148
+ end
149
+
150
+ #
151
+ # Gets the MongoDB databases under an existing Azure Cosmos DB database account
152
+ # with the provided name.
153
+ #
154
+ # @param resource_group_name [String] The name of the resource group. The name
155
+ # is case insensitive.
156
+ # @param account_name [String] Cosmos DB database account name.
157
+ # @param database_name [String] Cosmos DB database name.
158
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
159
+ # will be added to the HTTP request.
160
+ #
161
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
162
+ #
163
+ def get_mongo_dbdatabase_with_http_info(resource_group_name, account_name, database_name, custom_headers:nil)
164
+ get_mongo_dbdatabase_async(resource_group_name, account_name, database_name, custom_headers:custom_headers).value!
165
+ end
166
+
167
+ #
168
+ # Gets the MongoDB databases under an existing Azure Cosmos DB database account
169
+ # with the provided name.
170
+ #
171
+ # @param resource_group_name [String] The name of the resource group. The name
172
+ # is case insensitive.
173
+ # @param account_name [String] Cosmos DB database account name.
174
+ # @param database_name [String] Cosmos DB database name.
175
+ # @param [Hash{String => String}] A hash of custom headers that will be added
176
+ # to the HTTP request.
177
+ #
178
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
179
+ #
180
+ def get_mongo_dbdatabase_async(resource_group_name, account_name, database_name, custom_headers:nil)
181
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
182
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
183
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
184
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
185
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
186
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
187
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
188
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
189
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
190
+ 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?
191
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
192
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
193
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
194
+
195
+
196
+ request_headers = {}
197
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
198
+
199
+ # Set Headers
200
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
201
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
202
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}'
203
+
204
+ request_url = @base_url || @client.base_url
205
+
206
+ options = {
207
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
208
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'databaseName' => database_name},
209
+ query_params: {'api-version' => @client.api_version},
210
+ headers: request_headers.merge(custom_headers || {}),
211
+ base_url: request_url
212
+ }
213
+ promise = @client.make_request_async(:get, path_template, options)
214
+
215
+ promise = promise.then do |result|
216
+ http_response = result.response
217
+ status_code = http_response.status
218
+ response_content = http_response.body
219
+ unless status_code == 200
220
+ error_model = JSON.load(response_content)
221
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
222
+ end
223
+
224
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
225
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
226
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
227
+ # Deserialize Response
228
+ if status_code == 200
229
+ begin
230
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
231
+ result_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::MongoDBDatabaseGetResults.mapper()
232
+ result.body = @client.deserialize(result_mapper, parsed_response)
233
+ rescue Exception => e
234
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
235
+ end
236
+ end
237
+
238
+ result
239
+ end
240
+
241
+ promise.execute
242
+ end
243
+
244
+ #
245
+ # Create or updates Azure Cosmos DB MongoDB database
246
+ #
247
+ # @param resource_group_name [String] The name of the resource group. The name
248
+ # is case insensitive.
249
+ # @param account_name [String] Cosmos DB database account name.
250
+ # @param database_name [String] Cosmos DB database name.
251
+ # @param create_update_mongo_dbdatabase_parameters
252
+ # [MongoDBDatabaseCreateUpdateParameters] The parameters to provide for the
253
+ # current MongoDB database.
254
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
255
+ # will be added to the HTTP request.
256
+ #
257
+ # @return [MongoDBDatabaseGetResults] operation results.
258
+ #
259
+ def create_update_mongo_dbdatabase(resource_group_name, account_name, database_name, create_update_mongo_dbdatabase_parameters, custom_headers:nil)
260
+ response = create_update_mongo_dbdatabase_async(resource_group_name, account_name, database_name, create_update_mongo_dbdatabase_parameters, custom_headers:custom_headers).value!
261
+ response.body unless response.nil?
262
+ end
263
+
264
+ #
265
+ # @param resource_group_name [String] The name of the resource group. The name
266
+ # is case insensitive.
267
+ # @param account_name [String] Cosmos DB database account name.
268
+ # @param database_name [String] Cosmos DB database name.
269
+ # @param create_update_mongo_dbdatabase_parameters
270
+ # [MongoDBDatabaseCreateUpdateParameters] The parameters to provide for the
271
+ # current MongoDB database.
272
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
273
+ # will be added to the HTTP request.
274
+ #
275
+ # @return [Concurrent::Promise] promise which provides async access to http
276
+ # response.
277
+ #
278
+ def create_update_mongo_dbdatabase_async(resource_group_name, account_name, database_name, create_update_mongo_dbdatabase_parameters, custom_headers:nil)
279
+ # Send request
280
+ promise = begin_create_update_mongo_dbdatabase_async(resource_group_name, account_name, database_name, create_update_mongo_dbdatabase_parameters, custom_headers:custom_headers)
281
+
282
+ promise = promise.then do |response|
283
+ # Defining deserialization method.
284
+ deserialize_method = lambda do |parsed_response|
285
+ result_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::MongoDBDatabaseGetResults.mapper()
286
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
287
+ end
288
+
289
+ # Waiting for response.
290
+ @client.get_long_running_operation_result(response, deserialize_method)
291
+ end
292
+
293
+ promise
294
+ end
295
+
296
+ #
297
+ # Deletes an existing Azure Cosmos DB MongoDB database.
298
+ #
299
+ # @param resource_group_name [String] The name of the resource group. The name
300
+ # is case insensitive.
301
+ # @param account_name [String] Cosmos DB database account name.
302
+ # @param database_name [String] Cosmos DB database name.
303
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
304
+ # will be added to the HTTP request.
305
+ #
306
+ def delete_mongo_dbdatabase(resource_group_name, account_name, database_name, custom_headers:nil)
307
+ response = delete_mongo_dbdatabase_async(resource_group_name, account_name, database_name, custom_headers:custom_headers).value!
308
+ nil
309
+ end
310
+
311
+ #
312
+ # @param resource_group_name [String] The name of the resource group. The name
313
+ # is case insensitive.
314
+ # @param account_name [String] Cosmos DB database account name.
315
+ # @param database_name [String] Cosmos DB database name.
316
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
317
+ # will be added to the HTTP request.
318
+ #
319
+ # @return [Concurrent::Promise] promise which provides async access to http
320
+ # response.
321
+ #
322
+ def delete_mongo_dbdatabase_async(resource_group_name, account_name, database_name, custom_headers:nil)
323
+ # Send request
324
+ promise = begin_delete_mongo_dbdatabase_async(resource_group_name, account_name, database_name, custom_headers:custom_headers)
325
+
326
+ promise = promise.then do |response|
327
+ # Defining deserialization method.
328
+ deserialize_method = lambda do |parsed_response|
329
+ end
330
+
331
+ # Waiting for response.
332
+ @client.get_long_running_operation_result(response, deserialize_method)
333
+ end
334
+
335
+ promise
336
+ end
337
+
338
+ #
339
+ # Gets the RUs per second of the MongoDB database under an existing Azure
340
+ # Cosmos DB database account with the provided name.
341
+ #
342
+ # @param resource_group_name [String] The name of the resource group. The name
343
+ # is case insensitive.
344
+ # @param account_name [String] Cosmos DB database account name.
345
+ # @param database_name [String] Cosmos DB database name.
346
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
347
+ # will be added to the HTTP request.
348
+ #
349
+ # @return [ThroughputSettingsGetResults] operation results.
350
+ #
351
+ def get_mongo_dbdatabase_throughput(resource_group_name, account_name, database_name, custom_headers:nil)
352
+ response = get_mongo_dbdatabase_throughput_async(resource_group_name, account_name, database_name, custom_headers:custom_headers).value!
353
+ response.body unless response.nil?
354
+ end
355
+
356
+ #
357
+ # Gets the RUs per second of the MongoDB database under an existing Azure
358
+ # Cosmos DB database account with the provided name.
359
+ #
360
+ # @param resource_group_name [String] The name of the resource group. The name
361
+ # is case insensitive.
362
+ # @param account_name [String] Cosmos DB database account name.
363
+ # @param database_name [String] Cosmos DB database name.
364
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
365
+ # will be added to the HTTP request.
366
+ #
367
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
368
+ #
369
+ def get_mongo_dbdatabase_throughput_with_http_info(resource_group_name, account_name, database_name, custom_headers:nil)
370
+ get_mongo_dbdatabase_throughput_async(resource_group_name, account_name, database_name, custom_headers:custom_headers).value!
371
+ end
372
+
373
+ #
374
+ # Gets the RUs per second of the MongoDB database under an existing Azure
375
+ # Cosmos DB database account with the provided name.
376
+ #
377
+ # @param resource_group_name [String] The name of the resource group. The name
378
+ # is case insensitive.
379
+ # @param account_name [String] Cosmos DB database account name.
380
+ # @param database_name [String] Cosmos DB database name.
381
+ # @param [Hash{String => String}] A hash of custom headers that will be added
382
+ # to the HTTP request.
383
+ #
384
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
385
+ #
386
+ def get_mongo_dbdatabase_throughput_async(resource_group_name, account_name, database_name, custom_headers:nil)
387
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
388
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
389
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
390
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
391
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
392
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
393
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
394
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
395
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
396
+ 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?
397
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
398
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
399
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
400
+
401
+
402
+ request_headers = {}
403
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
404
+
405
+ # Set Headers
406
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
407
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
408
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default'
409
+
410
+ request_url = @base_url || @client.base_url
411
+
412
+ options = {
413
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
414
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'databaseName' => database_name},
415
+ query_params: {'api-version' => @client.api_version},
416
+ headers: request_headers.merge(custom_headers || {}),
417
+ base_url: request_url
418
+ }
419
+ promise = @client.make_request_async(:get, path_template, options)
420
+
421
+ promise = promise.then do |result|
422
+ http_response = result.response
423
+ status_code = http_response.status
424
+ response_content = http_response.body
425
+ unless status_code == 200
426
+ error_model = JSON.load(response_content)
427
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
428
+ end
429
+
430
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
431
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
432
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
433
+ # Deserialize Response
434
+ if status_code == 200
435
+ begin
436
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
437
+ result_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::ThroughputSettingsGetResults.mapper()
438
+ result.body = @client.deserialize(result_mapper, parsed_response)
439
+ rescue Exception => e
440
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
441
+ end
442
+ end
443
+
444
+ result
445
+ end
446
+
447
+ promise.execute
448
+ end
449
+
450
+ #
451
+ # Update RUs per second of the an Azure Cosmos DB MongoDB database
452
+ #
453
+ # @param resource_group_name [String] The name of the resource group. The name
454
+ # is case insensitive.
455
+ # @param account_name [String] Cosmos DB database account name.
456
+ # @param database_name [String] Cosmos DB database name.
457
+ # @param update_throughput_parameters [ThroughputSettingsUpdateParameters] The
458
+ # RUs per second of the parameters to provide for the current MongoDB database.
459
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
460
+ # will be added to the HTTP request.
461
+ #
462
+ # @return [ThroughputSettingsGetResults] operation results.
463
+ #
464
+ def update_mongo_dbdatabase_throughput(resource_group_name, account_name, database_name, update_throughput_parameters, custom_headers:nil)
465
+ response = update_mongo_dbdatabase_throughput_async(resource_group_name, account_name, database_name, update_throughput_parameters, custom_headers:custom_headers).value!
466
+ response.body unless response.nil?
467
+ end
468
+
469
+ #
470
+ # @param resource_group_name [String] The name of the resource group. The name
471
+ # is case insensitive.
472
+ # @param account_name [String] Cosmos DB database account name.
473
+ # @param database_name [String] Cosmos DB database name.
474
+ # @param update_throughput_parameters [ThroughputSettingsUpdateParameters] The
475
+ # RUs per second of the parameters to provide for the current MongoDB database.
476
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
477
+ # will be added to the HTTP request.
478
+ #
479
+ # @return [Concurrent::Promise] promise which provides async access to http
480
+ # response.
481
+ #
482
+ def update_mongo_dbdatabase_throughput_async(resource_group_name, account_name, database_name, update_throughput_parameters, custom_headers:nil)
483
+ # Send request
484
+ promise = begin_update_mongo_dbdatabase_throughput_async(resource_group_name, account_name, database_name, update_throughput_parameters, custom_headers:custom_headers)
485
+
486
+ promise = promise.then do |response|
487
+ # Defining deserialization method.
488
+ deserialize_method = lambda do |parsed_response|
489
+ result_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::ThroughputSettingsGetResults.mapper()
490
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
491
+ end
492
+
493
+ # Waiting for response.
494
+ @client.get_long_running_operation_result(response, deserialize_method)
495
+ end
496
+
497
+ promise
498
+ end
499
+
500
+ #
501
+ # Lists the MongoDB collection under an existing Azure Cosmos DB database
502
+ # account.
503
+ #
504
+ # @param resource_group_name [String] The name of the resource group. The name
505
+ # is case insensitive.
506
+ # @param account_name [String] Cosmos DB database account name.
507
+ # @param database_name [String] Cosmos DB database name.
508
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
509
+ # will be added to the HTTP request.
510
+ #
511
+ # @return [MongoDBCollectionListResult] operation results.
512
+ #
513
+ def list_mongo_dbcollections(resource_group_name, account_name, database_name, custom_headers:nil)
514
+ response = list_mongo_dbcollections_async(resource_group_name, account_name, database_name, custom_headers:custom_headers).value!
515
+ response.body unless response.nil?
516
+ end
517
+
518
+ #
519
+ # Lists the MongoDB collection under an existing Azure Cosmos DB database
520
+ # account.
521
+ #
522
+ # @param resource_group_name [String] The name of the resource group. The name
523
+ # is case insensitive.
524
+ # @param account_name [String] Cosmos DB database account name.
525
+ # @param database_name [String] Cosmos DB database name.
526
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
527
+ # will be added to the HTTP request.
528
+ #
529
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
530
+ #
531
+ def list_mongo_dbcollections_with_http_info(resource_group_name, account_name, database_name, custom_headers:nil)
532
+ list_mongo_dbcollections_async(resource_group_name, account_name, database_name, custom_headers:custom_headers).value!
533
+ end
534
+
535
+ #
536
+ # Lists the MongoDB collection under an existing Azure Cosmos DB database
537
+ # account.
538
+ #
539
+ # @param resource_group_name [String] The name of the resource group. The name
540
+ # is case insensitive.
541
+ # @param account_name [String] Cosmos DB database account name.
542
+ # @param database_name [String] Cosmos DB database name.
543
+ # @param [Hash{String => String}] A hash of custom headers that will be added
544
+ # to the HTTP request.
545
+ #
546
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
547
+ #
548
+ def list_mongo_dbcollections_async(resource_group_name, account_name, database_name, custom_headers:nil)
549
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
550
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
551
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
552
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
553
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
554
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
555
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
556
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
557
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
558
+ 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?
559
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
560
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
561
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
562
+
563
+
564
+ request_headers = {}
565
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
566
+
567
+ # Set Headers
568
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
569
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
570
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections'
571
+
572
+ request_url = @base_url || @client.base_url
573
+
574
+ options = {
575
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
576
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'databaseName' => database_name},
577
+ query_params: {'api-version' => @client.api_version},
578
+ headers: request_headers.merge(custom_headers || {}),
579
+ base_url: request_url
580
+ }
581
+ promise = @client.make_request_async(:get, path_template, options)
582
+
583
+ promise = promise.then do |result|
584
+ http_response = result.response
585
+ status_code = http_response.status
586
+ response_content = http_response.body
587
+ unless status_code == 200
588
+ error_model = JSON.load(response_content)
589
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
590
+ end
591
+
592
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
593
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
594
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
595
+ # Deserialize Response
596
+ if status_code == 200
597
+ begin
598
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
599
+ result_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::MongoDBCollectionListResult.mapper()
600
+ result.body = @client.deserialize(result_mapper, parsed_response)
601
+ rescue Exception => e
602
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
603
+ end
604
+ end
605
+
606
+ result
607
+ end
608
+
609
+ promise.execute
610
+ end
611
+
612
+ #
613
+ # Gets the MongoDB collection under an existing Azure Cosmos DB database
614
+ # account.
615
+ #
616
+ # @param resource_group_name [String] The name of the resource group. The name
617
+ # is case insensitive.
618
+ # @param account_name [String] Cosmos DB database account name.
619
+ # @param database_name [String] Cosmos DB database name.
620
+ # @param collection_name [String] Cosmos DB collection name.
621
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
622
+ # will be added to the HTTP request.
623
+ #
624
+ # @return [MongoDBCollectionGetResults] operation results.
625
+ #
626
+ def get_mongo_dbcollection(resource_group_name, account_name, database_name, collection_name, custom_headers:nil)
627
+ response = get_mongo_dbcollection_async(resource_group_name, account_name, database_name, collection_name, custom_headers:custom_headers).value!
628
+ response.body unless response.nil?
629
+ end
630
+
631
+ #
632
+ # Gets the MongoDB collection under an existing Azure Cosmos DB database
633
+ # account.
634
+ #
635
+ # @param resource_group_name [String] The name of the resource group. The name
636
+ # is case insensitive.
637
+ # @param account_name [String] Cosmos DB database account name.
638
+ # @param database_name [String] Cosmos DB database name.
639
+ # @param collection_name [String] Cosmos DB collection name.
640
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
641
+ # will be added to the HTTP request.
642
+ #
643
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
644
+ #
645
+ def get_mongo_dbcollection_with_http_info(resource_group_name, account_name, database_name, collection_name, custom_headers:nil)
646
+ get_mongo_dbcollection_async(resource_group_name, account_name, database_name, collection_name, custom_headers:custom_headers).value!
647
+ end
648
+
649
+ #
650
+ # Gets the MongoDB collection under an existing Azure Cosmos DB database
651
+ # account.
652
+ #
653
+ # @param resource_group_name [String] The name of the resource group. The name
654
+ # is case insensitive.
655
+ # @param account_name [String] Cosmos DB database account name.
656
+ # @param database_name [String] Cosmos DB database name.
657
+ # @param collection_name [String] Cosmos DB collection name.
658
+ # @param [Hash{String => String}] A hash of custom headers that will be added
659
+ # to the HTTP request.
660
+ #
661
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
662
+ #
663
+ def get_mongo_dbcollection_async(resource_group_name, account_name, database_name, collection_name, custom_headers:nil)
664
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
665
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
666
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
667
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
668
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
669
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
670
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
671
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
672
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
673
+ 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?
674
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
675
+ fail ArgumentError, 'collection_name is nil' if collection_name.nil?
676
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
677
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
678
+
679
+
680
+ request_headers = {}
681
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
682
+
683
+ # Set Headers
684
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
685
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
686
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}'
687
+
688
+ request_url = @base_url || @client.base_url
689
+
690
+ options = {
691
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
692
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'databaseName' => database_name,'collectionName' => collection_name},
693
+ query_params: {'api-version' => @client.api_version},
694
+ headers: request_headers.merge(custom_headers || {}),
695
+ base_url: request_url
696
+ }
697
+ promise = @client.make_request_async(:get, path_template, options)
698
+
699
+ promise = promise.then do |result|
700
+ http_response = result.response
701
+ status_code = http_response.status
702
+ response_content = http_response.body
703
+ unless status_code == 200
704
+ error_model = JSON.load(response_content)
705
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
706
+ end
707
+
708
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
709
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
710
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
711
+ # Deserialize Response
712
+ if status_code == 200
713
+ begin
714
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
715
+ result_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::MongoDBCollectionGetResults.mapper()
716
+ result.body = @client.deserialize(result_mapper, parsed_response)
717
+ rescue Exception => e
718
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
719
+ end
720
+ end
721
+
722
+ result
723
+ end
724
+
725
+ promise.execute
726
+ end
727
+
728
+ #
729
+ # Create or update an Azure Cosmos DB MongoDB Collection
730
+ #
731
+ # @param resource_group_name [String] The name of the resource group. The name
732
+ # is case insensitive.
733
+ # @param account_name [String] Cosmos DB database account name.
734
+ # @param database_name [String] Cosmos DB database name.
735
+ # @param collection_name [String] Cosmos DB collection name.
736
+ # @param create_update_mongo_dbcollection_parameters
737
+ # [MongoDBCollectionCreateUpdateParameters] The parameters to provide for the
738
+ # current MongoDB Collection.
739
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
740
+ # will be added to the HTTP request.
741
+ #
742
+ # @return [MongoDBCollectionGetResults] operation results.
743
+ #
744
+ def create_update_mongo_dbcollection(resource_group_name, account_name, database_name, collection_name, create_update_mongo_dbcollection_parameters, custom_headers:nil)
745
+ response = create_update_mongo_dbcollection_async(resource_group_name, account_name, database_name, collection_name, create_update_mongo_dbcollection_parameters, custom_headers:custom_headers).value!
746
+ response.body unless response.nil?
747
+ end
748
+
749
+ #
750
+ # @param resource_group_name [String] The name of the resource group. The name
751
+ # is case insensitive.
752
+ # @param account_name [String] Cosmos DB database account name.
753
+ # @param database_name [String] Cosmos DB database name.
754
+ # @param collection_name [String] Cosmos DB collection name.
755
+ # @param create_update_mongo_dbcollection_parameters
756
+ # [MongoDBCollectionCreateUpdateParameters] The parameters to provide for the
757
+ # current MongoDB Collection.
758
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
759
+ # will be added to the HTTP request.
760
+ #
761
+ # @return [Concurrent::Promise] promise which provides async access to http
762
+ # response.
763
+ #
764
+ def create_update_mongo_dbcollection_async(resource_group_name, account_name, database_name, collection_name, create_update_mongo_dbcollection_parameters, custom_headers:nil)
765
+ # Send request
766
+ promise = begin_create_update_mongo_dbcollection_async(resource_group_name, account_name, database_name, collection_name, create_update_mongo_dbcollection_parameters, custom_headers:custom_headers)
767
+
768
+ promise = promise.then do |response|
769
+ # Defining deserialization method.
770
+ deserialize_method = lambda do |parsed_response|
771
+ result_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::MongoDBCollectionGetResults.mapper()
772
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
773
+ end
774
+
775
+ # Waiting for response.
776
+ @client.get_long_running_operation_result(response, deserialize_method)
777
+ end
778
+
779
+ promise
780
+ end
781
+
782
+ #
783
+ # Deletes an existing Azure Cosmos DB MongoDB Collection.
784
+ #
785
+ # @param resource_group_name [String] The name of the resource group. The name
786
+ # is case insensitive.
787
+ # @param account_name [String] Cosmos DB database account name.
788
+ # @param database_name [String] Cosmos DB database name.
789
+ # @param collection_name [String] Cosmos DB collection name.
790
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
791
+ # will be added to the HTTP request.
792
+ #
793
+ def delete_mongo_dbcollection(resource_group_name, account_name, database_name, collection_name, custom_headers:nil)
794
+ response = delete_mongo_dbcollection_async(resource_group_name, account_name, database_name, collection_name, custom_headers:custom_headers).value!
795
+ nil
796
+ end
797
+
798
+ #
799
+ # @param resource_group_name [String] The name of the resource group. The name
800
+ # is case insensitive.
801
+ # @param account_name [String] Cosmos DB database account name.
802
+ # @param database_name [String] Cosmos DB database name.
803
+ # @param collection_name [String] Cosmos DB collection name.
804
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
805
+ # will be added to the HTTP request.
806
+ #
807
+ # @return [Concurrent::Promise] promise which provides async access to http
808
+ # response.
809
+ #
810
+ def delete_mongo_dbcollection_async(resource_group_name, account_name, database_name, collection_name, custom_headers:nil)
811
+ # Send request
812
+ promise = begin_delete_mongo_dbcollection_async(resource_group_name, account_name, database_name, collection_name, custom_headers:custom_headers)
813
+
814
+ promise = promise.then do |response|
815
+ # Defining deserialization method.
816
+ deserialize_method = lambda do |parsed_response|
817
+ end
818
+
819
+ # Waiting for response.
820
+ @client.get_long_running_operation_result(response, deserialize_method)
821
+ end
822
+
823
+ promise
824
+ end
825
+
826
+ #
827
+ # Gets the RUs per second of the MongoDB collection under an existing Azure
828
+ # Cosmos DB database account with the provided name.
829
+ #
830
+ # @param resource_group_name [String] The name of the resource group. The name
831
+ # is case insensitive.
832
+ # @param account_name [String] Cosmos DB database account name.
833
+ # @param database_name [String] Cosmos DB database name.
834
+ # @param collection_name [String] Cosmos DB collection name.
835
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
836
+ # will be added to the HTTP request.
837
+ #
838
+ # @return [ThroughputSettingsGetResults] operation results.
839
+ #
840
+ def get_mongo_dbcollection_throughput(resource_group_name, account_name, database_name, collection_name, custom_headers:nil)
841
+ response = get_mongo_dbcollection_throughput_async(resource_group_name, account_name, database_name, collection_name, custom_headers:custom_headers).value!
842
+ response.body unless response.nil?
843
+ end
844
+
845
+ #
846
+ # Gets the RUs per second of the MongoDB collection under an existing Azure
847
+ # Cosmos DB database account with the provided name.
848
+ #
849
+ # @param resource_group_name [String] The name of the resource group. The name
850
+ # is case insensitive.
851
+ # @param account_name [String] Cosmos DB database account name.
852
+ # @param database_name [String] Cosmos DB database name.
853
+ # @param collection_name [String] Cosmos DB collection name.
854
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
855
+ # will be added to the HTTP request.
856
+ #
857
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
858
+ #
859
+ def get_mongo_dbcollection_throughput_with_http_info(resource_group_name, account_name, database_name, collection_name, custom_headers:nil)
860
+ get_mongo_dbcollection_throughput_async(resource_group_name, account_name, database_name, collection_name, custom_headers:custom_headers).value!
861
+ end
862
+
863
+ #
864
+ # Gets the RUs per second of the MongoDB collection under an existing Azure
865
+ # Cosmos DB database account with the provided name.
866
+ #
867
+ # @param resource_group_name [String] The name of the resource group. The name
868
+ # is case insensitive.
869
+ # @param account_name [String] Cosmos DB database account name.
870
+ # @param database_name [String] Cosmos DB database name.
871
+ # @param collection_name [String] Cosmos DB collection name.
872
+ # @param [Hash{String => String}] A hash of custom headers that will be added
873
+ # to the HTTP request.
874
+ #
875
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
876
+ #
877
+ def get_mongo_dbcollection_throughput_async(resource_group_name, account_name, database_name, collection_name, custom_headers:nil)
878
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
879
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
880
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
881
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
882
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
883
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
884
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
885
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
886
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
887
+ 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?
888
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
889
+ fail ArgumentError, 'collection_name is nil' if collection_name.nil?
890
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
891
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
892
+
893
+
894
+ request_headers = {}
895
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
896
+
897
+ # Set Headers
898
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
899
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
900
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default'
901
+
902
+ request_url = @base_url || @client.base_url
903
+
904
+ options = {
905
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
906
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'databaseName' => database_name,'collectionName' => collection_name},
907
+ query_params: {'api-version' => @client.api_version},
908
+ headers: request_headers.merge(custom_headers || {}),
909
+ base_url: request_url
910
+ }
911
+ promise = @client.make_request_async(:get, path_template, options)
912
+
913
+ promise = promise.then do |result|
914
+ http_response = result.response
915
+ status_code = http_response.status
916
+ response_content = http_response.body
917
+ unless status_code == 200
918
+ error_model = JSON.load(response_content)
919
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
920
+ end
921
+
922
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
923
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
924
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
925
+ # Deserialize Response
926
+ if status_code == 200
927
+ begin
928
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
929
+ result_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::ThroughputSettingsGetResults.mapper()
930
+ result.body = @client.deserialize(result_mapper, parsed_response)
931
+ rescue Exception => e
932
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
933
+ end
934
+ end
935
+
936
+ result
937
+ end
938
+
939
+ promise.execute
940
+ end
941
+
942
+ #
943
+ # Update the RUs per second of an Azure Cosmos DB MongoDB collection
944
+ #
945
+ # @param resource_group_name [String] The name of the resource group. The name
946
+ # is case insensitive.
947
+ # @param account_name [String] Cosmos DB database account name.
948
+ # @param database_name [String] Cosmos DB database name.
949
+ # @param collection_name [String] Cosmos DB collection name.
950
+ # @param update_throughput_parameters [ThroughputSettingsUpdateParameters] The
951
+ # RUs per second of the parameters to provide for the current MongoDB
952
+ # collection.
953
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
954
+ # will be added to the HTTP request.
955
+ #
956
+ # @return [ThroughputSettingsGetResults] operation results.
957
+ #
958
+ def update_mongo_dbcollection_throughput(resource_group_name, account_name, database_name, collection_name, update_throughput_parameters, custom_headers:nil)
959
+ response = update_mongo_dbcollection_throughput_async(resource_group_name, account_name, database_name, collection_name, update_throughput_parameters, custom_headers:custom_headers).value!
960
+ response.body unless response.nil?
961
+ end
962
+
963
+ #
964
+ # @param resource_group_name [String] The name of the resource group. The name
965
+ # is case insensitive.
966
+ # @param account_name [String] Cosmos DB database account name.
967
+ # @param database_name [String] Cosmos DB database name.
968
+ # @param collection_name [String] Cosmos DB collection name.
969
+ # @param update_throughput_parameters [ThroughputSettingsUpdateParameters] The
970
+ # RUs per second of the parameters to provide for the current MongoDB
971
+ # collection.
972
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
973
+ # will be added to the HTTP request.
974
+ #
975
+ # @return [Concurrent::Promise] promise which provides async access to http
976
+ # response.
977
+ #
978
+ def update_mongo_dbcollection_throughput_async(resource_group_name, account_name, database_name, collection_name, update_throughput_parameters, custom_headers:nil)
979
+ # Send request
980
+ promise = begin_update_mongo_dbcollection_throughput_async(resource_group_name, account_name, database_name, collection_name, update_throughput_parameters, custom_headers:custom_headers)
981
+
982
+ promise = promise.then do |response|
983
+ # Defining deserialization method.
984
+ deserialize_method = lambda do |parsed_response|
985
+ result_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::ThroughputSettingsGetResults.mapper()
986
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
987
+ end
988
+
989
+ # Waiting for response.
990
+ @client.get_long_running_operation_result(response, deserialize_method)
991
+ end
992
+
993
+ promise
994
+ end
995
+
996
+ #
997
+ # Create or updates Azure Cosmos DB MongoDB database
998
+ #
999
+ # @param resource_group_name [String] The name of the resource group. The name
1000
+ # is case insensitive.
1001
+ # @param account_name [String] Cosmos DB database account name.
1002
+ # @param database_name [String] Cosmos DB database name.
1003
+ # @param create_update_mongo_dbdatabase_parameters
1004
+ # [MongoDBDatabaseCreateUpdateParameters] The parameters to provide for the
1005
+ # current MongoDB database.
1006
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1007
+ # will be added to the HTTP request.
1008
+ #
1009
+ # @return [MongoDBDatabaseGetResults] operation results.
1010
+ #
1011
+ def begin_create_update_mongo_dbdatabase(resource_group_name, account_name, database_name, create_update_mongo_dbdatabase_parameters, custom_headers:nil)
1012
+ response = begin_create_update_mongo_dbdatabase_async(resource_group_name, account_name, database_name, create_update_mongo_dbdatabase_parameters, custom_headers:custom_headers).value!
1013
+ response.body unless response.nil?
1014
+ end
1015
+
1016
+ #
1017
+ # Create or updates Azure Cosmos DB MongoDB database
1018
+ #
1019
+ # @param resource_group_name [String] The name of the resource group. The name
1020
+ # is case insensitive.
1021
+ # @param account_name [String] Cosmos DB database account name.
1022
+ # @param database_name [String] Cosmos DB database name.
1023
+ # @param create_update_mongo_dbdatabase_parameters
1024
+ # [MongoDBDatabaseCreateUpdateParameters] The parameters to provide for the
1025
+ # current MongoDB database.
1026
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1027
+ # will be added to the HTTP request.
1028
+ #
1029
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1030
+ #
1031
+ def begin_create_update_mongo_dbdatabase_with_http_info(resource_group_name, account_name, database_name, create_update_mongo_dbdatabase_parameters, custom_headers:nil)
1032
+ begin_create_update_mongo_dbdatabase_async(resource_group_name, account_name, database_name, create_update_mongo_dbdatabase_parameters, custom_headers:custom_headers).value!
1033
+ end
1034
+
1035
+ #
1036
+ # Create or updates Azure Cosmos DB MongoDB database
1037
+ #
1038
+ # @param resource_group_name [String] The name of the resource group. The name
1039
+ # is case insensitive.
1040
+ # @param account_name [String] Cosmos DB database account name.
1041
+ # @param database_name [String] Cosmos DB database name.
1042
+ # @param create_update_mongo_dbdatabase_parameters
1043
+ # [MongoDBDatabaseCreateUpdateParameters] The parameters to provide for the
1044
+ # current MongoDB database.
1045
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1046
+ # to the HTTP request.
1047
+ #
1048
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1049
+ #
1050
+ def begin_create_update_mongo_dbdatabase_async(resource_group_name, account_name, database_name, create_update_mongo_dbdatabase_parameters, custom_headers:nil)
1051
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1052
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
1053
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1054
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1055
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1056
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1057
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1058
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
1059
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
1060
+ 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?
1061
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
1062
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1063
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
1064
+ fail ArgumentError, 'create_update_mongo_dbdatabase_parameters is nil' if create_update_mongo_dbdatabase_parameters.nil?
1065
+
1066
+
1067
+ request_headers = {}
1068
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1069
+
1070
+ # Set Headers
1071
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1072
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1073
+
1074
+ # Serialize Request
1075
+ request_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::MongoDBDatabaseCreateUpdateParameters.mapper()
1076
+ request_content = @client.serialize(request_mapper, create_update_mongo_dbdatabase_parameters)
1077
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1078
+
1079
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}'
1080
+
1081
+ request_url = @base_url || @client.base_url
1082
+
1083
+ options = {
1084
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1085
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'databaseName' => database_name},
1086
+ query_params: {'api-version' => @client.api_version},
1087
+ body: request_content,
1088
+ headers: request_headers.merge(custom_headers || {}),
1089
+ base_url: request_url
1090
+ }
1091
+ promise = @client.make_request_async(:put, path_template, options)
1092
+
1093
+ promise = promise.then do |result|
1094
+ http_response = result.response
1095
+ status_code = http_response.status
1096
+ response_content = http_response.body
1097
+ unless status_code == 202 || status_code == 200
1098
+ error_model = JSON.load(response_content)
1099
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1100
+ end
1101
+
1102
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1103
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1104
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1105
+ # Deserialize Response
1106
+ if status_code == 200
1107
+ begin
1108
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1109
+ result_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::MongoDBDatabaseGetResults.mapper()
1110
+ result.body = @client.deserialize(result_mapper, parsed_response)
1111
+ rescue Exception => e
1112
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1113
+ end
1114
+ end
1115
+
1116
+ result
1117
+ end
1118
+
1119
+ promise.execute
1120
+ end
1121
+
1122
+ #
1123
+ # Deletes an existing Azure Cosmos DB MongoDB database.
1124
+ #
1125
+ # @param resource_group_name [String] The name of the resource group. The name
1126
+ # is case insensitive.
1127
+ # @param account_name [String] Cosmos DB database account name.
1128
+ # @param database_name [String] Cosmos DB database name.
1129
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1130
+ # will be added to the HTTP request.
1131
+ #
1132
+ #
1133
+ def begin_delete_mongo_dbdatabase(resource_group_name, account_name, database_name, custom_headers:nil)
1134
+ response = begin_delete_mongo_dbdatabase_async(resource_group_name, account_name, database_name, custom_headers:custom_headers).value!
1135
+ nil
1136
+ end
1137
+
1138
+ #
1139
+ # Deletes an existing Azure Cosmos DB MongoDB database.
1140
+ #
1141
+ # @param resource_group_name [String] The name of the resource group. The name
1142
+ # is case insensitive.
1143
+ # @param account_name [String] Cosmos DB database account name.
1144
+ # @param database_name [String] Cosmos DB database name.
1145
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1146
+ # will be added to the HTTP request.
1147
+ #
1148
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1149
+ #
1150
+ def begin_delete_mongo_dbdatabase_with_http_info(resource_group_name, account_name, database_name, custom_headers:nil)
1151
+ begin_delete_mongo_dbdatabase_async(resource_group_name, account_name, database_name, custom_headers:custom_headers).value!
1152
+ end
1153
+
1154
+ #
1155
+ # Deletes an existing Azure Cosmos DB MongoDB database.
1156
+ #
1157
+ # @param resource_group_name [String] The name of the resource group. The name
1158
+ # is case insensitive.
1159
+ # @param account_name [String] Cosmos DB database account name.
1160
+ # @param database_name [String] Cosmos DB database name.
1161
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1162
+ # to the HTTP request.
1163
+ #
1164
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1165
+ #
1166
+ def begin_delete_mongo_dbdatabase_async(resource_group_name, account_name, database_name, custom_headers:nil)
1167
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1168
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
1169
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1170
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1171
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1172
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1173
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1174
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
1175
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
1176
+ 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?
1177
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
1178
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1179
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
1180
+
1181
+
1182
+ request_headers = {}
1183
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1184
+
1185
+ # Set Headers
1186
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1187
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1188
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}'
1189
+
1190
+ request_url = @base_url || @client.base_url
1191
+
1192
+ options = {
1193
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1194
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'databaseName' => database_name},
1195
+ query_params: {'api-version' => @client.api_version},
1196
+ headers: request_headers.merge(custom_headers || {}),
1197
+ base_url: request_url
1198
+ }
1199
+ promise = @client.make_request_async(:delete, path_template, options)
1200
+
1201
+ promise = promise.then do |result|
1202
+ http_response = result.response
1203
+ status_code = http_response.status
1204
+ response_content = http_response.body
1205
+ unless status_code == 202 || status_code == 204
1206
+ error_model = JSON.load(response_content)
1207
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1208
+ end
1209
+
1210
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1211
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1212
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1213
+
1214
+ result
1215
+ end
1216
+
1217
+ promise.execute
1218
+ end
1219
+
1220
+ #
1221
+ # Update RUs per second of the an Azure Cosmos DB MongoDB database
1222
+ #
1223
+ # @param resource_group_name [String] The name of the resource group. The name
1224
+ # is case insensitive.
1225
+ # @param account_name [String] Cosmos DB database account name.
1226
+ # @param database_name [String] Cosmos DB database name.
1227
+ # @param update_throughput_parameters [ThroughputSettingsUpdateParameters] The
1228
+ # RUs per second of the parameters to provide for the current MongoDB database.
1229
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1230
+ # will be added to the HTTP request.
1231
+ #
1232
+ # @return [ThroughputSettingsGetResults] operation results.
1233
+ #
1234
+ def begin_update_mongo_dbdatabase_throughput(resource_group_name, account_name, database_name, update_throughput_parameters, custom_headers:nil)
1235
+ response = begin_update_mongo_dbdatabase_throughput_async(resource_group_name, account_name, database_name, update_throughput_parameters, custom_headers:custom_headers).value!
1236
+ response.body unless response.nil?
1237
+ end
1238
+
1239
+ #
1240
+ # Update RUs per second of the an Azure Cosmos DB MongoDB database
1241
+ #
1242
+ # @param resource_group_name [String] The name of the resource group. The name
1243
+ # is case insensitive.
1244
+ # @param account_name [String] Cosmos DB database account name.
1245
+ # @param database_name [String] Cosmos DB database name.
1246
+ # @param update_throughput_parameters [ThroughputSettingsUpdateParameters] The
1247
+ # RUs per second of the parameters to provide for the current MongoDB database.
1248
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1249
+ # will be added to the HTTP request.
1250
+ #
1251
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1252
+ #
1253
+ def begin_update_mongo_dbdatabase_throughput_with_http_info(resource_group_name, account_name, database_name, update_throughput_parameters, custom_headers:nil)
1254
+ begin_update_mongo_dbdatabase_throughput_async(resource_group_name, account_name, database_name, update_throughput_parameters, custom_headers:custom_headers).value!
1255
+ end
1256
+
1257
+ #
1258
+ # Update RUs per second of the an Azure Cosmos DB MongoDB database
1259
+ #
1260
+ # @param resource_group_name [String] The name of the resource group. The name
1261
+ # is case insensitive.
1262
+ # @param account_name [String] Cosmos DB database account name.
1263
+ # @param database_name [String] Cosmos DB database name.
1264
+ # @param update_throughput_parameters [ThroughputSettingsUpdateParameters] The
1265
+ # RUs per second of the parameters to provide for the current MongoDB database.
1266
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1267
+ # to the HTTP request.
1268
+ #
1269
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1270
+ #
1271
+ def begin_update_mongo_dbdatabase_throughput_async(resource_group_name, account_name, database_name, update_throughput_parameters, custom_headers:nil)
1272
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1273
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
1274
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1275
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1276
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1277
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1278
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1279
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
1280
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
1281
+ 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?
1282
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
1283
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1284
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
1285
+ fail ArgumentError, 'update_throughput_parameters is nil' if update_throughput_parameters.nil?
1286
+
1287
+
1288
+ request_headers = {}
1289
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1290
+
1291
+ # Set Headers
1292
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1293
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1294
+
1295
+ # Serialize Request
1296
+ request_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::ThroughputSettingsUpdateParameters.mapper()
1297
+ request_content = @client.serialize(request_mapper, update_throughput_parameters)
1298
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1299
+
1300
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default'
1301
+
1302
+ request_url = @base_url || @client.base_url
1303
+
1304
+ options = {
1305
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1306
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'databaseName' => database_name},
1307
+ query_params: {'api-version' => @client.api_version},
1308
+ body: request_content,
1309
+ headers: request_headers.merge(custom_headers || {}),
1310
+ base_url: request_url
1311
+ }
1312
+ promise = @client.make_request_async(:put, path_template, options)
1313
+
1314
+ promise = promise.then do |result|
1315
+ http_response = result.response
1316
+ status_code = http_response.status
1317
+ response_content = http_response.body
1318
+ unless status_code == 202 || status_code == 200
1319
+ error_model = JSON.load(response_content)
1320
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1321
+ end
1322
+
1323
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1324
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1325
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1326
+ # Deserialize Response
1327
+ if status_code == 200
1328
+ begin
1329
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1330
+ result_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::ThroughputSettingsGetResults.mapper()
1331
+ result.body = @client.deserialize(result_mapper, parsed_response)
1332
+ rescue Exception => e
1333
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1334
+ end
1335
+ end
1336
+
1337
+ result
1338
+ end
1339
+
1340
+ promise.execute
1341
+ end
1342
+
1343
+ #
1344
+ # Create or update an Azure Cosmos DB MongoDB Collection
1345
+ #
1346
+ # @param resource_group_name [String] The name of the resource group. The name
1347
+ # is case insensitive.
1348
+ # @param account_name [String] Cosmos DB database account name.
1349
+ # @param database_name [String] Cosmos DB database name.
1350
+ # @param collection_name [String] Cosmos DB collection name.
1351
+ # @param create_update_mongo_dbcollection_parameters
1352
+ # [MongoDBCollectionCreateUpdateParameters] The parameters to provide for the
1353
+ # current MongoDB Collection.
1354
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1355
+ # will be added to the HTTP request.
1356
+ #
1357
+ # @return [MongoDBCollectionGetResults] operation results.
1358
+ #
1359
+ def begin_create_update_mongo_dbcollection(resource_group_name, account_name, database_name, collection_name, create_update_mongo_dbcollection_parameters, custom_headers:nil)
1360
+ response = begin_create_update_mongo_dbcollection_async(resource_group_name, account_name, database_name, collection_name, create_update_mongo_dbcollection_parameters, custom_headers:custom_headers).value!
1361
+ response.body unless response.nil?
1362
+ end
1363
+
1364
+ #
1365
+ # Create or update an Azure Cosmos DB MongoDB Collection
1366
+ #
1367
+ # @param resource_group_name [String] The name of the resource group. The name
1368
+ # is case insensitive.
1369
+ # @param account_name [String] Cosmos DB database account name.
1370
+ # @param database_name [String] Cosmos DB database name.
1371
+ # @param collection_name [String] Cosmos DB collection name.
1372
+ # @param create_update_mongo_dbcollection_parameters
1373
+ # [MongoDBCollectionCreateUpdateParameters] The parameters to provide for the
1374
+ # current MongoDB Collection.
1375
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1376
+ # will be added to the HTTP request.
1377
+ #
1378
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1379
+ #
1380
+ def begin_create_update_mongo_dbcollection_with_http_info(resource_group_name, account_name, database_name, collection_name, create_update_mongo_dbcollection_parameters, custom_headers:nil)
1381
+ begin_create_update_mongo_dbcollection_async(resource_group_name, account_name, database_name, collection_name, create_update_mongo_dbcollection_parameters, custom_headers:custom_headers).value!
1382
+ end
1383
+
1384
+ #
1385
+ # Create or update an Azure Cosmos DB MongoDB Collection
1386
+ #
1387
+ # @param resource_group_name [String] The name of the resource group. The name
1388
+ # is case insensitive.
1389
+ # @param account_name [String] Cosmos DB database account name.
1390
+ # @param database_name [String] Cosmos DB database name.
1391
+ # @param collection_name [String] Cosmos DB collection name.
1392
+ # @param create_update_mongo_dbcollection_parameters
1393
+ # [MongoDBCollectionCreateUpdateParameters] The parameters to provide for the
1394
+ # current MongoDB Collection.
1395
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1396
+ # to the HTTP request.
1397
+ #
1398
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1399
+ #
1400
+ def begin_create_update_mongo_dbcollection_async(resource_group_name, account_name, database_name, collection_name, create_update_mongo_dbcollection_parameters, custom_headers:nil)
1401
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1402
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
1403
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1404
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1405
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1406
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1407
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1408
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
1409
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
1410
+ 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?
1411
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
1412
+ fail ArgumentError, 'collection_name is nil' if collection_name.nil?
1413
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1414
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
1415
+ fail ArgumentError, 'create_update_mongo_dbcollection_parameters is nil' if create_update_mongo_dbcollection_parameters.nil?
1416
+
1417
+
1418
+ request_headers = {}
1419
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1420
+
1421
+ # Set Headers
1422
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1423
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1424
+
1425
+ # Serialize Request
1426
+ request_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::MongoDBCollectionCreateUpdateParameters.mapper()
1427
+ request_content = @client.serialize(request_mapper, create_update_mongo_dbcollection_parameters)
1428
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1429
+
1430
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}'
1431
+
1432
+ request_url = @base_url || @client.base_url
1433
+
1434
+ options = {
1435
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1436
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'databaseName' => database_name,'collectionName' => collection_name},
1437
+ query_params: {'api-version' => @client.api_version},
1438
+ body: request_content,
1439
+ headers: request_headers.merge(custom_headers || {}),
1440
+ base_url: request_url
1441
+ }
1442
+ promise = @client.make_request_async(:put, path_template, options)
1443
+
1444
+ promise = promise.then do |result|
1445
+ http_response = result.response
1446
+ status_code = http_response.status
1447
+ response_content = http_response.body
1448
+ unless status_code == 202 || status_code == 200
1449
+ error_model = JSON.load(response_content)
1450
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1451
+ end
1452
+
1453
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1454
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1455
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1456
+ # Deserialize Response
1457
+ if status_code == 200
1458
+ begin
1459
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1460
+ result_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::MongoDBCollectionGetResults.mapper()
1461
+ result.body = @client.deserialize(result_mapper, parsed_response)
1462
+ rescue Exception => e
1463
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1464
+ end
1465
+ end
1466
+
1467
+ result
1468
+ end
1469
+
1470
+ promise.execute
1471
+ end
1472
+
1473
+ #
1474
+ # Deletes an existing Azure Cosmos DB MongoDB Collection.
1475
+ #
1476
+ # @param resource_group_name [String] The name of the resource group. The name
1477
+ # is case insensitive.
1478
+ # @param account_name [String] Cosmos DB database account name.
1479
+ # @param database_name [String] Cosmos DB database name.
1480
+ # @param collection_name [String] Cosmos DB collection name.
1481
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1482
+ # will be added to the HTTP request.
1483
+ #
1484
+ #
1485
+ def begin_delete_mongo_dbcollection(resource_group_name, account_name, database_name, collection_name, custom_headers:nil)
1486
+ response = begin_delete_mongo_dbcollection_async(resource_group_name, account_name, database_name, collection_name, custom_headers:custom_headers).value!
1487
+ nil
1488
+ end
1489
+
1490
+ #
1491
+ # Deletes an existing Azure Cosmos DB MongoDB Collection.
1492
+ #
1493
+ # @param resource_group_name [String] The name of the resource group. The name
1494
+ # is case insensitive.
1495
+ # @param account_name [String] Cosmos DB database account name.
1496
+ # @param database_name [String] Cosmos DB database name.
1497
+ # @param collection_name [String] Cosmos DB collection name.
1498
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1499
+ # will be added to the HTTP request.
1500
+ #
1501
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1502
+ #
1503
+ def begin_delete_mongo_dbcollection_with_http_info(resource_group_name, account_name, database_name, collection_name, custom_headers:nil)
1504
+ begin_delete_mongo_dbcollection_async(resource_group_name, account_name, database_name, collection_name, custom_headers:custom_headers).value!
1505
+ end
1506
+
1507
+ #
1508
+ # Deletes an existing Azure Cosmos DB MongoDB Collection.
1509
+ #
1510
+ # @param resource_group_name [String] The name of the resource group. The name
1511
+ # is case insensitive.
1512
+ # @param account_name [String] Cosmos DB database account name.
1513
+ # @param database_name [String] Cosmos DB database name.
1514
+ # @param collection_name [String] Cosmos DB collection name.
1515
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1516
+ # to the HTTP request.
1517
+ #
1518
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1519
+ #
1520
+ def begin_delete_mongo_dbcollection_async(resource_group_name, account_name, database_name, collection_name, custom_headers:nil)
1521
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1522
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
1523
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1524
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1525
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1526
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1527
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1528
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
1529
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
1530
+ 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?
1531
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
1532
+ fail ArgumentError, 'collection_name is nil' if collection_name.nil?
1533
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1534
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
1535
+
1536
+
1537
+ request_headers = {}
1538
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1539
+
1540
+ # Set Headers
1541
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1542
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1543
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}'
1544
+
1545
+ request_url = @base_url || @client.base_url
1546
+
1547
+ options = {
1548
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1549
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'databaseName' => database_name,'collectionName' => collection_name},
1550
+ query_params: {'api-version' => @client.api_version},
1551
+ headers: request_headers.merge(custom_headers || {}),
1552
+ base_url: request_url
1553
+ }
1554
+ promise = @client.make_request_async(:delete, path_template, options)
1555
+
1556
+ promise = promise.then do |result|
1557
+ http_response = result.response
1558
+ status_code = http_response.status
1559
+ response_content = http_response.body
1560
+ unless status_code == 202 || status_code == 204
1561
+ error_model = JSON.load(response_content)
1562
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1563
+ end
1564
+
1565
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1566
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1567
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1568
+
1569
+ result
1570
+ end
1571
+
1572
+ promise.execute
1573
+ end
1574
+
1575
+ #
1576
+ # Update the RUs per second of an Azure Cosmos DB MongoDB collection
1577
+ #
1578
+ # @param resource_group_name [String] The name of the resource group. The name
1579
+ # is case insensitive.
1580
+ # @param account_name [String] Cosmos DB database account name.
1581
+ # @param database_name [String] Cosmos DB database name.
1582
+ # @param collection_name [String] Cosmos DB collection name.
1583
+ # @param update_throughput_parameters [ThroughputSettingsUpdateParameters] The
1584
+ # RUs per second of the parameters to provide for the current MongoDB
1585
+ # collection.
1586
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1587
+ # will be added to the HTTP request.
1588
+ #
1589
+ # @return [ThroughputSettingsGetResults] operation results.
1590
+ #
1591
+ def begin_update_mongo_dbcollection_throughput(resource_group_name, account_name, database_name, collection_name, update_throughput_parameters, custom_headers:nil)
1592
+ response = begin_update_mongo_dbcollection_throughput_async(resource_group_name, account_name, database_name, collection_name, update_throughput_parameters, custom_headers:custom_headers).value!
1593
+ response.body unless response.nil?
1594
+ end
1595
+
1596
+ #
1597
+ # Update the RUs per second of an Azure Cosmos DB MongoDB collection
1598
+ #
1599
+ # @param resource_group_name [String] The name of the resource group. The name
1600
+ # is case insensitive.
1601
+ # @param account_name [String] Cosmos DB database account name.
1602
+ # @param database_name [String] Cosmos DB database name.
1603
+ # @param collection_name [String] Cosmos DB collection name.
1604
+ # @param update_throughput_parameters [ThroughputSettingsUpdateParameters] The
1605
+ # RUs per second of the parameters to provide for the current MongoDB
1606
+ # collection.
1607
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1608
+ # will be added to the HTTP request.
1609
+ #
1610
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1611
+ #
1612
+ def begin_update_mongo_dbcollection_throughput_with_http_info(resource_group_name, account_name, database_name, collection_name, update_throughput_parameters, custom_headers:nil)
1613
+ begin_update_mongo_dbcollection_throughput_async(resource_group_name, account_name, database_name, collection_name, update_throughput_parameters, custom_headers:custom_headers).value!
1614
+ end
1615
+
1616
+ #
1617
+ # Update the RUs per second of an Azure Cosmos DB MongoDB collection
1618
+ #
1619
+ # @param resource_group_name [String] The name of the resource group. The name
1620
+ # is case insensitive.
1621
+ # @param account_name [String] Cosmos DB database account name.
1622
+ # @param database_name [String] Cosmos DB database name.
1623
+ # @param collection_name [String] Cosmos DB collection name.
1624
+ # @param update_throughput_parameters [ThroughputSettingsUpdateParameters] The
1625
+ # RUs per second of the parameters to provide for the current MongoDB
1626
+ # collection.
1627
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1628
+ # to the HTTP request.
1629
+ #
1630
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1631
+ #
1632
+ def begin_update_mongo_dbcollection_throughput_async(resource_group_name, account_name, database_name, collection_name, update_throughput_parameters, custom_headers:nil)
1633
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1634
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
1635
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1636
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1637
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1638
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1639
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1640
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
1641
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
1642
+ 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?
1643
+ fail ArgumentError, 'database_name is nil' if database_name.nil?
1644
+ fail ArgumentError, 'collection_name is nil' if collection_name.nil?
1645
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1646
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
1647
+ fail ArgumentError, 'update_throughput_parameters is nil' if update_throughput_parameters.nil?
1648
+
1649
+
1650
+ request_headers = {}
1651
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1652
+
1653
+ # Set Headers
1654
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1655
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1656
+
1657
+ # Serialize Request
1658
+ request_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::ThroughputSettingsUpdateParameters.mapper()
1659
+ request_content = @client.serialize(request_mapper, update_throughput_parameters)
1660
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1661
+
1662
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default'
1663
+
1664
+ request_url = @base_url || @client.base_url
1665
+
1666
+ options = {
1667
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1668
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'databaseName' => database_name,'collectionName' => collection_name},
1669
+ query_params: {'api-version' => @client.api_version},
1670
+ body: request_content,
1671
+ headers: request_headers.merge(custom_headers || {}),
1672
+ base_url: request_url
1673
+ }
1674
+ promise = @client.make_request_async(:put, path_template, options)
1675
+
1676
+ promise = promise.then do |result|
1677
+ http_response = result.response
1678
+ status_code = http_response.status
1679
+ response_content = http_response.body
1680
+ unless status_code == 202 || status_code == 200
1681
+ error_model = JSON.load(response_content)
1682
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1683
+ end
1684
+
1685
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1686
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1687
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1688
+ # Deserialize Response
1689
+ if status_code == 200
1690
+ begin
1691
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1692
+ result_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::ThroughputSettingsGetResults.mapper()
1693
+ result.body = @client.deserialize(result_mapper, parsed_response)
1694
+ rescue Exception => e
1695
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1696
+ end
1697
+ end
1698
+
1699
+ result
1700
+ end
1701
+
1702
+ promise.execute
1703
+ end
1704
+
1705
+ end
1706
+ end