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