@azure/arm-trafficmanager 6.0.2-alpha.20221026.1 → 6.1.0-alpha.20221115.1
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/CHANGELOG.md +14 -10
- package/README.md +1 -1
- package/dist/index.js +153 -48
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/endpointsCreateOrUpdateSample.js +32 -4
- package/dist-esm/samples-dev/endpointsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/endpointsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/endpointsGetSample.js +3 -3
- package/dist-esm/samples-dev/endpointsUpdateSample.js +1 -1
- package/dist-esm/samples-dev/geographicHierarchiesGetDefaultSample.js +1 -1
- package/dist-esm/samples-dev/heatMapGetSample.js +3 -3
- package/dist-esm/samples-dev/profilesCheckTrafficManagerRelativeDnsNameAvailabilitySample.js +2 -2
- package/dist-esm/samples-dev/profilesCreateOrUpdateSample.js +6 -6
- package/dist-esm/samples-dev/profilesDeleteSample.js +1 -1
- package/dist-esm/samples-dev/profilesGetSample.js +3 -3
- package/dist-esm/samples-dev/profilesListByResourceGroupSample.js +1 -1
- package/dist-esm/samples-dev/profilesListBySubscriptionSample.js +1 -1
- package/dist-esm/samples-dev/profilesUpdateSample.js +1 -1
- package/dist-esm/samples-dev/trafficManagerUserMetricsKeysCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/trafficManagerUserMetricsKeysDeleteSample.js +1 -1
- package/dist-esm/samples-dev/trafficManagerUserMetricsKeysGetSample.js +1 -1
- package/dist-esm/src/index.d.ts +1 -0
- package/dist-esm/src/index.d.ts.map +1 -1
- package/dist-esm/src/index.js +1 -0
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +62 -13
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +38 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +5 -0
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +8 -1
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/endpoints.d.ts +4 -7
- package/dist-esm/src/operations/endpoints.d.ts.map +1 -1
- package/dist-esm/src/operations/endpoints.js +4 -7
- package/dist-esm/src/operations/endpoints.js.map +1 -1
- package/dist-esm/src/operations/heatMap.d.ts +1 -1
- package/dist-esm/src/operations/heatMap.js +1 -1
- package/dist-esm/src/operations/profiles.d.ts +6 -9
- package/dist-esm/src/operations/profiles.d.ts.map +1 -1
- package/dist-esm/src/operations/profiles.js +22 -17
- package/dist-esm/src/operations/profiles.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/endpoints.d.ts +4 -7
- package/dist-esm/src/operationsInterfaces/endpoints.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/heatMap.d.ts +1 -1
- package/dist-esm/src/operationsInterfaces/profiles.d.ts +5 -7
- package/dist-esm/src/operationsInterfaces/profiles.d.ts.map +1 -1
- package/dist-esm/src/pagingHelper.d.ts +13 -0
- package/dist-esm/src/pagingHelper.d.ts.map +1 -0
- package/dist-esm/src/pagingHelper.js +32 -0
- package/dist-esm/src/pagingHelper.js.map +1 -0
- package/dist-esm/src/trafficManagerManagementClient.d.ts +3 -2
- package/dist-esm/src/trafficManagerManagementClient.d.ts.map +1 -1
- package/dist-esm/src/trafficManagerManagementClient.js +51 -21
- package/dist-esm/src/trafficManagerManagementClient.js.map +1 -1
- package/dist-esm/test/trafficmanager_examples.spec.d.ts +4 -0
- package/dist-esm/test/trafficmanager_examples.spec.d.ts.map +1 -0
- package/dist-esm/test/trafficmanager_examples.spec.js +112 -0
- package/dist-esm/test/trafficmanager_examples.spec.js.map +1 -0
- package/package.json +12 -8
- package/review/arm-trafficmanager.api.md +42 -58
- package/src/index.ts +1 -0
- package/src/models/index.ts +63 -13
- package/src/models/mappers.ts +6 -0
- package/src/models/parameters.ts +8 -1
- package/src/operations/endpoints.ts +4 -7
- package/src/operations/heatMap.ts +1 -1
- package/src/operations/profiles.ts +31 -20
- package/src/operationsInterfaces/endpoints.ts +4 -7
- package/src/operationsInterfaces/heatMap.ts +1 -1
- package/src/operationsInterfaces/profiles.ts +5 -7
- package/src/pagingHelper.ts +39 -0
- package/src/trafficManagerManagementClient.ts +62 -23
- package/types/arm-trafficmanager.d.ts +86 -30
- package/types/tsdoc-metadata.json +1 -1
- package/dist-esm/samples-dev/endpointDeleteExternal.d.ts +0 -2
- package/dist-esm/samples-dev/endpointDeleteExternal.d.ts.map +0 -1
- package/dist-esm/samples-dev/endpointDeleteExternal.js +0 -33
- package/dist-esm/samples-dev/endpointDeleteExternal.js.map +0 -1
- package/dist-esm/samples-dev/endpointGetExternalWithGeoMapping.d.ts +0 -2
- package/dist-esm/samples-dev/endpointGetExternalWithGeoMapping.d.ts.map +0 -1
- package/dist-esm/samples-dev/endpointGetExternalWithGeoMapping.js +0 -33
- package/dist-esm/samples-dev/endpointGetExternalWithGeoMapping.js.map +0 -1
- package/dist-esm/samples-dev/endpointGetExternalWithLocation.d.ts +0 -2
- package/dist-esm/samples-dev/endpointGetExternalWithLocation.d.ts.map +0 -1
- package/dist-esm/samples-dev/endpointGetExternalWithLocation.js +0 -33
- package/dist-esm/samples-dev/endpointGetExternalWithLocation.js.map +0 -1
- package/dist-esm/samples-dev/endpointGetExternalWithSubnetMapping.d.ts +0 -2
- package/dist-esm/samples-dev/endpointGetExternalWithSubnetMapping.d.ts.map +0 -1
- package/dist-esm/samples-dev/endpointGetExternalWithSubnetMapping.js +0 -33
- package/dist-esm/samples-dev/endpointGetExternalWithSubnetMapping.js.map +0 -1
- package/dist-esm/samples-dev/endpointPatchExternalTarget.d.ts +0 -2
- package/dist-esm/samples-dev/endpointPatchExternalTarget.d.ts.map +0 -1
- package/dist-esm/samples-dev/endpointPatchExternalTarget.js +0 -39
- package/dist-esm/samples-dev/endpointPatchExternalTarget.js.map +0 -1
- package/dist-esm/samples-dev/endpointPutExternalWithCustomHeaders.d.ts +0 -2
- package/dist-esm/samples-dev/endpointPutExternalWithCustomHeaders.d.ts.map +0 -1
- package/dist-esm/samples-dev/endpointPutExternalWithCustomHeaders.js +0 -44
- package/dist-esm/samples-dev/endpointPutExternalWithCustomHeaders.js.map +0 -1
- package/dist-esm/samples-dev/endpointPutExternalWithGeoMapping.d.ts +0 -2
- package/dist-esm/samples-dev/endpointPutExternalWithGeoMapping.d.ts.map +0 -1
- package/dist-esm/samples-dev/endpointPutExternalWithGeoMapping.js +0 -40
- package/dist-esm/samples-dev/endpointPutExternalWithGeoMapping.js.map +0 -1
- package/dist-esm/samples-dev/endpointPutExternalWithLocation.d.ts +0 -2
- package/dist-esm/samples-dev/endpointPutExternalWithLocation.d.ts.map +0 -1
- package/dist-esm/samples-dev/endpointPutExternalWithLocation.js +0 -40
- package/dist-esm/samples-dev/endpointPutExternalWithLocation.js.map +0 -1
- package/dist-esm/samples-dev/endpointPutExternalWithSubnetMapping.d.ts +0 -2
- package/dist-esm/samples-dev/endpointPutExternalWithSubnetMapping.d.ts.map +0 -1
- package/dist-esm/samples-dev/endpointPutExternalWithSubnetMapping.js +0 -43
- package/dist-esm/samples-dev/endpointPutExternalWithSubnetMapping.js.map +0 -1
- package/dist-esm/samples-dev/geographicHierarchyGetDefault.d.ts +0 -2
- package/dist-esm/samples-dev/geographicHierarchyGetDefault.d.ts.map +0 -1
- package/dist-esm/samples-dev/geographicHierarchyGetDefault.js +0 -29
- package/dist-esm/samples-dev/geographicHierarchyGetDefault.js.map +0 -1
- package/dist-esm/samples-dev/heatMapGet.d.ts +0 -2
- package/dist-esm/samples-dev/heatMapGet.d.ts.map +0 -1
- package/dist-esm/samples-dev/heatMapGet.js +0 -31
- package/dist-esm/samples-dev/heatMapGet.js.map +0 -1
- package/dist-esm/samples-dev/heatMapGetWithNullValues.d.ts +0 -2
- package/dist-esm/samples-dev/heatMapGetWithNullValues.d.ts.map +0 -1
- package/dist-esm/samples-dev/heatMapGetWithNullValues.js +0 -31
- package/dist-esm/samples-dev/heatMapGetWithNullValues.js.map +0 -1
- package/dist-esm/samples-dev/heatMapGetWithTopLeftBotRight.d.ts +0 -2
- package/dist-esm/samples-dev/heatMapGetWithTopLeftBotRight.d.ts.map +0 -1
- package/dist-esm/samples-dev/heatMapGetWithTopLeftBotRight.js +0 -34
- package/dist-esm/samples-dev/heatMapGetWithTopLeftBotRight.js.map +0 -1
- package/dist-esm/samples-dev/listBySubscription.d.ts +0 -2
- package/dist-esm/samples-dev/listBySubscription.d.ts.map +0 -1
- package/dist-esm/samples-dev/listBySubscription.js +0 -43
- package/dist-esm/samples-dev/listBySubscription.js.map +0 -1
- package/dist-esm/samples-dev/listProfilesByResourceGroup.d.ts +0 -2
- package/dist-esm/samples-dev/listProfilesByResourceGroup.d.ts.map +0 -1
- package/dist-esm/samples-dev/listProfilesByResourceGroup.js +0 -44
- package/dist-esm/samples-dev/listProfilesByResourceGroup.js.map +0 -1
- package/dist-esm/samples-dev/nameAvailabilityTestNameAvailablePost21.d.ts +0 -2
- package/dist-esm/samples-dev/nameAvailabilityTestNameAvailablePost21.d.ts.map +0 -1
- package/dist-esm/samples-dev/nameAvailabilityTestNameAvailablePost21.js +0 -33
- package/dist-esm/samples-dev/nameAvailabilityTestNameAvailablePost21.js.map +0 -1
- package/dist-esm/samples-dev/nameAvailabilityTestNameNotAvailablePost23.d.ts +0 -2
- package/dist-esm/samples-dev/nameAvailabilityTestNameNotAvailablePost23.d.ts.map +0 -1
- package/dist-esm/samples-dev/nameAvailabilityTestNameNotAvailablePost23.js +0 -33
- package/dist-esm/samples-dev/nameAvailabilityTestNameNotAvailablePost23.js.map +0 -1
- package/dist-esm/samples-dev/profileDelete.d.ts +0 -2
- package/dist-esm/samples-dev/profileDelete.d.ts.map +0 -1
- package/dist-esm/samples-dev/profileDelete.js +0 -31
- package/dist-esm/samples-dev/profileDelete.js.map +0 -1
- package/dist-esm/samples-dev/profileGetWithEndpoints.d.ts +0 -2
- package/dist-esm/samples-dev/profileGetWithEndpoints.d.ts.map +0 -1
- package/dist-esm/samples-dev/profileGetWithEndpoints.js +0 -31
- package/dist-esm/samples-dev/profileGetWithEndpoints.js.map +0 -1
- package/dist-esm/samples-dev/profileGetWithTrafficViewDisabled.d.ts +0 -2
- package/dist-esm/samples-dev/profileGetWithTrafficViewDisabled.d.ts.map +0 -1
- package/dist-esm/samples-dev/profileGetWithTrafficViewDisabled.js +0 -31
- package/dist-esm/samples-dev/profileGetWithTrafficViewDisabled.js.map +0 -1
- package/dist-esm/samples-dev/profileGetWithTrafficViewEnabled.d.ts +0 -2
- package/dist-esm/samples-dev/profileGetWithTrafficViewEnabled.d.ts.map +0 -1
- package/dist-esm/samples-dev/profileGetWithTrafficViewEnabled.js +0 -31
- package/dist-esm/samples-dev/profileGetWithTrafficViewEnabled.js.map +0 -1
- package/dist-esm/samples-dev/profilePatchMonitorConfig.d.ts +0 -2
- package/dist-esm/samples-dev/profilePatchMonitorConfig.d.ts.map +0 -1
- package/dist-esm/samples-dev/profilePatchMonitorConfig.js +0 -45
- package/dist-esm/samples-dev/profilePatchMonitorConfig.js.map +0 -1
- package/dist-esm/samples-dev/profilePutMultiValue.d.ts +0 -2
- package/dist-esm/samples-dev/profilePutMultiValue.d.ts.map +0 -1
- package/dist-esm/samples-dev/profilePutMultiValue.js +0 -40
- package/dist-esm/samples-dev/profilePutMultiValue.js.map +0 -1
- package/dist-esm/samples-dev/profilePutNoEndpoints.d.ts +0 -2
- package/dist-esm/samples-dev/profilePutNoEndpoints.d.ts.map +0 -1
- package/dist-esm/samples-dev/profilePutNoEndpoints.js +0 -38
- package/dist-esm/samples-dev/profilePutNoEndpoints.js.map +0 -1
- package/dist-esm/samples-dev/profilePutWithAliasing.d.ts +0 -2
- package/dist-esm/samples-dev/profilePutWithAliasing.d.ts.map +0 -1
- package/dist-esm/samples-dev/profilePutWithAliasing.js +0 -58
- package/dist-esm/samples-dev/profilePutWithAliasing.js.map +0 -1
- package/dist-esm/samples-dev/profilePutWithCustomHeaders.d.ts +0 -2
- package/dist-esm/samples-dev/profilePutWithCustomHeaders.d.ts.map +0 -1
- package/dist-esm/samples-dev/profilePutWithCustomHeaders.js +0 -67
- package/dist-esm/samples-dev/profilePutWithCustomHeaders.js.map +0 -1
- package/dist-esm/samples-dev/profilePutWithEndpoints.d.ts +0 -2
- package/dist-esm/samples-dev/profilePutWithEndpoints.d.ts.map +0 -1
- package/dist-esm/samples-dev/profilePutWithEndpoints.js +0 -57
- package/dist-esm/samples-dev/profilePutWithEndpoints.js.map +0 -1
- package/dist-esm/samples-dev/profilePutWithNestedEndpoints.d.ts +0 -2
- package/dist-esm/samples-dev/profilePutWithNestedEndpoints.d.ts.map +0 -1
- package/dist-esm/samples-dev/profilePutWithNestedEndpoints.js +0 -69
- package/dist-esm/samples-dev/profilePutWithNestedEndpoints.js.map +0 -1
- package/dist-esm/samples-dev/trafficManagerUserMetricsKeysDelete.d.ts +0 -2
- package/dist-esm/samples-dev/trafficManagerUserMetricsKeysDelete.d.ts.map +0 -1
- package/dist-esm/samples-dev/trafficManagerUserMetricsKeysDelete.js +0 -29
- package/dist-esm/samples-dev/trafficManagerUserMetricsKeysDelete.js.map +0 -1
- package/dist-esm/samples-dev/trafficManagerUserMetricsKeysGet.d.ts +0 -2
- package/dist-esm/samples-dev/trafficManagerUserMetricsKeysGet.d.ts.map +0 -1
- package/dist-esm/samples-dev/trafficManagerUserMetricsKeysGet.js +0 -29
- package/dist-esm/samples-dev/trafficManagerUserMetricsKeysGet.js.map +0 -1
- package/dist-esm/samples-dev/trafficManagerUserMetricsKeysPut.d.ts +0 -2
- package/dist-esm/samples-dev/trafficManagerUserMetricsKeysPut.d.ts.map +0 -1
- package/dist-esm/samples-dev/trafficManagerUserMetricsKeysPut.js +0 -29
- package/dist-esm/samples-dev/trafficManagerUserMetricsKeysPut.js.map +0 -1
- package/dist-esm/test/sampleTest.d.ts +0 -2
- package/dist-esm/test/sampleTest.d.ts.map +0 -1
- package/dist-esm/test/sampleTest.js +0 -40
- package/dist-esm/test/sampleTest.js.map +0 -1
|
@@ -38,8 +38,7 @@ export class EndpointsImpl implements Endpoints {
|
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* Update a Traffic Manager endpoint.
|
|
41
|
-
* @param resourceGroupName The name of the resource group
|
|
42
|
-
* be updated.
|
|
41
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
43
42
|
* @param profileName The name of the Traffic Manager profile.
|
|
44
43
|
* @param endpointType The type of the Traffic Manager endpoint to be updated.
|
|
45
44
|
* @param endpointName The name of the Traffic Manager endpoint to be updated.
|
|
@@ -69,7 +68,7 @@ export class EndpointsImpl implements Endpoints {
|
|
|
69
68
|
|
|
70
69
|
/**
|
|
71
70
|
* Gets a Traffic Manager endpoint.
|
|
72
|
-
* @param resourceGroupName The name of the resource group
|
|
71
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
73
72
|
* @param profileName The name of the Traffic Manager profile.
|
|
74
73
|
* @param endpointType The type of the Traffic Manager endpoint.
|
|
75
74
|
* @param endpointName The name of the Traffic Manager endpoint.
|
|
@@ -90,8 +89,7 @@ export class EndpointsImpl implements Endpoints {
|
|
|
90
89
|
|
|
91
90
|
/**
|
|
92
91
|
* Create or update a Traffic Manager endpoint.
|
|
93
|
-
* @param resourceGroupName The name of the resource group
|
|
94
|
-
* be created or updated.
|
|
92
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
95
93
|
* @param profileName The name of the Traffic Manager profile.
|
|
96
94
|
* @param endpointType The type of the Traffic Manager endpoint to be created or updated.
|
|
97
95
|
* @param endpointName The name of the Traffic Manager endpoint to be created or updated.
|
|
@@ -121,8 +119,7 @@ export class EndpointsImpl implements Endpoints {
|
|
|
121
119
|
|
|
122
120
|
/**
|
|
123
121
|
* Deletes a Traffic Manager endpoint.
|
|
124
|
-
* @param resourceGroupName The name of the resource group
|
|
125
|
-
* be deleted.
|
|
122
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
126
123
|
* @param profileName The name of the Traffic Manager profile.
|
|
127
124
|
* @param endpointType The type of the Traffic Manager endpoint to be deleted.
|
|
128
125
|
* @param endpointName The name of the Traffic Manager endpoint to be deleted.
|
|
@@ -27,7 +27,7 @@ export class HeatMapImpl implements HeatMap {
|
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* Gets latest heatmap for Traffic Manager profile.
|
|
30
|
-
* @param resourceGroupName The name of the resource group
|
|
30
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
31
31
|
* @param profileName The name of the Traffic Manager profile.
|
|
32
32
|
* @param options The options parameters.
|
|
33
33
|
*/
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
10
|
import { Profiles } from "../operationsInterfaces";
|
|
11
11
|
import * as coreClient from "@azure/core-client";
|
|
12
12
|
import * as Mappers from "../models/mappers";
|
|
@@ -15,12 +15,12 @@ import { TrafficManagerManagementClient } from "../trafficManagerManagementClien
|
|
|
15
15
|
import {
|
|
16
16
|
Profile,
|
|
17
17
|
ProfilesListByResourceGroupOptionalParams,
|
|
18
|
+
ProfilesListByResourceGroupResponse,
|
|
18
19
|
ProfilesListBySubscriptionOptionalParams,
|
|
20
|
+
ProfilesListBySubscriptionResponse,
|
|
19
21
|
CheckTrafficManagerRelativeDnsNameAvailabilityParameters,
|
|
20
22
|
ProfilesCheckTrafficManagerRelativeDnsNameAvailabilityOptionalParams,
|
|
21
23
|
ProfilesCheckTrafficManagerRelativeDnsNameAvailabilityResponse,
|
|
22
|
-
ProfilesListByResourceGroupResponse,
|
|
23
|
-
ProfilesListBySubscriptionResponse,
|
|
24
24
|
ProfilesGetOptionalParams,
|
|
25
25
|
ProfilesGetResponse,
|
|
26
26
|
ProfilesCreateOrUpdateOptionalParams,
|
|
@@ -46,8 +46,7 @@ export class ProfilesImpl implements Profiles {
|
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
48
|
* Lists all Traffic Manager profiles within a resource group.
|
|
49
|
-
* @param resourceGroupName The name of the resource group
|
|
50
|
-
* be listed.
|
|
49
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
51
50
|
* @param options The options parameters.
|
|
52
51
|
*/
|
|
53
52
|
public listByResourceGroup(
|
|
@@ -62,17 +61,26 @@ export class ProfilesImpl implements Profiles {
|
|
|
62
61
|
[Symbol.asyncIterator]() {
|
|
63
62
|
return this;
|
|
64
63
|
},
|
|
65
|
-
byPage: () => {
|
|
66
|
-
|
|
64
|
+
byPage: (settings?: PageSettings) => {
|
|
65
|
+
if (settings?.maxPageSize) {
|
|
66
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
67
|
+
}
|
|
68
|
+
return this.listByResourceGroupPagingPage(
|
|
69
|
+
resourceGroupName,
|
|
70
|
+
options,
|
|
71
|
+
settings
|
|
72
|
+
);
|
|
67
73
|
}
|
|
68
74
|
};
|
|
69
75
|
}
|
|
70
76
|
|
|
71
77
|
private async *listByResourceGroupPagingPage(
|
|
72
78
|
resourceGroupName: string,
|
|
73
|
-
options?: ProfilesListByResourceGroupOptionalParams
|
|
79
|
+
options?: ProfilesListByResourceGroupOptionalParams,
|
|
80
|
+
_settings?: PageSettings
|
|
74
81
|
): AsyncIterableIterator<Profile[]> {
|
|
75
|
-
let result
|
|
82
|
+
let result: ProfilesListByResourceGroupResponse;
|
|
83
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
76
84
|
yield result.value || [];
|
|
77
85
|
}
|
|
78
86
|
|
|
@@ -103,16 +111,21 @@ export class ProfilesImpl implements Profiles {
|
|
|
103
111
|
[Symbol.asyncIterator]() {
|
|
104
112
|
return this;
|
|
105
113
|
},
|
|
106
|
-
byPage: () => {
|
|
107
|
-
|
|
114
|
+
byPage: (settings?: PageSettings) => {
|
|
115
|
+
if (settings?.maxPageSize) {
|
|
116
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
117
|
+
}
|
|
118
|
+
return this.listBySubscriptionPagingPage(options, settings);
|
|
108
119
|
}
|
|
109
120
|
};
|
|
110
121
|
}
|
|
111
122
|
|
|
112
123
|
private async *listBySubscriptionPagingPage(
|
|
113
|
-
options?: ProfilesListBySubscriptionOptionalParams
|
|
124
|
+
options?: ProfilesListBySubscriptionOptionalParams,
|
|
125
|
+
_settings?: PageSettings
|
|
114
126
|
): AsyncIterableIterator<Profile[]> {
|
|
115
|
-
let result
|
|
127
|
+
let result: ProfilesListBySubscriptionResponse;
|
|
128
|
+
result = await this._listBySubscription(options);
|
|
116
129
|
yield result.value || [];
|
|
117
130
|
}
|
|
118
131
|
|
|
@@ -142,8 +155,7 @@ export class ProfilesImpl implements Profiles {
|
|
|
142
155
|
|
|
143
156
|
/**
|
|
144
157
|
* Lists all Traffic Manager profiles within a resource group.
|
|
145
|
-
* @param resourceGroupName The name of the resource group
|
|
146
|
-
* be listed.
|
|
158
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
147
159
|
* @param options The options parameters.
|
|
148
160
|
*/
|
|
149
161
|
private _listByResourceGroup(
|
|
@@ -171,7 +183,7 @@ export class ProfilesImpl implements Profiles {
|
|
|
171
183
|
|
|
172
184
|
/**
|
|
173
185
|
* Gets a Traffic Manager profile.
|
|
174
|
-
* @param resourceGroupName The name of the resource group
|
|
186
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
175
187
|
* @param profileName The name of the Traffic Manager profile.
|
|
176
188
|
* @param options The options parameters.
|
|
177
189
|
*/
|
|
@@ -188,7 +200,7 @@ export class ProfilesImpl implements Profiles {
|
|
|
188
200
|
|
|
189
201
|
/**
|
|
190
202
|
* Create or update a Traffic Manager profile.
|
|
191
|
-
* @param resourceGroupName The name of the resource group
|
|
203
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
192
204
|
* @param profileName The name of the Traffic Manager profile.
|
|
193
205
|
* @param parameters The Traffic Manager profile parameters supplied to the CreateOrUpdate operation.
|
|
194
206
|
* @param options The options parameters.
|
|
@@ -207,8 +219,7 @@ export class ProfilesImpl implements Profiles {
|
|
|
207
219
|
|
|
208
220
|
/**
|
|
209
221
|
* Deletes a Traffic Manager profile.
|
|
210
|
-
* @param resourceGroupName The name of the resource group
|
|
211
|
-
* deleted.
|
|
222
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
212
223
|
* @param profileName The name of the Traffic Manager profile to be deleted.
|
|
213
224
|
* @param options The options parameters.
|
|
214
225
|
*/
|
|
@@ -225,7 +236,7 @@ export class ProfilesImpl implements Profiles {
|
|
|
225
236
|
|
|
226
237
|
/**
|
|
227
238
|
* Update a Traffic Manager profile.
|
|
228
|
-
* @param resourceGroupName The name of the resource group
|
|
239
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
229
240
|
* @param profileName The name of the Traffic Manager profile.
|
|
230
241
|
* @param parameters The Traffic Manager profile parameters supplied to the Update operation.
|
|
231
242
|
* @param options The options parameters.
|
|
@@ -23,8 +23,7 @@ import {
|
|
|
23
23
|
export interface Endpoints {
|
|
24
24
|
/**
|
|
25
25
|
* Update a Traffic Manager endpoint.
|
|
26
|
-
* @param resourceGroupName The name of the resource group
|
|
27
|
-
* be updated.
|
|
26
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
28
27
|
* @param profileName The name of the Traffic Manager profile.
|
|
29
28
|
* @param endpointType The type of the Traffic Manager endpoint to be updated.
|
|
30
29
|
* @param endpointName The name of the Traffic Manager endpoint to be updated.
|
|
@@ -41,7 +40,7 @@ export interface Endpoints {
|
|
|
41
40
|
): Promise<EndpointsUpdateResponse>;
|
|
42
41
|
/**
|
|
43
42
|
* Gets a Traffic Manager endpoint.
|
|
44
|
-
* @param resourceGroupName The name of the resource group
|
|
43
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
45
44
|
* @param profileName The name of the Traffic Manager profile.
|
|
46
45
|
* @param endpointType The type of the Traffic Manager endpoint.
|
|
47
46
|
* @param endpointName The name of the Traffic Manager endpoint.
|
|
@@ -56,8 +55,7 @@ export interface Endpoints {
|
|
|
56
55
|
): Promise<EndpointsGetResponse>;
|
|
57
56
|
/**
|
|
58
57
|
* Create or update a Traffic Manager endpoint.
|
|
59
|
-
* @param resourceGroupName The name of the resource group
|
|
60
|
-
* be created or updated.
|
|
58
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
61
59
|
* @param profileName The name of the Traffic Manager profile.
|
|
62
60
|
* @param endpointType The type of the Traffic Manager endpoint to be created or updated.
|
|
63
61
|
* @param endpointName The name of the Traffic Manager endpoint to be created or updated.
|
|
@@ -74,8 +72,7 @@ export interface Endpoints {
|
|
|
74
72
|
): Promise<EndpointsCreateOrUpdateResponse>;
|
|
75
73
|
/**
|
|
76
74
|
* Deletes a Traffic Manager endpoint.
|
|
77
|
-
* @param resourceGroupName The name of the resource group
|
|
78
|
-
* be deleted.
|
|
75
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
79
76
|
* @param profileName The name of the Traffic Manager profile.
|
|
80
77
|
* @param endpointType The type of the Traffic Manager endpoint to be deleted.
|
|
81
78
|
* @param endpointName The name of the Traffic Manager endpoint to be deleted.
|
|
@@ -12,7 +12,7 @@ import { HeatMapGetOptionalParams, HeatMapGetResponse } from "../models";
|
|
|
12
12
|
export interface HeatMap {
|
|
13
13
|
/**
|
|
14
14
|
* Gets latest heatmap for Traffic Manager profile.
|
|
15
|
-
* @param resourceGroupName The name of the resource group
|
|
15
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
16
16
|
* @param profileName The name of the Traffic Manager profile.
|
|
17
17
|
* @param options The options parameters.
|
|
18
18
|
*/
|
|
@@ -29,8 +29,7 @@ import {
|
|
|
29
29
|
export interface Profiles {
|
|
30
30
|
/**
|
|
31
31
|
* Lists all Traffic Manager profiles within a resource group.
|
|
32
|
-
* @param resourceGroupName The name of the resource group
|
|
33
|
-
* be listed.
|
|
32
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
34
33
|
* @param options The options parameters.
|
|
35
34
|
*/
|
|
36
35
|
listByResourceGroup(
|
|
@@ -56,7 +55,7 @@ export interface Profiles {
|
|
|
56
55
|
): Promise<ProfilesCheckTrafficManagerRelativeDnsNameAvailabilityResponse>;
|
|
57
56
|
/**
|
|
58
57
|
* Gets a Traffic Manager profile.
|
|
59
|
-
* @param resourceGroupName The name of the resource group
|
|
58
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
60
59
|
* @param profileName The name of the Traffic Manager profile.
|
|
61
60
|
* @param options The options parameters.
|
|
62
61
|
*/
|
|
@@ -67,7 +66,7 @@ export interface Profiles {
|
|
|
67
66
|
): Promise<ProfilesGetResponse>;
|
|
68
67
|
/**
|
|
69
68
|
* Create or update a Traffic Manager profile.
|
|
70
|
-
* @param resourceGroupName The name of the resource group
|
|
69
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
71
70
|
* @param profileName The name of the Traffic Manager profile.
|
|
72
71
|
* @param parameters The Traffic Manager profile parameters supplied to the CreateOrUpdate operation.
|
|
73
72
|
* @param options The options parameters.
|
|
@@ -80,8 +79,7 @@ export interface Profiles {
|
|
|
80
79
|
): Promise<ProfilesCreateOrUpdateResponse>;
|
|
81
80
|
/**
|
|
82
81
|
* Deletes a Traffic Manager profile.
|
|
83
|
-
* @param resourceGroupName The name of the resource group
|
|
84
|
-
* deleted.
|
|
82
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
85
83
|
* @param profileName The name of the Traffic Manager profile to be deleted.
|
|
86
84
|
* @param options The options parameters.
|
|
87
85
|
*/
|
|
@@ -92,7 +90,7 @@ export interface Profiles {
|
|
|
92
90
|
): Promise<ProfilesDeleteResponse>;
|
|
93
91
|
/**
|
|
94
92
|
* Update a Traffic Manager profile.
|
|
95
|
-
* @param resourceGroupName The name of the resource group
|
|
93
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
96
94
|
* @param profileName The name of the Traffic Manager profile.
|
|
97
95
|
* @param parameters The Traffic Manager profile parameters supplied to the Update operation.
|
|
98
96
|
* @param options The options parameters.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export interface PageInfo {
|
|
10
|
+
continuationToken?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const pageMap = new WeakMap<object, PageInfo>();
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Given a result page from a pageable operation, returns a
|
|
17
|
+
* continuation token that can be used to begin paging from
|
|
18
|
+
* that point later.
|
|
19
|
+
* @param page A result object from calling .byPage() on a paged operation.
|
|
20
|
+
* @returns The continuation token that can be passed into byPage().
|
|
21
|
+
*/
|
|
22
|
+
export function getContinuationToken(page: unknown): string | undefined {
|
|
23
|
+
if (typeof page !== "object" || page === null) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
return pageMap.get(page)?.continuationToken;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function setContinuationToken(
|
|
30
|
+
page: unknown,
|
|
31
|
+
continuationToken: string | undefined
|
|
32
|
+
): void {
|
|
33
|
+
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const pageInfo = pageMap.get(page) ?? {};
|
|
37
|
+
pageInfo.continuationToken = continuationToken;
|
|
38
|
+
pageMap.set(page, pageInfo);
|
|
39
|
+
}
|
|
@@ -8,6 +8,11 @@
|
|
|
8
8
|
|
|
9
9
|
import * as coreClient from "@azure/core-client";
|
|
10
10
|
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
|
11
|
+
import {
|
|
12
|
+
PipelineRequest,
|
|
13
|
+
PipelineResponse,
|
|
14
|
+
SendRequest
|
|
15
|
+
} from "@azure/core-rest-pipeline";
|
|
11
16
|
import * as coreAuth from "@azure/core-auth";
|
|
12
17
|
import {
|
|
13
18
|
EndpointsImpl,
|
|
@@ -33,8 +38,7 @@ export class TrafficManagerManagementClient extends coreClient.ServiceClient {
|
|
|
33
38
|
/**
|
|
34
39
|
* Initializes a new instance of the TrafficManagerManagementClient class.
|
|
35
40
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
36
|
-
* @param subscriptionId
|
|
37
|
-
* subscription. The subscription ID forms part of the URI for every service call.
|
|
41
|
+
* @param subscriptionId The ID of the target subscription.
|
|
38
42
|
* @param options The parameter options
|
|
39
43
|
*/
|
|
40
44
|
constructor(
|
|
@@ -58,54 +62,60 @@ export class TrafficManagerManagementClient extends coreClient.ServiceClient {
|
|
|
58
62
|
credential: credentials
|
|
59
63
|
};
|
|
60
64
|
|
|
61
|
-
const packageDetails = `azsdk-js-arm-trafficmanager/6.0.
|
|
65
|
+
const packageDetails = `azsdk-js-arm-trafficmanager/6.1.0-beta.1`;
|
|
62
66
|
const userAgentPrefix =
|
|
63
67
|
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
64
68
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
65
69
|
: `${packageDetails}`;
|
|
66
70
|
|
|
67
|
-
if (!options.credentialScopes) {
|
|
68
|
-
options.credentialScopes = ["https://management.azure.com/.default"];
|
|
69
|
-
}
|
|
70
71
|
const optionsWithDefaults = {
|
|
71
72
|
...defaults,
|
|
72
73
|
...options,
|
|
73
74
|
userAgentOptions: {
|
|
74
75
|
userAgentPrefix
|
|
75
76
|
},
|
|
76
|
-
|
|
77
|
+
endpoint:
|
|
77
78
|
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
|
78
79
|
};
|
|
79
80
|
super(optionsWithDefaults);
|
|
80
81
|
|
|
82
|
+
let bearerTokenAuthenticationPolicyFound: boolean = false;
|
|
81
83
|
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
82
84
|
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
|
|
83
|
-
|
|
85
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
|
|
84
86
|
(pipelinePolicy) =>
|
|
85
87
|
pipelinePolicy.name ===
|
|
86
88
|
coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
87
89
|
);
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
90
|
+
}
|
|
91
|
+
if (
|
|
92
|
+
!options ||
|
|
93
|
+
!options.pipeline ||
|
|
94
|
+
options.pipeline.getOrderedPolicies().length == 0 ||
|
|
95
|
+
!bearerTokenAuthenticationPolicyFound
|
|
96
|
+
) {
|
|
97
|
+
this.pipeline.removePolicy({
|
|
98
|
+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
99
|
+
});
|
|
100
|
+
this.pipeline.addPolicy(
|
|
101
|
+
coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
102
|
+
credential: credentials,
|
|
103
|
+
scopes:
|
|
104
|
+
optionsWithDefaults.credentialScopes ??
|
|
105
|
+
`${optionsWithDefaults.endpoint}/.default`,
|
|
106
|
+
challengeCallbacks: {
|
|
107
|
+
authorizeRequestOnChallenge:
|
|
108
|
+
coreClient.authorizeRequestOnClaimChallenge
|
|
109
|
+
}
|
|
110
|
+
})
|
|
111
|
+
);
|
|
102
112
|
}
|
|
103
113
|
// Parameter assignments
|
|
104
114
|
this.subscriptionId = subscriptionId;
|
|
105
115
|
|
|
106
116
|
// Assigning values to Constant parameters
|
|
107
117
|
this.$host = options.$host || "https://management.azure.com";
|
|
108
|
-
this.apiVersion = options.apiVersion || "
|
|
118
|
+
this.apiVersion = options.apiVersion || "2022-04-01-preview";
|
|
109
119
|
this.endpoints = new EndpointsImpl(this);
|
|
110
120
|
this.profiles = new ProfilesImpl(this);
|
|
111
121
|
this.geographicHierarchies = new GeographicHierarchiesImpl(this);
|
|
@@ -113,6 +123,35 @@ export class TrafficManagerManagementClient extends coreClient.ServiceClient {
|
|
|
113
123
|
this.trafficManagerUserMetricsKeys = new TrafficManagerUserMetricsKeysImpl(
|
|
114
124
|
this
|
|
115
125
|
);
|
|
126
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
130
|
+
private addCustomApiVersionPolicy(apiVersion?: string) {
|
|
131
|
+
if (!apiVersion) {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
const apiVersionPolicy = {
|
|
135
|
+
name: "CustomApiVersionPolicy",
|
|
136
|
+
async sendRequest(
|
|
137
|
+
request: PipelineRequest,
|
|
138
|
+
next: SendRequest
|
|
139
|
+
): Promise<PipelineResponse> {
|
|
140
|
+
const param = request.url.split("?");
|
|
141
|
+
if (param.length > 1) {
|
|
142
|
+
const newParams = param[1].split("&").map((item) => {
|
|
143
|
+
if (item.indexOf("api-version") > -1) {
|
|
144
|
+
return "api-version=" + apiVersion;
|
|
145
|
+
} else {
|
|
146
|
+
return item;
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
150
|
+
}
|
|
151
|
+
return next(request);
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
116
155
|
}
|
|
117
156
|
|
|
118
157
|
endpoints: Endpoints;
|