/
index.ts
606 lines (530 loc) · 22.1 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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
/*
* 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 coreClient from "@azure/core-client";
/** Subnet first address, scope, and/or last address. */
export interface EndpointPropertiesSubnetsItem {
/** First address in the subnet. */
first?: string;
/** Last address in the subnet. */
last?: string;
/** Block size (number of leading bits in the subnet mask). */
scope?: number;
}
/** Custom header name and value. */
export interface EndpointPropertiesCustomHeadersItem {
/** Header name. */
name?: string;
/** Header value. */
value?: string;
}
/** The core properties of ARM resources */
export interface Resource {
/** Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName} */
id?: string;
/** The name of the resource */
name?: string;
/** The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. */
type?: string;
}
/** An error returned by the Azure Resource Manager */
export interface CloudError {
/** The content of the error. */
error?: CloudErrorBody;
}
/** The content of an error returned by the Azure Resource Manager */
export interface CloudErrorBody {
/** Error code */
code?: string;
/** Error message */
message?: string;
/** Error target */
target?: string;
/** Error details */
details?: CloudErrorBody[];
}
/** The result of the request or operation. */
export interface DeleteOperationResult {
/**
* The result of the operation or request.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly operationResult?: boolean;
}
/** Parameters supplied to check Traffic Manager name operation. */
export interface CheckTrafficManagerRelativeDnsNameAvailabilityParameters {
/** The name of the resource. */
name?: string;
/** The type of the resource. */
type?: string;
}
/** Class representing a Traffic Manager Name Availability response. */
export interface TrafficManagerNameAvailability {
/** The relative name. */
name?: string;
/** Traffic Manager profile resource type. */
type?: string;
/** Describes whether the relative name is available or not. */
nameAvailable?: boolean;
/** The reason why the name is not available, when applicable. */
reason?: string;
/** Descriptive message that explains why the name is not available, when applicable. */
message?: string;
}
/** The list Traffic Manager profiles operation response. */
export interface ProfileListResult {
/** Gets the list of Traffic manager profiles. */
value?: Profile[];
}
/** Class containing DNS settings in a Traffic Manager profile. */
export interface DnsConfig {
/** The relative DNS name provided by this Traffic Manager profile. This value is combined with the DNS domain name used by Azure Traffic Manager to form the fully-qualified domain name (FQDN) of the profile. */
relativeName?: string;
/**
* The fully-qualified domain name (FQDN) of the Traffic Manager profile. This is formed from the concatenation of the RelativeName with the DNS domain used by Azure Traffic Manager.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly fqdn?: string;
/** The DNS Time-To-Live (TTL), in seconds. This informs the local DNS resolvers and DNS clients how long to cache DNS responses provided by this Traffic Manager profile. */
ttl?: number;
}
/** Class containing endpoint monitoring settings in a Traffic Manager profile. */
export interface MonitorConfig {
/** The profile-level monitoring status of the Traffic Manager profile. */
profileMonitorStatus?: ProfileMonitorStatus;
/** The protocol (HTTP, HTTPS or TCP) used to probe for endpoint health. */
protocol?: MonitorProtocol;
/** The TCP port used to probe for endpoint health. */
port?: number;
/** The path relative to the endpoint domain name used to probe for endpoint health. */
path?: string;
/** The monitor interval for endpoints in this profile. This is the interval at which Traffic Manager will check the health of each endpoint in this profile. */
intervalInSeconds?: number;
/** The monitor timeout for endpoints in this profile. This is the time that Traffic Manager allows endpoints in this profile to response to the health check. */
timeoutInSeconds?: number;
/** The number of consecutive failed health check that Traffic Manager tolerates before declaring an endpoint in this profile Degraded after the next failed health check. */
toleratedNumberOfFailures?: number;
/** List of custom headers. */
customHeaders?: MonitorConfigCustomHeadersItem[];
/** List of expected status code ranges. */
expectedStatusCodeRanges?: MonitorConfigExpectedStatusCodeRangesItem[];
}
/** Custom header name and value. */
export interface MonitorConfigCustomHeadersItem {
/** Header name. */
name?: string;
/** Header value. */
value?: string;
}
/** Min and max value of a status code range. */
export interface MonitorConfigExpectedStatusCodeRangesItem {
/** Min status code. */
min?: number;
/** Max status code. */
max?: number;
}
/** Class representing a region in the Geographic hierarchy used with the Geographic traffic routing method. */
export interface Region {
/** The code of the region */
code?: string;
/** The name of the region */
name?: string;
/** The list of Regions grouped under this Region in the Geographic Hierarchy. */
regions?: Region[];
}
/** Class which is a sparse representation of a Traffic Manager endpoint. */
export interface HeatMapEndpoint {
/** The ARM Resource ID of this Traffic Manager endpoint. */
resourceId?: string;
/** A number uniquely identifying this endpoint in query experiences. */
endpointId?: number;
}
/** Class representing a Traffic Manager HeatMap traffic flow properties. */
export interface TrafficFlow {
/** The IP address that this query experience originated from. */
sourceIp?: string;
/** The approximate latitude that these queries originated from. */
latitude?: number;
/** The approximate longitude that these queries originated from. */
longitude?: number;
/** The query experiences produced in this HeatMap calculation. */
queryExperiences?: QueryExperience[];
}
/** Class representing a Traffic Manager HeatMap query experience properties. */
export interface QueryExperience {
/** The id of the endpoint from the 'endpoints' array which these queries were routed to. */
endpointId: number;
/** The number of queries originating from this location. */
queryCount: number;
/** The latency experienced by queries originating from this location. */
latency?: number;
}
/** The resource model definition for a ARM proxy resource. It will have everything other than required location and tags */
export interface ProxyResource extends Resource {}
/** The resource model definition for a ARM tracked top level resource */
export interface TrackedResource extends Resource {
/** Resource tags. */
tags?: { [propertyName: string]: string };
/** The Azure Region where the resource lives */
location?: string;
}
/** Class representing a Traffic Manager endpoint. */
export interface Endpoint extends ProxyResource {
/** The Azure Resource URI of the of the endpoint. Not applicable to endpoints of type 'ExternalEndpoints'. */
targetResourceId?: string;
/** The fully-qualified DNS name or IP address of the endpoint. Traffic Manager returns this value in DNS responses to direct traffic to this endpoint. */
target?: string;
/** The status of the endpoint. If the endpoint is Enabled, it is probed for endpoint health and is included in the traffic routing method. */
endpointStatus?: EndpointStatus;
/** The weight of this endpoint when using the 'Weighted' traffic routing method. Possible values are from 1 to 1000. */
weight?: number;
/** The priority of this endpoint when using the 'Priority' traffic routing method. Possible values are from 1 to 1000, lower values represent higher priority. This is an optional parameter. If specified, it must be specified on all endpoints, and no two endpoints can share the same priority value. */
priority?: number;
/** Specifies the location of the external or nested endpoints when using the 'Performance' traffic routing method. */
endpointLocation?: string;
/** The monitoring status of the endpoint. */
endpointMonitorStatus?: EndpointMonitorStatus;
/** The minimum number of endpoints that must be available in the child profile in order for the parent profile to be considered available. Only applicable to endpoint of type 'NestedEndpoints'. */
minChildEndpoints?: number;
/** The minimum number of IPv4 (DNS record type A) endpoints that must be available in the child profile in order for the parent profile to be considered available. Only applicable to endpoint of type 'NestedEndpoints'. */
minChildEndpointsIPv4?: number;
/** The minimum number of IPv6 (DNS record type AAAA) endpoints that must be available in the child profile in order for the parent profile to be considered available. Only applicable to endpoint of type 'NestedEndpoints'. */
minChildEndpointsIPv6?: number;
/** The list of countries/regions mapped to this endpoint when using the 'Geographic' traffic routing method. Please consult Traffic Manager Geographic documentation for a full list of accepted values. */
geoMapping?: string[];
/** The list of subnets, IP addresses, and/or address ranges mapped to this endpoint when using the 'Subnet' traffic routing method. An empty list will match all ranges not covered by other endpoints. */
subnets?: EndpointPropertiesSubnetsItem[];
/** List of custom headers. */
customHeaders?: EndpointPropertiesCustomHeadersItem[];
/** If Always Serve is enabled, probing for endpoint health will be disabled and endpoints will be included in the traffic routing method. */
alwaysServe?: AlwaysServe;
}
/** Class representing the Geographic hierarchy used with the Geographic traffic routing method. */
export interface TrafficManagerGeographicHierarchy extends ProxyResource {
/** The region at the root of the hierarchy from all the regions in the hierarchy can be retrieved. */
geographicHierarchy?: Region;
}
/** Class representing a Traffic Manager HeatMap. */
export interface HeatMapModel extends ProxyResource {
/** The beginning of the time window for this HeatMap, inclusive. */
startTime?: Date;
/** The ending of the time window for this HeatMap, exclusive. */
endTime?: Date;
/** The endpoints used in this HeatMap calculation. */
endpoints?: HeatMapEndpoint[];
/** The traffic flows produced in this HeatMap calculation. */
trafficFlows?: TrafficFlow[];
}
/** Class representing Traffic Manager User Metrics. */
export interface UserMetricsModel extends ProxyResource {
/** The key returned by the User Metrics operation. */
key?: string;
}
/** Class representing a Traffic Manager profile. */
export interface Profile extends TrackedResource {
/** The status of the Traffic Manager profile. */
profileStatus?: ProfileStatus;
/** The traffic routing method of the Traffic Manager profile. */
trafficRoutingMethod?: TrafficRoutingMethod;
/** The DNS settings of the Traffic Manager profile. */
dnsConfig?: DnsConfig;
/** The endpoint monitoring settings of the Traffic Manager profile. */
monitorConfig?: MonitorConfig;
/** The list of endpoints in the Traffic Manager profile. */
endpoints?: Endpoint[];
/** Indicates whether Traffic View is 'Enabled' or 'Disabled' for the Traffic Manager profile. Null, indicates 'Disabled'. Enabling this feature will increase the cost of the Traffic Manage profile. */
trafficViewEnrollmentStatus?: TrafficViewEnrollmentStatus;
/** The list of allowed endpoint record types. */
allowedEndpointRecordTypes?: AllowedEndpointRecordType[];
/** Maximum number of endpoints to be returned for MultiValue routing type. */
maxReturn?: number;
}
/** Known values of {@link EndpointStatus} that the service accepts. */
export enum KnownEndpointStatus {
/** Enabled */
Enabled = "Enabled",
/** Disabled */
Disabled = "Disabled"
}
/**
* Defines values for EndpointStatus. \
* {@link KnownEndpointStatus} can be used interchangeably with EndpointStatus,
* this enum contains the known values that the service supports.
* ### Known values supported by the service
* **Enabled** \
* **Disabled**
*/
export type EndpointStatus = string;
/** Known values of {@link EndpointMonitorStatus} that the service accepts. */
export enum KnownEndpointMonitorStatus {
/** CheckingEndpoint */
CheckingEndpoint = "CheckingEndpoint",
/** Online */
Online = "Online",
/** Degraded */
Degraded = "Degraded",
/** Disabled */
Disabled = "Disabled",
/** Inactive */
Inactive = "Inactive",
/** Stopped */
Stopped = "Stopped"
}
/**
* Defines values for EndpointMonitorStatus. \
* {@link KnownEndpointMonitorStatus} can be used interchangeably with EndpointMonitorStatus,
* this enum contains the known values that the service supports.
* ### Known values supported by the service
* **CheckingEndpoint** \
* **Online** \
* **Degraded** \
* **Disabled** \
* **Inactive** \
* **Stopped**
*/
export type EndpointMonitorStatus = string;
/** Known values of {@link AlwaysServe} that the service accepts. */
export enum KnownAlwaysServe {
/** Enabled */
Enabled = "Enabled",
/** Disabled */
Disabled = "Disabled"
}
/**
* Defines values for AlwaysServe. \
* {@link KnownAlwaysServe} can be used interchangeably with AlwaysServe,
* this enum contains the known values that the service supports.
* ### Known values supported by the service
* **Enabled** \
* **Disabled**
*/
export type AlwaysServe = string;
/** Known values of {@link ProfileStatus} that the service accepts. */
export enum KnownProfileStatus {
/** Enabled */
Enabled = "Enabled",
/** Disabled */
Disabled = "Disabled"
}
/**
* Defines values for ProfileStatus. \
* {@link KnownProfileStatus} can be used interchangeably with ProfileStatus,
* this enum contains the known values that the service supports.
* ### Known values supported by the service
* **Enabled** \
* **Disabled**
*/
export type ProfileStatus = string;
/** Known values of {@link TrafficRoutingMethod} that the service accepts. */
export enum KnownTrafficRoutingMethod {
/** Performance */
Performance = "Performance",
/** Priority */
Priority = "Priority",
/** Weighted */
Weighted = "Weighted",
/** Geographic */
Geographic = "Geographic",
/** MultiValue */
MultiValue = "MultiValue",
/** Subnet */
Subnet = "Subnet"
}
/**
* Defines values for TrafficRoutingMethod. \
* {@link KnownTrafficRoutingMethod} can be used interchangeably with TrafficRoutingMethod,
* this enum contains the known values that the service supports.
* ### Known values supported by the service
* **Performance** \
* **Priority** \
* **Weighted** \
* **Geographic** \
* **MultiValue** \
* **Subnet**
*/
export type TrafficRoutingMethod = string;
/** Known values of {@link ProfileMonitorStatus} that the service accepts. */
export enum KnownProfileMonitorStatus {
/** CheckingEndpoints */
CheckingEndpoints = "CheckingEndpoints",
/** Online */
Online = "Online",
/** Degraded */
Degraded = "Degraded",
/** Disabled */
Disabled = "Disabled",
/** Inactive */
Inactive = "Inactive"
}
/**
* Defines values for ProfileMonitorStatus. \
* {@link KnownProfileMonitorStatus} can be used interchangeably with ProfileMonitorStatus,
* this enum contains the known values that the service supports.
* ### Known values supported by the service
* **CheckingEndpoints** \
* **Online** \
* **Degraded** \
* **Disabled** \
* **Inactive**
*/
export type ProfileMonitorStatus = string;
/** Known values of {@link MonitorProtocol} that the service accepts. */
export enum KnownMonitorProtocol {
/** Http */
Http = "HTTP",
/** Https */
Https = "HTTPS",
/** TCP */
TCP = "TCP"
}
/**
* Defines values for MonitorProtocol. \
* {@link KnownMonitorProtocol} can be used interchangeably with MonitorProtocol,
* this enum contains the known values that the service supports.
* ### Known values supported by the service
* **HTTP** \
* **HTTPS** \
* **TCP**
*/
export type MonitorProtocol = string;
/** Known values of {@link TrafficViewEnrollmentStatus} that the service accepts. */
export enum KnownTrafficViewEnrollmentStatus {
/** Enabled */
Enabled = "Enabled",
/** Disabled */
Disabled = "Disabled"
}
/**
* Defines values for TrafficViewEnrollmentStatus. \
* {@link KnownTrafficViewEnrollmentStatus} can be used interchangeably with TrafficViewEnrollmentStatus,
* this enum contains the known values that the service supports.
* ### Known values supported by the service
* **Enabled** \
* **Disabled**
*/
export type TrafficViewEnrollmentStatus = string;
/** Known values of {@link AllowedEndpointRecordType} that the service accepts. */
export enum KnownAllowedEndpointRecordType {
/** DomainName */
DomainName = "DomainName",
/** IPv4Address */
IPv4Address = "IPv4Address",
/** IPv6Address */
IPv6Address = "IPv6Address",
/** Any */
Any = "Any"
}
/**
* Defines values for AllowedEndpointRecordType. \
* {@link KnownAllowedEndpointRecordType} can be used interchangeably with AllowedEndpointRecordType,
* this enum contains the known values that the service supports.
* ### Known values supported by the service
* **DomainName** \
* **IPv4Address** \
* **IPv6Address** \
* **Any**
*/
export type AllowedEndpointRecordType = string;
/** Defines values for EndpointType. */
export type EndpointType =
| "AzureEndpoints"
| "ExternalEndpoints"
| "NestedEndpoints";
/** Optional parameters. */
export interface EndpointsUpdateOptionalParams
extends coreClient.OperationOptions {}
/** Contains response data for the update operation. */
export type EndpointsUpdateResponse = Endpoint;
/** Optional parameters. */
export interface EndpointsGetOptionalParams
extends coreClient.OperationOptions {}
/** Contains response data for the get operation. */
export type EndpointsGetResponse = Endpoint;
/** Optional parameters. */
export interface EndpointsCreateOrUpdateOptionalParams
extends coreClient.OperationOptions {}
/** Contains response data for the createOrUpdate operation. */
export type EndpointsCreateOrUpdateResponse = Endpoint;
/** Optional parameters. */
export interface EndpointsDeleteOptionalParams
extends coreClient.OperationOptions {}
/** Contains response data for the delete operation. */
export type EndpointsDeleteResponse = DeleteOperationResult;
/** Optional parameters. */
export interface ProfilesCheckTrafficManagerRelativeDnsNameAvailabilityOptionalParams
extends coreClient.OperationOptions {}
/** Contains response data for the checkTrafficManagerRelativeDnsNameAvailability operation. */
export type ProfilesCheckTrafficManagerRelativeDnsNameAvailabilityResponse = TrafficManagerNameAvailability;
/** Optional parameters. */
export interface ProfilesListByResourceGroupOptionalParams
extends coreClient.OperationOptions {}
/** Contains response data for the listByResourceGroup operation. */
export type ProfilesListByResourceGroupResponse = ProfileListResult;
/** Optional parameters. */
export interface ProfilesListBySubscriptionOptionalParams
extends coreClient.OperationOptions {}
/** Contains response data for the listBySubscription operation. */
export type ProfilesListBySubscriptionResponse = ProfileListResult;
/** Optional parameters. */
export interface ProfilesGetOptionalParams
extends coreClient.OperationOptions {}
/** Contains response data for the get operation. */
export type ProfilesGetResponse = Profile;
/** Optional parameters. */
export interface ProfilesCreateOrUpdateOptionalParams
extends coreClient.OperationOptions {}
/** Contains response data for the createOrUpdate operation. */
export type ProfilesCreateOrUpdateResponse = Profile;
/** Optional parameters. */
export interface ProfilesDeleteOptionalParams
extends coreClient.OperationOptions {}
/** Contains response data for the delete operation. */
export type ProfilesDeleteResponse = DeleteOperationResult;
/** Optional parameters. */
export interface ProfilesUpdateOptionalParams
extends coreClient.OperationOptions {}
/** Contains response data for the update operation. */
export type ProfilesUpdateResponse = Profile;
/** Optional parameters. */
export interface GeographicHierarchiesGetDefaultOptionalParams
extends coreClient.OperationOptions {}
/** Contains response data for the getDefault operation. */
export type GeographicHierarchiesGetDefaultResponse = TrafficManagerGeographicHierarchy;
/** Optional parameters. */
export interface HeatMapGetOptionalParams extends coreClient.OperationOptions {
/** The top left latitude,longitude pair of the rectangular viewport to query for. */
topLeft?: number[];
/** The bottom right latitude,longitude pair of the rectangular viewport to query for. */
botRight?: number[];
}
/** Contains response data for the get operation. */
export type HeatMapGetResponse = HeatMapModel;
/** Optional parameters. */
export interface TrafficManagerUserMetricsKeysGetOptionalParams
extends coreClient.OperationOptions {}
/** Contains response data for the get operation. */
export type TrafficManagerUserMetricsKeysGetResponse = UserMetricsModel;
/** Optional parameters. */
export interface TrafficManagerUserMetricsKeysCreateOrUpdateOptionalParams
extends coreClient.OperationOptions {}
/** Contains response data for the createOrUpdate operation. */
export type TrafficManagerUserMetricsKeysCreateOrUpdateResponse = UserMetricsModel;
/** Optional parameters. */
export interface TrafficManagerUserMetricsKeysDeleteOptionalParams
extends coreClient.OperationOptions {}
/** Contains response data for the delete operation. */
export type TrafficManagerUserMetricsKeysDeleteResponse = DeleteOperationResult;
/** Optional parameters. */
export interface TrafficManagerManagementClientOptionalParams
extends coreClient.ServiceClientOptions {
/** server parameter */
$host?: string;
/** Api Version */
apiVersion?: string;
/** Overrides client endpoint. */
endpoint?: string;
}