@azure/arm-cdn 9.1.1-alpha.20250619.1 → 9.1.1-alpha.20250721.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/dist/browser/cdnManagementClient.js +34 -5
- package/dist/browser/cdnManagementClient.js.map +1 -1
- package/dist/browser/lroImpl.js +7 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/mappers.js +663 -294
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/afdCustomDomains.js +67 -64
- package/dist/browser/operations/afdCustomDomains.js.map +1 -1
- package/dist/browser/operations/afdEndpoints.js +89 -103
- package/dist/browser/operations/afdEndpoints.js.map +1 -1
- package/dist/browser/operations/afdOriginGroups.js +78 -97
- package/dist/browser/operations/afdOriginGroups.js.map +1 -1
- package/dist/browser/operations/afdOrigins.js +56 -58
- package/dist/browser/operations/afdOrigins.js.map +1 -1
- package/dist/browser/operations/afdProfiles.js +34 -46
- package/dist/browser/operations/afdProfiles.js.map +1 -1
- package/dist/browser/operations/customDomains.js +67 -64
- package/dist/browser/operations/customDomains.js.map +1 -1
- package/dist/browser/operations/edgeNodes.js +23 -40
- package/dist/browser/operations/edgeNodes.js.map +1 -1
- package/dist/browser/operations/endpoints.js +122 -121
- package/dist/browser/operations/endpoints.js.map +1 -1
- package/dist/browser/operations/logAnalytics.js +1 -0
- package/dist/browser/operations/logAnalytics.js.map +1 -1
- package/dist/browser/operations/managedRuleSets.js +23 -40
- package/dist/browser/operations/managedRuleSets.js.map +1 -1
- package/dist/browser/operations/operations.js +23 -40
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operations/originGroups.js +56 -58
- package/dist/browser/operations/originGroups.js.map +1 -1
- package/dist/browser/operations/origins.js +56 -58
- package/dist/browser/operations/origins.js.map +1 -1
- package/dist/browser/operations/policies.js +45 -52
- package/dist/browser/operations/policies.js.map +1 -1
- package/dist/browser/operations/profiles.js +133 -154
- package/dist/browser/operations/profiles.js.map +1 -1
- package/dist/browser/operations/resourceUsageOperations.js +23 -40
- package/dist/browser/operations/resourceUsageOperations.js.map +1 -1
- package/dist/browser/operations/routes.js +56 -58
- package/dist/browser/operations/routes.js.map +1 -1
- package/dist/browser/operations/ruleSets.js +56 -85
- package/dist/browser/operations/ruleSets.js.map +1 -1
- package/dist/browser/operations/rules.js +56 -58
- package/dist/browser/operations/rules.js.map +1 -1
- package/dist/browser/operations/secrets.js +45 -52
- package/dist/browser/operations/secrets.js.map +1 -1
- package/dist/browser/operations/securityPolicies.js +56 -58
- package/dist/browser/operations/securityPolicies.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/cdnManagementClient.js +34 -5
- package/dist/commonjs/cdnManagementClient.js.map +1 -1
- package/dist/commonjs/lroImpl.js +7 -3
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/mappers.js +663 -294
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/afdCustomDomains.js +67 -63
- package/dist/commonjs/operations/afdCustomDomains.js.map +1 -1
- package/dist/commonjs/operations/afdEndpoints.js +89 -102
- package/dist/commonjs/operations/afdEndpoints.js.map +1 -1
- package/dist/commonjs/operations/afdOriginGroups.js +78 -96
- package/dist/commonjs/operations/afdOriginGroups.js.map +1 -1
- package/dist/commonjs/operations/afdOrigins.js +56 -57
- package/dist/commonjs/operations/afdOrigins.js.map +1 -1
- package/dist/commonjs/operations/afdProfiles.js +34 -45
- package/dist/commonjs/operations/afdProfiles.js.map +1 -1
- package/dist/commonjs/operations/customDomains.js +67 -63
- package/dist/commonjs/operations/customDomains.js.map +1 -1
- package/dist/commonjs/operations/edgeNodes.js +23 -39
- package/dist/commonjs/operations/edgeNodes.js.map +1 -1
- package/dist/commonjs/operations/endpoints.js +122 -120
- package/dist/commonjs/operations/endpoints.js.map +1 -1
- package/dist/commonjs/operations/logAnalytics.js +1 -0
- package/dist/commonjs/operations/logAnalytics.js.map +1 -1
- package/dist/commonjs/operations/managedRuleSets.js +23 -39
- package/dist/commonjs/operations/managedRuleSets.js.map +1 -1
- package/dist/commonjs/operations/operations.js +23 -39
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operations/originGroups.js +56 -57
- package/dist/commonjs/operations/originGroups.js.map +1 -1
- package/dist/commonjs/operations/origins.js +56 -57
- package/dist/commonjs/operations/origins.js.map +1 -1
- package/dist/commonjs/operations/policies.js +45 -51
- package/dist/commonjs/operations/policies.js.map +1 -1
- package/dist/commonjs/operations/profiles.js +133 -153
- package/dist/commonjs/operations/profiles.js.map +1 -1
- package/dist/commonjs/operations/resourceUsageOperations.js +23 -39
- package/dist/commonjs/operations/resourceUsageOperations.js.map +1 -1
- package/dist/commonjs/operations/routes.js +56 -57
- package/dist/commonjs/operations/routes.js.map +1 -1
- package/dist/commonjs/operations/ruleSets.js +56 -84
- package/dist/commonjs/operations/ruleSets.js.map +1 -1
- package/dist/commonjs/operations/rules.js +56 -57
- package/dist/commonjs/operations/rules.js.map +1 -1
- package/dist/commonjs/operations/secrets.js +45 -51
- package/dist/commonjs/operations/secrets.js.map +1 -1
- package/dist/commonjs/operations/securityPolicies.js +56 -57
- package/dist/commonjs/operations/securityPolicies.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/cdnManagementClient.js +34 -5
- package/dist/esm/cdnManagementClient.js.map +1 -1
- package/dist/esm/lroImpl.js +7 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/mappers.js +663 -294
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/afdCustomDomains.js +67 -64
- package/dist/esm/operations/afdCustomDomains.js.map +1 -1
- package/dist/esm/operations/afdEndpoints.js +89 -103
- package/dist/esm/operations/afdEndpoints.js.map +1 -1
- package/dist/esm/operations/afdOriginGroups.js +78 -97
- package/dist/esm/operations/afdOriginGroups.js.map +1 -1
- package/dist/esm/operations/afdOrigins.js +56 -58
- package/dist/esm/operations/afdOrigins.js.map +1 -1
- package/dist/esm/operations/afdProfiles.js +34 -46
- package/dist/esm/operations/afdProfiles.js.map +1 -1
- package/dist/esm/operations/customDomains.js +67 -64
- package/dist/esm/operations/customDomains.js.map +1 -1
- package/dist/esm/operations/edgeNodes.js +23 -40
- package/dist/esm/operations/edgeNodes.js.map +1 -1
- package/dist/esm/operations/endpoints.js +122 -121
- package/dist/esm/operations/endpoints.js.map +1 -1
- package/dist/esm/operations/logAnalytics.js +1 -0
- package/dist/esm/operations/logAnalytics.js.map +1 -1
- package/dist/esm/operations/managedRuleSets.js +23 -40
- package/dist/esm/operations/managedRuleSets.js.map +1 -1
- package/dist/esm/operations/operations.js +23 -40
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operations/originGroups.js +56 -58
- package/dist/esm/operations/originGroups.js.map +1 -1
- package/dist/esm/operations/origins.js +56 -58
- package/dist/esm/operations/origins.js.map +1 -1
- package/dist/esm/operations/policies.js +45 -52
- package/dist/esm/operations/policies.js.map +1 -1
- package/dist/esm/operations/profiles.js +133 -154
- package/dist/esm/operations/profiles.js.map +1 -1
- package/dist/esm/operations/resourceUsageOperations.js +23 -40
- package/dist/esm/operations/resourceUsageOperations.js.map +1 -1
- package/dist/esm/operations/routes.js +56 -58
- package/dist/esm/operations/routes.js.map +1 -1
- package/dist/esm/operations/ruleSets.js +56 -85
- package/dist/esm/operations/ruleSets.js.map +1 -1
- package/dist/esm/operations/rules.js +56 -58
- package/dist/esm/operations/rules.js.map +1 -1
- package/dist/esm/operations/secrets.js +45 -52
- package/dist/esm/operations/secrets.js.map +1 -1
- package/dist/esm/operations/securityPolicies.js +56 -58
- package/dist/esm/operations/securityPolicies.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/cdnManagementClient.js +34 -5
- package/dist/react-native/cdnManagementClient.js.map +1 -1
- package/dist/react-native/lroImpl.js +7 -3
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/mappers.js +663 -294
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/afdCustomDomains.js +67 -64
- package/dist/react-native/operations/afdCustomDomains.js.map +1 -1
- package/dist/react-native/operations/afdEndpoints.js +89 -103
- package/dist/react-native/operations/afdEndpoints.js.map +1 -1
- package/dist/react-native/operations/afdOriginGroups.js +78 -97
- package/dist/react-native/operations/afdOriginGroups.js.map +1 -1
- package/dist/react-native/operations/afdOrigins.js +56 -58
- package/dist/react-native/operations/afdOrigins.js.map +1 -1
- package/dist/react-native/operations/afdProfiles.js +34 -46
- package/dist/react-native/operations/afdProfiles.js.map +1 -1
- package/dist/react-native/operations/customDomains.js +67 -64
- package/dist/react-native/operations/customDomains.js.map +1 -1
- package/dist/react-native/operations/edgeNodes.js +23 -40
- package/dist/react-native/operations/edgeNodes.js.map +1 -1
- package/dist/react-native/operations/endpoints.js +122 -121
- package/dist/react-native/operations/endpoints.js.map +1 -1
- package/dist/react-native/operations/logAnalytics.js +1 -0
- package/dist/react-native/operations/logAnalytics.js.map +1 -1
- package/dist/react-native/operations/managedRuleSets.js +23 -40
- package/dist/react-native/operations/managedRuleSets.js.map +1 -1
- package/dist/react-native/operations/operations.js +23 -40
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operations/originGroups.js +56 -58
- package/dist/react-native/operations/originGroups.js.map +1 -1
- package/dist/react-native/operations/origins.js +56 -58
- package/dist/react-native/operations/origins.js.map +1 -1
- package/dist/react-native/operations/policies.js +45 -52
- package/dist/react-native/operations/policies.js.map +1 -1
- package/dist/react-native/operations/profiles.js +133 -154
- package/dist/react-native/operations/profiles.js.map +1 -1
- package/dist/react-native/operations/resourceUsageOperations.js +23 -40
- package/dist/react-native/operations/resourceUsageOperations.js.map +1 -1
- package/dist/react-native/operations/routes.js +56 -58
- package/dist/react-native/operations/routes.js.map +1 -1
- package/dist/react-native/operations/ruleSets.js +56 -85
- package/dist/react-native/operations/ruleSets.js.map +1 -1
- package/dist/react-native/operations/rules.js +56 -58
- package/dist/react-native/operations/rules.js.map +1 -1
- package/dist/react-native/operations/secrets.js +45 -52
- package/dist/react-native/operations/secrets.js.map +1 -1
- package/dist/react-native/operations/securityPolicies.js +56 -58
- package/dist/react-native/operations/securityPolicies.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/package.json +2 -2
- /package/review/{arm-cdn.api.md → arm-cdn-node.api.md} +0 -0
|
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
|
|
|
18
18
|
/// <reference lib="esnext.asynciterable" />
|
|
19
19
|
/** Class containing AfdOriginGroups operations. */
|
|
20
20
|
class AfdOriginGroupsImpl {
|
|
21
|
+
client;
|
|
21
22
|
/**
|
|
22
23
|
* Initialize a new instance of the class AfdOriginGroups class.
|
|
23
24
|
* @param client Reference to the service client
|
|
@@ -42,52 +43,35 @@ class AfdOriginGroupsImpl {
|
|
|
42
43
|
return this;
|
|
43
44
|
},
|
|
44
45
|
byPage: (settings) => {
|
|
45
|
-
if (settings
|
|
46
|
+
if (settings?.maxPageSize) {
|
|
46
47
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
47
48
|
}
|
|
48
49
|
return this.listByProfilePagingPage(resourceGroupName, profileName, options, settings);
|
|
49
50
|
},
|
|
50
51
|
};
|
|
51
52
|
}
|
|
52
|
-
listByProfilePagingPage(resourceGroupName, profileName, options, settings) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
});
|
|
53
|
+
async *listByProfilePagingPage(resourceGroupName, profileName, options, settings) {
|
|
54
|
+
let result;
|
|
55
|
+
let continuationToken = settings?.continuationToken;
|
|
56
|
+
if (!continuationToken) {
|
|
57
|
+
result = await this._listByProfile(resourceGroupName, profileName, options);
|
|
58
|
+
let page = result.value || [];
|
|
59
|
+
continuationToken = result.nextLink;
|
|
60
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
61
|
+
yield page;
|
|
62
|
+
}
|
|
63
|
+
while (continuationToken) {
|
|
64
|
+
result = await this._listByProfileNext(resourceGroupName, profileName, continuationToken, options);
|
|
65
|
+
continuationToken = result.nextLink;
|
|
66
|
+
let page = result.value || [];
|
|
67
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
68
|
+
yield page;
|
|
69
|
+
}
|
|
71
70
|
}
|
|
72
|
-
listByProfilePagingAll(resourceGroupName, profileName, options) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listByProfilePagingPage(resourceGroupName, profileName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
77
|
-
_c = _f.value;
|
|
78
|
-
_d = false;
|
|
79
|
-
const page = _c;
|
|
80
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
84
|
-
finally {
|
|
85
|
-
try {
|
|
86
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
87
|
-
}
|
|
88
|
-
finally { if (e_1) throw e_1.error; }
|
|
89
|
-
}
|
|
90
|
-
});
|
|
71
|
+
async *listByProfilePagingAll(resourceGroupName, profileName, options) {
|
|
72
|
+
for await (const page of this.listByProfilePagingPage(resourceGroupName, profileName, options)) {
|
|
73
|
+
yield* page;
|
|
74
|
+
}
|
|
91
75
|
}
|
|
92
76
|
/**
|
|
93
77
|
* Checks the quota and actual usage of endpoints under the given Azure Front Door profile..
|
|
@@ -107,52 +91,35 @@ class AfdOriginGroupsImpl {
|
|
|
107
91
|
return this;
|
|
108
92
|
},
|
|
109
93
|
byPage: (settings) => {
|
|
110
|
-
if (settings
|
|
94
|
+
if (settings?.maxPageSize) {
|
|
111
95
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
112
96
|
}
|
|
113
97
|
return this.listResourceUsagePagingPage(resourceGroupName, profileName, originGroupName, options, settings);
|
|
114
98
|
},
|
|
115
99
|
};
|
|
116
100
|
}
|
|
117
|
-
listResourceUsagePagingPage(resourceGroupName, profileName, originGroupName, options, settings) {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
-
});
|
|
101
|
+
async *listResourceUsagePagingPage(resourceGroupName, profileName, originGroupName, options, settings) {
|
|
102
|
+
let result;
|
|
103
|
+
let continuationToken = settings?.continuationToken;
|
|
104
|
+
if (!continuationToken) {
|
|
105
|
+
result = await this._listResourceUsage(resourceGroupName, profileName, originGroupName, options);
|
|
106
|
+
let page = result.value || [];
|
|
107
|
+
continuationToken = result.nextLink;
|
|
108
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
109
|
+
yield page;
|
|
110
|
+
}
|
|
111
|
+
while (continuationToken) {
|
|
112
|
+
result = await this._listResourceUsageNext(resourceGroupName, profileName, originGroupName, continuationToken, options);
|
|
113
|
+
continuationToken = result.nextLink;
|
|
114
|
+
let page = result.value || [];
|
|
115
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
116
|
+
yield page;
|
|
117
|
+
}
|
|
136
118
|
}
|
|
137
|
-
listResourceUsagePagingAll(resourceGroupName, profileName, originGroupName, options) {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listResourceUsagePagingPage(resourceGroupName, profileName, originGroupName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
142
|
-
_c = _f.value;
|
|
143
|
-
_d = false;
|
|
144
|
-
const page = _c;
|
|
145
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
149
|
-
finally {
|
|
150
|
-
try {
|
|
151
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
152
|
-
}
|
|
153
|
-
finally { if (e_2) throw e_2.error; }
|
|
154
|
-
}
|
|
155
|
-
});
|
|
119
|
+
async *listResourceUsagePagingAll(resourceGroupName, profileName, originGroupName, options) {
|
|
120
|
+
for await (const page of this.listResourceUsagePagingPage(resourceGroupName, profileName, originGroupName, options)) {
|
|
121
|
+
yield* page;
|
|
122
|
+
}
|
|
156
123
|
}
|
|
157
124
|
/**
|
|
158
125
|
* Lists all of the existing origin groups within a profile.
|
|
@@ -189,14 +156,19 @@ class AfdOriginGroupsImpl {
|
|
|
189
156
|
return this.client.sendOperationRequest(args, spec);
|
|
190
157
|
};
|
|
191
158
|
const sendOperationFn = async (args, spec) => {
|
|
192
|
-
var _a;
|
|
193
159
|
let currentRawResponse = undefined;
|
|
194
|
-
const providedCallback =
|
|
160
|
+
const providedCallback = args.options?.onResponse;
|
|
195
161
|
const callback = (rawResponse, flatResponse) => {
|
|
196
162
|
currentRawResponse = rawResponse;
|
|
197
|
-
providedCallback
|
|
163
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
164
|
+
};
|
|
165
|
+
const updatedArgs = {
|
|
166
|
+
...args,
|
|
167
|
+
options: {
|
|
168
|
+
...args.options,
|
|
169
|
+
onResponse: callback,
|
|
170
|
+
},
|
|
198
171
|
};
|
|
199
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
200
172
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
201
173
|
return {
|
|
202
174
|
flatResponse,
|
|
@@ -219,8 +191,8 @@ class AfdOriginGroupsImpl {
|
|
|
219
191
|
spec: createOperationSpec,
|
|
220
192
|
});
|
|
221
193
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
222
|
-
restoreFrom: options
|
|
223
|
-
intervalInMs: options
|
|
194
|
+
restoreFrom: options?.resumeFrom,
|
|
195
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
224
196
|
resourceLocationConfig: "azure-async-operation",
|
|
225
197
|
});
|
|
226
198
|
await poller.poll();
|
|
@@ -253,14 +225,19 @@ class AfdOriginGroupsImpl {
|
|
|
253
225
|
return this.client.sendOperationRequest(args, spec);
|
|
254
226
|
};
|
|
255
227
|
const sendOperationFn = async (args, spec) => {
|
|
256
|
-
var _a;
|
|
257
228
|
let currentRawResponse = undefined;
|
|
258
|
-
const providedCallback =
|
|
229
|
+
const providedCallback = args.options?.onResponse;
|
|
259
230
|
const callback = (rawResponse, flatResponse) => {
|
|
260
231
|
currentRawResponse = rawResponse;
|
|
261
|
-
providedCallback
|
|
232
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
233
|
+
};
|
|
234
|
+
const updatedArgs = {
|
|
235
|
+
...args,
|
|
236
|
+
options: {
|
|
237
|
+
...args.options,
|
|
238
|
+
onResponse: callback,
|
|
239
|
+
},
|
|
262
240
|
};
|
|
263
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
264
241
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
265
242
|
return {
|
|
266
243
|
flatResponse,
|
|
@@ -283,8 +260,8 @@ class AfdOriginGroupsImpl {
|
|
|
283
260
|
spec: updateOperationSpec,
|
|
284
261
|
});
|
|
285
262
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
286
|
-
restoreFrom: options
|
|
287
|
-
intervalInMs: options
|
|
263
|
+
restoreFrom: options?.resumeFrom,
|
|
264
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
288
265
|
resourceLocationConfig: "azure-async-operation",
|
|
289
266
|
});
|
|
290
267
|
await poller.poll();
|
|
@@ -316,14 +293,19 @@ class AfdOriginGroupsImpl {
|
|
|
316
293
|
return this.client.sendOperationRequest(args, spec);
|
|
317
294
|
};
|
|
318
295
|
const sendOperationFn = async (args, spec) => {
|
|
319
|
-
var _a;
|
|
320
296
|
let currentRawResponse = undefined;
|
|
321
|
-
const providedCallback =
|
|
297
|
+
const providedCallback = args.options?.onResponse;
|
|
322
298
|
const callback = (rawResponse, flatResponse) => {
|
|
323
299
|
currentRawResponse = rawResponse;
|
|
324
|
-
providedCallback
|
|
300
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
301
|
+
};
|
|
302
|
+
const updatedArgs = {
|
|
303
|
+
...args,
|
|
304
|
+
options: {
|
|
305
|
+
...args.options,
|
|
306
|
+
onResponse: callback,
|
|
307
|
+
},
|
|
325
308
|
};
|
|
326
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
327
309
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
328
310
|
return {
|
|
329
311
|
flatResponse,
|
|
@@ -340,8 +322,8 @@ class AfdOriginGroupsImpl {
|
|
|
340
322
|
spec: deleteOperationSpec,
|
|
341
323
|
});
|
|
342
324
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
343
|
-
restoreFrom: options
|
|
344
|
-
intervalInMs: options
|
|
325
|
+
restoreFrom: options?.resumeFrom,
|
|
326
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
345
327
|
resourceLocationConfig: "azure-async-operation",
|
|
346
328
|
});
|
|
347
329
|
await poller.poll();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"afdOriginGroups.js","sourceRoot":"","sources":["../../../src/operations/afdOriginGroups.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAsB9C,4CAA4C;AAC5C,mDAAmD;AACnD,MAAa,mBAAmB;IAG9B;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACI,aAAa,CAClB,iBAAyB,EACzB,WAAmB,EACnB,OAAoD;QAEpD,MAAM,IAAI,GAAG,IAAI,CAAC,sBAAsB,CACtC,iBAAiB,EACjB,WAAW,EACX,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,uBAAuB,CACjC,iBAAiB,EACjB,WAAW,EACX,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,uBAAuB,CACpC,iBAAyB,EACzB,WAAmB,EACnB,OAAoD,EACpD,QAAuB;;YAEvB,IAAI,MAA4C,CAAC;YACjD,IAAI,iBAAiB,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,iBAAiB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AChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,kCAAkC,GAA6B;IACnE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gBAAgB;SACrC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,gBAAgB;SACrC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,eAAe;KAC3B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { AfdOriginGroups } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { CdnManagementClient } from \"../cdnManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n AFDOriginGroup,\n AfdOriginGroupsListByProfileNextOptionalParams,\n AfdOriginGroupsListByProfileOptionalParams,\n AfdOriginGroupsListByProfileResponse,\n Usage,\n AfdOriginGroupsListResourceUsageNextOptionalParams,\n AfdOriginGroupsListResourceUsageOptionalParams,\n AfdOriginGroupsListResourceUsageResponse,\n AfdOriginGroupsGetOptionalParams,\n AfdOriginGroupsGetResponse,\n AfdOriginGroupsCreateOptionalParams,\n AfdOriginGroupsCreateResponse,\n AFDOriginGroupUpdateParameters,\n AfdOriginGroupsUpdateOptionalParams,\n AfdOriginGroupsUpdateResponse,\n AfdOriginGroupsDeleteOptionalParams,\n AfdOriginGroupsListByProfileNextResponse,\n AfdOriginGroupsListResourceUsageNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing AfdOriginGroups operations. */\nexport class AfdOriginGroupsImpl implements AfdOriginGroups {\n private readonly client: CdnManagementClient;\n\n /**\n * Initialize a new instance of the class AfdOriginGroups class.\n * @param client Reference to the service client\n */\n constructor(client: CdnManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists all of the existing origin groups within a profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param options The options parameters.\n */\n public listByProfile(\n resourceGroupName: string,\n profileName: string,\n options?: AfdOriginGroupsListByProfileOptionalParams,\n ): PagedAsyncIterableIterator<AFDOriginGroup> {\n const iter = this.listByProfilePagingAll(\n resourceGroupName,\n profileName,\n options,\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByProfilePagingPage(\n resourceGroupName,\n profileName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByProfilePagingPage(\n resourceGroupName: string,\n profileName: string,\n options?: AfdOriginGroupsListByProfileOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<AFDOriginGroup[]> {\n let result: AfdOriginGroupsListByProfileResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByProfile(\n resourceGroupName,\n profileName,\n options,\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByProfileNext(\n resourceGroupName,\n profileName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByProfilePagingAll(\n resourceGroupName: string,\n profileName: string,\n options?: AfdOriginGroupsListByProfileOptionalParams,\n ): AsyncIterableIterator<AFDOriginGroup> {\n for await (const page of this.listByProfilePagingPage(\n resourceGroupName,\n profileName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Checks the quota and actual usage of endpoints under the given Azure Front Door profile..\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the endpoint.\n * @param options The options parameters.\n */\n public listResourceUsage(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n options?: AfdOriginGroupsListResourceUsageOptionalParams,\n ): PagedAsyncIterableIterator<Usage> {\n const iter = this.listResourceUsagePagingAll(\n resourceGroupName,\n profileName,\n originGroupName,\n options,\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listResourceUsagePagingPage(\n resourceGroupName,\n profileName,\n originGroupName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listResourceUsagePagingPage(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n options?: AfdOriginGroupsListResourceUsageOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<Usage[]> {\n let result: AfdOriginGroupsListResourceUsageResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listResourceUsage(\n resourceGroupName,\n profileName,\n originGroupName,\n options,\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listResourceUsageNext(\n resourceGroupName,\n profileName,\n originGroupName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listResourceUsagePagingAll(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n options?: AfdOriginGroupsListResourceUsageOptionalParams,\n ): AsyncIterableIterator<Usage> {\n for await (const page of this.listResourceUsagePagingPage(\n resourceGroupName,\n profileName,\n originGroupName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists all of the existing origin groups within a profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param options The options parameters.\n */\n private _listByProfile(\n resourceGroupName: string,\n profileName: string,\n options?: AfdOriginGroupsListByProfileOptionalParams,\n ): Promise<AfdOriginGroupsListByProfileResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, profileName, options },\n listByProfileOperationSpec,\n );\n }\n\n /**\n * Gets an existing origin group within a profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the endpoint.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n options?: AfdOriginGroupsGetOptionalParams,\n ): Promise<AfdOriginGroupsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, profileName, originGroupName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Creates a new origin group within the specified profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the endpoint.\n * @param originGroup Origin group properties\n * @param options The options parameters.\n */\n async beginCreate(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n originGroup: AFDOriginGroup,\n options?: AfdOriginGroupsCreateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<AfdOriginGroupsCreateResponse>,\n AfdOriginGroupsCreateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<AfdOriginGroupsCreateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n profileName,\n originGroupName,\n originGroup,\n options,\n },\n spec: createOperationSpec,\n });\n const poller = await createHttpPoller<\n AfdOriginGroupsCreateResponse,\n OperationState<AfdOriginGroupsCreateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates a new origin group within the specified profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the endpoint.\n * @param originGroup Origin group properties\n * @param options The options parameters.\n */\n async beginCreateAndWait(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n originGroup: AFDOriginGroup,\n options?: AfdOriginGroupsCreateOptionalParams,\n ): Promise<AfdOriginGroupsCreateResponse> {\n const poller = await this.beginCreate(\n resourceGroupName,\n profileName,\n originGroupName,\n originGroup,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Updates an existing origin group within a profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the profile.\n * @param originGroupUpdateProperties Origin group properties\n * @param options The options parameters.\n */\n async beginUpdate(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n originGroupUpdateProperties: AFDOriginGroupUpdateParameters,\n options?: AfdOriginGroupsUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<AfdOriginGroupsUpdateResponse>,\n AfdOriginGroupsUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<AfdOriginGroupsUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n profileName,\n originGroupName,\n originGroupUpdateProperties,\n options,\n },\n spec: updateOperationSpec,\n });\n const poller = await createHttpPoller<\n AfdOriginGroupsUpdateResponse,\n OperationState<AfdOriginGroupsUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Updates an existing origin group within a profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the profile.\n * @param originGroupUpdateProperties Origin group properties\n * @param options The options parameters.\n */\n async beginUpdateAndWait(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n originGroupUpdateProperties: AFDOriginGroupUpdateParameters,\n options?: AfdOriginGroupsUpdateOptionalParams,\n ): Promise<AfdOriginGroupsUpdateResponse> {\n const poller = await this.beginUpdate(\n resourceGroupName,\n profileName,\n originGroupName,\n originGroupUpdateProperties,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes an existing origin group within a profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the profile.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n options?: AfdOriginGroupsDeleteOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, profileName, originGroupName, options },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes an existing origin group within a profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the profile.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n options?: AfdOriginGroupsDeleteOptionalParams,\n ): Promise<void> {\n const poller = await this.beginDelete(\n resourceGroupName,\n profileName,\n originGroupName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Checks the quota and actual usage of endpoints under the given Azure Front Door profile..\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the endpoint.\n * @param options The options parameters.\n */\n private _listResourceUsage(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n options?: AfdOriginGroupsListResourceUsageOptionalParams,\n ): Promise<AfdOriginGroupsListResourceUsageResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, profileName, originGroupName, options },\n listResourceUsageOperationSpec,\n );\n }\n\n /**\n * ListByProfileNext\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param nextLink The nextLink from the previous successful call to the ListByProfile method.\n * @param options The options parameters.\n */\n private _listByProfileNext(\n resourceGroupName: string,\n profileName: string,\n nextLink: string,\n options?: AfdOriginGroupsListByProfileNextOptionalParams,\n ): Promise<AfdOriginGroupsListByProfileNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, profileName, nextLink, options },\n listByProfileNextOperationSpec,\n );\n }\n\n /**\n * ListResourceUsageNext\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the endpoint.\n * @param nextLink The nextLink from the previous successful call to the ListResourceUsage method.\n * @param options The options parameters.\n */\n private _listResourceUsageNext(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n nextLink: string,\n options?: AfdOriginGroupsListResourceUsageNextOptionalParams,\n ): Promise<AfdOriginGroupsListResourceUsageNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, profileName, originGroupName, nextLink, options },\n listResourceUsageNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByProfileOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AFDOriginGroupListResult,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.originGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n 201: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n 202: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n 204: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n requestBody: Parameters.originGroup,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.originGroupName,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n 201: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n 202: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n 204: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n requestBody: Parameters.originGroupUpdateProperties,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.originGroupName,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.originGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listResourceUsageOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/usages\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.UsagesListResult,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.originGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByProfileNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AFDOriginGroupListResult,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listResourceUsageNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.UsagesListResult,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.nextLink,\n Parameters.originGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"afdOriginGroups.js","sourceRoot":"","sources":["../../../src/operations/afdOriginGroups.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAEtD,8CAIyB;AACzB,8CAA8C;AAsB9C,4CAA4C;AAC5C,mDAAmD;AACnD,MAAa,mBAAmB;IACb,MAAM,CAAsB;IAE7C;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACI,aAAa,CAClB,iBAAyB,EACzB,WAAmB,EACnB,OAAoD;QAEpD,MAAM,IAAI,GAAG,IAAI,CAAC,sBAAsB,CACtC,iBAAiB,EACjB,WAAW,EACX,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,uBAAuB,CACjC,iBAAiB,E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AG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gBAAgB;SACrC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,gBAAgB;SACrC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,eAAe;KAC3B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { AfdOriginGroups } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { CdnManagementClient } from \"../cdnManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n AFDOriginGroup,\n AfdOriginGroupsListByProfileNextOptionalParams,\n AfdOriginGroupsListByProfileOptionalParams,\n AfdOriginGroupsListByProfileResponse,\n Usage,\n AfdOriginGroupsListResourceUsageNextOptionalParams,\n AfdOriginGroupsListResourceUsageOptionalParams,\n AfdOriginGroupsListResourceUsageResponse,\n AfdOriginGroupsGetOptionalParams,\n AfdOriginGroupsGetResponse,\n AfdOriginGroupsCreateOptionalParams,\n AfdOriginGroupsCreateResponse,\n AFDOriginGroupUpdateParameters,\n AfdOriginGroupsUpdateOptionalParams,\n AfdOriginGroupsUpdateResponse,\n AfdOriginGroupsDeleteOptionalParams,\n AfdOriginGroupsListByProfileNextResponse,\n AfdOriginGroupsListResourceUsageNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing AfdOriginGroups operations. */\nexport class AfdOriginGroupsImpl implements AfdOriginGroups {\n private readonly client: CdnManagementClient;\n\n /**\n * Initialize a new instance of the class AfdOriginGroups class.\n * @param client Reference to the service client\n */\n constructor(client: CdnManagementClient) {\n this.client = client;\n }\n\n /**\n * Lists all of the existing origin groups within a profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param options The options parameters.\n */\n public listByProfile(\n resourceGroupName: string,\n profileName: string,\n options?: AfdOriginGroupsListByProfileOptionalParams,\n ): PagedAsyncIterableIterator<AFDOriginGroup> {\n const iter = this.listByProfilePagingAll(\n resourceGroupName,\n profileName,\n options,\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByProfilePagingPage(\n resourceGroupName,\n profileName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByProfilePagingPage(\n resourceGroupName: string,\n profileName: string,\n options?: AfdOriginGroupsListByProfileOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<AFDOriginGroup[]> {\n let result: AfdOriginGroupsListByProfileResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByProfile(\n resourceGroupName,\n profileName,\n options,\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByProfileNext(\n resourceGroupName,\n profileName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByProfilePagingAll(\n resourceGroupName: string,\n profileName: string,\n options?: AfdOriginGroupsListByProfileOptionalParams,\n ): AsyncIterableIterator<AFDOriginGroup> {\n for await (const page of this.listByProfilePagingPage(\n resourceGroupName,\n profileName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Checks the quota and actual usage of endpoints under the given Azure Front Door profile..\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the endpoint.\n * @param options The options parameters.\n */\n public listResourceUsage(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n options?: AfdOriginGroupsListResourceUsageOptionalParams,\n ): PagedAsyncIterableIterator<Usage> {\n const iter = this.listResourceUsagePagingAll(\n resourceGroupName,\n profileName,\n originGroupName,\n options,\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listResourceUsagePagingPage(\n resourceGroupName,\n profileName,\n originGroupName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listResourceUsagePagingPage(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n options?: AfdOriginGroupsListResourceUsageOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<Usage[]> {\n let result: AfdOriginGroupsListResourceUsageResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listResourceUsage(\n resourceGroupName,\n profileName,\n originGroupName,\n options,\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listResourceUsageNext(\n resourceGroupName,\n profileName,\n originGroupName,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listResourceUsagePagingAll(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n options?: AfdOriginGroupsListResourceUsageOptionalParams,\n ): AsyncIterableIterator<Usage> {\n for await (const page of this.listResourceUsagePagingPage(\n resourceGroupName,\n profileName,\n originGroupName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * Lists all of the existing origin groups within a profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param options The options parameters.\n */\n private _listByProfile(\n resourceGroupName: string,\n profileName: string,\n options?: AfdOriginGroupsListByProfileOptionalParams,\n ): Promise<AfdOriginGroupsListByProfileResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, profileName, options },\n listByProfileOperationSpec,\n );\n }\n\n /**\n * Gets an existing origin group within a profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the endpoint.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n options?: AfdOriginGroupsGetOptionalParams,\n ): Promise<AfdOriginGroupsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, profileName, originGroupName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Creates a new origin group within the specified profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the endpoint.\n * @param originGroup Origin group properties\n * @param options The options parameters.\n */\n async beginCreate(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n originGroup: AFDOriginGroup,\n options?: AfdOriginGroupsCreateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<AfdOriginGroupsCreateResponse>,\n AfdOriginGroupsCreateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<AfdOriginGroupsCreateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n profileName,\n originGroupName,\n originGroup,\n options,\n },\n spec: createOperationSpec,\n });\n const poller = await createHttpPoller<\n AfdOriginGroupsCreateResponse,\n OperationState<AfdOriginGroupsCreateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates a new origin group within the specified profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the endpoint.\n * @param originGroup Origin group properties\n * @param options The options parameters.\n */\n async beginCreateAndWait(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n originGroup: AFDOriginGroup,\n options?: AfdOriginGroupsCreateOptionalParams,\n ): Promise<AfdOriginGroupsCreateResponse> {\n const poller = await this.beginCreate(\n resourceGroupName,\n profileName,\n originGroupName,\n originGroup,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Updates an existing origin group within a profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the profile.\n * @param originGroupUpdateProperties Origin group properties\n * @param options The options parameters.\n */\n async beginUpdate(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n originGroupUpdateProperties: AFDOriginGroupUpdateParameters,\n options?: AfdOriginGroupsUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<AfdOriginGroupsUpdateResponse>,\n AfdOriginGroupsUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<AfdOriginGroupsUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: {\n resourceGroupName,\n profileName,\n originGroupName,\n originGroupUpdateProperties,\n options,\n },\n spec: updateOperationSpec,\n });\n const poller = await createHttpPoller<\n AfdOriginGroupsUpdateResponse,\n OperationState<AfdOriginGroupsUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Updates an existing origin group within a profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the profile.\n * @param originGroupUpdateProperties Origin group properties\n * @param options The options parameters.\n */\n async beginUpdateAndWait(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n originGroupUpdateProperties: AFDOriginGroupUpdateParameters,\n options?: AfdOriginGroupsUpdateOptionalParams,\n ): Promise<AfdOriginGroupsUpdateResponse> {\n const poller = await this.beginUpdate(\n resourceGroupName,\n profileName,\n originGroupName,\n originGroupUpdateProperties,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes an existing origin group within a profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the profile.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n options?: AfdOriginGroupsDeleteOptionalParams,\n ): Promise<SimplePollerLike<OperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, profileName, originGroupName, options },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<void, OperationState<void>>(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes an existing origin group within a profile.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the profile.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n options?: AfdOriginGroupsDeleteOptionalParams,\n ): Promise<void> {\n const poller = await this.beginDelete(\n resourceGroupName,\n profileName,\n originGroupName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Checks the quota and actual usage of endpoints under the given Azure Front Door profile..\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the endpoint.\n * @param options The options parameters.\n */\n private _listResourceUsage(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n options?: AfdOriginGroupsListResourceUsageOptionalParams,\n ): Promise<AfdOriginGroupsListResourceUsageResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, profileName, originGroupName, options },\n listResourceUsageOperationSpec,\n );\n }\n\n /**\n * ListByProfileNext\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param nextLink The nextLink from the previous successful call to the ListByProfile method.\n * @param options The options parameters.\n */\n private _listByProfileNext(\n resourceGroupName: string,\n profileName: string,\n nextLink: string,\n options?: AfdOriginGroupsListByProfileNextOptionalParams,\n ): Promise<AfdOriginGroupsListByProfileNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, profileName, nextLink, options },\n listByProfileNextOperationSpec,\n );\n }\n\n /**\n * ListResourceUsageNext\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param profileName Name of the Azure Front Door Standard or Azure Front Door Premium profile which\n * is unique within the resource group.\n * @param originGroupName Name of the origin group which is unique within the endpoint.\n * @param nextLink The nextLink from the previous successful call to the ListResourceUsage method.\n * @param options The options parameters.\n */\n private _listResourceUsageNext(\n resourceGroupName: string,\n profileName: string,\n originGroupName: string,\n nextLink: string,\n options?: AfdOriginGroupsListResourceUsageNextOptionalParams,\n ): Promise<AfdOriginGroupsListResourceUsageNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, profileName, originGroupName, nextLink, options },\n listResourceUsageNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByProfileOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AFDOriginGroupListResult,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.originGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n 201: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n 202: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n 204: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n requestBody: Parameters.originGroup,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.originGroupName,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n 201: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n 202: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n 204: {\n bodyMapper: Mappers.AFDOriginGroup,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n requestBody: Parameters.originGroupUpdateProperties,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.originGroupName,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.originGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listResourceUsageOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/usages\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.UsagesListResult,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.originGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByProfileNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AFDOriginGroupListResult,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listResourceUsageNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.UsagesListResult,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.profileName1,\n Parameters.nextLink,\n Parameters.originGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|