/
index.ts
180 lines (164 loc) · 5.57 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import * as coreHttp from "@azure/core-http";
/** Represents collection of metric definitions. */
export interface MetricDefinitionCollection {
/** the values for the metric definitions. */
value: MetricDefinition[];
}
/** Metric definition class specifies the metadata for a metric. */
export interface MetricDefinition {
/** Flag to indicate whether the dimension is required. */
isDimensionRequired?: boolean;
/** the resource identifier of the resource that emitted the metric. */
resourceId?: string;
/** the namespace the metric belongs to. */
namespace?: string;
/** the name and the display name of the metric, i.e. it is a localizable string. */
name?: LocalizableString;
/** Detailed description of this metric. */
displayDescription?: string;
/** Custom category name for this metric. */
category?: string;
/** The class of the metric. */
metricClass?: MetricClass;
/** The unit of the metric. */
unit?: MetricUnit;
/** the primary aggregation type value defining how to use the values for display. */
primaryAggregationType?: AggregationType;
/** the collection of what aggregation types are supported. */
supportedAggregationTypes?: AggregationType[];
/** the collection of what aggregation intervals are available to be queried. */
metricAvailabilities?: MetricAvailability[];
/** the resource identifier of the metric definition. */
id?: string;
/** the name and the display name of the dimension, i.e. it is a localizable string. */
dimensions?: LocalizableString[];
}
/** The localizable string class. */
export interface LocalizableString {
/** the invariant value. */
value: string;
/** the locale specific value. */
localizedValue?: string;
}
/** Metric availability specifies the time grain (aggregation interval or frequency) and the retention period for that time grain. */
export interface MetricAvailability {
/** the time grain specifies the aggregation interval for the metric. Expressed as a duration 'PT1M', 'P1D', etc. */
timeGrain?: string;
/** the retention period for the metric at the specified timegrain. Expressed as a duration 'PT1M', 'P1D', etc. */
retention?: string;
}
/** Describes the format of Error response. */
export interface ErrorResponse {
/** Error code */
code?: string;
/** Error message indicating why the operation failed. */
message?: string;
}
/** Known values of {@link ApiVersion201801} that the service accepts. */
export const enum KnownApiVersion201801 {
/** Api Version '2018-01-01' */
TwoThousandEighteen0101 = "2018-01-01"
}
/**
* Defines values for ApiVersion201801. \
* {@link KnownApiVersion201801} can be used interchangeably with ApiVersion201801,
* this enum contains the known values that the service supports.
* ### Know values supported by the service
* **2018-01-01**: Api Version '2018-01-01'
*/
export type ApiVersion201801 = string;
/** Known values of {@link MetricClass} that the service accepts. */
export const enum KnownMetricClass {
Availability = "Availability",
Transactions = "Transactions",
Errors = "Errors",
Latency = "Latency",
Saturation = "Saturation"
}
/**
* Defines values for MetricClass. \
* {@link KnownMetricClass} can be used interchangeably with MetricClass,
* this enum contains the known values that the service supports.
* ### Know values supported by the service
* **Availability** \
* **Transactions** \
* **Errors** \
* **Latency** \
* **Saturation**
*/
export type MetricClass = string;
/** Known values of {@link MetricUnit} that the service accepts. */
export const enum KnownMetricUnit {
Count = "Count",
Bytes = "Bytes",
Seconds = "Seconds",
CountPerSecond = "CountPerSecond",
BytesPerSecond = "BytesPerSecond",
Percent = "Percent",
MilliSeconds = "MilliSeconds",
ByteSeconds = "ByteSeconds",
Unspecified = "Unspecified",
Cores = "Cores",
MilliCores = "MilliCores",
NanoCores = "NanoCores",
BitsPerSecond = "BitsPerSecond"
}
/**
* Defines values for MetricUnit. \
* {@link KnownMetricUnit} can be used interchangeably with MetricUnit,
* this enum contains the known values that the service supports.
* ### Know values supported by the service
* **Count** \
* **Bytes** \
* **Seconds** \
* **CountPerSecond** \
* **BytesPerSecond** \
* **Percent** \
* **MilliSeconds** \
* **ByteSeconds** \
* **Unspecified** \
* **Cores** \
* **MilliCores** \
* **NanoCores** \
* **BitsPerSecond**
*/
export type MetricUnit = string;
/** Defines values for AggregationType. */
export type AggregationType =
| "None"
| "Average"
| "Count"
| "Minimum"
| "Maximum"
| "Total";
/** Optional parameters. */
export interface MetricDefinitionsListOptionalParams
extends coreHttp.OperationOptions {
/** Metric namespace to query metric definitions for. */
metricnamespace?: string;
}
/** Contains response data for the list operation. */
export type MetricDefinitionsListResponse = MetricDefinitionCollection & {
/** The underlying HTTP response. */
_response: coreHttp.HttpResponse & {
/** The response body as text (string format) */
bodyAsText: string;
/** The response body as parsed JSON or XML */
parsedBody: MetricDefinitionCollection;
};
};
/** Optional parameters. */
export interface MonitorManagementClientOptionalParams
extends coreHttp.ServiceClientOptions {
/** server parameter */
$host?: string;
/** Overrides client endpoint. */
endpoint?: string;
}