azure_mgmt_cosmosdb 0.18.0 → 0.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/LICENSE.txt +20 -20
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/collection.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/collection_partition.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/collection_partition_region.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/collection_region.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/cosmos_db.rb +1 -1
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/database.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/database_account_region.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/database_accounts.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/capability.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_create_update_parameters.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_list_result.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_resource.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_partition_key.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_schema.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_table.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_table_create_update_parameters.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_table_list_result.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_table_resource.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cluster_key.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/column.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/conflict_resolution_mode.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/conflict_resolution_policy.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/connector_offer.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/consistency_policy.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/container_partition_key.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/data_type.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_connection_string.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_create_update_parameters.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_kind.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_list_connection_strings_result.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_list_keys_result.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_list_read_only_keys_result.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_offer_type.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_patch_parameters.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_regenerate_key_parameters.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_accounts_list_result.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/default_consistency_level.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/error_response.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/excluded_path.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/extended_resource_properties.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/failover_policies.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/failover_policy.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/gremlin_database.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/gremlin_database_create_update_parameters.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/gremlin_database_list_result.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/gremlin_database_resource.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/gremlin_graph.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/gremlin_graph_create_update_parameters.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/gremlin_graph_list_result.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/gremlin_graph_resource.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/included_path.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/index_kind.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/indexes.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/indexing_mode.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/indexing_policy.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/key_kind.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/location.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/metric.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/metric_availability.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/metric_definition.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/metric_definitions_list_result.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/metric_list_result.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/metric_name.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/metric_value.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_create_update_parameters.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_list_result.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_resource.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_create_update_parameters.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_list_result.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_resource.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_index.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_index_keys.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_index_options.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/operation.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/operation_display.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/operation_list_result.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/partition_kind.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/partition_metric.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/partition_metric_list_result.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/partition_usage.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/partition_usages_result.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/percentile_metric.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/percentile_metric_list_result.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/percentile_metric_value.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/primary_aggregation_type.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/region_for_online_offline.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/resource.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/sql_container.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/sql_container_create_update_parameters.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/sql_container_list_result.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/sql_container_resource.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/sql_database.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/sql_database_create_update_parameters.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/sql_database_list_result.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/sql_database_resource.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/table.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/table_create_update_parameters.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/table_list_result.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/table_resource.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/throughput.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/throughput_resource.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/throughput_update_parameters.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/unique_key.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/unique_key_policy.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/unit_type.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/usage.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/usages_result.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/virtual_network_rule.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/module_definition.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/operations.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/partition_key_range_id.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/partition_key_range_id_region.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/percentile.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/percentile_source_target.rb +0 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/percentile_target.rb +0 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb.rb +41 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/cosmos_db.rb +142 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/armproxy_resource.rb +73 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/azure_entity_resource.rb +75 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/error_response.rb +57 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/private_endpoint_connection.rb +88 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/private_endpoint_connection_list_result.rb +56 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/private_endpoint_property.rb +46 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/private_link_resource.rb +95 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/private_link_resource_list_result.rb +55 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/private_link_service_connection_state_property.rb +71 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/proxy_resource.rb +63 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/resource.rb +83 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/models/tracked_resource.rb +92 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/module_definition.rb +9 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/private_endpoint_connections.rb +560 -0
- data/lib/2019-08-01-preview/generated/azure_mgmt_cosmosdb/private_link_resources.rb +235 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb.rb +164 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/cassandra_resources.rb +1628 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/collection.rb +374 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/collection_partition.rb +269 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/collection_partition_region.rb +156 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/collection_region.rb +156 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/cosmos_db.rb +200 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/database.rb +362 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/database_account_region.rb +148 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/database_accounts.rb +2184 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/gremlin_resources.rb +1623 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/armproxy_resource.rb +73 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/armresource_properties.rb +102 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/capability.rb +48 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_create_update_parameters.rb +120 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_get_results.rb +135 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_list_result.rb +58 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_resource.rb +46 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_partition_key.rb +46 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_schema.rb +95 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_create_update_parameters.rb +120 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_get_results.rb +158 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_list_result.rb +58 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cassandra_table_resource.rb +69 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/cluster_key.rb +58 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/column.rb +57 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/conflict_resolution_mode.rb +16 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/conflict_resolution_policy.rb +73 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/connector_offer.rb +15 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/consistency_policy.rb +86 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/container_partition_key.rb +85 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/data_type.rb +20 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_connection_string.rb +59 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_create_update_parameters.rb +279 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_get_results.rb +371 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_kind.rb +17 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_list_connection_strings_result.rb +57 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_list_keys_result.rb +77 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_list_read_only_keys_result.rb +59 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_offer_type.rb +15 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_regenerate_key_parameters.rb +47 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_account_update_parameters.rb +230 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/database_accounts_list_result.rb +58 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/default_consistency_level.rb +19 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/error_response.rb +57 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/excluded_path.rb +48 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/extended_resource_properties.rb +74 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/failover_policies.rb +55 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/failover_policy.rb +79 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_create_update_parameters.rb +120 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_get_results.rb +135 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_list_result.rb +58 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_database_resource.rb +46 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_create_update_parameters.rb +120 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_get_results.rb +200 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_list_result.rb +58 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/gremlin_graph_resource.rb +111 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/included_path.rb +67 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/index_kind.rb +17 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/indexes.rb +73 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/indexing_mode.rb +17 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/indexing_policy.rb +99 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/key_kind.rb +18 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/location.rb +114 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/metric.rb +120 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/metric_availability.rb +60 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/metric_definition.rb +109 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/metric_definitions_list_result.rb +57 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/metric_list_result.rb +56 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/metric_name.rb +59 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/metric_value.rb +107 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_create_update_parameters.rb +120 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_get_results.rb +175 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_list_result.rb +58 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_resource.rb +86 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_create_update_parameters.rb +120 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_get_results.rb +135 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_list_result.rb +58 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_resource.rb +46 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_index.rb +60 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_index_keys.rb +55 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/mongo_index_options.rb +57 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/operation.rb +58 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/operation_display.rb +80 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/operation_list_result.rb +101 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/partition_kind.rb +16 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/partition_metric.rb +124 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/partition_metric_list_result.rb +57 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/partition_usage.rb +105 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/partition_usages_result.rb +57 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/percentile_metric.rb +120 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/percentile_metric_list_result.rb +57 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/percentile_metric_value.rb +173 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/primary_aggregation_type.rb +20 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/region_for_online_offline.rb +47 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_container_create_update_parameters.rb +119 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_container_get_results.rb +200 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_container_list_result.rb +58 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_container_resource.rb +111 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_database_create_update_parameters.rb +120 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_database_get_results.rb +159 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_database_list_result.rb +58 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_database_resource.rb +46 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_create_update_parameters.rb +120 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_get_results.rb +146 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_list_result.rb +58 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_stored_procedure_resource.rb +57 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_trigger_create_update_parameters.rb +119 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_trigger_get_results.rb +171 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_trigger_list_result.rb +58 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_trigger_resource.rb +82 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_create_update_parameters.rb +121 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_get_results.rb +146 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_list_result.rb +58 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/sql_user_defined_function_resource.rb +57 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/table_create_update_parameters.rb +119 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/table_get_results.rb +135 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/table_list_result.rb +57 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/table_resource.rb +46 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/throughput_settings_get_results.rb +121 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/throughput_settings_resource.rb +70 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/throughput_settings_update_parameters.rb +99 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/trigger_operation.rb +19 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/trigger_type.rb +16 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/unique_key.rb +56 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/unique_key_policy.rb +58 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/unit_type.rb +21 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/usage.rb +97 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/usages_result.rb +57 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/models/virtual_network_rule.rb +59 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/module_definition.rb +9 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/mongo_dbresources.rb +1634 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/operations.rb +219 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/partition_key_range_id.rb +156 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/partition_key_range_id_region.rb +163 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/percentile.rb +141 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/percentile_source_target.rb +158 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/percentile_target.rb +148 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/sql_resources.rb +3289 -0
- data/lib/2019-08-01/generated/azure_mgmt_cosmosdb/table_resources.rb +804 -0
- data/lib/azure_mgmt_cosmosdb.rb +8 -6
- data/lib/module_definition.rb +7 -7
- data/lib/profiles/latest/cosmosdb_latest_profile_client.rb +40 -40
- data/lib/profiles/latest/cosmosdb_module_definition.rb +8 -8
- data/lib/profiles/latest/modules/cosmosdb_profile_module.rb +571 -501
- data/lib/version.rb +1 -1
- metadata +160 -3
@@ -0,0 +1,374 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Cosmosdb::Mgmt::V2019_08_01
|
7
|
+
#
|
8
|
+
# Azure Cosmos DB Database Service Resource Provider REST API
|
9
|
+
#
|
10
|
+
class Collection
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the Collection class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [CosmosDB] reference to the CosmosDB
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Retrieves the metrics determined by the given filter for the given database
|
26
|
+
# account and collection.
|
27
|
+
#
|
28
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
29
|
+
# @param account_name [String] Cosmos DB database account name.
|
30
|
+
# @param database_rid [String] Cosmos DB database rid.
|
31
|
+
# @param collection_rid [String] Cosmos DB collection rid.
|
32
|
+
# @param filter [String] An OData filter expression that describes a subset of
|
33
|
+
# metrics to return. The parameters that can be filtered are name.value (name
|
34
|
+
# of the metric, can have an or of multiple names), startTime, endTime, and
|
35
|
+
# timeGrain. The supported operator is eq.
|
36
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
37
|
+
# will be added to the HTTP request.
|
38
|
+
#
|
39
|
+
# @return [MetricListResult] operation results.
|
40
|
+
#
|
41
|
+
def list_metrics(resource_group_name, account_name, database_rid, collection_rid, filter, custom_headers:nil)
|
42
|
+
response = list_metrics_async(resource_group_name, account_name, database_rid, collection_rid, filter, custom_headers:custom_headers).value!
|
43
|
+
response.body unless response.nil?
|
44
|
+
end
|
45
|
+
|
46
|
+
#
|
47
|
+
# Retrieves the metrics determined by the given filter for the given database
|
48
|
+
# account and collection.
|
49
|
+
#
|
50
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
51
|
+
# @param account_name [String] Cosmos DB database account name.
|
52
|
+
# @param database_rid [String] Cosmos DB database rid.
|
53
|
+
# @param collection_rid [String] Cosmos DB collection rid.
|
54
|
+
# @param filter [String] An OData filter expression that describes a subset of
|
55
|
+
# metrics to return. The parameters that can be filtered are name.value (name
|
56
|
+
# of the metric, can have an or of multiple names), startTime, endTime, and
|
57
|
+
# timeGrain. The supported operator is eq.
|
58
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
59
|
+
# will be added to the HTTP request.
|
60
|
+
#
|
61
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
62
|
+
#
|
63
|
+
def list_metrics_with_http_info(resource_group_name, account_name, database_rid, collection_rid, filter, custom_headers:nil)
|
64
|
+
list_metrics_async(resource_group_name, account_name, database_rid, collection_rid, filter, custom_headers:custom_headers).value!
|
65
|
+
end
|
66
|
+
|
67
|
+
#
|
68
|
+
# Retrieves the metrics determined by the given filter for the given database
|
69
|
+
# account and collection.
|
70
|
+
#
|
71
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
72
|
+
# @param account_name [String] Cosmos DB database account name.
|
73
|
+
# @param database_rid [String] Cosmos DB database rid.
|
74
|
+
# @param collection_rid [String] Cosmos DB collection rid.
|
75
|
+
# @param filter [String] An OData filter expression that describes a subset of
|
76
|
+
# metrics to return. The parameters that can be filtered are name.value (name
|
77
|
+
# of the metric, can have an or of multiple names), startTime, endTime, and
|
78
|
+
# timeGrain. The supported operator is eq.
|
79
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
80
|
+
# to the HTTP request.
|
81
|
+
#
|
82
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
83
|
+
#
|
84
|
+
def list_metrics_async(resource_group_name, account_name, database_rid, collection_rid, filter, custom_headers:nil)
|
85
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
86
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
87
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
88
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
89
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
90
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
91
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
|
92
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
93
|
+
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?
|
94
|
+
fail ArgumentError, 'database_rid is nil' if database_rid.nil?
|
95
|
+
fail ArgumentError, 'collection_rid is nil' if collection_rid.nil?
|
96
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
97
|
+
fail ArgumentError, 'filter is nil' if filter.nil?
|
98
|
+
|
99
|
+
|
100
|
+
request_headers = {}
|
101
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
102
|
+
|
103
|
+
# Set Headers
|
104
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
105
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
106
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/metrics'
|
107
|
+
|
108
|
+
request_url = @base_url || @client.base_url
|
109
|
+
|
110
|
+
options = {
|
111
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
112
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'databaseRid' => database_rid,'collectionRid' => collection_rid},
|
113
|
+
query_params: {'api-version' => @client.api_version,'$filter' => filter},
|
114
|
+
headers: request_headers.merge(custom_headers || {}),
|
115
|
+
base_url: request_url
|
116
|
+
}
|
117
|
+
promise = @client.make_request_async(:get, path_template, options)
|
118
|
+
|
119
|
+
promise = promise.then do |result|
|
120
|
+
http_response = result.response
|
121
|
+
status_code = http_response.status
|
122
|
+
response_content = http_response.body
|
123
|
+
unless status_code == 200
|
124
|
+
error_model = JSON.load(response_content)
|
125
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
126
|
+
end
|
127
|
+
|
128
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
129
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
130
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
131
|
+
# Deserialize Response
|
132
|
+
if status_code == 200
|
133
|
+
begin
|
134
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
135
|
+
result_mapper = Azure::Cosmosdb::Mgmt::V2019_08_01::Models::MetricListResult.mapper()
|
136
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
137
|
+
rescue Exception => e
|
138
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
result
|
143
|
+
end
|
144
|
+
|
145
|
+
promise.execute
|
146
|
+
end
|
147
|
+
|
148
|
+
#
|
149
|
+
# Retrieves the usages (most recent storage data) for the given collection.
|
150
|
+
#
|
151
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
152
|
+
# @param account_name [String] Cosmos DB database account name.
|
153
|
+
# @param database_rid [String] Cosmos DB database rid.
|
154
|
+
# @param collection_rid [String] Cosmos DB collection rid.
|
155
|
+
# @param filter [String] An OData filter expression that describes a subset of
|
156
|
+
# usages to return. The supported parameter is name.value (name of the metric,
|
157
|
+
# can have an or of multiple names).
|
158
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
159
|
+
# will be added to the HTTP request.
|
160
|
+
#
|
161
|
+
# @return [UsagesResult] operation results.
|
162
|
+
#
|
163
|
+
def list_usages(resource_group_name, account_name, database_rid, collection_rid, filter:nil, custom_headers:nil)
|
164
|
+
response = list_usages_async(resource_group_name, account_name, database_rid, collection_rid, filter:filter, custom_headers:custom_headers).value!
|
165
|
+
response.body unless response.nil?
|
166
|
+
end
|
167
|
+
|
168
|
+
#
|
169
|
+
# Retrieves the usages (most recent storage data) for the given collection.
|
170
|
+
#
|
171
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
172
|
+
# @param account_name [String] Cosmos DB database account name.
|
173
|
+
# @param database_rid [String] Cosmos DB database rid.
|
174
|
+
# @param collection_rid [String] Cosmos DB collection rid.
|
175
|
+
# @param filter [String] An OData filter expression that describes a subset of
|
176
|
+
# usages to return. The supported parameter is name.value (name of the metric,
|
177
|
+
# can have an or of multiple names).
|
178
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
179
|
+
# will be added to the HTTP request.
|
180
|
+
#
|
181
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
182
|
+
#
|
183
|
+
def list_usages_with_http_info(resource_group_name, account_name, database_rid, collection_rid, filter:nil, custom_headers:nil)
|
184
|
+
list_usages_async(resource_group_name, account_name, database_rid, collection_rid, filter:filter, custom_headers:custom_headers).value!
|
185
|
+
end
|
186
|
+
|
187
|
+
#
|
188
|
+
# Retrieves the usages (most recent storage data) for the given collection.
|
189
|
+
#
|
190
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
191
|
+
# @param account_name [String] Cosmos DB database account name.
|
192
|
+
# @param database_rid [String] Cosmos DB database rid.
|
193
|
+
# @param collection_rid [String] Cosmos DB collection rid.
|
194
|
+
# @param filter [String] An OData filter expression that describes a subset of
|
195
|
+
# usages to return. The supported parameter is name.value (name of the metric,
|
196
|
+
# can have an or of multiple names).
|
197
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
198
|
+
# to the HTTP request.
|
199
|
+
#
|
200
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
201
|
+
#
|
202
|
+
def list_usages_async(resource_group_name, account_name, database_rid, collection_rid, filter:nil, custom_headers:nil)
|
203
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
204
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
205
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
206
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
207
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
208
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
209
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
|
210
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
211
|
+
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?
|
212
|
+
fail ArgumentError, 'database_rid is nil' if database_rid.nil?
|
213
|
+
fail ArgumentError, 'collection_rid is nil' if collection_rid.nil?
|
214
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
215
|
+
|
216
|
+
|
217
|
+
request_headers = {}
|
218
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
219
|
+
|
220
|
+
# Set Headers
|
221
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
222
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
223
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/usages'
|
224
|
+
|
225
|
+
request_url = @base_url || @client.base_url
|
226
|
+
|
227
|
+
options = {
|
228
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
229
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'databaseRid' => database_rid,'collectionRid' => collection_rid},
|
230
|
+
query_params: {'api-version' => @client.api_version,'$filter' => filter},
|
231
|
+
headers: request_headers.merge(custom_headers || {}),
|
232
|
+
base_url: request_url
|
233
|
+
}
|
234
|
+
promise = @client.make_request_async(:get, path_template, options)
|
235
|
+
|
236
|
+
promise = promise.then do |result|
|
237
|
+
http_response = result.response
|
238
|
+
status_code = http_response.status
|
239
|
+
response_content = http_response.body
|
240
|
+
unless status_code == 200
|
241
|
+
error_model = JSON.load(response_content)
|
242
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
243
|
+
end
|
244
|
+
|
245
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
246
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
247
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
248
|
+
# Deserialize Response
|
249
|
+
if status_code == 200
|
250
|
+
begin
|
251
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
252
|
+
result_mapper = Azure::Cosmosdb::Mgmt::V2019_08_01::Models::UsagesResult.mapper()
|
253
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
254
|
+
rescue Exception => e
|
255
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
256
|
+
end
|
257
|
+
end
|
258
|
+
|
259
|
+
result
|
260
|
+
end
|
261
|
+
|
262
|
+
promise.execute
|
263
|
+
end
|
264
|
+
|
265
|
+
#
|
266
|
+
# Retrieves metric definitions for the given collection.
|
267
|
+
#
|
268
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
269
|
+
# @param account_name [String] Cosmos DB database account name.
|
270
|
+
# @param database_rid [String] Cosmos DB database rid.
|
271
|
+
# @param collection_rid [String] Cosmos DB collection rid.
|
272
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
273
|
+
# will be added to the HTTP request.
|
274
|
+
#
|
275
|
+
# @return [MetricDefinitionsListResult] operation results.
|
276
|
+
#
|
277
|
+
def list_metric_definitions(resource_group_name, account_name, database_rid, collection_rid, custom_headers:nil)
|
278
|
+
response = list_metric_definitions_async(resource_group_name, account_name, database_rid, collection_rid, custom_headers:custom_headers).value!
|
279
|
+
response.body unless response.nil?
|
280
|
+
end
|
281
|
+
|
282
|
+
#
|
283
|
+
# Retrieves metric definitions for the given collection.
|
284
|
+
#
|
285
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
286
|
+
# @param account_name [String] Cosmos DB database account name.
|
287
|
+
# @param database_rid [String] Cosmos DB database rid.
|
288
|
+
# @param collection_rid [String] Cosmos DB collection rid.
|
289
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
290
|
+
# will be added to the HTTP request.
|
291
|
+
#
|
292
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
293
|
+
#
|
294
|
+
def list_metric_definitions_with_http_info(resource_group_name, account_name, database_rid, collection_rid, custom_headers:nil)
|
295
|
+
list_metric_definitions_async(resource_group_name, account_name, database_rid, collection_rid, custom_headers:custom_headers).value!
|
296
|
+
end
|
297
|
+
|
298
|
+
#
|
299
|
+
# Retrieves metric definitions for the given collection.
|
300
|
+
#
|
301
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
302
|
+
# @param account_name [String] Cosmos DB database account name.
|
303
|
+
# @param database_rid [String] Cosmos DB database rid.
|
304
|
+
# @param collection_rid [String] Cosmos DB collection rid.
|
305
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
306
|
+
# to the HTTP request.
|
307
|
+
#
|
308
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
309
|
+
#
|
310
|
+
def list_metric_definitions_async(resource_group_name, account_name, database_rid, collection_rid, custom_headers:nil)
|
311
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
312
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
313
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
314
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
315
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
316
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
317
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
|
318
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
319
|
+
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?
|
320
|
+
fail ArgumentError, 'database_rid is nil' if database_rid.nil?
|
321
|
+
fail ArgumentError, 'collection_rid is nil' if collection_rid.nil?
|
322
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
323
|
+
|
324
|
+
|
325
|
+
request_headers = {}
|
326
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
327
|
+
|
328
|
+
# Set Headers
|
329
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
330
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
331
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/metricDefinitions'
|
332
|
+
|
333
|
+
request_url = @base_url || @client.base_url
|
334
|
+
|
335
|
+
options = {
|
336
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
337
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'databaseRid' => database_rid,'collectionRid' => collection_rid},
|
338
|
+
query_params: {'api-version' => @client.api_version},
|
339
|
+
headers: request_headers.merge(custom_headers || {}),
|
340
|
+
base_url: request_url
|
341
|
+
}
|
342
|
+
promise = @client.make_request_async(:get, path_template, options)
|
343
|
+
|
344
|
+
promise = promise.then do |result|
|
345
|
+
http_response = result.response
|
346
|
+
status_code = http_response.status
|
347
|
+
response_content = http_response.body
|
348
|
+
unless status_code == 200
|
349
|
+
error_model = JSON.load(response_content)
|
350
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
351
|
+
end
|
352
|
+
|
353
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
354
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
355
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
356
|
+
# Deserialize Response
|
357
|
+
if status_code == 200
|
358
|
+
begin
|
359
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
360
|
+
result_mapper = Azure::Cosmosdb::Mgmt::V2019_08_01::Models::MetricDefinitionsListResult.mapper()
|
361
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
362
|
+
rescue Exception => e
|
363
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
364
|
+
end
|
365
|
+
end
|
366
|
+
|
367
|
+
result
|
368
|
+
end
|
369
|
+
|
370
|
+
promise.execute
|
371
|
+
end
|
372
|
+
|
373
|
+
end
|
374
|
+
end
|
@@ -0,0 +1,269 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::Cosmosdb::Mgmt::V2019_08_01
|
7
|
+
#
|
8
|
+
# Azure Cosmos DB Database Service Resource Provider REST API
|
9
|
+
#
|
10
|
+
class CollectionPartition
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the CollectionPartition class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [CosmosDB] reference to the CosmosDB
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Retrieves the metrics determined by the given filter for the given
|
26
|
+
# collection, split by partition.
|
27
|
+
#
|
28
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
29
|
+
# @param account_name [String] Cosmos DB database account name.
|
30
|
+
# @param database_rid [String] Cosmos DB database rid.
|
31
|
+
# @param collection_rid [String] Cosmos DB collection rid.
|
32
|
+
# @param filter [String] An OData filter expression that describes a subset of
|
33
|
+
# metrics to return. The parameters that can be filtered are name.value (name
|
34
|
+
# of the metric, can have an or of multiple names), startTime, endTime, and
|
35
|
+
# timeGrain. The supported operator is eq.
|
36
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
37
|
+
# will be added to the HTTP request.
|
38
|
+
#
|
39
|
+
# @return [PartitionMetricListResult] operation results.
|
40
|
+
#
|
41
|
+
def list_metrics(resource_group_name, account_name, database_rid, collection_rid, filter, custom_headers:nil)
|
42
|
+
response = list_metrics_async(resource_group_name, account_name, database_rid, collection_rid, filter, custom_headers:custom_headers).value!
|
43
|
+
response.body unless response.nil?
|
44
|
+
end
|
45
|
+
|
46
|
+
#
|
47
|
+
# Retrieves the metrics determined by the given filter for the given
|
48
|
+
# collection, split by partition.
|
49
|
+
#
|
50
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
51
|
+
# @param account_name [String] Cosmos DB database account name.
|
52
|
+
# @param database_rid [String] Cosmos DB database rid.
|
53
|
+
# @param collection_rid [String] Cosmos DB collection rid.
|
54
|
+
# @param filter [String] An OData filter expression that describes a subset of
|
55
|
+
# metrics to return. The parameters that can be filtered are name.value (name
|
56
|
+
# of the metric, can have an or of multiple names), startTime, endTime, and
|
57
|
+
# timeGrain. The supported operator is eq.
|
58
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
59
|
+
# will be added to the HTTP request.
|
60
|
+
#
|
61
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
62
|
+
#
|
63
|
+
def list_metrics_with_http_info(resource_group_name, account_name, database_rid, collection_rid, filter, custom_headers:nil)
|
64
|
+
list_metrics_async(resource_group_name, account_name, database_rid, collection_rid, filter, custom_headers:custom_headers).value!
|
65
|
+
end
|
66
|
+
|
67
|
+
#
|
68
|
+
# Retrieves the metrics determined by the given filter for the given
|
69
|
+
# collection, split by partition.
|
70
|
+
#
|
71
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
72
|
+
# @param account_name [String] Cosmos DB database account name.
|
73
|
+
# @param database_rid [String] Cosmos DB database rid.
|
74
|
+
# @param collection_rid [String] Cosmos DB collection rid.
|
75
|
+
# @param filter [String] An OData filter expression that describes a subset of
|
76
|
+
# metrics to return. The parameters that can be filtered are name.value (name
|
77
|
+
# of the metric, can have an or of multiple names), startTime, endTime, and
|
78
|
+
# timeGrain. The supported operator is eq.
|
79
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
80
|
+
# to the HTTP request.
|
81
|
+
#
|
82
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
83
|
+
#
|
84
|
+
def list_metrics_async(resource_group_name, account_name, database_rid, collection_rid, filter, custom_headers:nil)
|
85
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
86
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
87
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
88
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
89
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
90
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
91
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
|
92
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
93
|
+
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?
|
94
|
+
fail ArgumentError, 'database_rid is nil' if database_rid.nil?
|
95
|
+
fail ArgumentError, 'collection_rid is nil' if collection_rid.nil?
|
96
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
97
|
+
fail ArgumentError, 'filter is nil' if filter.nil?
|
98
|
+
|
99
|
+
|
100
|
+
request_headers = {}
|
101
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
102
|
+
|
103
|
+
# Set Headers
|
104
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
105
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
106
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitions/metrics'
|
107
|
+
|
108
|
+
request_url = @base_url || @client.base_url
|
109
|
+
|
110
|
+
options = {
|
111
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
112
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'databaseRid' => database_rid,'collectionRid' => collection_rid},
|
113
|
+
query_params: {'api-version' => @client.api_version,'$filter' => filter},
|
114
|
+
headers: request_headers.merge(custom_headers || {}),
|
115
|
+
base_url: request_url
|
116
|
+
}
|
117
|
+
promise = @client.make_request_async(:get, path_template, options)
|
118
|
+
|
119
|
+
promise = promise.then do |result|
|
120
|
+
http_response = result.response
|
121
|
+
status_code = http_response.status
|
122
|
+
response_content = http_response.body
|
123
|
+
unless status_code == 200
|
124
|
+
error_model = JSON.load(response_content)
|
125
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
126
|
+
end
|
127
|
+
|
128
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
129
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
130
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
131
|
+
# Deserialize Response
|
132
|
+
if status_code == 200
|
133
|
+
begin
|
134
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
135
|
+
result_mapper = Azure::Cosmosdb::Mgmt::V2019_08_01::Models::PartitionMetricListResult.mapper()
|
136
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
137
|
+
rescue Exception => e
|
138
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
result
|
143
|
+
end
|
144
|
+
|
145
|
+
promise.execute
|
146
|
+
end
|
147
|
+
|
148
|
+
#
|
149
|
+
# Retrieves the usages (most recent storage data) for the given collection,
|
150
|
+
# split by partition.
|
151
|
+
#
|
152
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
153
|
+
# @param account_name [String] Cosmos DB database account name.
|
154
|
+
# @param database_rid [String] Cosmos DB database rid.
|
155
|
+
# @param collection_rid [String] Cosmos DB collection rid.
|
156
|
+
# @param filter [String] An OData filter expression that describes a subset of
|
157
|
+
# usages to return. The supported parameter is name.value (name of the metric,
|
158
|
+
# can have an or of multiple names).
|
159
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
160
|
+
# will be added to the HTTP request.
|
161
|
+
#
|
162
|
+
# @return [PartitionUsagesResult] operation results.
|
163
|
+
#
|
164
|
+
def list_usages(resource_group_name, account_name, database_rid, collection_rid, filter:nil, custom_headers:nil)
|
165
|
+
response = list_usages_async(resource_group_name, account_name, database_rid, collection_rid, filter:filter, custom_headers:custom_headers).value!
|
166
|
+
response.body unless response.nil?
|
167
|
+
end
|
168
|
+
|
169
|
+
#
|
170
|
+
# Retrieves the usages (most recent storage data) for the given collection,
|
171
|
+
# split by partition.
|
172
|
+
#
|
173
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
174
|
+
# @param account_name [String] Cosmos DB database account name.
|
175
|
+
# @param database_rid [String] Cosmos DB database rid.
|
176
|
+
# @param collection_rid [String] Cosmos DB collection rid.
|
177
|
+
# @param filter [String] An OData filter expression that describes a subset of
|
178
|
+
# usages to return. The supported parameter is name.value (name of the metric,
|
179
|
+
# can have an or of multiple names).
|
180
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
181
|
+
# will be added to the HTTP request.
|
182
|
+
#
|
183
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
184
|
+
#
|
185
|
+
def list_usages_with_http_info(resource_group_name, account_name, database_rid, collection_rid, filter:nil, custom_headers:nil)
|
186
|
+
list_usages_async(resource_group_name, account_name, database_rid, collection_rid, filter:filter, custom_headers:custom_headers).value!
|
187
|
+
end
|
188
|
+
|
189
|
+
#
|
190
|
+
# Retrieves the usages (most recent storage data) for the given collection,
|
191
|
+
# split by partition.
|
192
|
+
#
|
193
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
194
|
+
# @param account_name [String] Cosmos DB database account name.
|
195
|
+
# @param database_rid [String] Cosmos DB database rid.
|
196
|
+
# @param collection_rid [String] Cosmos DB collection rid.
|
197
|
+
# @param filter [String] An OData filter expression that describes a subset of
|
198
|
+
# usages to return. The supported parameter is name.value (name of the metric,
|
199
|
+
# can have an or of multiple names).
|
200
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
201
|
+
# to the HTTP request.
|
202
|
+
#
|
203
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
204
|
+
#
|
205
|
+
def list_usages_async(resource_group_name, account_name, database_rid, collection_rid, filter:nil, custom_headers:nil)
|
206
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
207
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
208
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
209
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
210
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
211
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
212
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
|
213
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
214
|
+
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?
|
215
|
+
fail ArgumentError, 'database_rid is nil' if database_rid.nil?
|
216
|
+
fail ArgumentError, 'collection_rid is nil' if collection_rid.nil?
|
217
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
218
|
+
|
219
|
+
|
220
|
+
request_headers = {}
|
221
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
222
|
+
|
223
|
+
# Set Headers
|
224
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
225
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
226
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitions/usages'
|
227
|
+
|
228
|
+
request_url = @base_url || @client.base_url
|
229
|
+
|
230
|
+
options = {
|
231
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
232
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'databaseRid' => database_rid,'collectionRid' => collection_rid},
|
233
|
+
query_params: {'api-version' => @client.api_version,'$filter' => filter},
|
234
|
+
headers: request_headers.merge(custom_headers || {}),
|
235
|
+
base_url: request_url
|
236
|
+
}
|
237
|
+
promise = @client.make_request_async(:get, path_template, options)
|
238
|
+
|
239
|
+
promise = promise.then do |result|
|
240
|
+
http_response = result.response
|
241
|
+
status_code = http_response.status
|
242
|
+
response_content = http_response.body
|
243
|
+
unless status_code == 200
|
244
|
+
error_model = JSON.load(response_content)
|
245
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
246
|
+
end
|
247
|
+
|
248
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
249
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
250
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
251
|
+
# Deserialize Response
|
252
|
+
if status_code == 200
|
253
|
+
begin
|
254
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
255
|
+
result_mapper = Azure::Cosmosdb::Mgmt::V2019_08_01::Models::PartitionUsagesResult.mapper()
|
256
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
257
|
+
rescue Exception => e
|
258
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
259
|
+
end
|
260
|
+
end
|
261
|
+
|
262
|
+
result
|
263
|
+
end
|
264
|
+
|
265
|
+
promise.execute
|
266
|
+
end
|
267
|
+
|
268
|
+
end
|
269
|
+
end
|