azure_mgmt_cosmosdb 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb.rb +140 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/collection.rb +371 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/collection_partition.rb +267 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/collection_partition_region.rb +155 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/collection_region.rb +155 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/cosmos_db.rb +180 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/database.rb +359 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/database_account_region.rb +147 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/database_accounts.rb +6805 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/capability.rb +48 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace.rb +97 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_create_update_parameters.rb +69 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_list_result.rb +58 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_keyspace_resource.rb +46 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_partition_key.rb +46 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_schema.rb +95 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_table.rb +120 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_table_create_update_parameters.rb +69 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_table_list_result.rb +58 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cassandra_table_resource.rb +69 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/cluster_key.rb +58 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/column.rb +57 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/conflict_resolution_mode.rb +16 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/conflict_resolution_policy.rb +73 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/consistency_policy.rb +86 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/container_partition_key.rb +70 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/data_type.rb +20 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account.rb +313 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_connection_string.rb +59 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_create_update_parameters.rb +243 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_kind.rb +17 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_list_connection_strings_result.rb +57 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_list_keys_result.rb +83 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_list_read_only_keys_result.rb +59 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_offer_type.rb +15 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_patch_parameters.rb +75 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_account_regenerate_key_parameters.rb +47 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/database_accounts_list_result.rb +58 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/default_consistency_level.rb +19 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/error_response.rb +57 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/excluded_path.rb +48 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/extended_resource_properties.rb +71 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/failover_policies.rb +55 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/failover_policy.rb +79 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/gremlin_database.rb +132 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/gremlin_database_create_update_parameters.rb +69 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/gremlin_database_list_result.rb +58 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/gremlin_database_resource.rb +46 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/gremlin_graph.rb +197 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/gremlin_graph_create_update_parameters.rb +69 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/gremlin_graph_list_result.rb +57 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/gremlin_graph_resource.rb +111 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/included_path.rb +67 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/index_kind.rb +17 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/indexes.rb +73 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/indexing_mode.rb +17 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/indexing_policy.rb +99 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/key_kind.rb +18 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/location.rb +102 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/metric.rb +120 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/metric_availability.rb +60 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/metric_definition.rb +109 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/metric_definitions_list_result.rb +57 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/metric_list_result.rb +56 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/metric_name.rb +59 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/metric_value.rb +107 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection.rb +137 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_create_update_parameters.rb +69 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_list_result.rb +58 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_dbcollection_resource.rb +86 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase.rb +97 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_create_update_parameters.rb +69 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_list_result.rb +58 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_dbdatabase_resource.rb +46 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_index.rb +60 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_index_keys.rb +55 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/mongo_index_options.rb +57 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/operation.rb +58 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/operation_display.rb +80 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/operation_list_result.rb +101 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/partition_kind.rb +16 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/partition_metric.rb +124 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/partition_metric_list_result.rb +57 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/partition_usage.rb +105 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/partition_usages_result.rb +57 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/percentile_metric.rb +120 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/percentile_metric_list_result.rb +57 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/percentile_metric_value.rb +173 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/primary_aggregation_type.rb +20 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/region_for_online_offline.rb +47 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/resource.rb +112 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/sql_container.rb +197 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/sql_container_create_update_parameters.rb +68 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/sql_container_list_result.rb +57 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/sql_container_resource.rb +111 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/sql_database.rb +156 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/sql_database_create_update_parameters.rb +69 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/sql_database_list_result.rb +58 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/sql_database_resource.rb +46 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/table.rb +97 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/table_create_update_parameters.rb +68 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/table_list_result.rb +57 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/table_resource.rb +46 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/unique_key.rb +56 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/unique_key_policy.rb +58 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/unit_type.rb +21 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/usage.rb +97 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/usages_result.rb +57 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/models/virtual_network_rule.rb +59 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/module_definition.rb +9 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/operations.rb +219 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/partition_key_range_id.rb +155 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/partition_key_range_id_region.rb +162 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/percentile.rb +140 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/percentile_source_target.rb +157 -0
- data/lib/2015-04-08/generated/azure_mgmt_cosmosdb/percentile_target.rb +147 -0
- data/lib/azure_mgmt_cosmosdb.rb +6 -0
- data/lib/module_definition.rb +7 -0
- data/lib/profiles/latest/cosmosdb_latest_profile_client.rb +40 -0
- data/lib/profiles/latest/cosmosdb_module_definition.rb +8 -0
- data/lib/profiles/latest/modules/cosmosdb_profile_module.rb +485 -0
- data/lib/version.rb +7 -0
- metadata +240 -0
|
@@ -0,0 +1,97 @@
|
|
|
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::V2015_04_08
|
|
7
|
+
module Models
|
|
8
|
+
#
|
|
9
|
+
# The usage data for a usage request.
|
|
10
|
+
#
|
|
11
|
+
class Usage
|
|
12
|
+
|
|
13
|
+
include MsRestAzure
|
|
14
|
+
|
|
15
|
+
# @return [UnitType] The unit of the metric. Possible values include:
|
|
16
|
+
# 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond',
|
|
17
|
+
# 'BytesPerSecond', 'Milliseconds'
|
|
18
|
+
attr_accessor :unit
|
|
19
|
+
|
|
20
|
+
# @return [MetricName] The name information for the metric.
|
|
21
|
+
attr_accessor :name
|
|
22
|
+
|
|
23
|
+
# @return [String] The quota period used to summarize the usage values.
|
|
24
|
+
attr_accessor :quota_period
|
|
25
|
+
|
|
26
|
+
# @return [Integer] Maximum value for this metric
|
|
27
|
+
attr_accessor :limit
|
|
28
|
+
|
|
29
|
+
# @return [Integer] Current value for this metric
|
|
30
|
+
attr_accessor :current_value
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
#
|
|
34
|
+
# Mapper for Usage class as Ruby Hash.
|
|
35
|
+
# This will be used for serialization/deserialization.
|
|
36
|
+
#
|
|
37
|
+
def self.mapper()
|
|
38
|
+
{
|
|
39
|
+
client_side_validation: true,
|
|
40
|
+
required: false,
|
|
41
|
+
serialized_name: 'Usage',
|
|
42
|
+
type: {
|
|
43
|
+
name: 'Composite',
|
|
44
|
+
class_name: 'Usage',
|
|
45
|
+
model_properties: {
|
|
46
|
+
unit: {
|
|
47
|
+
client_side_validation: true,
|
|
48
|
+
required: false,
|
|
49
|
+
serialized_name: 'unit',
|
|
50
|
+
type: {
|
|
51
|
+
name: 'String'
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
name: {
|
|
55
|
+
client_side_validation: true,
|
|
56
|
+
required: false,
|
|
57
|
+
read_only: true,
|
|
58
|
+
serialized_name: 'name',
|
|
59
|
+
type: {
|
|
60
|
+
name: 'Composite',
|
|
61
|
+
class_name: 'MetricName'
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
quota_period: {
|
|
65
|
+
client_side_validation: true,
|
|
66
|
+
required: false,
|
|
67
|
+
read_only: true,
|
|
68
|
+
serialized_name: 'quotaPeriod',
|
|
69
|
+
type: {
|
|
70
|
+
name: 'String'
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
limit: {
|
|
74
|
+
client_side_validation: true,
|
|
75
|
+
required: false,
|
|
76
|
+
read_only: true,
|
|
77
|
+
serialized_name: 'limit',
|
|
78
|
+
type: {
|
|
79
|
+
name: 'Number'
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
current_value: {
|
|
83
|
+
client_side_validation: true,
|
|
84
|
+
required: false,
|
|
85
|
+
read_only: true,
|
|
86
|
+
serialized_name: 'currentValue',
|
|
87
|
+
type: {
|
|
88
|
+
name: 'Number'
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
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::V2015_04_08
|
|
7
|
+
module Models
|
|
8
|
+
#
|
|
9
|
+
# The response to a list usage request.
|
|
10
|
+
#
|
|
11
|
+
class UsagesResult
|
|
12
|
+
|
|
13
|
+
include MsRestAzure
|
|
14
|
+
|
|
15
|
+
# @return [Array<Usage>] The list of usages for the database. A usage is
|
|
16
|
+
# a point in time metric
|
|
17
|
+
attr_accessor :value
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
#
|
|
21
|
+
# Mapper for UsagesResult class as Ruby Hash.
|
|
22
|
+
# This will be used for serialization/deserialization.
|
|
23
|
+
#
|
|
24
|
+
def self.mapper()
|
|
25
|
+
{
|
|
26
|
+
client_side_validation: true,
|
|
27
|
+
required: false,
|
|
28
|
+
serialized_name: 'UsagesResult',
|
|
29
|
+
type: {
|
|
30
|
+
name: 'Composite',
|
|
31
|
+
class_name: 'UsagesResult',
|
|
32
|
+
model_properties: {
|
|
33
|
+
value: {
|
|
34
|
+
client_side_validation: true,
|
|
35
|
+
required: false,
|
|
36
|
+
read_only: true,
|
|
37
|
+
serialized_name: 'value',
|
|
38
|
+
type: {
|
|
39
|
+
name: 'Sequence',
|
|
40
|
+
element: {
|
|
41
|
+
client_side_validation: true,
|
|
42
|
+
required: false,
|
|
43
|
+
serialized_name: 'UsageElementType',
|
|
44
|
+
type: {
|
|
45
|
+
name: 'Composite',
|
|
46
|
+
class_name: 'Usage'
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -0,0 +1,59 @@
|
|
|
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::V2015_04_08
|
|
7
|
+
module Models
|
|
8
|
+
#
|
|
9
|
+
# Virtual Network ACL Rule object
|
|
10
|
+
#
|
|
11
|
+
class VirtualNetworkRule
|
|
12
|
+
|
|
13
|
+
include MsRestAzure
|
|
14
|
+
|
|
15
|
+
# @return [String] Resource ID of a subnet, for example:
|
|
16
|
+
# /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}.
|
|
17
|
+
attr_accessor :id
|
|
18
|
+
|
|
19
|
+
# @return [Boolean] Create firewall rule before the virtual network has
|
|
20
|
+
# vnet service endpoint enabled.
|
|
21
|
+
attr_accessor :ignore_missing_vnet_service_endpoint
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
#
|
|
25
|
+
# Mapper for VirtualNetworkRule class as Ruby Hash.
|
|
26
|
+
# This will be used for serialization/deserialization.
|
|
27
|
+
#
|
|
28
|
+
def self.mapper()
|
|
29
|
+
{
|
|
30
|
+
client_side_validation: true,
|
|
31
|
+
required: false,
|
|
32
|
+
serialized_name: 'VirtualNetworkRule',
|
|
33
|
+
type: {
|
|
34
|
+
name: 'Composite',
|
|
35
|
+
class_name: 'VirtualNetworkRule',
|
|
36
|
+
model_properties: {
|
|
37
|
+
id: {
|
|
38
|
+
client_side_validation: true,
|
|
39
|
+
required: false,
|
|
40
|
+
serialized_name: 'id',
|
|
41
|
+
type: {
|
|
42
|
+
name: 'String'
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
ignore_missing_vnet_service_endpoint: {
|
|
46
|
+
client_side_validation: true,
|
|
47
|
+
required: false,
|
|
48
|
+
serialized_name: 'ignoreMissingVNetServiceEndpoint',
|
|
49
|
+
type: {
|
|
50
|
+
name: 'Boolean'
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
|
4
|
+
# regenerated.
|
|
5
|
+
|
|
6
|
+
module Azure end
|
|
7
|
+
module Azure::Cosmosdb end
|
|
8
|
+
module Azure::Cosmosdb::Mgmt end
|
|
9
|
+
module Azure::Cosmosdb::Mgmt::V2015_04_08 end
|
|
@@ -0,0 +1,219 @@
|
|
|
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::V2015_04_08
|
|
7
|
+
#
|
|
8
|
+
# Azure Cosmos DB Database Service Resource Provider REST API
|
|
9
|
+
#
|
|
10
|
+
class Operations
|
|
11
|
+
include MsRestAzure
|
|
12
|
+
|
|
13
|
+
#
|
|
14
|
+
# Creates and initializes a new instance of the Operations class.
|
|
15
|
+
# @param client service class for accessing basic functionality.
|
|
16
|
+
#
|
|
17
|
+
def initialize(client)
|
|
18
|
+
@client = client
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# @return [CosmosDB] reference to the CosmosDB
|
|
22
|
+
attr_reader :client
|
|
23
|
+
|
|
24
|
+
#
|
|
25
|
+
# Lists all of the available Cosmos DB Resource Provider operations.
|
|
26
|
+
#
|
|
27
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
28
|
+
# will be added to the HTTP request.
|
|
29
|
+
#
|
|
30
|
+
# @return [Array<Operation>] operation results.
|
|
31
|
+
#
|
|
32
|
+
def list(custom_headers:nil)
|
|
33
|
+
first_page = list_as_lazy(custom_headers:custom_headers)
|
|
34
|
+
first_page.get_all_items
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
#
|
|
38
|
+
# Lists all of the available Cosmos DB Resource Provider operations.
|
|
39
|
+
#
|
|
40
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
41
|
+
# will be added to the HTTP request.
|
|
42
|
+
#
|
|
43
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
44
|
+
#
|
|
45
|
+
def list_with_http_info(custom_headers:nil)
|
|
46
|
+
list_async(custom_headers:custom_headers).value!
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
#
|
|
50
|
+
# Lists all of the available Cosmos DB Resource Provider operations.
|
|
51
|
+
#
|
|
52
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
53
|
+
# to the HTTP request.
|
|
54
|
+
#
|
|
55
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
56
|
+
#
|
|
57
|
+
def list_async(custom_headers:nil)
|
|
58
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
request_headers = {}
|
|
62
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
63
|
+
|
|
64
|
+
# Set Headers
|
|
65
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
66
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
67
|
+
path_template = 'providers/Microsoft.DocumentDB/operations'
|
|
68
|
+
|
|
69
|
+
request_url = @base_url || @client.base_url
|
|
70
|
+
|
|
71
|
+
options = {
|
|
72
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
73
|
+
query_params: {'api-version' => @client.api_version},
|
|
74
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
75
|
+
base_url: request_url
|
|
76
|
+
}
|
|
77
|
+
promise = @client.make_request_async(:get, path_template, options)
|
|
78
|
+
|
|
79
|
+
promise = promise.then do |result|
|
|
80
|
+
http_response = result.response
|
|
81
|
+
status_code = http_response.status
|
|
82
|
+
response_content = http_response.body
|
|
83
|
+
unless status_code == 200
|
|
84
|
+
error_model = JSON.load(response_content)
|
|
85
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
89
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
|
90
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
|
91
|
+
# Deserialize Response
|
|
92
|
+
if status_code == 200
|
|
93
|
+
begin
|
|
94
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
95
|
+
result_mapper = Azure::Cosmosdb::Mgmt::V2015_04_08::Models::OperationListResult.mapper()
|
|
96
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
|
97
|
+
rescue Exception => e
|
|
98
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
result
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
promise.execute
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
#
|
|
109
|
+
# Lists all of the available Cosmos DB Resource Provider operations.
|
|
110
|
+
#
|
|
111
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
|
112
|
+
# to List operation.
|
|
113
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
114
|
+
# will be added to the HTTP request.
|
|
115
|
+
#
|
|
116
|
+
# @return [OperationListResult] operation results.
|
|
117
|
+
#
|
|
118
|
+
def list_next(next_page_link, custom_headers:nil)
|
|
119
|
+
response = list_next_async(next_page_link, custom_headers:custom_headers).value!
|
|
120
|
+
response.body unless response.nil?
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
#
|
|
124
|
+
# Lists all of the available Cosmos DB Resource Provider operations.
|
|
125
|
+
#
|
|
126
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
|
127
|
+
# to List operation.
|
|
128
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
129
|
+
# will be added to the HTTP request.
|
|
130
|
+
#
|
|
131
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
132
|
+
#
|
|
133
|
+
def list_next_with_http_info(next_page_link, custom_headers:nil)
|
|
134
|
+
list_next_async(next_page_link, custom_headers:custom_headers).value!
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
#
|
|
138
|
+
# Lists all of the available Cosmos DB Resource Provider operations.
|
|
139
|
+
#
|
|
140
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
|
141
|
+
# to List operation.
|
|
142
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
143
|
+
# to the HTTP request.
|
|
144
|
+
#
|
|
145
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
146
|
+
#
|
|
147
|
+
def list_next_async(next_page_link, custom_headers:nil)
|
|
148
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
request_headers = {}
|
|
152
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
153
|
+
|
|
154
|
+
# Set Headers
|
|
155
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
156
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
157
|
+
path_template = '{nextLink}'
|
|
158
|
+
|
|
159
|
+
request_url = @base_url || @client.base_url
|
|
160
|
+
|
|
161
|
+
options = {
|
|
162
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
163
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
|
164
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
165
|
+
base_url: request_url
|
|
166
|
+
}
|
|
167
|
+
promise = @client.make_request_async(:get, path_template, options)
|
|
168
|
+
|
|
169
|
+
promise = promise.then do |result|
|
|
170
|
+
http_response = result.response
|
|
171
|
+
status_code = http_response.status
|
|
172
|
+
response_content = http_response.body
|
|
173
|
+
unless status_code == 200
|
|
174
|
+
error_model = JSON.load(response_content)
|
|
175
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
179
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
|
180
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
|
181
|
+
# Deserialize Response
|
|
182
|
+
if status_code == 200
|
|
183
|
+
begin
|
|
184
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
185
|
+
result_mapper = Azure::Cosmosdb::Mgmt::V2015_04_08::Models::OperationListResult.mapper()
|
|
186
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
|
187
|
+
rescue Exception => e
|
|
188
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
result
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
promise.execute
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
#
|
|
199
|
+
# Lists all of the available Cosmos DB Resource Provider operations.
|
|
200
|
+
#
|
|
201
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
202
|
+
# will be added to the HTTP request.
|
|
203
|
+
#
|
|
204
|
+
# @return [OperationListResult] which provide lazy access to pages of the
|
|
205
|
+
# response.
|
|
206
|
+
#
|
|
207
|
+
def list_as_lazy(custom_headers:nil)
|
|
208
|
+
response = list_async(custom_headers:custom_headers).value!
|
|
209
|
+
unless response.nil?
|
|
210
|
+
page = response.body
|
|
211
|
+
page.next_method = Proc.new do |next_page_link|
|
|
212
|
+
list_next_async(next_page_link, custom_headers:custom_headers)
|
|
213
|
+
end
|
|
214
|
+
page
|
|
215
|
+
end
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
end
|
|
219
|
+
end
|
|
@@ -0,0 +1,155 @@
|
|
|
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::V2015_04_08
|
|
7
|
+
#
|
|
8
|
+
# Azure Cosmos DB Database Service Resource Provider REST API
|
|
9
|
+
#
|
|
10
|
+
class PartitionKeyRangeId
|
|
11
|
+
include MsRestAzure
|
|
12
|
+
|
|
13
|
+
#
|
|
14
|
+
# Creates and initializes a new instance of the PartitionKeyRangeId class.
|
|
15
|
+
# @param client service class for accessing basic functionality.
|
|
16
|
+
#
|
|
17
|
+
def initialize(client)
|
|
18
|
+
@client = client
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# @return [CosmosDB] reference to the CosmosDB
|
|
22
|
+
attr_reader :client
|
|
23
|
+
|
|
24
|
+
#
|
|
25
|
+
# Retrieves the metrics determined by the given filter for the given partition
|
|
26
|
+
# key range id.
|
|
27
|
+
#
|
|
28
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
|
29
|
+
# @param account_name [String] Cosmos DB database account name.
|
|
30
|
+
# @param database_rid [String] Cosmos DB database rid.
|
|
31
|
+
# @param collection_rid [String] Cosmos DB collection rid.
|
|
32
|
+
# @param partition_key_range_id [String] Partition Key Range Id for which to
|
|
33
|
+
# get data.
|
|
34
|
+
# @param filter [String] An OData filter expression that describes a subset of
|
|
35
|
+
# metrics to return. The parameters that can be filtered are name.value (name
|
|
36
|
+
# of the metric, can have an or of multiple names), startTime, endTime, and
|
|
37
|
+
# timeGrain. The supported operator is eq.
|
|
38
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
39
|
+
# will be added to the HTTP request.
|
|
40
|
+
#
|
|
41
|
+
# @return [PartitionMetricListResult] operation results.
|
|
42
|
+
#
|
|
43
|
+
def list_metrics(resource_group_name, account_name, database_rid, collection_rid, partition_key_range_id, filter, custom_headers:nil)
|
|
44
|
+
response = list_metrics_async(resource_group_name, account_name, database_rid, collection_rid, partition_key_range_id, filter, custom_headers:custom_headers).value!
|
|
45
|
+
response.body unless response.nil?
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
#
|
|
49
|
+
# Retrieves the metrics determined by the given filter for the given partition
|
|
50
|
+
# key range id.
|
|
51
|
+
#
|
|
52
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
|
53
|
+
# @param account_name [String] Cosmos DB database account name.
|
|
54
|
+
# @param database_rid [String] Cosmos DB database rid.
|
|
55
|
+
# @param collection_rid [String] Cosmos DB collection rid.
|
|
56
|
+
# @param partition_key_range_id [String] Partition Key Range Id for which to
|
|
57
|
+
# get data.
|
|
58
|
+
# @param filter [String] An OData filter expression that describes a subset of
|
|
59
|
+
# metrics to return. The parameters that can be filtered are name.value (name
|
|
60
|
+
# of the metric, can have an or of multiple names), startTime, endTime, and
|
|
61
|
+
# timeGrain. The supported operator is eq.
|
|
62
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
63
|
+
# will be added to the HTTP request.
|
|
64
|
+
#
|
|
65
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
66
|
+
#
|
|
67
|
+
def list_metrics_with_http_info(resource_group_name, account_name, database_rid, collection_rid, partition_key_range_id, filter, custom_headers:nil)
|
|
68
|
+
list_metrics_async(resource_group_name, account_name, database_rid, collection_rid, partition_key_range_id, filter, custom_headers:custom_headers).value!
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
#
|
|
72
|
+
# Retrieves the metrics determined by the given filter for the given partition
|
|
73
|
+
# key range id.
|
|
74
|
+
#
|
|
75
|
+
# @param resource_group_name [String] Name of an Azure resource group.
|
|
76
|
+
# @param account_name [String] Cosmos DB database account name.
|
|
77
|
+
# @param database_rid [String] Cosmos DB database rid.
|
|
78
|
+
# @param collection_rid [String] Cosmos DB collection rid.
|
|
79
|
+
# @param partition_key_range_id [String] Partition Key Range Id for which to
|
|
80
|
+
# get data.
|
|
81
|
+
# @param filter [String] An OData filter expression that describes a subset of
|
|
82
|
+
# metrics to return. The parameters that can be filtered are name.value (name
|
|
83
|
+
# of the metric, can have an or of multiple names), startTime, endTime, and
|
|
84
|
+
# timeGrain. The supported operator is eq.
|
|
85
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
86
|
+
# to the HTTP request.
|
|
87
|
+
#
|
|
88
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
89
|
+
#
|
|
90
|
+
def list_metrics_async(resource_group_name, account_name, database_rid, collection_rid, partition_key_range_id, filter, custom_headers:nil)
|
|
91
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
92
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
93
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
|
94
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
|
95
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
|
96
|
+
fail ArgumentError, 'account_name is nil' if account_name.nil?
|
|
97
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MaxLength': '50'" if !account_name.nil? && account_name.length > 50
|
|
98
|
+
fail ArgumentError, "'account_name' should satisfy the constraint - 'MinLength': '3'" if !account_name.nil? && account_name.length < 3
|
|
99
|
+
fail ArgumentError, 'database_rid is nil' if database_rid.nil?
|
|
100
|
+
fail ArgumentError, 'collection_rid is nil' if collection_rid.nil?
|
|
101
|
+
fail ArgumentError, 'partition_key_range_id is nil' if partition_key_range_id.nil?
|
|
102
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
|
103
|
+
fail ArgumentError, 'filter is nil' if filter.nil?
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
request_headers = {}
|
|
107
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
|
108
|
+
|
|
109
|
+
# Set Headers
|
|
110
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
111
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
112
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/databases/{databaseRid}/collections/{collectionRid}/partitionKeyRangeId/{partitionKeyRangeId}/metrics'
|
|
113
|
+
|
|
114
|
+
request_url = @base_url || @client.base_url
|
|
115
|
+
|
|
116
|
+
options = {
|
|
117
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
118
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name,'databaseRid' => database_rid,'collectionRid' => collection_rid,'partitionKeyRangeId' => partition_key_range_id},
|
|
119
|
+
query_params: {'api-version' => @client.api_version,'$filter' => filter},
|
|
120
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
121
|
+
base_url: request_url
|
|
122
|
+
}
|
|
123
|
+
promise = @client.make_request_async(:get, path_template, options)
|
|
124
|
+
|
|
125
|
+
promise = promise.then do |result|
|
|
126
|
+
http_response = result.response
|
|
127
|
+
status_code = http_response.status
|
|
128
|
+
response_content = http_response.body
|
|
129
|
+
unless status_code == 200
|
|
130
|
+
error_model = JSON.load(response_content)
|
|
131
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
135
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
|
136
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
|
137
|
+
# Deserialize Response
|
|
138
|
+
if status_code == 200
|
|
139
|
+
begin
|
|
140
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
141
|
+
result_mapper = Azure::Cosmosdb::Mgmt::V2015_04_08::Models::PartitionMetricListResult.mapper()
|
|
142
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
|
143
|
+
rescue Exception => e
|
|
144
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
result
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
promise.execute
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
end
|
|
155
|
+
end
|