azure_mgmt_cosmosdb 0.17.0 → 0.21.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (201) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb.rb +50 -46
  3. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/collection.rb +3 -0
  4. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/collection_partition.rb +2 -0
  5. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/collection_partition_region.rb +1 -0
  6. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/collection_region.rb +1 -0
  7. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/cosmos_db.rb +1 -1
  8. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/database.rb +3 -0
  9. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/database_account_region.rb +1 -0
  10. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/database_accounts.rb +3264 -715
  11. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/connector_offer.rb +15 -0
  12. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account.rb +24 -0
  13. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_create_update_parameters.rb +24 -0
  14. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_list_keys_result.rb +9 -15
  15. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/location.rb +12 -0
  16. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/throughput.rb +97 -0
  17. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/throughput_resource.rb +46 -0
  18. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/throughput_update_parameters.rb +48 -0
  19. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/partition_key_range_id.rb +1 -0
  20. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/partition_key_range_id_region.rb +1 -0
  21. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/percentile.rb +1 -0
  22. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/percentile_source_target.rb +1 -0
  23. data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/percentile_target.rb +1 -0
  24. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb.rb +41 -0
  25. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/cosmos_dbmanagement_client.rb +142 -0
  26. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/armproxy_resource.rb +73 -0
  27. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/azure_entity_resource.rb +75 -0
  28. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/error_response.rb +57 -0
  29. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/private_endpoint_connection.rb +88 -0
  30. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/private_endpoint_connection_list_result.rb +56 -0
  31. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/private_endpoint_property.rb +46 -0
  32. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/private_link_resource.rb +95 -0
  33. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/private_link_resource_list_result.rb +55 -0
  34. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/private_link_service_connection_state_property.rb +71 -0
  35. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/proxy_resource.rb +63 -0
  36. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/resource.rb +83 -0
  37. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/tracked_resource.rb +92 -0
  38. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/module_definition.rb +9 -0
  39. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/private_endpoint_connections.rb +560 -0
  40. data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/private_link_resources.rb +235 -0
  41. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb.rb +181 -0
  42. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/cassandra_resources.rb +1628 -0
  43. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/collection.rb +374 -0
  44. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/collection_partition.rb +269 -0
  45. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/collection_partition_region.rb +156 -0
  46. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/collection_region.rb +156 -0
  47. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/cosmos_dbmanagement_client.rb +200 -0
  48. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/database.rb +362 -0
  49. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/database_account_region.rb +148 -0
  50. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/database_accounts.rb +2184 -0
  51. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/gremlin_resources.rb +1623 -0
  52. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/armproxy_resource.rb +73 -0
  53. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/armresource_properties.rb +102 -0
  54. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/capability.rb +48 -0
  55. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_create_update_parameters.rb +120 -0
  56. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_get_properties_resource.rb +85 -0
  57. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_get_results.rb +98 -0
  58. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_list_result.rb +58 -0
  59. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_resource.rb +46 -0
  60. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_partition_key.rb +46 -0
  61. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_schema.rb +95 -0
  62. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_create_update_parameters.rb +120 -0
  63. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_get_properties_resource.rb +108 -0
  64. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_get_results.rb +98 -0
  65. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_list_result.rb +58 -0
  66. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_resource.rb +69 -0
  67. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cluster_key.rb +58 -0
  68. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/column.rb +57 -0
  69. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/composite_path.rb +60 -0
  70. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/composite_path_sort_order.rb +16 -0
  71. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/conflict_resolution_mode.rb +16 -0
  72. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/conflict_resolution_policy.rb +73 -0
  73. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/connector_offer.rb +15 -0
  74. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/consistency_policy.rb +86 -0
  75. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/container_partition_key.rb +85 -0
  76. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/data_type.rb +20 -0
  77. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_connection_string.rb +59 -0
  78. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_create_update_parameters.rb +279 -0
  79. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_get_results.rb +371 -0
  80. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_kind.rb +17 -0
  81. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_list_connection_strings_result.rb +57 -0
  82. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_list_keys_result.rb +77 -0
  83. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_list_read_only_keys_result.rb +59 -0
  84. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_offer_type.rb +15 -0
  85. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_regenerate_key_parameters.rb +47 -0
  86. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_update_parameters.rb +230 -0
  87. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_accounts_list_result.rb +58 -0
  88. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/default_consistency_level.rb +19 -0
  89. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/error_response.rb +57 -0
  90. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/excluded_path.rb +48 -0
  91. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/extended_resource_properties.rb +74 -0
  92. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/failover_policies.rb +55 -0
  93. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/failover_policy.rb +79 -0
  94. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_create_update_parameters.rb +120 -0
  95. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_get_properties_resource.rb +85 -0
  96. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_get_results.rb +98 -0
  97. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_list_result.rb +58 -0
  98. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_resource.rb +46 -0
  99. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_create_update_parameters.rb +120 -0
  100. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_get_properties_resource.rb +150 -0
  101. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_get_results.rb +98 -0
  102. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_list_result.rb +58 -0
  103. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_resource.rb +111 -0
  104. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/included_path.rb +67 -0
  105. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/index_kind.rb +17 -0
  106. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/indexes.rb +73 -0
  107. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/indexing_mode.rb +17 -0
  108. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/indexing_policy.rb +147 -0
  109. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/key_kind.rb +18 -0
  110. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/location.rb +114 -0
  111. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/metric.rb +120 -0
  112. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/metric_availability.rb +60 -0
  113. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/metric_definition.rb +109 -0
  114. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/metric_definitions_list_result.rb +57 -0
  115. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/metric_list_result.rb +56 -0
  116. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/metric_name.rb +59 -0
  117. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/metric_value.rb +107 -0
  118. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_create_update_parameters.rb +120 -0
  119. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_get_properties_resource.rb +125 -0
  120. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_get_results.rb +98 -0
  121. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_list_result.rb +58 -0
  122. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_resource.rb +86 -0
  123. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_create_update_parameters.rb +120 -0
  124. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_get_properties_resource.rb +85 -0
  125. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_get_results.rb +98 -0
  126. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_list_result.rb +58 -0
  127. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_resource.rb +46 -0
  128. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_index.rb +60 -0
  129. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_index_keys.rb +55 -0
  130. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_index_options.rb +57 -0
  131. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/operation.rb +58 -0
  132. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/operation_display.rb +80 -0
  133. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/operation_list_result.rb +101 -0
  134. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/partition_kind.rb +16 -0
  135. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/partition_metric.rb +124 -0
  136. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/partition_metric_list_result.rb +57 -0
  137. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/partition_usage.rb +105 -0
  138. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/partition_usages_result.rb +57 -0
  139. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/percentile_metric.rb +120 -0
  140. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/percentile_metric_list_result.rb +57 -0
  141. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/percentile_metric_value.rb +173 -0
  142. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/primary_aggregation_type.rb +20 -0
  143. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/region_for_online_offline.rb +47 -0
  144. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/spatial_spec.rb +67 -0
  145. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/spatial_type.rb +18 -0
  146. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_container_create_update_parameters.rb +119 -0
  147. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_container_get_properties_resource.rb +150 -0
  148. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_container_get_results.rb +98 -0
  149. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_container_list_result.rb +58 -0
  150. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_container_resource.rb +111 -0
  151. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_database_create_update_parameters.rb +120 -0
  152. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_database_get_properties_resource.rb +109 -0
  153. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_database_get_results.rb +98 -0
  154. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_database_list_result.rb +58 -0
  155. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_database_resource.rb +46 -0
  156. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_create_update_parameters.rb +120 -0
  157. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_get_properties_resource.rb +96 -0
  158. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_get_results.rb +98 -0
  159. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_list_result.rb +58 -0
  160. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_resource.rb +57 -0
  161. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_trigger_create_update_parameters.rb +119 -0
  162. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_trigger_get_properties_resource.rb +121 -0
  163. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_trigger_get_results.rb +98 -0
  164. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_trigger_list_result.rb +58 -0
  165. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_trigger_resource.rb +82 -0
  166. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_create_update_parameters.rb +121 -0
  167. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_get_properties_resource.rb +97 -0
  168. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_get_results.rb +98 -0
  169. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_list_result.rb +58 -0
  170. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_resource.rb +57 -0
  171. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/table_create_update_parameters.rb +119 -0
  172. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/table_get_properties_resource.rb +85 -0
  173. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/table_get_results.rb +98 -0
  174. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/table_list_result.rb +57 -0
  175. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/table_resource.rb +46 -0
  176. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/throughput_settings_get_properties_resource.rb +109 -0
  177. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/throughput_settings_get_results.rb +98 -0
  178. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/throughput_settings_resource.rb +70 -0
  179. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/throughput_settings_update_parameters.rb +99 -0
  180. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/trigger_operation.rb +19 -0
  181. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/trigger_type.rb +16 -0
  182. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/unique_key.rb +56 -0
  183. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/unique_key_policy.rb +58 -0
  184. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/unit_type.rb +21 -0
  185. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/usage.rb +97 -0
  186. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/usages_result.rb +57 -0
  187. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/virtual_network_rule.rb +59 -0
  188. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/module_definition.rb +9 -0
  189. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/mongo_dbresources.rb +1634 -0
  190. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/operations.rb +219 -0
  191. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/partition_key_range_id.rb +156 -0
  192. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/partition_key_range_id_region.rb +163 -0
  193. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/percentile.rb +141 -0
  194. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/percentile_source_target.rb +158 -0
  195. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/percentile_target.rb +148 -0
  196. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/sql_resources.rb +3289 -0
  197. data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/table_resources.rb +804 -0
  198. data/lib/azure_mgmt_cosmosdb.rb +2 -0
  199. data/lib/profiles/latest/modules/cosmosdb_profile_module.rb +502 -296
  200. data/lib/version.rb +1 -1
  201. metadata +183 -5
@@ -0,0 +1,9 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure end
7
+ module Azure::Cosmosdb end
8
+ module Azure::Cosmosdb::Mgmt end
9
+ module Azure::Cosmosdb::Mgmt::V2019_08_01_preview end
@@ -0,0 +1,560 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Cosmosdb::Mgmt::V2019_08_01_preview
7
+ #
8
+ # Azure Cosmos DB Database Service Resource Provider REST API
9
+ #
10
+ class PrivateEndpointConnections
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the PrivateEndpointConnections 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
+ # List all private endpoint connections on a Cosmos DB account.
26
+ #
27
+ # @param resource_group_name [String] The name of the resource group. The name
28
+ # is case insensitive.
29
+ # @param account_name [String] Cosmos DB database account name.
30
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
31
+ # will be added to the HTTP request.
32
+ #
33
+ # @return [PrivateEndpointConnectionListResult] operation results.
34
+ #
35
+ def list_by_database_account(resource_group_name, account_name, custom_headers:nil)
36
+ response = list_by_database_account_async(resource_group_name, account_name, custom_headers:custom_headers).value!
37
+ response.body unless response.nil?
38
+ end
39
+
40
+ #
41
+ # List all private endpoint connections on a Cosmos DB account.
42
+ #
43
+ # @param resource_group_name [String] The name of the resource group. The name
44
+ # is case insensitive.
45
+ # @param account_name [String] Cosmos DB database account name.
46
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
47
+ # will be added to the HTTP request.
48
+ #
49
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
50
+ #
51
+ def list_by_database_account_with_http_info(resource_group_name, account_name, custom_headers:nil)
52
+ list_by_database_account_async(resource_group_name, account_name, custom_headers:custom_headers).value!
53
+ end
54
+
55
+ #
56
+ # List all private endpoint connections on a Cosmos DB account.
57
+ #
58
+ # @param resource_group_name [String] The name of the resource group. The name
59
+ # is case insensitive.
60
+ # @param account_name [String] Cosmos DB database account name.
61
+ # @param [Hash{String => String}] A hash of custom headers that will be added
62
+ # to the HTTP request.
63
+ #
64
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
65
+ #
66
+ def list_by_database_account_async(resource_group_name, account_name, custom_headers:nil)
67
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
68
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
69
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
70
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
71
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
72
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
73
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
74
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
75
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
76
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
77
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
78
+ 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?
79
+
80
+
81
+ request_headers = {}
82
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
83
+
84
+ # Set Headers
85
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
86
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
87
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections'
88
+
89
+ request_url = @base_url || @client.base_url
90
+
91
+ options = {
92
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
93
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
94
+ query_params: {'api-version' => @client.api_version},
95
+ headers: request_headers.merge(custom_headers || {}),
96
+ base_url: request_url
97
+ }
98
+ promise = @client.make_request_async(:get, path_template, options)
99
+
100
+ promise = promise.then do |result|
101
+ http_response = result.response
102
+ status_code = http_response.status
103
+ response_content = http_response.body
104
+ unless status_code == 200
105
+ error_model = JSON.load(response_content)
106
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
107
+ end
108
+
109
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
110
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
111
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
112
+ # Deserialize Response
113
+ if status_code == 200
114
+ begin
115
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
116
+ result_mapper = Azure::Cosmosdb::Mgmt::V2019_08_01_preview::Models::PrivateEndpointConnectionListResult.mapper()
117
+ result.body = @client.deserialize(result_mapper, parsed_response)
118
+ rescue Exception => e
119
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
120
+ end
121
+ end
122
+
123
+ result
124
+ end
125
+
126
+ promise.execute
127
+ end
128
+
129
+ #
130
+ # Gets a private endpoint connection.
131
+ #
132
+ # @param resource_group_name [String] The name of the resource group. The name
133
+ # is case insensitive.
134
+ # @param account_name [String] Cosmos DB database account name.
135
+ # @param private_endpoint_connection_name [String] The name of the private
136
+ # endpoint connection.
137
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
138
+ # will be added to the HTTP request.
139
+ #
140
+ # @return [PrivateEndpointConnection] operation results.
141
+ #
142
+ def get(resource_group_name, account_name, private_endpoint_connection_name, custom_headers:nil)
143
+ response = get_async(resource_group_name, account_name, private_endpoint_connection_name, custom_headers:custom_headers).value!
144
+ response.body unless response.nil?
145
+ end
146
+
147
+ #
148
+ # Gets a private endpoint connection.
149
+ #
150
+ # @param resource_group_name [String] The name of the resource group. The name
151
+ # is case insensitive.
152
+ # @param account_name [String] Cosmos DB database account name.
153
+ # @param private_endpoint_connection_name [String] The name of the private
154
+ # endpoint connection.
155
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
156
+ # will be added to the HTTP request.
157
+ #
158
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
159
+ #
160
+ def get_with_http_info(resource_group_name, account_name, private_endpoint_connection_name, custom_headers:nil)
161
+ get_async(resource_group_name, account_name, private_endpoint_connection_name, custom_headers:custom_headers).value!
162
+ end
163
+
164
+ #
165
+ # Gets a private endpoint connection.
166
+ #
167
+ # @param resource_group_name [String] The name of the resource group. The name
168
+ # is case insensitive.
169
+ # @param account_name [String] Cosmos DB database account name.
170
+ # @param private_endpoint_connection_name [String] The name of the private
171
+ # endpoint connection.
172
+ # @param [Hash{String => String}] A hash of custom headers that will be added
173
+ # to the HTTP request.
174
+ #
175
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
176
+ #
177
+ def get_async(resource_group_name, account_name, private_endpoint_connection_name, custom_headers:nil)
178
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
179
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
180
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
181
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
182
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
183
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
184
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
185
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
186
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
187
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
188
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
189
+ 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?
190
+ fail ArgumentError, 'private_endpoint_connection_name is nil' if private_endpoint_connection_name.nil?
191
+
192
+
193
+ request_headers = {}
194
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
195
+
196
+ # Set Headers
197
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
198
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
199
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}'
200
+
201
+ request_url = @base_url || @client.base_url
202
+
203
+ options = {
204
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
205
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'privateEndpointConnectionName' => private_endpoint_connection_name},
206
+ query_params: {'api-version' => @client.api_version},
207
+ headers: request_headers.merge(custom_headers || {}),
208
+ base_url: request_url
209
+ }
210
+ promise = @client.make_request_async(:get, path_template, options)
211
+
212
+ promise = promise.then do |result|
213
+ http_response = result.response
214
+ status_code = http_response.status
215
+ response_content = http_response.body
216
+ unless status_code == 200
217
+ error_model = JSON.load(response_content)
218
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
219
+ end
220
+
221
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
222
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
223
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
224
+ # Deserialize Response
225
+ if status_code == 200
226
+ begin
227
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
228
+ result_mapper = Azure::Cosmosdb::Mgmt::V2019_08_01_preview::Models::PrivateEndpointConnection.mapper()
229
+ result.body = @client.deserialize(result_mapper, parsed_response)
230
+ rescue Exception => e
231
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
232
+ end
233
+ end
234
+
235
+ result
236
+ end
237
+
238
+ promise.execute
239
+ end
240
+
241
+ #
242
+ # Approve or reject a private endpoint connection with a given name.
243
+ #
244
+ # @param resource_group_name [String] The name of the resource group. The name
245
+ # is case insensitive.
246
+ # @param account_name [String] Cosmos DB database account name.
247
+ # @param private_endpoint_connection_name [String] The name of the private
248
+ # endpoint connection.
249
+ # @param parameters [PrivateEndpointConnection]
250
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
251
+ # will be added to the HTTP request.
252
+ #
253
+ # @return [PrivateEndpointConnection] operation results.
254
+ #
255
+ def create_or_update(resource_group_name, account_name, private_endpoint_connection_name, parameters, custom_headers:nil)
256
+ response = create_or_update_async(resource_group_name, account_name, private_endpoint_connection_name, parameters, custom_headers:custom_headers).value!
257
+ response.body unless response.nil?
258
+ end
259
+
260
+ #
261
+ # @param resource_group_name [String] The name of the resource group. The name
262
+ # is case insensitive.
263
+ # @param account_name [String] Cosmos DB database account name.
264
+ # @param private_endpoint_connection_name [String] The name of the private
265
+ # endpoint connection.
266
+ # @param parameters [PrivateEndpointConnection]
267
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
268
+ # will be added to the HTTP request.
269
+ #
270
+ # @return [Concurrent::Promise] promise which provides async access to http
271
+ # response.
272
+ #
273
+ def create_or_update_async(resource_group_name, account_name, private_endpoint_connection_name, parameters, custom_headers:nil)
274
+ # Send request
275
+ promise = begin_create_or_update_async(resource_group_name, account_name, private_endpoint_connection_name, parameters, custom_headers:custom_headers)
276
+
277
+ promise = promise.then do |response|
278
+ # Defining deserialization method.
279
+ deserialize_method = lambda do |parsed_response|
280
+ result_mapper = Azure::Cosmosdb::Mgmt::V2019_08_01_preview::Models::PrivateEndpointConnection.mapper()
281
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
282
+ end
283
+
284
+ # Waiting for response.
285
+ @client.get_long_running_operation_result(response, deserialize_method)
286
+ end
287
+
288
+ promise
289
+ end
290
+
291
+ #
292
+ # Deletes a private endpoint connection with a given name.
293
+ #
294
+ # @param resource_group_name [String] The name of the resource group. The name
295
+ # is case insensitive.
296
+ # @param account_name [String] Cosmos DB database account name.
297
+ # @param private_endpoint_connection_name [String] The name of the private
298
+ # endpoint connection.
299
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
300
+ # will be added to the HTTP request.
301
+ #
302
+ def delete(resource_group_name, account_name, private_endpoint_connection_name, custom_headers:nil)
303
+ response = delete_async(resource_group_name, account_name, private_endpoint_connection_name, custom_headers:custom_headers).value!
304
+ nil
305
+ end
306
+
307
+ #
308
+ # @param resource_group_name [String] The name of the resource group. The name
309
+ # is case insensitive.
310
+ # @param account_name [String] Cosmos DB database account name.
311
+ # @param private_endpoint_connection_name [String] The name of the private
312
+ # endpoint connection.
313
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
314
+ # will be added to the HTTP request.
315
+ #
316
+ # @return [Concurrent::Promise] promise which provides async access to http
317
+ # response.
318
+ #
319
+ def delete_async(resource_group_name, account_name, private_endpoint_connection_name, custom_headers:nil)
320
+ # Send request
321
+ promise = begin_delete_async(resource_group_name, account_name, private_endpoint_connection_name, custom_headers:custom_headers)
322
+
323
+ promise = promise.then do |response|
324
+ # Defining deserialization method.
325
+ deserialize_method = lambda do |parsed_response|
326
+ end
327
+
328
+ # Waiting for response.
329
+ @client.get_long_running_operation_result(response, deserialize_method)
330
+ end
331
+
332
+ promise
333
+ end
334
+
335
+ #
336
+ # Approve or reject a private endpoint connection with a given name.
337
+ #
338
+ # @param resource_group_name [String] The name of the resource group. The name
339
+ # is case insensitive.
340
+ # @param account_name [String] Cosmos DB database account name.
341
+ # @param private_endpoint_connection_name [String] The name of the private
342
+ # endpoint connection.
343
+ # @param parameters [PrivateEndpointConnection]
344
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
345
+ # will be added to the HTTP request.
346
+ #
347
+ # @return [PrivateEndpointConnection] operation results.
348
+ #
349
+ def begin_create_or_update(resource_group_name, account_name, private_endpoint_connection_name, parameters, custom_headers:nil)
350
+ response = begin_create_or_update_async(resource_group_name, account_name, private_endpoint_connection_name, parameters, custom_headers:custom_headers).value!
351
+ response.body unless response.nil?
352
+ end
353
+
354
+ #
355
+ # Approve or reject a private endpoint connection with a given name.
356
+ #
357
+ # @param resource_group_name [String] The name of the resource group. The name
358
+ # is case insensitive.
359
+ # @param account_name [String] Cosmos DB database account name.
360
+ # @param private_endpoint_connection_name [String] The name of the private
361
+ # endpoint connection.
362
+ # @param parameters [PrivateEndpointConnection]
363
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
364
+ # will be added to the HTTP request.
365
+ #
366
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
367
+ #
368
+ def begin_create_or_update_with_http_info(resource_group_name, account_name, private_endpoint_connection_name, parameters, custom_headers:nil)
369
+ begin_create_or_update_async(resource_group_name, account_name, private_endpoint_connection_name, parameters, custom_headers:custom_headers).value!
370
+ end
371
+
372
+ #
373
+ # Approve or reject a private endpoint connection with a given name.
374
+ #
375
+ # @param resource_group_name [String] The name of the resource group. The name
376
+ # is case insensitive.
377
+ # @param account_name [String] Cosmos DB database account name.
378
+ # @param private_endpoint_connection_name [String] The name of the private
379
+ # endpoint connection.
380
+ # @param parameters [PrivateEndpointConnection]
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 begin_create_or_update_async(resource_group_name, account_name, private_endpoint_connection_name, parameters, 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, '@client.api_version is nil' if @client.api_version.nil?
394
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
395
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
396
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
397
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
398
+ 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?
399
+ fail ArgumentError, 'private_endpoint_connection_name is nil' if private_endpoint_connection_name.nil?
400
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
401
+
402
+
403
+ request_headers = {}
404
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
405
+
406
+ # Set Headers
407
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
408
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
409
+
410
+ # Serialize Request
411
+ request_mapper = Azure::Cosmosdb::Mgmt::V2019_08_01_preview::Models::PrivateEndpointConnection.mapper()
412
+ request_content = @client.serialize(request_mapper, parameters)
413
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
414
+
415
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}'
416
+
417
+ request_url = @base_url || @client.base_url
418
+
419
+ options = {
420
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
421
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'privateEndpointConnectionName' => private_endpoint_connection_name},
422
+ query_params: {'api-version' => @client.api_version},
423
+ body: request_content,
424
+ headers: request_headers.merge(custom_headers || {}),
425
+ base_url: request_url
426
+ }
427
+ promise = @client.make_request_async(:put, path_template, options)
428
+
429
+ promise = promise.then do |result|
430
+ http_response = result.response
431
+ status_code = http_response.status
432
+ response_content = http_response.body
433
+ unless status_code == 200 || status_code == 202
434
+ error_model = JSON.load(response_content)
435
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
436
+ end
437
+
438
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
439
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
440
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
441
+ # Deserialize Response
442
+ if status_code == 200
443
+ begin
444
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
445
+ result_mapper = Azure::Cosmosdb::Mgmt::V2019_08_01_preview::Models::PrivateEndpointConnection.mapper()
446
+ result.body = @client.deserialize(result_mapper, parsed_response)
447
+ rescue Exception => e
448
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
449
+ end
450
+ end
451
+
452
+ result
453
+ end
454
+
455
+ promise.execute
456
+ end
457
+
458
+ #
459
+ # Deletes a private endpoint connection with a given name.
460
+ #
461
+ # @param resource_group_name [String] The name of the resource group. The name
462
+ # is case insensitive.
463
+ # @param account_name [String] Cosmos DB database account name.
464
+ # @param private_endpoint_connection_name [String] The name of the private
465
+ # endpoint connection.
466
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
467
+ # will be added to the HTTP request.
468
+ #
469
+ #
470
+ def begin_delete(resource_group_name, account_name, private_endpoint_connection_name, custom_headers:nil)
471
+ response = begin_delete_async(resource_group_name, account_name, private_endpoint_connection_name, custom_headers:custom_headers).value!
472
+ nil
473
+ end
474
+
475
+ #
476
+ # Deletes a private endpoint connection with a given name.
477
+ #
478
+ # @param resource_group_name [String] The name of the resource group. The name
479
+ # is case insensitive.
480
+ # @param account_name [String] Cosmos DB database account name.
481
+ # @param private_endpoint_connection_name [String] The name of the private
482
+ # endpoint connection.
483
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
484
+ # will be added to the HTTP request.
485
+ #
486
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
487
+ #
488
+ def begin_delete_with_http_info(resource_group_name, account_name, private_endpoint_connection_name, custom_headers:nil)
489
+ begin_delete_async(resource_group_name, account_name, private_endpoint_connection_name, custom_headers:custom_headers).value!
490
+ end
491
+
492
+ #
493
+ # Deletes a private endpoint connection with a given name.
494
+ #
495
+ # @param resource_group_name [String] The name of the resource group. The name
496
+ # is case insensitive.
497
+ # @param account_name [String] Cosmos DB database account name.
498
+ # @param private_endpoint_connection_name [String] The name of the private
499
+ # endpoint connection.
500
+ # @param [Hash{String => String}] A hash of custom headers that will be added
501
+ # to the HTTP request.
502
+ #
503
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
504
+ #
505
+ def begin_delete_async(resource_group_name, account_name, private_endpoint_connection_name, custom_headers:nil)
506
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
507
+ fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
508
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
509
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
510
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
511
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
512
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
513
+ fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
514
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
515
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
516
+ fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
517
+ 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?
518
+ fail ArgumentError, 'private_endpoint_connection_name is nil' if private_endpoint_connection_name.nil?
519
+
520
+
521
+ request_headers = {}
522
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
523
+
524
+ # Set Headers
525
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
526
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
527
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}'
528
+
529
+ request_url = @base_url || @client.base_url
530
+
531
+ options = {
532
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
533
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'privateEndpointConnectionName' => private_endpoint_connection_name},
534
+ query_params: {'api-version' => @client.api_version},
535
+ headers: request_headers.merge(custom_headers || {}),
536
+ base_url: request_url
537
+ }
538
+ promise = @client.make_request_async(:delete, path_template, options)
539
+
540
+ promise = promise.then do |result|
541
+ http_response = result.response
542
+ status_code = http_response.status
543
+ response_content = http_response.body
544
+ unless status_code == 202 || status_code == 204
545
+ error_model = JSON.load(response_content)
546
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
547
+ end
548
+
549
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
550
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
551
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
552
+
553
+ result
554
+ end
555
+
556
+ promise.execute
557
+ end
558
+
559
+ end
560
+ end