@azure/monitor-query-metrics 1.0.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.
- package/LICENSE +21 -0
- package/README.md +243 -0
- package/dist/browser/api/index.d.ts +4 -0
- package/dist/browser/api/index.d.ts.map +1 -0
- package/dist/browser/api/index.js +5 -0
- package/dist/browser/api/index.js.map +1 -0
- package/dist/browser/api/metricsContext.d.ts +15 -0
- package/dist/browser/api/metricsContext.d.ts.map +1 -0
- package/dist/browser/api/metricsContext.js +38 -0
- package/dist/browser/api/metricsContext.js.map +1 -0
- package/dist/browser/api/operations.d.ts +9 -0
- package/dist/browser/api/operations.d.ts.map +1 -0
- package/dist/browser/api/operations.js +49 -0
- package/dist/browser/api/operations.js.map +1 -0
- package/dist/browser/api/options.d.ts +57 -0
- package/dist/browser/api/options.d.ts.map +1 -0
- package/dist/browser/api/options.js +4 -0
- package/dist/browser/api/options.js.map +1 -0
- package/dist/browser/index.d.ts +5 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +6 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/internalMetricsClient.d.ts +15 -0
- package/dist/browser/internalMetricsClient.d.ts.map +1 -0
- package/dist/browser/internalMetricsClient.js +23 -0
- package/dist/browser/internalMetricsClient.js.map +1 -0
- package/dist/browser/logger.d.ts +2 -0
- package/dist/browser/logger.d.ts.map +1 -0
- package/dist/browser/logger.js +5 -0
- package/dist/browser/logger.js.map +1 -0
- package/dist/browser/metricsClient.d.ts +28 -0
- package/dist/browser/metricsClient.d.ts.map +1 -0
- package/dist/browser/metricsClient.js +48 -0
- package/dist/browser/metricsClient.js.map +1 -0
- package/dist/browser/models/index.d.ts +2 -0
- package/dist/browser/models/index.d.ts.map +1 -0
- package/dist/browser/models/index.js +4 -0
- package/dist/browser/models/index.js.map +1 -0
- package/dist/browser/models/models.d.ts +141 -0
- package/dist/browser/models/models.d.ts.map +1 -0
- package/dist/browser/models/models.js +136 -0
- package/dist/browser/models/models.js.map +1 -0
- package/dist/browser/models.d.ts +167 -0
- package/dist/browser/models.d.ts.map +1 -0
- package/dist/browser/models.js +46 -0
- package/dist/browser/models.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/browser/static-helpers/urlTemplate.d.ts +5 -0
- package/dist/browser/static-helpers/urlTemplate.d.ts.map +1 -0
- package/dist/browser/static-helpers/urlTemplate.js +186 -0
- package/dist/browser/static-helpers/urlTemplate.js.map +1 -0
- package/dist/browser/utils.d.ts +13 -0
- package/dist/browser/utils.d.ts.map +1 -0
- package/dist/browser/utils.js +54 -0
- package/dist/browser/utils.js.map +1 -0
- package/dist/commonjs/api/index.d.ts +4 -0
- package/dist/commonjs/api/index.d.ts.map +1 -0
- package/dist/commonjs/api/index.js +10 -0
- package/dist/commonjs/api/index.js.map +1 -0
- package/dist/commonjs/api/metricsContext.d.ts +15 -0
- package/dist/commonjs/api/metricsContext.d.ts.map +1 -0
- package/dist/commonjs/api/metricsContext.js +41 -0
- package/dist/commonjs/api/metricsContext.js.map +1 -0
- package/dist/commonjs/api/operations.d.ts +9 -0
- package/dist/commonjs/api/operations.d.ts.map +1 -0
- package/dist/commonjs/api/operations.js +54 -0
- package/dist/commonjs/api/operations.js.map +1 -0
- package/dist/commonjs/api/options.d.ts +57 -0
- package/dist/commonjs/api/options.d.ts.map +1 -0
- package/dist/commonjs/api/options.js +5 -0
- package/dist/commonjs/api/options.js.map +1 -0
- package/dist/commonjs/index.d.ts +5 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +13 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/internalMetricsClient.d.ts +15 -0
- package/dist/commonjs/internalMetricsClient.d.ts.map +1 -0
- package/dist/commonjs/internalMetricsClient.js +27 -0
- package/dist/commonjs/internalMetricsClient.js.map +1 -0
- package/dist/commonjs/logger.d.ts +2 -0
- package/dist/commonjs/logger.d.ts.map +1 -0
- package/dist/commonjs/logger.js +8 -0
- package/dist/commonjs/logger.js.map +1 -0
- package/dist/commonjs/metricsClient.d.ts +28 -0
- package/dist/commonjs/metricsClient.d.ts.map +1 -0
- package/dist/commonjs/metricsClient.js +52 -0
- package/dist/commonjs/metricsClient.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +2 -0
- package/dist/commonjs/models/index.d.ts.map +1 -0
- package/dist/commonjs/models/index.js +8 -0
- package/dist/commonjs/models/index.js.map +1 -0
- package/dist/commonjs/models/models.d.ts +141 -0
- package/dist/commonjs/models/models.d.ts.map +1 -0
- package/dist/commonjs/models/models.js +157 -0
- package/dist/commonjs/models/models.js.map +1 -0
- package/dist/commonjs/models.d.ts +167 -0
- package/dist/commonjs/models.d.ts.map +1 -0
- package/dist/commonjs/models.js +49 -0
- package/dist/commonjs/models.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/static-helpers/urlTemplate.d.ts +5 -0
- package/dist/commonjs/static-helpers/urlTemplate.d.ts.map +1 -0
- package/dist/commonjs/static-helpers/urlTemplate.js +189 -0
- package/dist/commonjs/static-helpers/urlTemplate.js.map +1 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/commonjs/utils.d.ts +13 -0
- package/dist/commonjs/utils.d.ts.map +1 -0
- package/dist/commonjs/utils.js +60 -0
- package/dist/commonjs/utils.js.map +1 -0
- package/dist/esm/api/index.d.ts +4 -0
- package/dist/esm/api/index.d.ts.map +1 -0
- package/dist/esm/api/index.js +5 -0
- package/dist/esm/api/index.js.map +1 -0
- package/dist/esm/api/metricsContext.d.ts +15 -0
- package/dist/esm/api/metricsContext.d.ts.map +1 -0
- package/dist/esm/api/metricsContext.js +38 -0
- package/dist/esm/api/metricsContext.js.map +1 -0
- package/dist/esm/api/operations.d.ts +9 -0
- package/dist/esm/api/operations.d.ts.map +1 -0
- package/dist/esm/api/operations.js +49 -0
- package/dist/esm/api/operations.js.map +1 -0
- package/dist/esm/api/options.d.ts +57 -0
- package/dist/esm/api/options.d.ts.map +1 -0
- package/dist/esm/api/options.js +4 -0
- package/dist/esm/api/options.js.map +1 -0
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +6 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/internalMetricsClient.d.ts +15 -0
- package/dist/esm/internalMetricsClient.d.ts.map +1 -0
- package/dist/esm/internalMetricsClient.js +23 -0
- package/dist/esm/internalMetricsClient.js.map +1 -0
- package/dist/esm/logger.d.ts +2 -0
- package/dist/esm/logger.d.ts.map +1 -0
- package/dist/esm/logger.js +5 -0
- package/dist/esm/logger.js.map +1 -0
- package/dist/esm/metricsClient.d.ts +28 -0
- package/dist/esm/metricsClient.d.ts.map +1 -0
- package/dist/esm/metricsClient.js +48 -0
- package/dist/esm/metricsClient.js.map +1 -0
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.d.ts.map +1 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/esm/models/index.js.map +1 -0
- package/dist/esm/models/models.d.ts +141 -0
- package/dist/esm/models/models.d.ts.map +1 -0
- package/dist/esm/models/models.js +136 -0
- package/dist/esm/models/models.js.map +1 -0
- package/dist/esm/models.d.ts +167 -0
- package/dist/esm/models.d.ts.map +1 -0
- package/dist/esm/models.js +46 -0
- package/dist/esm/models.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/static-helpers/urlTemplate.d.ts +5 -0
- package/dist/esm/static-helpers/urlTemplate.d.ts.map +1 -0
- package/dist/esm/static-helpers/urlTemplate.js +186 -0
- package/dist/esm/static-helpers/urlTemplate.js.map +1 -0
- package/dist/esm/utils.d.ts +13 -0
- package/dist/esm/utils.d.ts.map +1 -0
- package/dist/esm/utils.js +54 -0
- package/dist/esm/utils.js.map +1 -0
- package/dist/react-native/api/index.d.ts +4 -0
- package/dist/react-native/api/index.d.ts.map +1 -0
- package/dist/react-native/api/index.js +5 -0
- package/dist/react-native/api/index.js.map +1 -0
- package/dist/react-native/api/metricsContext.d.ts +15 -0
- package/dist/react-native/api/metricsContext.d.ts.map +1 -0
- package/dist/react-native/api/metricsContext.js +38 -0
- package/dist/react-native/api/metricsContext.js.map +1 -0
- package/dist/react-native/api/operations.d.ts +9 -0
- package/dist/react-native/api/operations.d.ts.map +1 -0
- package/dist/react-native/api/operations.js +49 -0
- package/dist/react-native/api/operations.js.map +1 -0
- package/dist/react-native/api/options.d.ts +57 -0
- package/dist/react-native/api/options.d.ts.map +1 -0
- package/dist/react-native/api/options.js +4 -0
- package/dist/react-native/api/options.js.map +1 -0
- package/dist/react-native/index.d.ts +5 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +6 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/internalMetricsClient.d.ts +15 -0
- package/dist/react-native/internalMetricsClient.d.ts.map +1 -0
- package/dist/react-native/internalMetricsClient.js +23 -0
- package/dist/react-native/internalMetricsClient.js.map +1 -0
- package/dist/react-native/logger.d.ts +2 -0
- package/dist/react-native/logger.d.ts.map +1 -0
- package/dist/react-native/logger.js +5 -0
- package/dist/react-native/logger.js.map +1 -0
- package/dist/react-native/metricsClient.d.ts +28 -0
- package/dist/react-native/metricsClient.d.ts.map +1 -0
- package/dist/react-native/metricsClient.js +48 -0
- package/dist/react-native/metricsClient.js.map +1 -0
- package/dist/react-native/models/index.d.ts +2 -0
- package/dist/react-native/models/index.d.ts.map +1 -0
- package/dist/react-native/models/index.js +4 -0
- package/dist/react-native/models/index.js.map +1 -0
- package/dist/react-native/models/models.d.ts +141 -0
- package/dist/react-native/models/models.d.ts.map +1 -0
- package/dist/react-native/models/models.js +136 -0
- package/dist/react-native/models/models.js.map +1 -0
- package/dist/react-native/models.d.ts +167 -0
- package/dist/react-native/models.d.ts.map +1 -0
- package/dist/react-native/models.js +46 -0
- package/dist/react-native/models.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/static-helpers/urlTemplate.d.ts +5 -0
- package/dist/react-native/static-helpers/urlTemplate.d.ts.map +1 -0
- package/dist/react-native/static-helpers/urlTemplate.js +186 -0
- package/dist/react-native/static-helpers/urlTemplate.js.map +1 -0
- package/dist/react-native/utils.d.ts +13 -0
- package/dist/react-native/utils.d.ts.map +1 -0
- package/dist/react-native/utils.js +54 -0
- package/dist/react-native/utils.js.map +1 -0
- package/package.json +130 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/** The comma separated list of resource IDs to query metrics for. */
|
|
2
|
+
export interface ResourceIdList {
|
|
3
|
+
/** The list of resource IDs to query metrics for. */
|
|
4
|
+
resourceids?: string[];
|
|
5
|
+
}
|
|
6
|
+
export declare function resourceIdListSerializer(item: ResourceIdList): any;
|
|
7
|
+
/** The metrics result for a resource. */
|
|
8
|
+
export interface MetricResultsResponse {
|
|
9
|
+
/** The collection of metric data responses per resource, per metric. */
|
|
10
|
+
values?: MetricResultsResponseValuesItem[];
|
|
11
|
+
}
|
|
12
|
+
export declare function metricResultsResponseDeserializer(item: any): MetricResultsResponse;
|
|
13
|
+
export declare function metricResultsResponseValuesItemArrayDeserializer(result: Array<MetricResultsResponseValuesItem>): any[];
|
|
14
|
+
/** The metric data response for a resource. */
|
|
15
|
+
export interface MetricResultsResponseValuesItem {
|
|
16
|
+
/** The start time, in datetime format, for which the data was retrieved. */
|
|
17
|
+
startTime: string;
|
|
18
|
+
/** The end time, in datetime format, for which the data was retrieved. */
|
|
19
|
+
endTime: string;
|
|
20
|
+
/**
|
|
21
|
+
* The interval (window size) for which the metric data was returned in ISO 8601
|
|
22
|
+
* duration format with a special case for 'FULL' value that returns single
|
|
23
|
+
* datapoint for entire time span requested (*Examples: PT15M, PT1H, P1D, FULL*).
|
|
24
|
+
* This may be adjusted and different from what was originally requested if
|
|
25
|
+
* AutoAdjustTimegrain=true is specified.
|
|
26
|
+
*/
|
|
27
|
+
interval?: string;
|
|
28
|
+
/** The namespace of the metrics been queried */
|
|
29
|
+
namespace?: string;
|
|
30
|
+
/** The region of the resource been queried for metrics. */
|
|
31
|
+
resourceRegion?: string;
|
|
32
|
+
/** The resource that has been queried for metrics. */
|
|
33
|
+
resourceId?: string;
|
|
34
|
+
/** The value of the collection. */
|
|
35
|
+
metrics: Metric[];
|
|
36
|
+
}
|
|
37
|
+
export declare function metricResultsResponseValuesItemDeserializer(item: any): MetricResultsResponseValuesItem;
|
|
38
|
+
export declare function metricArrayDeserializer(result: Array<Metric>): any[];
|
|
39
|
+
/** The result data of a query. */
|
|
40
|
+
export interface Metric {
|
|
41
|
+
/** The metric Id. */
|
|
42
|
+
id: string;
|
|
43
|
+
/** The resource type of the metric resource. */
|
|
44
|
+
type: string;
|
|
45
|
+
/** The name and the display name of the metric, i.e. it is localizable string. */
|
|
46
|
+
name: string;
|
|
47
|
+
/** Detailed description of this metric. */
|
|
48
|
+
description?: string;
|
|
49
|
+
/** 'Success' or the error details on query failures for this metric. */
|
|
50
|
+
errorCode?: string;
|
|
51
|
+
/** Error message encountered querying this specific metric. */
|
|
52
|
+
errorMessage?: string;
|
|
53
|
+
/** The unit of the metric. */
|
|
54
|
+
unit: MetricUnit;
|
|
55
|
+
/** The time series returned when a data query is performed. */
|
|
56
|
+
timeseries: TimeSeriesElement[];
|
|
57
|
+
}
|
|
58
|
+
export declare function metricDeserializer(item: any): Metric;
|
|
59
|
+
export declare function localizableStringDeserializer(item: any): string;
|
|
60
|
+
/** The unit of the metric. */
|
|
61
|
+
export type MetricUnit = "Count" | "Bytes" | "Seconds" | "CountPerSecond" | "BytesPerSecond" | "Percent" | "MilliSeconds" | "ByteSeconds" | "Unspecified" | "Cores" | "MilliCores" | "NanoCores" | "BitsPerSecond";
|
|
62
|
+
export declare function timeSeriesElementArrayDeserializer(result: Array<TimeSeriesElement>): any[];
|
|
63
|
+
/**
|
|
64
|
+
* A time series result type. The discriminator value is always TimeSeries in this
|
|
65
|
+
* case.
|
|
66
|
+
*/
|
|
67
|
+
export interface TimeSeriesElement {
|
|
68
|
+
/** The metadata values returned if $filter was specified in the call. */
|
|
69
|
+
metadatavalues?: MetadataValue[];
|
|
70
|
+
/**
|
|
71
|
+
* An array of data points representing the metric values. This is only returned
|
|
72
|
+
* if a result type of data is specified.
|
|
73
|
+
*/
|
|
74
|
+
data?: MetricValue[];
|
|
75
|
+
}
|
|
76
|
+
export declare function timeSeriesElementDeserializer(item: any): TimeSeriesElement;
|
|
77
|
+
export declare function metadataValueArrayDeserializer(result: Array<MetadataValue>): any[];
|
|
78
|
+
/** Represents a metric metadata value. */
|
|
79
|
+
export interface MetadataValue {
|
|
80
|
+
/** The name of the metadata. */
|
|
81
|
+
name?: string;
|
|
82
|
+
/** The value of the metadata. */
|
|
83
|
+
value?: string;
|
|
84
|
+
}
|
|
85
|
+
export declare function metadataValueDeserializer(item: any): MetadataValue;
|
|
86
|
+
export declare function metricValueArrayDeserializer(result: Array<MetricValue>): any[];
|
|
87
|
+
/** Represents a metric value. */
|
|
88
|
+
export interface MetricValue {
|
|
89
|
+
/** The timestamp for the metric value in ISO 8601 format. */
|
|
90
|
+
timeStamp: Date;
|
|
91
|
+
/** The average value in the time range. */
|
|
92
|
+
average?: number;
|
|
93
|
+
/** The least value in the time range. */
|
|
94
|
+
minimum?: number;
|
|
95
|
+
/** The greatest value in the time range. */
|
|
96
|
+
maximum?: number;
|
|
97
|
+
/** The sum of all of the values in the time range. */
|
|
98
|
+
total?: number;
|
|
99
|
+
/**
|
|
100
|
+
* The number of samples in the time range. Can be used to determine the number of
|
|
101
|
+
* values that contributed to the average value.
|
|
102
|
+
*/
|
|
103
|
+
count?: number;
|
|
104
|
+
}
|
|
105
|
+
export declare function metricValueDeserializer(item: any): MetricValue;
|
|
106
|
+
/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. */
|
|
107
|
+
export interface ErrorResponse {
|
|
108
|
+
/** The error object. */
|
|
109
|
+
error?: ErrorDetail;
|
|
110
|
+
}
|
|
111
|
+
export declare function errorResponseDeserializer(item: any): ErrorResponse;
|
|
112
|
+
/** The error detail. */
|
|
113
|
+
export interface ErrorDetail {
|
|
114
|
+
/** The error code. */
|
|
115
|
+
readonly code?: string;
|
|
116
|
+
/** The error message. */
|
|
117
|
+
readonly message?: string;
|
|
118
|
+
/** The error target. */
|
|
119
|
+
readonly target?: string;
|
|
120
|
+
/** The error details. */
|
|
121
|
+
readonly details?: ErrorDetail[];
|
|
122
|
+
/** The error additional info. */
|
|
123
|
+
readonly additionalInfo?: ErrorAdditionalInfo[];
|
|
124
|
+
}
|
|
125
|
+
export declare function errorDetailDeserializer(item: any): ErrorDetail;
|
|
126
|
+
export declare function errorDetailArrayDeserializer(result: Array<ErrorDetail>): any[];
|
|
127
|
+
export declare function errorAdditionalInfoArrayDeserializer(result: Array<ErrorAdditionalInfo>): any[];
|
|
128
|
+
/** The resource management error additional info. */
|
|
129
|
+
export interface ErrorAdditionalInfo {
|
|
130
|
+
/** The additional info type. */
|
|
131
|
+
readonly type?: string;
|
|
132
|
+
/** The additional info. */
|
|
133
|
+
readonly info?: any;
|
|
134
|
+
}
|
|
135
|
+
export declare function errorAdditionalInfoDeserializer(item: any): ErrorAdditionalInfo;
|
|
136
|
+
/** Service API versions */
|
|
137
|
+
export declare enum KnownVersions {
|
|
138
|
+
/** The 2024-02-01 API version. */
|
|
139
|
+
V20240201 = "2024-02-01"
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/models/models.ts"],"names":[],"mappings":"AAKA,qEAAqE;AACrE,MAAM,WAAW,cAAc;IAC7B,qDAAqD;IACrD,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,cAAc,GAAG,GAAG,CAQlE;AAED,yCAAyC;AACzC,MAAM,WAAW,qBAAqB;IACpC,wEAAwE;IACxE,MAAM,CAAC,EAAE,+BAA+B,EAAE,CAAC;CAC5C;AAED,wBAAgB,iCAAiC,C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
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
export function resourceIdListSerializer(item) {
|
|
4
|
+
return {
|
|
5
|
+
resourceids: !item["resourceids"]
|
|
6
|
+
? item["resourceids"]
|
|
7
|
+
: item["resourceids"].map((p) => {
|
|
8
|
+
return p;
|
|
9
|
+
}),
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export function metricResultsResponseDeserializer(item) {
|
|
13
|
+
return {
|
|
14
|
+
values: !item["values"]
|
|
15
|
+
? item["values"]
|
|
16
|
+
: metricResultsResponseValuesItemArrayDeserializer(item["values"]),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export function metricResultsResponseValuesItemArrayDeserializer(result) {
|
|
20
|
+
return result.map((item) => {
|
|
21
|
+
return metricResultsResponseValuesItemDeserializer(item);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
export function metricResultsResponseValuesItemDeserializer(item) {
|
|
25
|
+
return {
|
|
26
|
+
startTime: item["starttime"],
|
|
27
|
+
endTime: item["endtime"],
|
|
28
|
+
interval: item["interval"],
|
|
29
|
+
namespace: item["namespace"],
|
|
30
|
+
resourceRegion: item["resourceregion"],
|
|
31
|
+
resourceId: item["resourceid"],
|
|
32
|
+
metrics: metricArrayDeserializer(item["value"]),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export function metricArrayDeserializer(result) {
|
|
36
|
+
return result.map((item) => {
|
|
37
|
+
return metricDeserializer(item);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
export function metricDeserializer(item) {
|
|
41
|
+
return {
|
|
42
|
+
id: item["id"],
|
|
43
|
+
type: item["type"],
|
|
44
|
+
name: localizableStringDeserializer(item["name"]),
|
|
45
|
+
description: item["displayDescription"],
|
|
46
|
+
errorCode: item["errorCode"],
|
|
47
|
+
errorMessage: item["errorMessage"],
|
|
48
|
+
unit: item["unit"],
|
|
49
|
+
timeseries: timeSeriesElementArrayDeserializer(item["timeseries"]),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export function localizableStringDeserializer(item) {
|
|
53
|
+
const deserialized = {
|
|
54
|
+
value: item["value"],
|
|
55
|
+
localizedValue: item["localizedValue"],
|
|
56
|
+
};
|
|
57
|
+
return deserialized.localizedValue || deserialized.value;
|
|
58
|
+
}
|
|
59
|
+
export function timeSeriesElementArrayDeserializer(result) {
|
|
60
|
+
return result.map((item) => {
|
|
61
|
+
return timeSeriesElementDeserializer(item);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
export function timeSeriesElementDeserializer(item) {
|
|
65
|
+
return {
|
|
66
|
+
metadatavalues: !item["metadatavalues"]
|
|
67
|
+
? item["metadatavalues"]
|
|
68
|
+
: metadataValueArrayDeserializer(item["metadatavalues"]),
|
|
69
|
+
data: !item["data"] ? item["data"] : metricValueArrayDeserializer(item["data"]),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
export function metadataValueArrayDeserializer(result) {
|
|
73
|
+
return result.map((item) => {
|
|
74
|
+
return metadataValueDeserializer(item);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
export function metadataValueDeserializer(item) {
|
|
78
|
+
return {
|
|
79
|
+
name: !item["name"] ? item["name"] : localizableStringDeserializer(item["name"]),
|
|
80
|
+
value: item["value"],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export function metricValueArrayDeserializer(result) {
|
|
84
|
+
return result.map((item) => {
|
|
85
|
+
return metricValueDeserializer(item);
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
export function metricValueDeserializer(item) {
|
|
89
|
+
return {
|
|
90
|
+
timeStamp: new Date(item["timeStamp"]),
|
|
91
|
+
average: item["average"],
|
|
92
|
+
minimum: item["minimum"],
|
|
93
|
+
maximum: item["maximum"],
|
|
94
|
+
total: item["total"],
|
|
95
|
+
count: item["count"],
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
export function errorResponseDeserializer(item) {
|
|
99
|
+
return {
|
|
100
|
+
error: !item["error"] ? item["error"] : errorDetailDeserializer(item["error"]),
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
export function errorDetailDeserializer(item) {
|
|
104
|
+
return {
|
|
105
|
+
code: item["code"],
|
|
106
|
+
message: item["message"],
|
|
107
|
+
target: item["target"],
|
|
108
|
+
details: !item["details"] ? item["details"] : errorDetailArrayDeserializer(item["details"]),
|
|
109
|
+
additionalInfo: !item["additionalInfo"]
|
|
110
|
+
? item["additionalInfo"]
|
|
111
|
+
: errorAdditionalInfoArrayDeserializer(item["additionalInfo"]),
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
export function errorDetailArrayDeserializer(result) {
|
|
115
|
+
return result.map((item) => {
|
|
116
|
+
return errorDetailDeserializer(item);
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
export function errorAdditionalInfoArrayDeserializer(result) {
|
|
120
|
+
return result.map((item) => {
|
|
121
|
+
return errorAdditionalInfoDeserializer(item);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
export function errorAdditionalInfoDeserializer(item) {
|
|
125
|
+
return {
|
|
126
|
+
type: item["type"],
|
|
127
|
+
info: item["info"],
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
/** Service API versions */
|
|
131
|
+
export var KnownVersions;
|
|
132
|
+
(function (KnownVersions) {
|
|
133
|
+
/** The 2024-02-01 API version. */
|
|
134
|
+
KnownVersions["V20240201"] = "2024-02-01";
|
|
135
|
+
})(KnownVersions || (KnownVersions = {}));
|
|
136
|
+
//# sourceMappingURL=models.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/models/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAUlC,MAAM,UAAU,wBAAwB,CAAC,IAAoB;IAC3D,OAAO;QACL,WAAW,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC;YAC/B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O;QACL,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC;QAClB,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC;QACxB,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC;QACtB,OAAO,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,4BAA4B,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC3F,cAAc,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC;YACrC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC;YACxB,CAAC,CAAC,oCAAoC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;KACjE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,4BAA4B,CAAC,MAA0B;IACrE,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,IAAS,EAAE,EAAE;QAC9B,OAAO,uBAAuB,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,oCAAoC,CAAC,MAAkC;IACrF,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,IAAS,EAAE,EAAE;QAC9B,OAAO,+BAA+B,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;AACL,CAAC;AAUD,MAAM,UAAU,+BAA+B,CAAC,IAAS;IACvD,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC;QAClB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC;KACnB,CAAC;AACJ,CAAC;AAED,2BAA2B;AAC3B,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,kCAAkC;IAClC,yCAAwB,CAAA;AAC1B,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\n/** The comma separated list of resource IDs to query metrics for. */\nexport interface ResourceIdList {\n /** The list of resource IDs to query metrics for. */\n resourceids?: string[];\n}\n\nexport function resourceIdListSerializer(item: ResourceIdList): any {\n return {\n resourceids: !item[\"resourceids\"]\n ? item[\"resourceids\"]\n : item[\"resourceids\"].map((p: string) => {\n return p;\n }),\n };\n}\n\n/** The metrics result for a resource. */\nexport interface MetricResultsResponse {\n /** The collection of metric data responses per resource, per metric. */\n values?: MetricResultsResponseValuesItem[];\n}\n\nexport function metricResultsResponseDeserializer(item: any): MetricResultsResponse {\n return {\n values: !item[\"values\"]\n ? item[\"values\"]\n : metricResultsResponseValuesItemArrayDeserializer(item[\"values\"]),\n };\n}\n\nexport function metricResultsResponseValuesItemArrayDeserializer(\n result: Array<MetricResultsResponseValuesItem>,\n): any[] {\n return result.map((item: any) => {\n return metricResultsResponseValuesItemDeserializer(item);\n });\n}\n\n/** The metric data response for a resource. */\nexport interface MetricResultsResponseValuesItem {\n /** The start time, in datetime format, for which the data was retrieved. */\n startTime: string;\n /** The end time, in datetime format, for which the data was retrieved. */\n endTime: string;\n /**\n * The interval (window size) for which the metric data was returned in ISO 8601\n * duration format with a special case for 'FULL' value that returns single\n * datapoint for entire time span requested (*Examples: PT15M, PT1H, P1D, FULL*).\n * This may be adjusted and different from what was originally requested if\n * AutoAdjustTimegrain=true is specified.\n */\n interval?: string;\n /** The namespace of the metrics been queried */\n namespace?: string;\n /** The region of the resource been queried for metrics. */\n resourceRegion?: string;\n /** The resource that has been queried for metrics. */\n resourceId?: string;\n /** The value of the collection. */\n metrics: Metric[];\n}\n\nexport function metricResultsResponseValuesItemDeserializer(\n item: any,\n): MetricResultsResponseValuesItem {\n return {\n startTime: item[\"starttime\"],\n endTime: item[\"endtime\"],\n interval: item[\"interval\"],\n namespace: item[\"namespace\"],\n resourceRegion: item[\"resourceregion\"],\n resourceId: item[\"resourceid\"],\n metrics: metricArrayDeserializer(item[\"value\"]),\n };\n}\n\nexport function metricArrayDeserializer(result: Array<Metric>): any[] {\n return result.map((item: any) => {\n return metricDeserializer(item);\n });\n}\n\n/** The result data of a query. */\nexport interface Metric {\n /** The metric Id. */\n id: string;\n /** The resource type of the metric resource. */\n type: string;\n /** The name and the display name of the metric, i.e. it is localizable string. */\n name: string;\n /** Detailed description of this metric. */\n description?: string;\n /** 'Success' or the error details on query failures for this metric. */\n errorCode?: string;\n /** Error message encountered querying this specific metric. */\n errorMessage?: string;\n /** The unit of the metric. */\n unit: MetricUnit;\n /** The time series returned when a data query is performed. */\n timeseries: TimeSeriesElement[];\n}\n\nexport function metricDeserializer(item: any): Metric {\n return {\n id: item[\"id\"],\n type: item[\"type\"],\n name: localizableStringDeserializer(item[\"name\"]),\n description: item[\"displayDescription\"],\n errorCode: item[\"errorCode\"],\n errorMessage: item[\"errorMessage\"],\n unit: item[\"unit\"],\n timeseries: timeSeriesElementArrayDeserializer(item[\"timeseries\"]),\n };\n}\n\n/** The localizable string class. */\ninterface LocalizableString {\n /** The invariant value. */\n value: string;\n /** The display name. */\n localizedValue?: string;\n}\n\nexport function localizableStringDeserializer(item: any): string {\n const deserialized: LocalizableString = {\n value: item[\"value\"],\n localizedValue: item[\"localizedValue\"],\n };\n return deserialized.localizedValue || deserialized.value;\n}\n\n/** The unit of the metric. */\nexport type MetricUnit =\n | \"Count\"\n | \"Bytes\"\n | \"Seconds\"\n | \"CountPerSecond\"\n | \"BytesPerSecond\"\n | \"Percent\"\n | \"MilliSeconds\"\n | \"ByteSeconds\"\n | \"Unspecified\"\n | \"Cores\"\n | \"MilliCores\"\n | \"NanoCores\"\n | \"BitsPerSecond\";\n\nexport function timeSeriesElementArrayDeserializer(result: Array<TimeSeriesElement>): any[] {\n return result.map((item: any) => {\n return timeSeriesElementDeserializer(item);\n });\n}\n\n/**\n * A time series result type. The discriminator value is always TimeSeries in this\n * case.\n */\nexport interface TimeSeriesElement {\n /** The metadata values returned if $filter was specified in the call. */\n metadatavalues?: MetadataValue[];\n /**\n * An array of data points representing the metric values. This is only returned\n * if a result type of data is specified.\n */\n data?: MetricValue[];\n}\n\nexport function timeSeriesElementDeserializer(item: any): TimeSeriesElement {\n return {\n metadatavalues: !item[\"metadatavalues\"]\n ? item[\"metadatavalues\"]\n : metadataValueArrayDeserializer(item[\"metadatavalues\"]),\n data: !item[\"data\"] ? item[\"data\"] : metricValueArrayDeserializer(item[\"data\"]),\n };\n}\n\nexport function metadataValueArrayDeserializer(result: Array<MetadataValue>): any[] {\n return result.map((item: any) => {\n return metadataValueDeserializer(item);\n });\n}\n\n/** Represents a metric metadata value. */\nexport interface MetadataValue {\n /** The name of the metadata. */\n name?: string;\n /** The value of the metadata. */\n value?: string;\n}\n\nexport function metadataValueDeserializer(item: any): MetadataValue {\n return {\n name: !item[\"name\"] ? item[\"name\"] : localizableStringDeserializer(item[\"name\"]),\n value: item[\"value\"],\n };\n}\n\nexport function metricValueArrayDeserializer(result: Array<MetricValue>): any[] {\n return result.map((item: any) => {\n return metricValueDeserializer(item);\n });\n}\n\n/** Represents a metric value. */\nexport interface MetricValue {\n /** The timestamp for the metric value in ISO 8601 format. */\n timeStamp: Date;\n /** The average value in the time range. */\n average?: number;\n /** The least value in the time range. */\n minimum?: number;\n /** The greatest value in the time range. */\n maximum?: number;\n /** The sum of all of the values in the time range. */\n total?: number;\n /**\n * The number of samples in the time range. Can be used to determine the number of\n * values that contributed to the average value.\n */\n count?: number;\n}\n\nexport function metricValueDeserializer(item: any): MetricValue {\n return {\n timeStamp: new Date(item[\"timeStamp\"]),\n average: item[\"average\"],\n minimum: item[\"minimum\"],\n maximum: item[\"maximum\"],\n total: item[\"total\"],\n count: item[\"count\"],\n };\n}\n\n/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. */\nexport interface ErrorResponse {\n /** The error object. */\n error?: ErrorDetail;\n}\n\nexport function errorResponseDeserializer(item: any): ErrorResponse {\n return {\n error: !item[\"error\"] ? item[\"error\"] : errorDetailDeserializer(item[\"error\"]),\n };\n}\n\n/** The error detail. */\nexport interface ErrorDetail {\n /** The error code. */\n readonly code?: string;\n /** The error message. */\n readonly message?: string;\n /** The error target. */\n readonly target?: string;\n /** The error details. */\n readonly details?: ErrorDetail[];\n /** The error additional info. */\n readonly additionalInfo?: ErrorAdditionalInfo[];\n}\n\nexport function errorDetailDeserializer(item: any): ErrorDetail {\n return {\n code: item[\"code\"],\n message: item[\"message\"],\n target: item[\"target\"],\n details: !item[\"details\"] ? item[\"details\"] : errorDetailArrayDeserializer(item[\"details\"]),\n additionalInfo: !item[\"additionalInfo\"]\n ? item[\"additionalInfo\"]\n : errorAdditionalInfoArrayDeserializer(item[\"additionalInfo\"]),\n };\n}\n\nexport function errorDetailArrayDeserializer(result: Array<ErrorDetail>): any[] {\n return result.map((item: any) => {\n return errorDetailDeserializer(item);\n });\n}\n\nexport function errorAdditionalInfoArrayDeserializer(result: Array<ErrorAdditionalInfo>): any[] {\n return result.map((item: any) => {\n return errorAdditionalInfoDeserializer(item);\n });\n}\n\n/** The resource management error additional info. */\nexport interface ErrorAdditionalInfo {\n /** The additional info type. */\n readonly type?: string;\n /** The additional info. */\n readonly info?: any;\n}\n\nexport function errorAdditionalInfoDeserializer(item: any): ErrorAdditionalInfo {\n return {\n type: item[\"type\"],\n info: item[\"info\"],\n };\n}\n\n/** Service API versions */\nexport enum KnownVersions {\n /** The 2024-02-01 API version. */\n V20240201 = \"2024-02-01\",\n}\n"]}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import type { MetricsClientOptionalParams } from "./internalMetricsClient.js";
|
|
2
|
+
import type { Metric } from "./models/models.js";
|
|
3
|
+
/**
|
|
4
|
+
* Known values for Monitor Audience
|
|
5
|
+
*/
|
|
6
|
+
export declare enum KnownMonitorMetricsQueryAudience {
|
|
7
|
+
/**
|
|
8
|
+
* Audience for Azure China
|
|
9
|
+
*/
|
|
10
|
+
AzureChina = "https://management.chinacloudapi.cn",
|
|
11
|
+
/**
|
|
12
|
+
* Audience for Azure Government
|
|
13
|
+
*/
|
|
14
|
+
AzureGovernment = "https://management.usgovcloudapi.net",
|
|
15
|
+
/**
|
|
16
|
+
* Audience for Azure Public
|
|
17
|
+
*/
|
|
18
|
+
AzurePublicCloud = "https://management.azure.com"
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Options for configuring the MetricsClient.
|
|
22
|
+
*/
|
|
23
|
+
export interface MetricsClientOptions extends MetricsClientOptionalParams {
|
|
24
|
+
/**
|
|
25
|
+
* The Audience to use for authentication with Microsoft Entra ID. The
|
|
26
|
+
* audience is not considered when using a shared key.
|
|
27
|
+
* {@link KnownMonitorMetricsQueryAudience} can be used interchangeably with audience
|
|
28
|
+
*/
|
|
29
|
+
audience?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The endpoint to use when communicating with the service.
|
|
32
|
+
*/
|
|
33
|
+
endpoint?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Options for querying metrics for multiple resources.
|
|
37
|
+
*/
|
|
38
|
+
export interface MetricsQueryResourcesOptions {
|
|
39
|
+
/**
|
|
40
|
+
* The start time of the query.
|
|
41
|
+
*/
|
|
42
|
+
startTime?: Date;
|
|
43
|
+
/** The end time of the query. */
|
|
44
|
+
endTime?: Date;
|
|
45
|
+
/**
|
|
46
|
+
* The interval (i.e. timegrain) of the query in ISO 8601 duration format.
|
|
47
|
+
* Defaults to PT1M. Special case for 'FULL' value that returns single datapoint
|
|
48
|
+
* for entire time span requested.
|
|
49
|
+
* *Examples: PT15M, PT1H, P1D, FULL*
|
|
50
|
+
*
|
|
51
|
+
* {@link Durations}
|
|
52
|
+
*/
|
|
53
|
+
interval?: string;
|
|
54
|
+
/** The list of aggregation types (comma separated) to retrieve. *Examples: average, minimum, maximum* */
|
|
55
|
+
aggregation?: string;
|
|
56
|
+
/**
|
|
57
|
+
* The maximum number of records to retrieve per resource ID in the request.
|
|
58
|
+
* Valid only if filter is specified.
|
|
59
|
+
* Defaults to 10.
|
|
60
|
+
*/
|
|
61
|
+
top?: number;
|
|
62
|
+
/**
|
|
63
|
+
* The aggregation to use for sorting results and the direction of the sort.
|
|
64
|
+
* Only one order can be specified.
|
|
65
|
+
* *Examples: sum asc*
|
|
66
|
+
*/
|
|
67
|
+
orderBy?: string;
|
|
68
|
+
/**
|
|
69
|
+
* The filter is used to reduce the set of metric data
|
|
70
|
+
* returned.<br>Example:<br>Metric contains metadata A, B and C.<br>- Return all
|
|
71
|
+
* time series of C where A = a1 and B = b1 or b2<br>**filter=A eq ‘a1’ and B eq
|
|
72
|
+
* ‘b1’ or B eq ‘b2’ and C eq ‘*’**<br>- Invalid variant:<br>**filter=A eq ‘a1’
|
|
73
|
+
* and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**<br>This is invalid because the logical
|
|
74
|
+
* or operator cannot separate two different metadata names.<br>- Return all time
|
|
75
|
+
* series where A = a1, B = b1 and C = c1:<br>**filter=A eq ‘a1’ and B eq ‘b1’ and
|
|
76
|
+
* C eq ‘c1’**<br>- Return all time series where A = a1<br>**filter=A eq ‘a1’ and
|
|
77
|
+
* B eq ‘*’ and C eq ‘*’**.
|
|
78
|
+
*/
|
|
79
|
+
filter?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Dimension name(s) to rollup results by. For example if you only want to see
|
|
82
|
+
* metric values with a filter like 'City eq Seattle or City eq Tacoma' but don't
|
|
83
|
+
* want to see separate values for each city, you can specify 'RollUpBy=City' to
|
|
84
|
+
* see the results for Seattle and Tacoma rolled up into one timeseries.
|
|
85
|
+
*/
|
|
86
|
+
rollUpBy?: string;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Query time interval type that supports multiple formats.
|
|
90
|
+
*/
|
|
91
|
+
export type QueryTimeInterval = {
|
|
92
|
+
startTime: Date;
|
|
93
|
+
endTime: Date;
|
|
94
|
+
} | {
|
|
95
|
+
startTime: Date;
|
|
96
|
+
duration: string;
|
|
97
|
+
} | {
|
|
98
|
+
duration: string;
|
|
99
|
+
endTime: Date;
|
|
100
|
+
} | {
|
|
101
|
+
duration: string;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Result of a metrics query for a single resource.
|
|
105
|
+
*/
|
|
106
|
+
export interface MetricsQueryResult {
|
|
107
|
+
/**
|
|
108
|
+
* The cost associated with the query.
|
|
109
|
+
*/
|
|
110
|
+
cost?: number;
|
|
111
|
+
/**
|
|
112
|
+
* The interval (window size) for which the metric data was returned.
|
|
113
|
+
*/
|
|
114
|
+
granularity?: string;
|
|
115
|
+
/**
|
|
116
|
+
* The metrics data.
|
|
117
|
+
*/
|
|
118
|
+
metrics: Metric[];
|
|
119
|
+
/**
|
|
120
|
+
* The namespace of the metrics been queried.
|
|
121
|
+
*/
|
|
122
|
+
namespace?: string;
|
|
123
|
+
/**
|
|
124
|
+
* The resource that has been queried for metrics.
|
|
125
|
+
*/
|
|
126
|
+
resourceId?: string;
|
|
127
|
+
/**
|
|
128
|
+
* The region of the resource been queried for metrics.
|
|
129
|
+
*/
|
|
130
|
+
resourceRegion?: string;
|
|
131
|
+
/**
|
|
132
|
+
* The timespan for the query.
|
|
133
|
+
*/
|
|
134
|
+
timespan: QueryTimeInterval;
|
|
135
|
+
/**
|
|
136
|
+
* Helper method to get a metric by name.
|
|
137
|
+
* @param metricName - The name of the metric to retrieve.
|
|
138
|
+
* @returns The metric if found, undefined otherwise.
|
|
139
|
+
*/
|
|
140
|
+
getMetricByName(metricName: string): Metric | undefined;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Aliases for some common ISO8601 durations.
|
|
144
|
+
*/
|
|
145
|
+
export declare const Durations: {
|
|
146
|
+
/** Alias for ISO8601 value 'P7D' */
|
|
147
|
+
readonly sevenDays: "P7D";
|
|
148
|
+
/** Alias for ISO8601 value 'P3D' */
|
|
149
|
+
readonly threeDays: "P3D";
|
|
150
|
+
/** Alias for ISO8601 value 'P2D' */
|
|
151
|
+
readonly twoDays: "P2D";
|
|
152
|
+
/** Alias for ISO8601 value 'P1D' */
|
|
153
|
+
readonly oneDay: "P1D";
|
|
154
|
+
/** Alias for ISO8601 value 'PT1H' */
|
|
155
|
+
readonly oneHour: "PT1H";
|
|
156
|
+
/** Alias for ISO8601 value 'PT4H' */
|
|
157
|
+
readonly fourHours: "PT4H";
|
|
158
|
+
/** Alias for ISO8601 value 'PT24H' */
|
|
159
|
+
readonly twentyFourHours: "PT24H";
|
|
160
|
+
/** Alias for ISO8601 value 'PT48H' */
|
|
161
|
+
readonly fortyEightHours: "PT48H";
|
|
162
|
+
/** Alias for ISO8601 value 'PT30M' */
|
|
163
|
+
readonly thirtyMinutes: "PT30M";
|
|
164
|
+
/** Alias for ISO8601 value 'PT5M' */
|
|
165
|
+
readonly fiveMinutes: "PT5M";
|
|
166
|
+
};
|
|
167
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;GAEG;AACH,oBAAY,gCAAgC;IAC1C;;OAEG;IACH,UAAU,wCAAwC;IAClD;;OAEG;IACH,eAAe,yCAAyC;IACxD;;OAEG;IACH,gBAAgB,iCAAiC;CAClD;AAED;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,2BAA2B;IACvE;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAMD;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,iCAAiC;IACjC,OAAO,CAAC,EAAE,IAAI,CAAC;IACf;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yGAAyG;IACzG,WAAW,CAAC,EAAE,MAAM,CAAC;IAC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+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
/**
|
|
4
|
+
* Known values for Monitor Audience
|
|
5
|
+
*/
|
|
6
|
+
export var KnownMonitorMetricsQueryAudience;
|
|
7
|
+
(function (KnownMonitorMetricsQueryAudience) {
|
|
8
|
+
/**
|
|
9
|
+
* Audience for Azure China
|
|
10
|
+
*/
|
|
11
|
+
KnownMonitorMetricsQueryAudience["AzureChina"] = "https://management.chinacloudapi.cn";
|
|
12
|
+
/**
|
|
13
|
+
* Audience for Azure Government
|
|
14
|
+
*/
|
|
15
|
+
KnownMonitorMetricsQueryAudience["AzureGovernment"] = "https://management.usgovcloudapi.net";
|
|
16
|
+
/**
|
|
17
|
+
* Audience for Azure Public
|
|
18
|
+
*/
|
|
19
|
+
KnownMonitorMetricsQueryAudience["AzurePublicCloud"] = "https://management.azure.com";
|
|
20
|
+
})(KnownMonitorMetricsQueryAudience || (KnownMonitorMetricsQueryAudience = {}));
|
|
21
|
+
/**
|
|
22
|
+
* Aliases for some common ISO8601 durations.
|
|
23
|
+
*/
|
|
24
|
+
export const Durations = {
|
|
25
|
+
/** Alias for ISO8601 value 'P7D' */
|
|
26
|
+
sevenDays: "P7D",
|
|
27
|
+
/** Alias for ISO8601 value 'P3D' */
|
|
28
|
+
threeDays: "P3D",
|
|
29
|
+
/** Alias for ISO8601 value 'P2D' */
|
|
30
|
+
twoDays: "P2D",
|
|
31
|
+
/** Alias for ISO8601 value 'P1D' */
|
|
32
|
+
oneDay: "P1D",
|
|
33
|
+
/** Alias for ISO8601 value 'PT1H' */
|
|
34
|
+
oneHour: "PT1H",
|
|
35
|
+
/** Alias for ISO8601 value 'PT4H' */
|
|
36
|
+
fourHours: "PT4H",
|
|
37
|
+
/** Alias for ISO8601 value 'PT24H' */
|
|
38
|
+
twentyFourHours: "PT24H",
|
|
39
|
+
/** Alias for ISO8601 value 'PT48H' */
|
|
40
|
+
fortyEightHours: "PT48H",
|
|
41
|
+
/** Alias for ISO8601 value 'PT30M' */
|
|
42
|
+
thirtyMinutes: "PT30M",
|
|
43
|
+
/** Alias for ISO8601 value 'PT5M' */
|
|
44
|
+
fiveMinutes: "PT5M",
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=models.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC;;GAEG;AACH,MAAM,CAAN,IAAY,gCAaX;AAbD,WAAY,gCAAgC;IAC1C;;OAEG;IACH,sFAAkD,CAAA;IAClD;;OAEG;IACH,4FAAwD,CAAA;IACxD;;OAEG;IACH,qFAAiD,CAAA;AACnD,CAAC,EAbW,gCAAgC,KAAhC,gCAAgC,QAa3C;AA6HD;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,oCAAoC;IACpC,SAAS,EAAE,KAAK;IAChB,oCAAoC;IACpC,SAAS,EAAE,KAAK;IAChB,oCAAoC;IACpC,OAAO,EAAE,KAAK;IACd,oCAAoC;IACpC,MAAM,EAAE,KAAK;IACb,qCAAqC;IACrC,OAAO,EAAE,MAAM;IACf,qCAAqC;IACrC,SAAS,EAAE,MAAM;IACjB,sCAAsC;IACtC,eAAe,EAAE,OAAO;IACxB,sCAAsC;IACtC,eAAe,EAAE,OAAO;IACxB,sCAAsC;IACtC,aAAa,EAAE,OAAO;IACtB,qCAAqC;IACrC,WAAW,EAAE,MAAM;CACX,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { MetricsClientOptionalParams } from \"./internalMetricsClient.js\";\nimport type { Metric } from \"./models/models.js\";\n\n/**\n * Known values for Monitor Audience\n */\nexport enum KnownMonitorMetricsQueryAudience {\n /**\n * Audience for Azure China\n */\n AzureChina = \"https://management.chinacloudapi.cn\",\n /**\n * Audience for Azure Government\n */\n AzureGovernment = \"https://management.usgovcloudapi.net\",\n /**\n * Audience for Azure Public\n */\n AzurePublicCloud = \"https://management.azure.com\",\n}\n\n/**\n * Options for configuring the MetricsClient.\n */\nexport interface MetricsClientOptions extends MetricsClientOptionalParams {\n /**\n * The Audience to use for authentication with Microsoft Entra ID. The\n * audience is not considered when using a shared key.\n * {@link KnownMonitorMetricsQueryAudience} can be used interchangeably with audience\n */\n audience?: string;\n /**\n * The endpoint to use when communicating with the service.\n */\n endpoint?: string;\n}\n\n// MetricsQueryResourcesOptions is equivalent to Omit<QueryResourcesOptionalParams, \"startTime\" | \"endTime\"> {\n// endTime?: Date;\n// startTime?: Date;\n// }\n/**\n * Options for querying metrics for multiple resources.\n */\nexport interface MetricsQueryResourcesOptions {\n /**\n * The start time of the query.\n */\n startTime?: Date;\n /** The end time of the query. */\n endTime?: Date;\n /**\n * The interval (i.e. timegrain) of the query in ISO 8601 duration format.\n * Defaults to PT1M. Special case for 'FULL' value that returns single datapoint\n * for entire time span requested.\n * *Examples: PT15M, PT1H, P1D, FULL*\n *\n * {@link Durations}\n */\n interval?: string;\n /** The list of aggregation types (comma separated) to retrieve. *Examples: average, minimum, maximum* */\n aggregation?: string;\n /**\n * The maximum number of records to retrieve per resource ID in the request.\n * Valid only if filter is specified.\n * Defaults to 10.\n */\n top?: number;\n /**\n * The aggregation to use for sorting results and the direction of the sort.\n * Only one order can be specified.\n * *Examples: sum asc*\n */\n orderBy?: string;\n /**\n * The filter is used to reduce the set of metric data\n * returned.<br>Example:<br>Metric contains metadata A, B and C.<br>- Return all\n * time series of C where A = a1 and B = b1 or b2<br>**filter=A eq ‘a1’ and B eq\n * ‘b1’ or B eq ‘b2’ and C eq ‘*’**<br>- Invalid variant:<br>**filter=A eq ‘a1’\n * and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**<br>This is invalid because the logical\n * or operator cannot separate two different metadata names.<br>- Return all time\n * series where A = a1, B = b1 and C = c1:<br>**filter=A eq ‘a1’ and B eq ‘b1’ and\n * C eq ‘c1’**<br>- Return all time series where A = a1<br>**filter=A eq ‘a1’ and\n * B eq ‘*’ and C eq ‘*’**.\n */\n filter?: string;\n /**\n * Dimension name(s) to rollup results by. For example if you only want to see\n * metric values with a filter like 'City eq Seattle or City eq Tacoma' but don't\n * want to see separate values for each city, you can specify 'RollUpBy=City' to\n * see the results for Seattle and Tacoma rolled up into one timeseries.\n */\n rollUpBy?: string;\n}\n\n/**\n * Query time interval type that supports multiple formats.\n */\nexport type QueryTimeInterval =\n | { startTime: Date; endTime: Date }\n | { startTime: Date; duration: string }\n | { duration: string; endTime: Date }\n | { duration: string };\n\n/**\n * Result of a metrics query for a single resource.\n */\nexport interface MetricsQueryResult {\n /**\n * The cost associated with the query.\n */\n cost?: number;\n /**\n * The interval (window size) for which the metric data was returned.\n */\n granularity?: string;\n /**\n * The metrics data.\n */\n metrics: Metric[];\n /**\n * The namespace of the metrics been queried.\n */\n namespace?: string;\n /**\n * The resource that has been queried for metrics.\n */\n resourceId?: string;\n /**\n * The region of the resource been queried for metrics.\n */\n resourceRegion?: string;\n /**\n * The timespan for the query.\n */\n timespan: QueryTimeInterval;\n /**\n * Helper method to get a metric by name.\n * @param metricName - The name of the metric to retrieve.\n * @returns The metric if found, undefined otherwise.\n */\n getMetricByName(metricName: string): Metric | undefined;\n}\n\n/**\n * Aliases for some common ISO8601 durations.\n */\nexport const Durations = {\n /** Alias for ISO8601 value 'P7D' */\n sevenDays: \"P7D\",\n /** Alias for ISO8601 value 'P3D' */\n threeDays: \"P3D\",\n /** Alias for ISO8601 value 'P2D' */\n twoDays: \"P2D\",\n /** Alias for ISO8601 value 'P1D' */\n oneDay: \"P1D\",\n /** Alias for ISO8601 value 'PT1H' */\n oneHour: \"PT1H\",\n /** Alias for ISO8601 value 'PT4H' */\n fourHours: \"PT4H\",\n /** Alias for ISO8601 value 'PT24H' */\n twentyFourHours: \"PT24H\",\n /** Alias for ISO8601 value 'PT48H' */\n fortyEightHours: \"PT48H\",\n /** Alias for ISO8601 value 'PT30M' */\n thirtyMinutes: \"PT30M\",\n /** Alias for ISO8601 value 'PT5M' */\n fiveMinutes: \"PT5M\",\n} as const;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"urlTemplate.d.ts","sourceRoot":"","sources":["../../../src/static-helpers/urlTemplate.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,kBAAkB;IAEjC,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AA4JD,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC5B,MAAM,CAAC,EAAE,kBAAkB,GAC1B,MAAM,CAgCR"}
|