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,2281 @@
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 DatabaseAccounts
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the DatabaseAccounts 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
+ # Retrieves the properties of an existing Azure Cosmos DB database account.
26
+ #
27
+ # @param resource_group_name [String] The name of the resource group. The name
28
+ # is case insensitive.
29
+ # @param account_name [String] Cosmos DB database account name.
30
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
31
+ # will be added to the HTTP request.
32
+ #
33
+ # @return [DatabaseAccountGetResults] operation results.
34
+ #
35
+ def get(resource_group_name, account_name, custom_headers:nil)
36
+ response = get_async(resource_group_name, account_name, custom_headers:custom_headers).value!
37
+ response.body unless response.nil?
38
+ end
39
+
40
+ #
41
+ # Retrieves the properties of an existing Azure Cosmos DB database account.
42
+ #
43
+ # @param resource_group_name [String] The name of the resource group. The name
44
+ # is case insensitive.
45
+ # @param account_name [String] Cosmos DB database account name.
46
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
47
+ # will be added to the HTTP request.
48
+ #
49
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
50
+ #
51
+ def get_with_http_info(resource_group_name, account_name, custom_headers:nil)
52
+ get_async(resource_group_name, account_name, custom_headers:custom_headers).value!
53
+ end
54
+
55
+ #
56
+ # Retrieves the properties of an existing Azure Cosmos DB database account.
57
+ #
58
+ # @param resource_group_name [String] The name of the resource group. The name
59
+ # is case insensitive.
60
+ # @param account_name [String] Cosmos DB database account name.
61
+ # @param [Hash{String => String}] A hash of custom headers that will be added
62
+ # to the HTTP request.
63
+ #
64
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
65
+ #
66
+ def get_async(resource_group_name, account_name, custom_headers:nil)
67
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
68
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
69
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
70
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
71
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
72
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
73
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
74
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
75
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
76
+ 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?
77
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
78
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
79
+
80
+
81
+ request_headers = {}
82
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
83
+
84
+ # Set Headers
85
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
86
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
87
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}'
88
+
89
+ request_url = @base_url || @client.base_url
90
+
91
+ options = {
92
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
93
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
94
+ query_params: {'api-version' => @client.api_version},
95
+ headers: request_headers.merge(custom_headers || {}),
96
+ base_url: request_url
97
+ }
98
+ promise = @client.make_request_async(:get, path_template, options)
99
+
100
+ promise = promise.then do |result|
101
+ http_response = result.response
102
+ status_code = http_response.status
103
+ response_content = http_response.body
104
+ unless status_code == 200
105
+ error_model = JSON.load(response_content)
106
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
107
+ end
108
+
109
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
110
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
111
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
112
+ # Deserialize Response
113
+ if status_code == 200
114
+ begin
115
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
116
+ result_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::DatabaseAccountGetResults.mapper()
117
+ result.body = @client.deserialize(result_mapper, parsed_response)
118
+ rescue Exception => e
119
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
120
+ end
121
+ end
122
+
123
+ result
124
+ end
125
+
126
+ promise.execute
127
+ end
128
+
129
+ #
130
+ # Updates the properties of an existing Azure Cosmos DB database account.
131
+ #
132
+ # @param resource_group_name [String] The name of the resource group. The name
133
+ # is case insensitive.
134
+ # @param account_name [String] Cosmos DB database account name.
135
+ # @param update_parameters [DatabaseAccountUpdateParameters] The parameters to
136
+ # provide for the current database account.
137
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
138
+ # will be added to the HTTP request.
139
+ #
140
+ # @return [DatabaseAccountGetResults] operation results.
141
+ #
142
+ def update(resource_group_name, account_name, update_parameters, custom_headers:nil)
143
+ response = update_async(resource_group_name, account_name, update_parameters, custom_headers:custom_headers).value!
144
+ response.body unless response.nil?
145
+ end
146
+
147
+ #
148
+ # @param resource_group_name [String] The name of the resource group. The name
149
+ # is case insensitive.
150
+ # @param account_name [String] Cosmos DB database account name.
151
+ # @param update_parameters [DatabaseAccountUpdateParameters] The parameters to
152
+ # provide for the current database account.
153
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
154
+ # will be added to the HTTP request.
155
+ #
156
+ # @return [Concurrent::Promise] promise which provides async access to http
157
+ # response.
158
+ #
159
+ def update_async(resource_group_name, account_name, update_parameters, custom_headers:nil)
160
+ # Send request
161
+ promise = begin_update_async(resource_group_name, account_name, update_parameters, custom_headers:custom_headers)
162
+
163
+ promise = promise.then do |response|
164
+ # Defining deserialization method.
165
+ deserialize_method = lambda do |parsed_response|
166
+ result_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::DatabaseAccountGetResults.mapper()
167
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
168
+ end
169
+
170
+ # Waiting for response.
171
+ @client.get_long_running_operation_result(response, deserialize_method)
172
+ end
173
+
174
+ promise
175
+ end
176
+
177
+ #
178
+ # Creates or updates an Azure Cosmos DB database account. The "Update" method
179
+ # is preferred when performing updates on an account.
180
+ #
181
+ # @param resource_group_name [String] The name of the resource group. The name
182
+ # is case insensitive.
183
+ # @param account_name [String] Cosmos DB database account name.
184
+ # @param create_update_parameters [DatabaseAccountCreateUpdateParameters] The
185
+ # parameters to provide for the current database account.
186
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
187
+ # will be added to the HTTP request.
188
+ #
189
+ # @return [DatabaseAccountGetResults] operation results.
190
+ #
191
+ def create_or_update(resource_group_name, account_name, create_update_parameters, custom_headers:nil)
192
+ response = create_or_update_async(resource_group_name, account_name, create_update_parameters, custom_headers:custom_headers).value!
193
+ response.body unless response.nil?
194
+ end
195
+
196
+ #
197
+ # @param resource_group_name [String] The name of the resource group. The name
198
+ # is case insensitive.
199
+ # @param account_name [String] Cosmos DB database account name.
200
+ # @param create_update_parameters [DatabaseAccountCreateUpdateParameters] The
201
+ # parameters to provide for the current database account.
202
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
203
+ # will be added to the HTTP request.
204
+ #
205
+ # @return [Concurrent::Promise] promise which provides async access to http
206
+ # response.
207
+ #
208
+ def create_or_update_async(resource_group_name, account_name, create_update_parameters, custom_headers:nil)
209
+ # Send request
210
+ promise = begin_create_or_update_async(resource_group_name, account_name, create_update_parameters, custom_headers:custom_headers)
211
+
212
+ promise = promise.then do |response|
213
+ # Defining deserialization method.
214
+ deserialize_method = lambda do |parsed_response|
215
+ result_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::DatabaseAccountGetResults.mapper()
216
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
217
+ end
218
+
219
+ # Waiting for response.
220
+ @client.get_long_running_operation_result(response, deserialize_method)
221
+ end
222
+
223
+ promise
224
+ end
225
+
226
+ #
227
+ # Deletes an existing Azure Cosmos DB database account.
228
+ #
229
+ # @param resource_group_name [String] The name of the resource group. The name
230
+ # is case insensitive.
231
+ # @param account_name [String] Cosmos DB database account name.
232
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
233
+ # will be added to the HTTP request.
234
+ #
235
+ def delete(resource_group_name, account_name, custom_headers:nil)
236
+ response = delete_async(resource_group_name, account_name, custom_headers:custom_headers).value!
237
+ nil
238
+ end
239
+
240
+ #
241
+ # @param resource_group_name [String] The name of the resource group. The name
242
+ # is case insensitive.
243
+ # @param account_name [String] Cosmos DB database account name.
244
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
245
+ # will be added to the HTTP request.
246
+ #
247
+ # @return [Concurrent::Promise] promise which provides async access to http
248
+ # response.
249
+ #
250
+ def delete_async(resource_group_name, account_name, custom_headers:nil)
251
+ # Send request
252
+ promise = begin_delete_async(resource_group_name, account_name, custom_headers:custom_headers)
253
+
254
+ promise = promise.then do |response|
255
+ # Defining deserialization method.
256
+ deserialize_method = lambda do |parsed_response|
257
+ end
258
+
259
+ # Waiting for response.
260
+ @client.get_long_running_operation_result(response, deserialize_method)
261
+ end
262
+
263
+ promise
264
+ end
265
+
266
+ #
267
+ # Changes the failover priority for the Azure Cosmos DB database account. A
268
+ # failover priority of 0 indicates a write region. The maximum value for a
269
+ # failover priority = (total number of regions - 1). Failover priority values
270
+ # must be unique for each of the regions in which the database account exists.
271
+ #
272
+ # @param resource_group_name [String] The name of the resource group. The name
273
+ # is case insensitive.
274
+ # @param account_name [String] Cosmos DB database account name.
275
+ # @param failover_parameters [FailoverPolicies] The new failover policies for
276
+ # the database account.
277
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
278
+ # will be added to the HTTP request.
279
+ #
280
+ def failover_priority_change(resource_group_name, account_name, failover_parameters, custom_headers:nil)
281
+ response = failover_priority_change_async(resource_group_name, account_name, failover_parameters, custom_headers:custom_headers).value!
282
+ nil
283
+ end
284
+
285
+ #
286
+ # @param resource_group_name [String] The name of the resource group. The name
287
+ # is case insensitive.
288
+ # @param account_name [String] Cosmos DB database account name.
289
+ # @param failover_parameters [FailoverPolicies] The new failover policies for
290
+ # the database account.
291
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
292
+ # will be added to the HTTP request.
293
+ #
294
+ # @return [Concurrent::Promise] promise which provides async access to http
295
+ # response.
296
+ #
297
+ def failover_priority_change_async(resource_group_name, account_name, failover_parameters, custom_headers:nil)
298
+ # Send request
299
+ promise = begin_failover_priority_change_async(resource_group_name, account_name, failover_parameters, custom_headers:custom_headers)
300
+
301
+ promise = promise.then do |response|
302
+ # Defining deserialization method.
303
+ deserialize_method = lambda do |parsed_response|
304
+ end
305
+
306
+ # Waiting for response.
307
+ @client.get_long_running_operation_result(response, deserialize_method)
308
+ end
309
+
310
+ promise
311
+ end
312
+
313
+ #
314
+ # Lists all the Azure Cosmos DB database accounts available under the
315
+ # subscription.
316
+ #
317
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
318
+ # will be added to the HTTP request.
319
+ #
320
+ # @return [DatabaseAccountsListResult] operation results.
321
+ #
322
+ def list(custom_headers:nil)
323
+ response = list_async(custom_headers:custom_headers).value!
324
+ response.body unless response.nil?
325
+ end
326
+
327
+ #
328
+ # Lists all the Azure Cosmos DB database accounts available under the
329
+ # subscription.
330
+ #
331
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
332
+ # will be added to the HTTP request.
333
+ #
334
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
335
+ #
336
+ def list_with_http_info(custom_headers:nil)
337
+ list_async(custom_headers:custom_headers).value!
338
+ end
339
+
340
+ #
341
+ # Lists all the Azure Cosmos DB database accounts available under the
342
+ # subscription.
343
+ #
344
+ # @param [Hash{String => String}] A hash of custom headers that will be added
345
+ # to the HTTP request.
346
+ #
347
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
348
+ #
349
+ def list_async(custom_headers:nil)
350
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
351
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
352
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
353
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
354
+
355
+
356
+ request_headers = {}
357
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
358
+
359
+ # Set Headers
360
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
361
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
362
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/databaseAccounts'
363
+
364
+ request_url = @base_url || @client.base_url
365
+
366
+ options = {
367
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
368
+ path_params: {'subscriptionId' => @client.subscription_id},
369
+ query_params: {'api-version' => @client.api_version},
370
+ headers: request_headers.merge(custom_headers || {}),
371
+ base_url: request_url
372
+ }
373
+ promise = @client.make_request_async(:get, path_template, options)
374
+
375
+ promise = promise.then do |result|
376
+ http_response = result.response
377
+ status_code = http_response.status
378
+ response_content = http_response.body
379
+ unless status_code == 200
380
+ error_model = JSON.load(response_content)
381
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
382
+ end
383
+
384
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
385
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
386
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
387
+ # Deserialize Response
388
+ if status_code == 200
389
+ begin
390
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
391
+ result_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::DatabaseAccountsListResult.mapper()
392
+ result.body = @client.deserialize(result_mapper, parsed_response)
393
+ rescue Exception => e
394
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
395
+ end
396
+ end
397
+
398
+ result
399
+ end
400
+
401
+ promise.execute
402
+ end
403
+
404
+ #
405
+ # Lists all the Azure Cosmos DB database accounts available under the given
406
+ # resource group.
407
+ #
408
+ # @param resource_group_name [String] The name of the resource group. The name
409
+ # is case insensitive.
410
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
411
+ # will be added to the HTTP request.
412
+ #
413
+ # @return [DatabaseAccountsListResult] operation results.
414
+ #
415
+ def list_by_resource_group(resource_group_name, custom_headers:nil)
416
+ response = list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
417
+ response.body unless response.nil?
418
+ end
419
+
420
+ #
421
+ # Lists all the Azure Cosmos DB database accounts available under the given
422
+ # resource group.
423
+ #
424
+ # @param resource_group_name [String] The name of the resource group. The name
425
+ # is case insensitive.
426
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
427
+ # will be added to the HTTP request.
428
+ #
429
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
430
+ #
431
+ def list_by_resource_group_with_http_info(resource_group_name, custom_headers:nil)
432
+ list_by_resource_group_async(resource_group_name, custom_headers:custom_headers).value!
433
+ end
434
+
435
+ #
436
+ # Lists all the Azure Cosmos DB database accounts available under the given
437
+ # resource group.
438
+ #
439
+ # @param resource_group_name [String] The name of the resource group. The name
440
+ # is case insensitive.
441
+ # @param [Hash{String => String}] A hash of custom headers that will be added
442
+ # to the HTTP request.
443
+ #
444
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
445
+ #
446
+ def list_by_resource_group_async(resource_group_name, custom_headers:nil)
447
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
448
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
449
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
450
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
451
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
452
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
453
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
454
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
455
+
456
+
457
+ request_headers = {}
458
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
459
+
460
+ # Set Headers
461
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
462
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
463
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts'
464
+
465
+ request_url = @base_url || @client.base_url
466
+
467
+ options = {
468
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
469
+ path_params: {'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
470
+ query_params: {'api-version' => @client.api_version},
471
+ headers: request_headers.merge(custom_headers || {}),
472
+ base_url: request_url
473
+ }
474
+ promise = @client.make_request_async(:get, path_template, options)
475
+
476
+ promise = promise.then do |result|
477
+ http_response = result.response
478
+ status_code = http_response.status
479
+ response_content = http_response.body
480
+ unless status_code == 200
481
+ error_model = JSON.load(response_content)
482
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
483
+ end
484
+
485
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
486
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
487
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
488
+ # Deserialize Response
489
+ if status_code == 200
490
+ begin
491
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
492
+ result_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::DatabaseAccountsListResult.mapper()
493
+ result.body = @client.deserialize(result_mapper, parsed_response)
494
+ rescue Exception => e
495
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
496
+ end
497
+ end
498
+
499
+ result
500
+ end
501
+
502
+ promise.execute
503
+ end
504
+
505
+ #
506
+ # Lists the access keys for the specified Azure Cosmos DB database account.
507
+ #
508
+ # @param resource_group_name [String] The name of the resource group. The name
509
+ # is case insensitive.
510
+ # @param account_name [String] Cosmos DB database account name.
511
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
512
+ # will be added to the HTTP request.
513
+ #
514
+ # @return [DatabaseAccountListKeysResult] operation results.
515
+ #
516
+ def list_keys(resource_group_name, account_name, custom_headers:nil)
517
+ response = list_keys_async(resource_group_name, account_name, custom_headers:custom_headers).value!
518
+ response.body unless response.nil?
519
+ end
520
+
521
+ #
522
+ # Lists the access keys for the specified Azure Cosmos DB database account.
523
+ #
524
+ # @param resource_group_name [String] The name of the resource group. The name
525
+ # is case insensitive.
526
+ # @param account_name [String] Cosmos DB database account name.
527
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
528
+ # will be added to the HTTP request.
529
+ #
530
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
531
+ #
532
+ def list_keys_with_http_info(resource_group_name, account_name, custom_headers:nil)
533
+ list_keys_async(resource_group_name, account_name, custom_headers:custom_headers).value!
534
+ end
535
+
536
+ #
537
+ # Lists the access keys for the specified Azure Cosmos DB database 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 [Hash{String => String}] A hash of custom headers that will be added
543
+ # to the HTTP request.
544
+ #
545
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
546
+ #
547
+ def list_keys_async(resource_group_name, account_name, custom_headers:nil)
548
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
549
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
550
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
551
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
552
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
553
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
554
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
555
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
556
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
557
+ 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?
558
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
559
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
560
+
561
+
562
+ request_headers = {}
563
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
564
+
565
+ # Set Headers
566
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
567
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
568
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listKeys'
569
+
570
+ request_url = @base_url || @client.base_url
571
+
572
+ options = {
573
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
574
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
575
+ query_params: {'api-version' => @client.api_version},
576
+ headers: request_headers.merge(custom_headers || {}),
577
+ base_url: request_url
578
+ }
579
+ promise = @client.make_request_async(:post, path_template, options)
580
+
581
+ promise = promise.then do |result|
582
+ http_response = result.response
583
+ status_code = http_response.status
584
+ response_content = http_response.body
585
+ unless status_code == 200
586
+ error_model = JSON.load(response_content)
587
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
588
+ end
589
+
590
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
591
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
592
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
593
+ # Deserialize Response
594
+ if status_code == 200
595
+ begin
596
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
597
+ result_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::DatabaseAccountListKeysResult.mapper()
598
+ result.body = @client.deserialize(result_mapper, parsed_response)
599
+ rescue Exception => e
600
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
601
+ end
602
+ end
603
+
604
+ result
605
+ end
606
+
607
+ promise.execute
608
+ end
609
+
610
+ #
611
+ # Lists the connection strings for the specified Azure Cosmos DB database
612
+ # account.
613
+ #
614
+ # @param resource_group_name [String] The name of the resource group. The name
615
+ # is case insensitive.
616
+ # @param account_name [String] Cosmos DB database account name.
617
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
618
+ # will be added to the HTTP request.
619
+ #
620
+ # @return [DatabaseAccountListConnectionStringsResult] operation results.
621
+ #
622
+ def list_connection_strings(resource_group_name, account_name, custom_headers:nil)
623
+ response = list_connection_strings_async(resource_group_name, account_name, custom_headers:custom_headers).value!
624
+ response.body unless response.nil?
625
+ end
626
+
627
+ #
628
+ # Lists the connection strings for the specified Azure Cosmos DB database
629
+ # account.
630
+ #
631
+ # @param resource_group_name [String] The name of the resource group. The name
632
+ # is case insensitive.
633
+ # @param account_name [String] Cosmos DB database account name.
634
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
635
+ # will be added to the HTTP request.
636
+ #
637
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
638
+ #
639
+ def list_connection_strings_with_http_info(resource_group_name, account_name, custom_headers:nil)
640
+ list_connection_strings_async(resource_group_name, account_name, custom_headers:custom_headers).value!
641
+ end
642
+
643
+ #
644
+ # Lists the connection strings for the specified Azure Cosmos DB database
645
+ # account.
646
+ #
647
+ # @param resource_group_name [String] The name of the resource group. The name
648
+ # is case insensitive.
649
+ # @param account_name [String] Cosmos DB database account name.
650
+ # @param [Hash{String => String}] A hash of custom headers that will be added
651
+ # to the HTTP request.
652
+ #
653
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
654
+ #
655
+ def list_connection_strings_async(resource_group_name, account_name, custom_headers:nil)
656
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
657
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
658
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
659
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
660
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
661
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
662
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
663
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
664
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
665
+ 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?
666
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
667
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
668
+
669
+
670
+ request_headers = {}
671
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
672
+
673
+ # Set Headers
674
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
675
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
676
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/listConnectionStrings'
677
+
678
+ request_url = @base_url || @client.base_url
679
+
680
+ options = {
681
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
682
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
683
+ query_params: {'api-version' => @client.api_version},
684
+ headers: request_headers.merge(custom_headers || {}),
685
+ base_url: request_url
686
+ }
687
+ promise = @client.make_request_async(:post, path_template, options)
688
+
689
+ promise = promise.then do |result|
690
+ http_response = result.response
691
+ status_code = http_response.status
692
+ response_content = http_response.body
693
+ unless status_code == 200
694
+ error_model = JSON.load(response_content)
695
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
696
+ end
697
+
698
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
699
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
700
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
701
+ # Deserialize Response
702
+ if status_code == 200
703
+ begin
704
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
705
+ result_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::DatabaseAccountListConnectionStringsResult.mapper()
706
+ result.body = @client.deserialize(result_mapper, parsed_response)
707
+ rescue Exception => e
708
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
709
+ end
710
+ end
711
+
712
+ result
713
+ end
714
+
715
+ promise.execute
716
+ end
717
+
718
+ #
719
+ # Offline the specified region for the specified Azure Cosmos DB database
720
+ # account.
721
+ #
722
+ # @param resource_group_name [String] The name of the resource group. The name
723
+ # is case insensitive.
724
+ # @param account_name [String] Cosmos DB database account name.
725
+ # @param region_parameter_for_offline [RegionForOnlineOffline] Cosmos DB region
726
+ # to offline for the database account.
727
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
728
+ # will be added to the HTTP request.
729
+ #
730
+ def offline_region(resource_group_name, account_name, region_parameter_for_offline, custom_headers:nil)
731
+ response = offline_region_async(resource_group_name, account_name, region_parameter_for_offline, custom_headers:custom_headers).value!
732
+ nil
733
+ end
734
+
735
+ #
736
+ # @param resource_group_name [String] The name of the resource group. The name
737
+ # is case insensitive.
738
+ # @param account_name [String] Cosmos DB database account name.
739
+ # @param region_parameter_for_offline [RegionForOnlineOffline] Cosmos DB region
740
+ # to offline for the database account.
741
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
742
+ # will be added to the HTTP request.
743
+ #
744
+ # @return [Concurrent::Promise] promise which provides async access to http
745
+ # response.
746
+ #
747
+ def offline_region_async(resource_group_name, account_name, region_parameter_for_offline, custom_headers:nil)
748
+ # Send request
749
+ promise = begin_offline_region_async(resource_group_name, account_name, region_parameter_for_offline, custom_headers:custom_headers)
750
+
751
+ promise = promise.then do |response|
752
+ # Defining deserialization method.
753
+ deserialize_method = lambda do |parsed_response|
754
+ end
755
+
756
+ # Waiting for response.
757
+ @client.get_long_running_operation_result(response, deserialize_method)
758
+ end
759
+
760
+ promise
761
+ end
762
+
763
+ #
764
+ # Online the specified region for the specified Azure Cosmos DB database
765
+ # account.
766
+ #
767
+ # @param resource_group_name [String] The name of the resource group. The name
768
+ # is case insensitive.
769
+ # @param account_name [String] Cosmos DB database account name.
770
+ # @param region_parameter_for_online [RegionForOnlineOffline] Cosmos DB region
771
+ # to online for the database account.
772
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
773
+ # will be added to the HTTP request.
774
+ #
775
+ def online_region(resource_group_name, account_name, region_parameter_for_online, custom_headers:nil)
776
+ response = online_region_async(resource_group_name, account_name, region_parameter_for_online, custom_headers:custom_headers).value!
777
+ nil
778
+ end
779
+
780
+ #
781
+ # @param resource_group_name [String] The name of the resource group. The name
782
+ # is case insensitive.
783
+ # @param account_name [String] Cosmos DB database account name.
784
+ # @param region_parameter_for_online [RegionForOnlineOffline] Cosmos DB region
785
+ # to online for the database account.
786
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
787
+ # will be added to the HTTP request.
788
+ #
789
+ # @return [Concurrent::Promise] promise which provides async access to http
790
+ # response.
791
+ #
792
+ def online_region_async(resource_group_name, account_name, region_parameter_for_online, custom_headers:nil)
793
+ # Send request
794
+ promise = begin_online_region_async(resource_group_name, account_name, region_parameter_for_online, custom_headers:custom_headers)
795
+
796
+ promise = promise.then do |response|
797
+ # Defining deserialization method.
798
+ deserialize_method = lambda do |parsed_response|
799
+ end
800
+
801
+ # Waiting for response.
802
+ @client.get_long_running_operation_result(response, deserialize_method)
803
+ end
804
+
805
+ promise
806
+ end
807
+
808
+ #
809
+ # Lists the read-only access keys for the specified Azure Cosmos DB database
810
+ # account.
811
+ #
812
+ # @param resource_group_name [String] The name of the resource group. The name
813
+ # is case insensitive.
814
+ # @param account_name [String] Cosmos DB database account name.
815
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
816
+ # will be added to the HTTP request.
817
+ #
818
+ # @return [DatabaseAccountListReadOnlyKeysResult] operation results.
819
+ #
820
+ def get_read_only_keys(resource_group_name, account_name, custom_headers:nil)
821
+ response = get_read_only_keys_async(resource_group_name, account_name, custom_headers:custom_headers).value!
822
+ response.body unless response.nil?
823
+ end
824
+
825
+ #
826
+ # Lists the read-only access keys for the specified Azure Cosmos DB database
827
+ # account.
828
+ #
829
+ # @param resource_group_name [String] The name of the resource group. The name
830
+ # is case insensitive.
831
+ # @param account_name [String] Cosmos DB database account name.
832
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
833
+ # will be added to the HTTP request.
834
+ #
835
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
836
+ #
837
+ def get_read_only_keys_with_http_info(resource_group_name, account_name, custom_headers:nil)
838
+ get_read_only_keys_async(resource_group_name, account_name, custom_headers:custom_headers).value!
839
+ end
840
+
841
+ #
842
+ # Lists the read-only access keys for the specified Azure Cosmos DB database
843
+ # account.
844
+ #
845
+ # @param resource_group_name [String] The name of the resource group. The name
846
+ # is case insensitive.
847
+ # @param account_name [String] Cosmos DB database account name.
848
+ # @param [Hash{String => String}] A hash of custom headers that will be added
849
+ # to the HTTP request.
850
+ #
851
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
852
+ #
853
+ def get_read_only_keys_async(resource_group_name, account_name, custom_headers:nil)
854
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
855
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
856
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
857
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
858
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
859
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
860
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
861
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
862
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
863
+ 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?
864
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
865
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
866
+
867
+
868
+ request_headers = {}
869
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
870
+
871
+ # Set Headers
872
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
873
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
874
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys'
875
+
876
+ request_url = @base_url || @client.base_url
877
+
878
+ options = {
879
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
880
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
881
+ query_params: {'api-version' => @client.api_version},
882
+ headers: request_headers.merge(custom_headers || {}),
883
+ base_url: request_url
884
+ }
885
+ promise = @client.make_request_async(:get, path_template, options)
886
+
887
+ promise = promise.then do |result|
888
+ http_response = result.response
889
+ status_code = http_response.status
890
+ response_content = http_response.body
891
+ unless status_code == 200
892
+ error_model = JSON.load(response_content)
893
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
894
+ end
895
+
896
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
897
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
898
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
899
+ # Deserialize Response
900
+ if status_code == 200
901
+ begin
902
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
903
+ result_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::DatabaseAccountListReadOnlyKeysResult.mapper()
904
+ result.body = @client.deserialize(result_mapper, parsed_response)
905
+ rescue Exception => e
906
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
907
+ end
908
+ end
909
+
910
+ result
911
+ end
912
+
913
+ promise.execute
914
+ end
915
+
916
+ #
917
+ # Lists the read-only access keys for the specified Azure Cosmos DB database
918
+ # account.
919
+ #
920
+ # @param resource_group_name [String] The name of the resource group. The name
921
+ # is case insensitive.
922
+ # @param account_name [String] Cosmos DB database account name.
923
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
924
+ # will be added to the HTTP request.
925
+ #
926
+ # @return [DatabaseAccountListReadOnlyKeysResult] operation results.
927
+ #
928
+ def list_read_only_keys(resource_group_name, account_name, custom_headers:nil)
929
+ response = list_read_only_keys_async(resource_group_name, account_name, custom_headers:custom_headers).value!
930
+ response.body unless response.nil?
931
+ end
932
+
933
+ #
934
+ # Lists the read-only access keys for the specified Azure Cosmos DB database
935
+ # account.
936
+ #
937
+ # @param resource_group_name [String] The name of the resource group. The name
938
+ # is case insensitive.
939
+ # @param account_name [String] Cosmos DB database account name.
940
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
941
+ # will be added to the HTTP request.
942
+ #
943
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
944
+ #
945
+ def list_read_only_keys_with_http_info(resource_group_name, account_name, custom_headers:nil)
946
+ list_read_only_keys_async(resource_group_name, account_name, custom_headers:custom_headers).value!
947
+ end
948
+
949
+ #
950
+ # Lists the read-only access keys for the specified Azure Cosmos DB database
951
+ # account.
952
+ #
953
+ # @param resource_group_name [String] The name of the resource group. The name
954
+ # is case insensitive.
955
+ # @param account_name [String] Cosmos DB database account name.
956
+ # @param [Hash{String => String}] A hash of custom headers that will be added
957
+ # to the HTTP request.
958
+ #
959
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
960
+ #
961
+ def list_read_only_keys_async(resource_group_name, account_name, custom_headers:nil)
962
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
963
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
964
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
965
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
966
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
967
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
968
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
969
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
970
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
971
+ 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?
972
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
973
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
974
+
975
+
976
+ request_headers = {}
977
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
978
+
979
+ # Set Headers
980
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
981
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
982
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/readonlykeys'
983
+
984
+ request_url = @base_url || @client.base_url
985
+
986
+ options = {
987
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
988
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
989
+ query_params: {'api-version' => @client.api_version},
990
+ headers: request_headers.merge(custom_headers || {}),
991
+ base_url: request_url
992
+ }
993
+ promise = @client.make_request_async(:post, path_template, options)
994
+
995
+ promise = promise.then do |result|
996
+ http_response = result.response
997
+ status_code = http_response.status
998
+ response_content = http_response.body
999
+ unless status_code == 200
1000
+ error_model = JSON.load(response_content)
1001
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1002
+ end
1003
+
1004
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1005
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1006
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1007
+ # Deserialize Response
1008
+ if status_code == 200
1009
+ begin
1010
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1011
+ result_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::DatabaseAccountListReadOnlyKeysResult.mapper()
1012
+ result.body = @client.deserialize(result_mapper, parsed_response)
1013
+ rescue Exception => e
1014
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1015
+ end
1016
+ end
1017
+
1018
+ result
1019
+ end
1020
+
1021
+ promise.execute
1022
+ end
1023
+
1024
+ #
1025
+ # Regenerates an access key for the specified Azure Cosmos DB database account.
1026
+ #
1027
+ # @param resource_group_name [String] The name of the resource group. The name
1028
+ # is case insensitive.
1029
+ # @param account_name [String] Cosmos DB database account name.
1030
+ # @param key_to_regenerate [DatabaseAccountRegenerateKeyParameters] The name of
1031
+ # the key to regenerate.
1032
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1033
+ # will be added to the HTTP request.
1034
+ #
1035
+ def regenerate_key(resource_group_name, account_name, key_to_regenerate, custom_headers:nil)
1036
+ response = regenerate_key_async(resource_group_name, account_name, key_to_regenerate, custom_headers:custom_headers).value!
1037
+ nil
1038
+ end
1039
+
1040
+ #
1041
+ # @param resource_group_name [String] The name of the resource group. The name
1042
+ # is case insensitive.
1043
+ # @param account_name [String] Cosmos DB database account name.
1044
+ # @param key_to_regenerate [DatabaseAccountRegenerateKeyParameters] The name of
1045
+ # the key to regenerate.
1046
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1047
+ # will be added to the HTTP request.
1048
+ #
1049
+ # @return [Concurrent::Promise] promise which provides async access to http
1050
+ # response.
1051
+ #
1052
+ def regenerate_key_async(resource_group_name, account_name, key_to_regenerate, custom_headers:nil)
1053
+ # Send request
1054
+ promise = begin_regenerate_key_async(resource_group_name, account_name, key_to_regenerate, custom_headers:custom_headers)
1055
+
1056
+ promise = promise.then do |response|
1057
+ # Defining deserialization method.
1058
+ deserialize_method = lambda do |parsed_response|
1059
+ end
1060
+
1061
+ # Waiting for response.
1062
+ @client.get_long_running_operation_result(response, deserialize_method)
1063
+ end
1064
+
1065
+ promise
1066
+ end
1067
+
1068
+ #
1069
+ # Checks that the Azure Cosmos DB account name already exists. A valid account
1070
+ # name may contain only lowercase letters, numbers, and the '-' character, and
1071
+ # must be between 3 and 50 characters.
1072
+ #
1073
+ # @param account_name [String] Cosmos DB database account name.
1074
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1075
+ # will be added to the HTTP request.
1076
+ #
1077
+ # @return [Boolean] operation results.
1078
+ #
1079
+ def check_name_exists(account_name, custom_headers:nil)
1080
+ response = check_name_exists_async(account_name, custom_headers:custom_headers).value!
1081
+ response.body unless response.nil?
1082
+ end
1083
+
1084
+ #
1085
+ # Checks that the Azure Cosmos DB account name already exists. A valid account
1086
+ # name may contain only lowercase letters, numbers, and the '-' character, and
1087
+ # must be between 3 and 50 characters.
1088
+ #
1089
+ # @param account_name [String] Cosmos DB database account name.
1090
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1091
+ # will be added to the HTTP request.
1092
+ #
1093
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1094
+ #
1095
+ def check_name_exists_with_http_info(account_name, custom_headers:nil)
1096
+ check_name_exists_async(account_name, custom_headers:custom_headers).value!
1097
+ end
1098
+
1099
+ #
1100
+ # Checks that the Azure Cosmos DB account name already exists. A valid account
1101
+ # name may contain only lowercase letters, numbers, and the '-' character, and
1102
+ # must be between 3 and 50 characters.
1103
+ #
1104
+ # @param account_name [String] Cosmos DB database account name.
1105
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1106
+ # to the HTTP request.
1107
+ #
1108
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1109
+ #
1110
+ def check_name_exists_async(account_name, custom_headers:nil)
1111
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1112
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
1113
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
1114
+ 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?
1115
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1116
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
1117
+
1118
+
1119
+ request_headers = {}
1120
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1121
+
1122
+ # Set Headers
1123
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1124
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1125
+ path_template = 'providers/Microsoft.DocumentDB/databaseAccountNames/{accountName}'
1126
+
1127
+ request_url = @base_url || @client.base_url
1128
+
1129
+ options = {
1130
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1131
+ path_params: {'accountName' => account_name},
1132
+ query_params: {'api-version' => @client.api_version},
1133
+ headers: request_headers.merge(custom_headers || {}),
1134
+ base_url: request_url
1135
+ }
1136
+ promise = @client.make_request_async(:head, path_template, options)
1137
+
1138
+ promise = promise.then do |result|
1139
+ http_response = result.response
1140
+ status_code = http_response.status
1141
+ response_content = http_response.body
1142
+ unless status_code == 200 || status_code == 404
1143
+ error_model = JSON.load(response_content)
1144
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1145
+ end
1146
+
1147
+ result.body = (status_code == 200)
1148
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1149
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1150
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1151
+
1152
+ result
1153
+ end
1154
+
1155
+ promise.execute
1156
+ end
1157
+
1158
+ #
1159
+ # Retrieves the metrics determined by the given filter for the given database
1160
+ # account.
1161
+ #
1162
+ # @param resource_group_name [String] The name of the resource group. The name
1163
+ # is case insensitive.
1164
+ # @param account_name [String] Cosmos DB database account name.
1165
+ # @param filter [String] An OData filter expression that describes a subset of
1166
+ # metrics to return. The parameters that can be filtered are name.value (name
1167
+ # of the metric, can have an or of multiple names), startTime, endTime, and
1168
+ # timeGrain. The supported operator is eq.
1169
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1170
+ # will be added to the HTTP request.
1171
+ #
1172
+ # @return [MetricListResult] operation results.
1173
+ #
1174
+ def list_metrics(resource_group_name, account_name, filter, custom_headers:nil)
1175
+ response = list_metrics_async(resource_group_name, account_name, filter, custom_headers:custom_headers).value!
1176
+ response.body unless response.nil?
1177
+ end
1178
+
1179
+ #
1180
+ # Retrieves the metrics determined by the given filter for the given database
1181
+ # account.
1182
+ #
1183
+ # @param resource_group_name [String] The name of the resource group. The name
1184
+ # is case insensitive.
1185
+ # @param account_name [String] Cosmos DB database account name.
1186
+ # @param filter [String] An OData filter expression that describes a subset of
1187
+ # metrics to return. The parameters that can be filtered are name.value (name
1188
+ # of the metric, can have an or of multiple names), startTime, endTime, and
1189
+ # timeGrain. The supported operator is eq.
1190
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1191
+ # will be added to the HTTP request.
1192
+ #
1193
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1194
+ #
1195
+ def list_metrics_with_http_info(resource_group_name, account_name, filter, custom_headers:nil)
1196
+ list_metrics_async(resource_group_name, account_name, filter, custom_headers:custom_headers).value!
1197
+ end
1198
+
1199
+ #
1200
+ # Retrieves the metrics determined by the given filter for the given database
1201
+ # account.
1202
+ #
1203
+ # @param resource_group_name [String] The name of the resource group. The name
1204
+ # is case insensitive.
1205
+ # @param account_name [String] Cosmos DB database account name.
1206
+ # @param filter [String] An OData filter expression that describes a subset of
1207
+ # metrics to return. The parameters that can be filtered are name.value (name
1208
+ # of the metric, can have an or of multiple names), startTime, endTime, and
1209
+ # timeGrain. The supported operator is eq.
1210
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1211
+ # to the HTTP request.
1212
+ #
1213
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1214
+ #
1215
+ def list_metrics_async(resource_group_name, account_name, filter, custom_headers:nil)
1216
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1217
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
1218
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1219
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1220
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1221
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1222
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1223
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
1224
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
1225
+ 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?
1226
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1227
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
1228
+ fail ArgumentError, 'filter is nil' if filter.nil?
1229
+
1230
+
1231
+ request_headers = {}
1232
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1233
+
1234
+ # Set Headers
1235
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1236
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1237
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/metrics'
1238
+
1239
+ request_url = @base_url || @client.base_url
1240
+
1241
+ options = {
1242
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1243
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
1244
+ query_params: {'api-version' => @client.api_version,'$filter' => filter},
1245
+ headers: request_headers.merge(custom_headers || {}),
1246
+ base_url: request_url
1247
+ }
1248
+ promise = @client.make_request_async(:get, path_template, options)
1249
+
1250
+ promise = promise.then do |result|
1251
+ http_response = result.response
1252
+ status_code = http_response.status
1253
+ response_content = http_response.body
1254
+ unless status_code == 200
1255
+ error_model = JSON.load(response_content)
1256
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1257
+ end
1258
+
1259
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1260
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1261
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1262
+ # Deserialize Response
1263
+ if status_code == 200
1264
+ begin
1265
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1266
+ result_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::MetricListResult.mapper()
1267
+ result.body = @client.deserialize(result_mapper, parsed_response)
1268
+ rescue Exception => e
1269
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1270
+ end
1271
+ end
1272
+
1273
+ result
1274
+ end
1275
+
1276
+ promise.execute
1277
+ end
1278
+
1279
+ #
1280
+ # Retrieves the usages (most recent data) for the given database account.
1281
+ #
1282
+ # @param resource_group_name [String] The name of the resource group. The name
1283
+ # is case insensitive.
1284
+ # @param account_name [String] Cosmos DB database account name.
1285
+ # @param filter [String] An OData filter expression that describes a subset of
1286
+ # usages to return. The supported parameter is name.value (name of the metric,
1287
+ # can have an or of multiple names).
1288
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1289
+ # will be added to the HTTP request.
1290
+ #
1291
+ # @return [UsagesResult] operation results.
1292
+ #
1293
+ def list_usages(resource_group_name, account_name, filter:nil, custom_headers:nil)
1294
+ response = list_usages_async(resource_group_name, account_name, filter:filter, custom_headers:custom_headers).value!
1295
+ response.body unless response.nil?
1296
+ end
1297
+
1298
+ #
1299
+ # Retrieves the usages (most recent data) for the given database account.
1300
+ #
1301
+ # @param resource_group_name [String] The name of the resource group. The name
1302
+ # is case insensitive.
1303
+ # @param account_name [String] Cosmos DB database account name.
1304
+ # @param filter [String] An OData filter expression that describes a subset of
1305
+ # usages to return. The supported parameter is name.value (name of the metric,
1306
+ # can have an or of multiple names).
1307
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1308
+ # will be added to the HTTP request.
1309
+ #
1310
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1311
+ #
1312
+ def list_usages_with_http_info(resource_group_name, account_name, filter:nil, custom_headers:nil)
1313
+ list_usages_async(resource_group_name, account_name, filter:filter, custom_headers:custom_headers).value!
1314
+ end
1315
+
1316
+ #
1317
+ # Retrieves the usages (most recent data) for the given database account.
1318
+ #
1319
+ # @param resource_group_name [String] The name of the resource group. The name
1320
+ # is case insensitive.
1321
+ # @param account_name [String] Cosmos DB database account name.
1322
+ # @param filter [String] An OData filter expression that describes a subset of
1323
+ # usages to return. The supported parameter is name.value (name of the metric,
1324
+ # can have an or of multiple names).
1325
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1326
+ # to the HTTP request.
1327
+ #
1328
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1329
+ #
1330
+ def list_usages_async(resource_group_name, account_name, filter:nil, custom_headers:nil)
1331
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1332
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
1333
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1334
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1335
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1336
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1337
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1338
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
1339
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
1340
+ 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?
1341
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1342
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
1343
+
1344
+
1345
+ request_headers = {}
1346
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1347
+
1348
+ # Set Headers
1349
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1350
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1351
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/usages'
1352
+
1353
+ request_url = @base_url || @client.base_url
1354
+
1355
+ options = {
1356
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1357
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
1358
+ query_params: {'api-version' => @client.api_version,'$filter' => filter},
1359
+ headers: request_headers.merge(custom_headers || {}),
1360
+ base_url: request_url
1361
+ }
1362
+ promise = @client.make_request_async(:get, path_template, options)
1363
+
1364
+ promise = promise.then do |result|
1365
+ http_response = result.response
1366
+ status_code = http_response.status
1367
+ response_content = http_response.body
1368
+ unless status_code == 200
1369
+ error_model = JSON.load(response_content)
1370
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1371
+ end
1372
+
1373
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1374
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1375
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1376
+ # Deserialize Response
1377
+ if status_code == 200
1378
+ begin
1379
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1380
+ result_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::UsagesResult.mapper()
1381
+ result.body = @client.deserialize(result_mapper, parsed_response)
1382
+ rescue Exception => e
1383
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1384
+ end
1385
+ end
1386
+
1387
+ result
1388
+ end
1389
+
1390
+ promise.execute
1391
+ end
1392
+
1393
+ #
1394
+ # Retrieves metric definitions for the given database account.
1395
+ #
1396
+ # @param resource_group_name [String] The name of the resource group. The name
1397
+ # is case insensitive.
1398
+ # @param account_name [String] Cosmos DB database account name.
1399
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1400
+ # will be added to the HTTP request.
1401
+ #
1402
+ # @return [MetricDefinitionsListResult] operation results.
1403
+ #
1404
+ def list_metric_definitions(resource_group_name, account_name, custom_headers:nil)
1405
+ response = list_metric_definitions_async(resource_group_name, account_name, custom_headers:custom_headers).value!
1406
+ response.body unless response.nil?
1407
+ end
1408
+
1409
+ #
1410
+ # Retrieves metric definitions for the given database account.
1411
+ #
1412
+ # @param resource_group_name [String] The name of the resource group. The name
1413
+ # is case insensitive.
1414
+ # @param account_name [String] Cosmos DB database account name.
1415
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1416
+ # will be added to the HTTP request.
1417
+ #
1418
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1419
+ #
1420
+ def list_metric_definitions_with_http_info(resource_group_name, account_name, custom_headers:nil)
1421
+ list_metric_definitions_async(resource_group_name, account_name, custom_headers:custom_headers).value!
1422
+ end
1423
+
1424
+ #
1425
+ # Retrieves metric definitions for the given database account.
1426
+ #
1427
+ # @param resource_group_name [String] The name of the resource group. The name
1428
+ # is case insensitive.
1429
+ # @param account_name [String] Cosmos DB database account name.
1430
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1431
+ # to the HTTP request.
1432
+ #
1433
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1434
+ #
1435
+ def list_metric_definitions_async(resource_group_name, account_name, custom_headers:nil)
1436
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1437
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
1438
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1439
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1440
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1441
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1442
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1443
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
1444
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
1445
+ 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?
1446
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1447
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
1448
+
1449
+
1450
+ request_headers = {}
1451
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1452
+
1453
+ # Set Headers
1454
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1455
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1456
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/metricDefinitions'
1457
+
1458
+ request_url = @base_url || @client.base_url
1459
+
1460
+ options = {
1461
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1462
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
1463
+ query_params: {'api-version' => @client.api_version},
1464
+ headers: request_headers.merge(custom_headers || {}),
1465
+ base_url: request_url
1466
+ }
1467
+ promise = @client.make_request_async(:get, path_template, options)
1468
+
1469
+ promise = promise.then do |result|
1470
+ http_response = result.response
1471
+ status_code = http_response.status
1472
+ response_content = http_response.body
1473
+ unless status_code == 200
1474
+ error_model = JSON.load(response_content)
1475
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1476
+ end
1477
+
1478
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1479
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1480
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1481
+ # Deserialize Response
1482
+ if status_code == 200
1483
+ begin
1484
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1485
+ result_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::MetricDefinitionsListResult.mapper()
1486
+ result.body = @client.deserialize(result_mapper, parsed_response)
1487
+ rescue Exception => e
1488
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1489
+ end
1490
+ end
1491
+
1492
+ result
1493
+ end
1494
+
1495
+ promise.execute
1496
+ end
1497
+
1498
+ #
1499
+ # Updates the properties of an existing Azure Cosmos DB database account.
1500
+ #
1501
+ # @param resource_group_name [String] The name of the resource group. The name
1502
+ # is case insensitive.
1503
+ # @param account_name [String] Cosmos DB database account name.
1504
+ # @param update_parameters [DatabaseAccountUpdateParameters] The parameters to
1505
+ # provide for the current database account.
1506
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1507
+ # will be added to the HTTP request.
1508
+ #
1509
+ # @return [DatabaseAccountGetResults] operation results.
1510
+ #
1511
+ def begin_update(resource_group_name, account_name, update_parameters, custom_headers:nil)
1512
+ response = begin_update_async(resource_group_name, account_name, update_parameters, custom_headers:custom_headers).value!
1513
+ response.body unless response.nil?
1514
+ end
1515
+
1516
+ #
1517
+ # Updates the properties of an existing Azure Cosmos DB database account.
1518
+ #
1519
+ # @param resource_group_name [String] The name of the resource group. The name
1520
+ # is case insensitive.
1521
+ # @param account_name [String] Cosmos DB database account name.
1522
+ # @param update_parameters [DatabaseAccountUpdateParameters] The parameters to
1523
+ # provide for the current database account.
1524
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1525
+ # will be added to the HTTP request.
1526
+ #
1527
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1528
+ #
1529
+ def begin_update_with_http_info(resource_group_name, account_name, update_parameters, custom_headers:nil)
1530
+ begin_update_async(resource_group_name, account_name, update_parameters, custom_headers:custom_headers).value!
1531
+ end
1532
+
1533
+ #
1534
+ # Updates the properties of an existing Azure Cosmos DB database account.
1535
+ #
1536
+ # @param resource_group_name [String] The name of the resource group. The name
1537
+ # is case insensitive.
1538
+ # @param account_name [String] Cosmos DB database account name.
1539
+ # @param update_parameters [DatabaseAccountUpdateParameters] The parameters to
1540
+ # provide for the current database account.
1541
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1542
+ # to the HTTP request.
1543
+ #
1544
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1545
+ #
1546
+ def begin_update_async(resource_group_name, account_name, update_parameters, custom_headers:nil)
1547
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1548
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
1549
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1550
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1551
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1552
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1553
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1554
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
1555
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
1556
+ 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?
1557
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1558
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
1559
+ fail ArgumentError, 'update_parameters is nil' if update_parameters.nil?
1560
+
1561
+
1562
+ request_headers = {}
1563
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1564
+
1565
+ # Set Headers
1566
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1567
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1568
+
1569
+ # Serialize Request
1570
+ request_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::DatabaseAccountUpdateParameters.mapper()
1571
+ request_content = @client.serialize(request_mapper, update_parameters)
1572
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1573
+
1574
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}'
1575
+
1576
+ request_url = @base_url || @client.base_url
1577
+
1578
+ options = {
1579
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1580
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
1581
+ query_params: {'api-version' => @client.api_version},
1582
+ body: request_content,
1583
+ headers: request_headers.merge(custom_headers || {}),
1584
+ base_url: request_url
1585
+ }
1586
+ promise = @client.make_request_async(:patch, path_template, options)
1587
+
1588
+ promise = promise.then do |result|
1589
+ http_response = result.response
1590
+ status_code = http_response.status
1591
+ response_content = http_response.body
1592
+ unless status_code == 200
1593
+ error_model = JSON.load(response_content)
1594
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1595
+ end
1596
+
1597
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1598
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1599
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1600
+ # Deserialize Response
1601
+ if status_code == 200
1602
+ begin
1603
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1604
+ result_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::DatabaseAccountGetResults.mapper()
1605
+ result.body = @client.deserialize(result_mapper, parsed_response)
1606
+ rescue Exception => e
1607
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1608
+ end
1609
+ end
1610
+
1611
+ result
1612
+ end
1613
+
1614
+ promise.execute
1615
+ end
1616
+
1617
+ #
1618
+ # Creates or updates an Azure Cosmos DB database account. The "Update" method
1619
+ # is preferred when performing updates on an account.
1620
+ #
1621
+ # @param resource_group_name [String] The name of the resource group. The name
1622
+ # is case insensitive.
1623
+ # @param account_name [String] Cosmos DB database account name.
1624
+ # @param create_update_parameters [DatabaseAccountCreateUpdateParameters] The
1625
+ # parameters to provide for the current database account.
1626
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1627
+ # will be added to the HTTP request.
1628
+ #
1629
+ # @return [DatabaseAccountGetResults] operation results.
1630
+ #
1631
+ def begin_create_or_update(resource_group_name, account_name, create_update_parameters, custom_headers:nil)
1632
+ response = begin_create_or_update_async(resource_group_name, account_name, create_update_parameters, custom_headers:custom_headers).value!
1633
+ response.body unless response.nil?
1634
+ end
1635
+
1636
+ #
1637
+ # Creates or updates an Azure Cosmos DB database account. The "Update" method
1638
+ # is preferred when performing updates on an account.
1639
+ #
1640
+ # @param resource_group_name [String] The name of the resource group. The name
1641
+ # is case insensitive.
1642
+ # @param account_name [String] Cosmos DB database account name.
1643
+ # @param create_update_parameters [DatabaseAccountCreateUpdateParameters] The
1644
+ # parameters to provide for the current database account.
1645
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1646
+ # will be added to the HTTP request.
1647
+ #
1648
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1649
+ #
1650
+ def begin_create_or_update_with_http_info(resource_group_name, account_name, create_update_parameters, custom_headers:nil)
1651
+ begin_create_or_update_async(resource_group_name, account_name, create_update_parameters, custom_headers:custom_headers).value!
1652
+ end
1653
+
1654
+ #
1655
+ # Creates or updates an Azure Cosmos DB database account. The "Update" method
1656
+ # is preferred when performing updates on an account.
1657
+ #
1658
+ # @param resource_group_name [String] The name of the resource group. The name
1659
+ # is case insensitive.
1660
+ # @param account_name [String] Cosmos DB database account name.
1661
+ # @param create_update_parameters [DatabaseAccountCreateUpdateParameters] The
1662
+ # parameters to provide for the current database account.
1663
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1664
+ # to the HTTP request.
1665
+ #
1666
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1667
+ #
1668
+ def begin_create_or_update_async(resource_group_name, account_name, create_update_parameters, custom_headers:nil)
1669
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1670
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
1671
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1672
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1673
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1674
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1675
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1676
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
1677
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
1678
+ 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?
1679
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1680
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
1681
+ fail ArgumentError, 'create_update_parameters is nil' if create_update_parameters.nil?
1682
+
1683
+
1684
+ request_headers = {}
1685
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1686
+
1687
+ # Set Headers
1688
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1689
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1690
+
1691
+ # Serialize Request
1692
+ request_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::DatabaseAccountCreateUpdateParameters.mapper()
1693
+ request_content = @client.serialize(request_mapper, create_update_parameters)
1694
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1695
+
1696
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}'
1697
+
1698
+ request_url = @base_url || @client.base_url
1699
+
1700
+ options = {
1701
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1702
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
1703
+ query_params: {'api-version' => @client.api_version},
1704
+ body: request_content,
1705
+ headers: request_headers.merge(custom_headers || {}),
1706
+ base_url: request_url
1707
+ }
1708
+ promise = @client.make_request_async(:put, path_template, options)
1709
+
1710
+ promise = promise.then do |result|
1711
+ http_response = result.response
1712
+ status_code = http_response.status
1713
+ response_content = http_response.body
1714
+ unless status_code == 200
1715
+ error_model = JSON.load(response_content)
1716
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1717
+ end
1718
+
1719
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1720
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1721
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1722
+ # Deserialize Response
1723
+ if status_code == 200
1724
+ begin
1725
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1726
+ result_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::DatabaseAccountGetResults.mapper()
1727
+ result.body = @client.deserialize(result_mapper, parsed_response)
1728
+ rescue Exception => e
1729
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1730
+ end
1731
+ end
1732
+
1733
+ result
1734
+ end
1735
+
1736
+ promise.execute
1737
+ end
1738
+
1739
+ #
1740
+ # Deletes an existing Azure Cosmos DB database account.
1741
+ #
1742
+ # @param resource_group_name [String] The name of the resource group. The name
1743
+ # is case insensitive.
1744
+ # @param account_name [String] Cosmos DB database account name.
1745
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1746
+ # will be added to the HTTP request.
1747
+ #
1748
+ #
1749
+ def begin_delete(resource_group_name, account_name, custom_headers:nil)
1750
+ response = begin_delete_async(resource_group_name, account_name, custom_headers:custom_headers).value!
1751
+ nil
1752
+ end
1753
+
1754
+ #
1755
+ # Deletes an existing Azure Cosmos DB database account.
1756
+ #
1757
+ # @param resource_group_name [String] The name of the resource group. The name
1758
+ # is case insensitive.
1759
+ # @param account_name [String] Cosmos DB database account name.
1760
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1761
+ # will be added to the HTTP request.
1762
+ #
1763
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1764
+ #
1765
+ def begin_delete_with_http_info(resource_group_name, account_name, custom_headers:nil)
1766
+ begin_delete_async(resource_group_name, account_name, custom_headers:custom_headers).value!
1767
+ end
1768
+
1769
+ #
1770
+ # Deletes an existing Azure Cosmos DB database account.
1771
+ #
1772
+ # @param resource_group_name [String] The name of the resource group. The name
1773
+ # is case insensitive.
1774
+ # @param account_name [String] Cosmos DB database account name.
1775
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1776
+ # to the HTTP request.
1777
+ #
1778
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1779
+ #
1780
+ def begin_delete_async(resource_group_name, account_name, custom_headers:nil)
1781
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1782
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
1783
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1784
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1785
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1786
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1787
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1788
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
1789
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
1790
+ 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?
1791
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1792
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
1793
+
1794
+
1795
+ request_headers = {}
1796
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1797
+
1798
+ # Set Headers
1799
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1800
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1801
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}'
1802
+
1803
+ request_url = @base_url || @client.base_url
1804
+
1805
+ options = {
1806
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1807
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
1808
+ query_params: {'api-version' => @client.api_version},
1809
+ headers: request_headers.merge(custom_headers || {}),
1810
+ base_url: request_url
1811
+ }
1812
+ promise = @client.make_request_async(:delete, path_template, options)
1813
+
1814
+ promise = promise.then do |result|
1815
+ http_response = result.response
1816
+ status_code = http_response.status
1817
+ response_content = http_response.body
1818
+ unless status_code == 202 || status_code == 204
1819
+ error_model = JSON.load(response_content)
1820
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1821
+ end
1822
+
1823
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1824
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1825
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1826
+
1827
+ result
1828
+ end
1829
+
1830
+ promise.execute
1831
+ end
1832
+
1833
+ #
1834
+ # Changes the failover priority for the Azure Cosmos DB database account. A
1835
+ # failover priority of 0 indicates a write region. The maximum value for a
1836
+ # failover priority = (total number of regions - 1). Failover priority values
1837
+ # must be unique for each of the regions in which the database account exists.
1838
+ #
1839
+ # @param resource_group_name [String] The name of the resource group. The name
1840
+ # is case insensitive.
1841
+ # @param account_name [String] Cosmos DB database account name.
1842
+ # @param failover_parameters [FailoverPolicies] The new failover policies for
1843
+ # the database account.
1844
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1845
+ # will be added to the HTTP request.
1846
+ #
1847
+ #
1848
+ def begin_failover_priority_change(resource_group_name, account_name, failover_parameters, custom_headers:nil)
1849
+ response = begin_failover_priority_change_async(resource_group_name, account_name, failover_parameters, custom_headers:custom_headers).value!
1850
+ nil
1851
+ end
1852
+
1853
+ #
1854
+ # Changes the failover priority for the Azure Cosmos DB database account. A
1855
+ # failover priority of 0 indicates a write region. The maximum value for a
1856
+ # failover priority = (total number of regions - 1). Failover priority values
1857
+ # must be unique for each of the regions in which the database account exists.
1858
+ #
1859
+ # @param resource_group_name [String] The name of the resource group. The name
1860
+ # is case insensitive.
1861
+ # @param account_name [String] Cosmos DB database account name.
1862
+ # @param failover_parameters [FailoverPolicies] The new failover policies for
1863
+ # the database account.
1864
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1865
+ # will be added to the HTTP request.
1866
+ #
1867
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1868
+ #
1869
+ def begin_failover_priority_change_with_http_info(resource_group_name, account_name, failover_parameters, custom_headers:nil)
1870
+ begin_failover_priority_change_async(resource_group_name, account_name, failover_parameters, custom_headers:custom_headers).value!
1871
+ end
1872
+
1873
+ #
1874
+ # Changes the failover priority for the Azure Cosmos DB database account. A
1875
+ # failover priority of 0 indicates a write region. The maximum value for a
1876
+ # failover priority = (total number of regions - 1). Failover priority values
1877
+ # must be unique for each of the regions in which the database account exists.
1878
+ #
1879
+ # @param resource_group_name [String] The name of the resource group. The name
1880
+ # is case insensitive.
1881
+ # @param account_name [String] Cosmos DB database account name.
1882
+ # @param failover_parameters [FailoverPolicies] The new failover policies for
1883
+ # the database account.
1884
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1885
+ # to the HTTP request.
1886
+ #
1887
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1888
+ #
1889
+ def begin_failover_priority_change_async(resource_group_name, account_name, failover_parameters, custom_headers:nil)
1890
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1891
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
1892
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
1893
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
1894
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
1895
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
1896
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
1897
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
1898
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
1899
+ 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?
1900
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1901
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
1902
+ fail ArgumentError, 'failover_parameters is nil' if failover_parameters.nil?
1903
+
1904
+
1905
+ request_headers = {}
1906
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1907
+
1908
+ # Set Headers
1909
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1910
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1911
+
1912
+ # Serialize Request
1913
+ request_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::FailoverPolicies.mapper()
1914
+ request_content = @client.serialize(request_mapper, failover_parameters)
1915
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
1916
+
1917
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/failoverPriorityChange'
1918
+
1919
+ request_url = @base_url || @client.base_url
1920
+
1921
+ options = {
1922
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1923
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
1924
+ query_params: {'api-version' => @client.api_version},
1925
+ body: request_content,
1926
+ headers: request_headers.merge(custom_headers || {}),
1927
+ base_url: request_url
1928
+ }
1929
+ promise = @client.make_request_async(:post, path_template, options)
1930
+
1931
+ promise = promise.then do |result|
1932
+ http_response = result.response
1933
+ status_code = http_response.status
1934
+ response_content = http_response.body
1935
+ unless status_code == 202 || status_code == 204
1936
+ error_model = JSON.load(response_content)
1937
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1938
+ end
1939
+
1940
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1941
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1942
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1943
+
1944
+ result
1945
+ end
1946
+
1947
+ promise.execute
1948
+ end
1949
+
1950
+ #
1951
+ # Offline the specified region for the specified Azure Cosmos DB database
1952
+ # account.
1953
+ #
1954
+ # @param resource_group_name [String] The name of the resource group. The name
1955
+ # is case insensitive.
1956
+ # @param account_name [String] Cosmos DB database account name.
1957
+ # @param region_parameter_for_offline [RegionForOnlineOffline] Cosmos DB region
1958
+ # to offline for the database account.
1959
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1960
+ # will be added to the HTTP request.
1961
+ #
1962
+ #
1963
+ def begin_offline_region(resource_group_name, account_name, region_parameter_for_offline, custom_headers:nil)
1964
+ response = begin_offline_region_async(resource_group_name, account_name, region_parameter_for_offline, custom_headers:custom_headers).value!
1965
+ nil
1966
+ end
1967
+
1968
+ #
1969
+ # Offline the specified region for the specified Azure Cosmos DB database
1970
+ # account.
1971
+ #
1972
+ # @param resource_group_name [String] The name of the resource group. The name
1973
+ # is case insensitive.
1974
+ # @param account_name [String] Cosmos DB database account name.
1975
+ # @param region_parameter_for_offline [RegionForOnlineOffline] Cosmos DB region
1976
+ # to offline for the database account.
1977
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1978
+ # will be added to the HTTP request.
1979
+ #
1980
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1981
+ #
1982
+ def begin_offline_region_with_http_info(resource_group_name, account_name, region_parameter_for_offline, custom_headers:nil)
1983
+ begin_offline_region_async(resource_group_name, account_name, region_parameter_for_offline, custom_headers:custom_headers).value!
1984
+ end
1985
+
1986
+ #
1987
+ # Offline the specified region for the specified Azure Cosmos DB database
1988
+ # account.
1989
+ #
1990
+ # @param resource_group_name [String] The name of the resource group. The name
1991
+ # is case insensitive.
1992
+ # @param account_name [String] Cosmos DB database account name.
1993
+ # @param region_parameter_for_offline [RegionForOnlineOffline] Cosmos DB region
1994
+ # to offline for the database account.
1995
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1996
+ # to the HTTP request.
1997
+ #
1998
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1999
+ #
2000
+ def begin_offline_region_async(resource_group_name, account_name, region_parameter_for_offline, custom_headers:nil)
2001
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2002
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
2003
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2004
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
2005
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
2006
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
2007
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
2008
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
2009
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
2010
+ 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?
2011
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2012
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
2013
+ fail ArgumentError, 'region_parameter_for_offline is nil' if region_parameter_for_offline.nil?
2014
+
2015
+
2016
+ request_headers = {}
2017
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2018
+
2019
+ # Set Headers
2020
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2021
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2022
+
2023
+ # Serialize Request
2024
+ request_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::RegionForOnlineOffline.mapper()
2025
+ request_content = @client.serialize(request_mapper, region_parameter_for_offline)
2026
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2027
+
2028
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/offlineRegion'
2029
+
2030
+ request_url = @base_url || @client.base_url
2031
+
2032
+ options = {
2033
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2034
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
2035
+ query_params: {'api-version' => @client.api_version},
2036
+ body: request_content,
2037
+ headers: request_headers.merge(custom_headers || {}),
2038
+ base_url: request_url
2039
+ }
2040
+ promise = @client.make_request_async(:post, path_template, options)
2041
+
2042
+ promise = promise.then do |result|
2043
+ http_response = result.response
2044
+ status_code = http_response.status
2045
+ response_content = http_response.body
2046
+ unless status_code == 200 || status_code == 202
2047
+ error_model = JSON.load(response_content)
2048
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2049
+ end
2050
+
2051
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2052
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2053
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2054
+
2055
+ result
2056
+ end
2057
+
2058
+ promise.execute
2059
+ end
2060
+
2061
+ #
2062
+ # Online the specified region for the specified Azure Cosmos DB database
2063
+ # account.
2064
+ #
2065
+ # @param resource_group_name [String] The name of the resource group. The name
2066
+ # is case insensitive.
2067
+ # @param account_name [String] Cosmos DB database account name.
2068
+ # @param region_parameter_for_online [RegionForOnlineOffline] Cosmos DB region
2069
+ # to online for the database account.
2070
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2071
+ # will be added to the HTTP request.
2072
+ #
2073
+ #
2074
+ def begin_online_region(resource_group_name, account_name, region_parameter_for_online, custom_headers:nil)
2075
+ response = begin_online_region_async(resource_group_name, account_name, region_parameter_for_online, custom_headers:custom_headers).value!
2076
+ nil
2077
+ end
2078
+
2079
+ #
2080
+ # Online the specified region for the specified Azure Cosmos DB database
2081
+ # account.
2082
+ #
2083
+ # @param resource_group_name [String] The name of the resource group. The name
2084
+ # is case insensitive.
2085
+ # @param account_name [String] Cosmos DB database account name.
2086
+ # @param region_parameter_for_online [RegionForOnlineOffline] Cosmos DB region
2087
+ # to online for the database account.
2088
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2089
+ # will be added to the HTTP request.
2090
+ #
2091
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2092
+ #
2093
+ def begin_online_region_with_http_info(resource_group_name, account_name, region_parameter_for_online, custom_headers:nil)
2094
+ begin_online_region_async(resource_group_name, account_name, region_parameter_for_online, custom_headers:custom_headers).value!
2095
+ end
2096
+
2097
+ #
2098
+ # Online the specified region for the specified Azure Cosmos DB database
2099
+ # account.
2100
+ #
2101
+ # @param resource_group_name [String] The name of the resource group. The name
2102
+ # is case insensitive.
2103
+ # @param account_name [String] Cosmos DB database account name.
2104
+ # @param region_parameter_for_online [RegionForOnlineOffline] Cosmos DB region
2105
+ # to online for the database account.
2106
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2107
+ # to the HTTP request.
2108
+ #
2109
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2110
+ #
2111
+ def begin_online_region_async(resource_group_name, account_name, region_parameter_for_online, custom_headers:nil)
2112
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2113
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
2114
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2115
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
2116
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
2117
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
2118
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
2119
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
2120
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
2121
+ 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?
2122
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2123
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
2124
+ fail ArgumentError, 'region_parameter_for_online is nil' if region_parameter_for_online.nil?
2125
+
2126
+
2127
+ request_headers = {}
2128
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2129
+
2130
+ # Set Headers
2131
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2132
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2133
+
2134
+ # Serialize Request
2135
+ request_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::RegionForOnlineOffline.mapper()
2136
+ request_content = @client.serialize(request_mapper, region_parameter_for_online)
2137
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2138
+
2139
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/onlineRegion'
2140
+
2141
+ request_url = @base_url || @client.base_url
2142
+
2143
+ options = {
2144
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2145
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
2146
+ query_params: {'api-version' => @client.api_version},
2147
+ body: request_content,
2148
+ headers: request_headers.merge(custom_headers || {}),
2149
+ base_url: request_url
2150
+ }
2151
+ promise = @client.make_request_async(:post, path_template, options)
2152
+
2153
+ promise = promise.then do |result|
2154
+ http_response = result.response
2155
+ status_code = http_response.status
2156
+ response_content = http_response.body
2157
+ unless status_code == 200 || status_code == 202
2158
+ error_model = JSON.load(response_content)
2159
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
2160
+ end
2161
+
2162
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2163
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2164
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2165
+
2166
+ result
2167
+ end
2168
+
2169
+ promise.execute
2170
+ end
2171
+
2172
+ #
2173
+ # Regenerates an access key for the specified Azure Cosmos DB database account.
2174
+ #
2175
+ # @param resource_group_name [String] The name of the resource group. The name
2176
+ # is case insensitive.
2177
+ # @param account_name [String] Cosmos DB database account name.
2178
+ # @param key_to_regenerate [DatabaseAccountRegenerateKeyParameters] The name of
2179
+ # the key to regenerate.
2180
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2181
+ # will be added to the HTTP request.
2182
+ #
2183
+ #
2184
+ def begin_regenerate_key(resource_group_name, account_name, key_to_regenerate, custom_headers:nil)
2185
+ response = begin_regenerate_key_async(resource_group_name, account_name, key_to_regenerate, custom_headers:custom_headers).value!
2186
+ nil
2187
+ end
2188
+
2189
+ #
2190
+ # Regenerates an access key for the specified Azure Cosmos DB database account.
2191
+ #
2192
+ # @param resource_group_name [String] The name of the resource group. The name
2193
+ # is case insensitive.
2194
+ # @param account_name [String] Cosmos DB database account name.
2195
+ # @param key_to_regenerate [DatabaseAccountRegenerateKeyParameters] The name of
2196
+ # the key to regenerate.
2197
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
2198
+ # will be added to the HTTP request.
2199
+ #
2200
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
2201
+ #
2202
+ def begin_regenerate_key_with_http_info(resource_group_name, account_name, key_to_regenerate, custom_headers:nil)
2203
+ begin_regenerate_key_async(resource_group_name, account_name, key_to_regenerate, custom_headers:custom_headers).value!
2204
+ end
2205
+
2206
+ #
2207
+ # Regenerates an access key for the specified Azure Cosmos DB database account.
2208
+ #
2209
+ # @param resource_group_name [String] The name of the resource group. The name
2210
+ # is case insensitive.
2211
+ # @param account_name [String] Cosmos DB database account name.
2212
+ # @param key_to_regenerate [DatabaseAccountRegenerateKeyParameters] The name of
2213
+ # the key to regenerate.
2214
+ # @param [Hash{String => String}] A hash of custom headers that will be added
2215
+ # to the HTTP request.
2216
+ #
2217
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
2218
+ #
2219
+ def begin_regenerate_key_async(resource_group_name, account_name, key_to_regenerate, custom_headers:nil)
2220
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
2221
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
2222
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
2223
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
2224
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
2225
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
2226
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
2227
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
2228
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
2229
+ 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?
2230
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
2231
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
2232
+ fail ArgumentError, 'key_to_regenerate is nil' if key_to_regenerate.nil?
2233
+
2234
+
2235
+ request_headers = {}
2236
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
2237
+
2238
+ # Set Headers
2239
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
2240
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
2241
+
2242
+ # Serialize Request
2243
+ request_mapper = Azure::Cosmosdb::Mgmt::V2020_03_01::Models::DatabaseAccountRegenerateKeyParameters.mapper()
2244
+ request_content = @client.serialize(request_mapper, key_to_regenerate)
2245
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
2246
+
2247
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/regenerateKey'
2248
+
2249
+ request_url = @base_url || @client.base_url
2250
+
2251
+ options = {
2252
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
2253
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
2254
+ query_params: {'api-version' => @client.api_version},
2255
+ body: request_content,
2256
+ headers: request_headers.merge(custom_headers || {}),
2257
+ base_url: request_url
2258
+ }
2259
+ promise = @client.make_request_async(:post, path_template, options)
2260
+
2261
+ promise = promise.then do |result|
2262
+ http_response = result.response
2263
+ status_code = http_response.status
2264
+ response_content = http_response.body
2265
+ unless status_code == 200 || status_code == 202
2266
+ error_model = JSON.load(response_content)
2267
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
2268
+ end
2269
+
2270
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
2271
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
2272
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
2273
+
2274
+ result
2275
+ end
2276
+
2277
+ promise.execute
2278
+ end
2279
+
2280
+ end
2281
+ end