azure_mgmt_cosmosdb 0.21.1 → 0.21.2

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