@azure/arm-networkfunction 1.0.1-alpha.20221128.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -8
- package/dist/index.js +368 -251
- 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/azureTrafficCollectorsByResourceGroupListSample.js +1 -1
- package/dist-esm/samples-dev/azureTrafficCollectorsBySubscriptionListSample.js +1 -1
- package/dist-esm/samples-dev/azureTrafficCollectorsCreateOrUpdateSample.js +3 -6
- package/dist-esm/samples-dev/azureTrafficCollectorsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/azureTrafficCollectorsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/azureTrafficCollectorsGetSample.js +1 -1
- package/dist-esm/samples-dev/azureTrafficCollectorsUpdateTagsSample.js +1 -1
- package/dist-esm/samples-dev/collectorPoliciesCreateOrUpdateSample.js +3 -2
- package/dist-esm/samples-dev/collectorPoliciesCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/collectorPoliciesDeleteSample.js +1 -1
- package/dist-esm/samples-dev/collectorPoliciesGetSample.js +1 -1
- package/dist-esm/samples-dev/collectorPoliciesListSample.js +1 -1
- package/dist-esm/samples-dev/collectorPoliciesUpdateTagsSample.d.ts +2 -0
- package/dist-esm/samples-dev/collectorPoliciesUpdateTagsSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/collectorPoliciesUpdateTagsSample.js +33 -0
- package/dist-esm/samples-dev/collectorPoliciesUpdateTagsSample.js.map +1 -0
- package/dist-esm/samples-dev/networkFunctionListOperationsSample.js +1 -1
- package/dist-esm/src/azureTrafficCollectorClient.d.ts.map +1 -1
- package/dist-esm/src/azureTrafficCollectorClient.js +21 -19
- package/dist-esm/src/azureTrafficCollectorClient.js.map +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 +138 -119
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +34 -24
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +7 -8
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +152 -163
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts +2 -1
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +10 -6
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/azureTrafficCollectors.d.ts +4 -2
- package/dist-esm/src/operations/azureTrafficCollectors.d.ts.map +1 -1
- package/dist-esm/src/operations/azureTrafficCollectors.js +7 -6
- package/dist-esm/src/operations/azureTrafficCollectors.js.map +1 -1
- package/dist-esm/src/operations/azureTrafficCollectorsByResourceGroup.d.ts.map +1 -1
- package/dist-esm/src/operations/azureTrafficCollectorsByResourceGroup.js +19 -7
- package/dist-esm/src/operations/azureTrafficCollectorsByResourceGroup.js.map +1 -1
- package/dist-esm/src/operations/azureTrafficCollectorsBySubscription.d.ts.map +1 -1
- package/dist-esm/src/operations/azureTrafficCollectorsBySubscription.js +19 -7
- package/dist-esm/src/operations/azureTrafficCollectorsBySubscription.js.map +1 -1
- package/dist-esm/src/operations/collectorPolicies.d.ts +14 -3
- package/dist-esm/src/operations/collectorPolicies.d.ts.map +1 -1
- package/dist-esm/src/operations/collectorPolicies.js +68 -10
- package/dist-esm/src/operations/collectorPolicies.js.map +1 -1
- package/dist-esm/src/operations/networkFunction.d.ts.map +1 -1
- package/dist-esm/src/operations/networkFunction.js +8 -4
- package/dist-esm/src/operations/networkFunction.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/azureTrafficCollectors.d.ts +4 -2
- package/dist-esm/src/operationsInterfaces/azureTrafficCollectors.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/collectorPolicies.d.ts +14 -3
- package/dist-esm/src/operationsInterfaces/collectorPolicies.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/test/networkfunction_examples.spec.d.ts +4 -0
- package/dist-esm/test/networkfunction_examples.spec.d.ts.map +1 -0
- package/dist-esm/test/networkfunction_examples.spec.js +69 -0
- package/dist-esm/test/networkfunction_examples.spec.js.map +1 -0
- package/package.json +7 -6
- package/review/arm-networkfunction.api.md +31 -14
- package/src/azureTrafficCollectorClient.ts +27 -21
- package/src/index.ts +1 -0
- package/src/models/index.ts +148 -127
- package/src/models/mappers.ts +157 -172
- package/src/models/parameters.ts +12 -7
- package/src/operations/azureTrafficCollectors.ts +7 -3
- package/src/operations/azureTrafficCollectorsByResourceGroup.ts +21 -8
- package/src/operations/azureTrafficCollectorsBySubscription.ts +21 -8
- package/src/operations/collectorPolicies.ts +89 -12
- package/src/operations/networkFunction.ts +10 -5
- package/src/operationsInterfaces/azureTrafficCollectors.ts +4 -0
- package/src/operationsInterfaces/collectorPolicies.ts +23 -1
- package/src/pagingHelper.ts +39 -0
- package/types/arm-networkfunction.d.ts +65 -21
- 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 -38
- package/dist-esm/test/sampleTest.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagingHelper.d.ts","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,QAAQ;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAID;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAKtE;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,OAAO,EACb,iBAAiB,EAAE,MAAM,GAAG,SAAS,GACpC,IAAI,CAON"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
const pageMap = new WeakMap();
|
|
9
|
+
/**
|
|
10
|
+
* Given a result page from a pageable operation, returns a
|
|
11
|
+
* continuation token that can be used to begin paging from
|
|
12
|
+
* that point later.
|
|
13
|
+
* @param page A result object from calling .byPage() on a paged operation.
|
|
14
|
+
* @returns The continuation token that can be passed into byPage().
|
|
15
|
+
*/
|
|
16
|
+
export function getContinuationToken(page) {
|
|
17
|
+
var _a;
|
|
18
|
+
if (typeof page !== "object" || page === null) {
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
|
|
22
|
+
}
|
|
23
|
+
export function setContinuationToken(page, continuationToken) {
|
|
24
|
+
var _a;
|
|
25
|
+
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
|
|
29
|
+
pageInfo.continuationToken = continuationToken;
|
|
30
|
+
pageMap.set(page, pageInfo);
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=pagingHelper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAa;;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE;QAC7C,OAAO,SAAS,CAAC;KAClB;IACD,OAAO,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,0CAAE,iBAAiB,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,IAAa,EACb,iBAAqC;;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE;QACnE,OAAO;KACR;IACD,MAAM,QAAQ,GAAG,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,mCAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"networkfunction_examples.spec.d.ts","sourceRoot":"","sources":["../../test/networkfunction_examples.spec.ts"],"names":[],"mappings":"AA+BA,eAAO,MAAM,kBAAkB;;CAE9B,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
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
|
+
import { __awaiter } from "tslib";
|
|
9
|
+
import { env, Recorder, isPlaybackMode, } from "@azure-tools/test-recorder";
|
|
10
|
+
import { createTestCredential } from "@azure-tools/test-credential";
|
|
11
|
+
import { assert } from "chai";
|
|
12
|
+
import { AzureTrafficCollectorClient } from "../src/azureTrafficCollectorClient";
|
|
13
|
+
const replaceableVariables = {
|
|
14
|
+
AZURE_CLIENT_ID: "azure_client_id",
|
|
15
|
+
AZURE_CLIENT_SECRET: "azure_client_secret",
|
|
16
|
+
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
|
|
17
|
+
SUBSCRIPTION_ID: "azure_subscription_id"
|
|
18
|
+
};
|
|
19
|
+
const recorderOptions = {
|
|
20
|
+
envSetupForPlayback: replaceableVariables
|
|
21
|
+
};
|
|
22
|
+
export const testPollingOptions = {
|
|
23
|
+
updateIntervalInMs: isPlaybackMode() ? 0 : undefined,
|
|
24
|
+
};
|
|
25
|
+
describe("networkfunction test", () => {
|
|
26
|
+
let recorder;
|
|
27
|
+
let subscriptionId;
|
|
28
|
+
let client;
|
|
29
|
+
let location;
|
|
30
|
+
let resourceGroup;
|
|
31
|
+
let azureTrafficCollectorName;
|
|
32
|
+
beforeEach(function () {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
recorder = new Recorder(this.currentTest);
|
|
35
|
+
yield recorder.start(recorderOptions);
|
|
36
|
+
subscriptionId = env.SUBSCRIPTION_ID || '';
|
|
37
|
+
// This is an example of how the environment variables are used
|
|
38
|
+
const credential = createTestCredential();
|
|
39
|
+
client = new AzureTrafficCollectorClient(credential, subscriptionId, recorder.configureClientOptions({}));
|
|
40
|
+
location = "eastus";
|
|
41
|
+
resourceGroup = "myjstest";
|
|
42
|
+
azureTrafficCollectorName = "atc";
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
afterEach(function () {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
yield recorder.stop();
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
it("azureTrafficCollector create test", function () {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
const res = yield client.azureTrafficCollectors.beginCreateOrUpdateAndWait(resourceGroup, azureTrafficCollectorName, location, testPollingOptions);
|
|
53
|
+
assert.equal(res.name, azureTrafficCollectorName);
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
it("azureTrafficCollector get test", function () {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
const res = yield client.azureTrafficCollectors.get(resourceGroup, azureTrafficCollectorName);
|
|
59
|
+
assert.equal(res.name, azureTrafficCollectorName);
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
it("azureTrafficCollector delete test", function () {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
const resArray = new Array();
|
|
65
|
+
const res = yield client.azureTrafficCollectors.beginDeleteAndWait(resourceGroup, azureTrafficCollectorName);
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
//# sourceMappingURL=networkfunction_examples.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"networkfunction_examples.spec.js","sourceRoot":"","sources":["../../test/networkfunction_examples.spec.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,EACL,GAAG,EACH,QAAQ,EAGR,cAAc,GACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAE9B,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AAEjF,MAAM,oBAAoB,GAA2B;IACnD,eAAe,EAAE,iBAAiB;IAClC,mBAAmB,EAAE,qBAAqB;IAC1C,eAAe,EAAE,sCAAsC;IACvD,eAAe,EAAE,uBAAuB;CACzC,CAAC;AAEF,MAAM,eAAe,GAAyB;IAC5C,mBAAmB,EAAE,oBAAoB;CAC1C,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;CACrD,CAAC;AAEF,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,IAAI,QAAkB,CAAC;IACvB,IAAI,cAAsB,CAAC;IAC3B,IAAI,MAAmC,CAAC;IACxC,IAAI,QAAgB,CAAC;IACrB,IAAI,aAAqB,CAAC;IAC1B,IAAI,yBAAiC,CAAC;IAEtC,UAAU,CAAC;;YACT,QAAQ,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAC1C,MAAM,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;YACtC,cAAc,GAAG,GAAG,CAAC,eAAe,IAAI,EAAE,CAAC;YAC3C,+DAA+D;YAC/D,MAAM,UAAU,GAAG,oBAAoB,EAAE,CAAC;YAC1C,MAAM,GAAG,IAAI,2BAA2B,CAAC,UAAU,EAAE,cAAc,EAAE,QAAQ,CAAC,sBAAsB,CAAC,EAAE,CAAC,CAAC,CAAC;YAC1G,QAAQ,GAAG,QAAQ,CAAC;YACpB,aAAa,GAAG,UAAU,CAAC;YAC3B,yBAAyB,GAAG,KAAK,CAAC;QAEpC,CAAC;KAAA,CAAC,CAAC;IAEH,SAAS,CAAC;;YACR,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACxB,CAAC;KAAA,CAAC,CAAC;IAEH,EAAE,CAAC,mCAAmC,EAAE;;YACtC,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,sBAAsB,CAAC,0BAA0B,CACxE,aAAa,EACb,yBAAyB,EACzB,QAAQ,EACR,kBAAkB,CAAC,CAAC;YACtB,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,yBAAyB,CAAC,CAAC;QACpD,CAAC;KAAA,CAAC,CAAC;IAEH,EAAE,CAAC,gCAAgC,EAAE;;YACnC,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,sBAAsB,CAAC,GAAG,CAAC,aAAa,EAAE,yBAAyB,CAAC,CAAC;YAC9F,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,yBAAyB,CAAC,CAAC;QACpD,CAAC;KAAA,CAAC,CAAC;IAEH,EAAE,CAAC,mCAAmC,EAAE;;YACtC,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;YAC7B,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,sBAAsB,CAAC,kBAAkB,CAAC,aAAa,EAAE,yBAAyB,CAAC,CAAA;QAC9G,CAAC;KAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"sdk-type": "mgmt",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "A generated SDK for AzureTrafficCollectorClient.",
|
|
6
|
-
"version": "
|
|
6
|
+
"version": "2.0.0",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=14.0.0"
|
|
9
9
|
},
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"@azure/core-lro": "^2.2.0",
|
|
12
12
|
"@azure/abort-controller": "^1.0.0",
|
|
13
13
|
"@azure/core-paging": "^1.2.0",
|
|
14
|
-
"@azure/core-client": "^1.
|
|
14
|
+
"@azure/core-client": "^1.6.1",
|
|
15
15
|
"@azure/core-auth": "^1.3.0",
|
|
16
16
|
"@azure/core-rest-pipeline": "^1.8.0",
|
|
17
17
|
"tslib": "^2.2.0"
|
|
@@ -36,17 +36,18 @@
|
|
|
36
36
|
"mkdirp": "^1.0.4",
|
|
37
37
|
"rollup": "^2.66.1",
|
|
38
38
|
"rollup-plugin-sourcemaps": "^0.6.3",
|
|
39
|
-
"typescript": "~4.
|
|
39
|
+
"typescript": "~4.8.0",
|
|
40
40
|
"uglify-js": "^3.4.9",
|
|
41
41
|
"rimraf": "^3.0.0",
|
|
42
42
|
"@azure/identity": "^2.0.1",
|
|
43
43
|
"@azure-tools/test-recorder": "^2.0.0",
|
|
44
|
-
"@azure-tools/test-credential": "
|
|
44
|
+
"@azure-tools/test-credential": "^1.0.0",
|
|
45
45
|
"mocha": "^7.1.1",
|
|
46
46
|
"@types/chai": "^4.2.8",
|
|
47
47
|
"chai": "^4.2.0",
|
|
48
48
|
"cross-env": "^7.0.2",
|
|
49
|
-
"@
|
|
49
|
+
"@types/node": "^14.0.0",
|
|
50
|
+
"@azure/dev-tool": "^1.0.0"
|
|
50
51
|
},
|
|
51
52
|
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/networkfunction/arm-networkfunction",
|
|
52
53
|
"repository": {
|
|
@@ -118,4 +119,4 @@
|
|
|
118
119
|
"disableDocsMs": true,
|
|
119
120
|
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-networkfunction?view=azure-node-preview"
|
|
120
121
|
}
|
|
121
|
-
}
|
|
122
|
+
}
|
|
@@ -10,9 +10,12 @@ import { PagedAsyncIterableIterator } from '@azure/core-paging';
|
|
|
10
10
|
import { PollerLike } from '@azure/core-lro';
|
|
11
11
|
import { PollOperationState } from '@azure/core-lro';
|
|
12
12
|
|
|
13
|
+
// @public
|
|
14
|
+
export type ApiVersionParameter = string;
|
|
15
|
+
|
|
13
16
|
// @public
|
|
14
17
|
export interface AzureTrafficCollector extends TrackedResource {
|
|
15
|
-
collectorPolicies?:
|
|
18
|
+
readonly collectorPolicies?: ResourceReference[];
|
|
16
19
|
readonly etag?: string;
|
|
17
20
|
readonly provisioningState?: ProvisioningState;
|
|
18
21
|
virtualHub?: ResourceReference;
|
|
@@ -54,8 +57,8 @@ export interface AzureTrafficCollectorListResult {
|
|
|
54
57
|
|
|
55
58
|
// @public
|
|
56
59
|
export interface AzureTrafficCollectors {
|
|
57
|
-
beginCreateOrUpdate(resourceGroupName: string, azureTrafficCollectorName: string, options?: AzureTrafficCollectorsCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<AzureTrafficCollectorsCreateOrUpdateResponse>, AzureTrafficCollectorsCreateOrUpdateResponse>>;
|
|
58
|
-
beginCreateOrUpdateAndWait(resourceGroupName: string, azureTrafficCollectorName: string, options?: AzureTrafficCollectorsCreateOrUpdateOptionalParams): Promise<AzureTrafficCollectorsCreateOrUpdateResponse>;
|
|
60
|
+
beginCreateOrUpdate(resourceGroupName: string, azureTrafficCollectorName: string, location: string, options?: AzureTrafficCollectorsCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<AzureTrafficCollectorsCreateOrUpdateResponse>, AzureTrafficCollectorsCreateOrUpdateResponse>>;
|
|
61
|
+
beginCreateOrUpdateAndWait(resourceGroupName: string, azureTrafficCollectorName: string, location: string, options?: AzureTrafficCollectorsCreateOrUpdateOptionalParams): Promise<AzureTrafficCollectorsCreateOrUpdateResponse>;
|
|
59
62
|
beginDelete(resourceGroupName: string, azureTrafficCollectorName: string, options?: AzureTrafficCollectorsDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
|
|
60
63
|
beginDeleteAndWait(resourceGroupName: string, azureTrafficCollectorName: string, options?: AzureTrafficCollectorsDeleteOptionalParams): Promise<void>;
|
|
61
64
|
get(resourceGroupName: string, azureTrafficCollectorName: string, options?: AzureTrafficCollectorsGetOptionalParams): Promise<AzureTrafficCollectorsGetResponse>;
|
|
@@ -102,8 +105,6 @@ export type AzureTrafficCollectorsBySubscriptionListResponse = AzureTrafficColle
|
|
|
102
105
|
|
|
103
106
|
// @public
|
|
104
107
|
export interface AzureTrafficCollectorsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
|
|
105
|
-
collectorPolicies?: CollectorPolicy[];
|
|
106
|
-
location?: string;
|
|
107
108
|
resumeFrom?: string;
|
|
108
109
|
tags?: {
|
|
109
110
|
[propertyName: string]: string;
|
|
@@ -150,12 +151,13 @@ export interface CloudErrorBody {
|
|
|
150
151
|
|
|
151
152
|
// @public
|
|
152
153
|
export interface CollectorPolicies {
|
|
153
|
-
beginCreateOrUpdate(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, options?: CollectorPoliciesCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<CollectorPoliciesCreateOrUpdateResponse>, CollectorPoliciesCreateOrUpdateResponse>>;
|
|
154
|
-
beginCreateOrUpdateAndWait(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, options?: CollectorPoliciesCreateOrUpdateOptionalParams): Promise<CollectorPoliciesCreateOrUpdateResponse>;
|
|
154
|
+
beginCreateOrUpdate(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, location: string, options?: CollectorPoliciesCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<CollectorPoliciesCreateOrUpdateResponse>, CollectorPoliciesCreateOrUpdateResponse>>;
|
|
155
|
+
beginCreateOrUpdateAndWait(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, location: string, options?: CollectorPoliciesCreateOrUpdateOptionalParams): Promise<CollectorPoliciesCreateOrUpdateResponse>;
|
|
155
156
|
beginDelete(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, options?: CollectorPoliciesDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
|
|
156
157
|
beginDeleteAndWait(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, options?: CollectorPoliciesDeleteOptionalParams): Promise<void>;
|
|
157
158
|
get(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, options?: CollectorPoliciesGetOptionalParams): Promise<CollectorPoliciesGetResponse>;
|
|
158
159
|
list(resourceGroupName: string, azureTrafficCollectorName: string, options?: CollectorPoliciesListOptionalParams): PagedAsyncIterableIterator<CollectorPolicy>;
|
|
160
|
+
updateTags(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, parameters: TagsObject, options?: CollectorPoliciesUpdateTagsOptionalParams): Promise<CollectorPoliciesUpdateTagsResponse>;
|
|
159
161
|
}
|
|
160
162
|
|
|
161
163
|
// @public
|
|
@@ -163,6 +165,9 @@ export interface CollectorPoliciesCreateOrUpdateOptionalParams extends coreClien
|
|
|
163
165
|
emissionPolicies?: EmissionPoliciesPropertiesFormat[];
|
|
164
166
|
ingestionPolicy?: IngestionPolicyPropertiesFormat;
|
|
165
167
|
resumeFrom?: string;
|
|
168
|
+
tags?: {
|
|
169
|
+
[propertyName: string]: string;
|
|
170
|
+
};
|
|
166
171
|
updateIntervalInMs?: number;
|
|
167
172
|
}
|
|
168
173
|
|
|
@@ -197,12 +202,18 @@ export interface CollectorPoliciesListOptionalParams extends coreClient.Operatio
|
|
|
197
202
|
export type CollectorPoliciesListResponse = CollectorPolicyListResult;
|
|
198
203
|
|
|
199
204
|
// @public
|
|
200
|
-
export interface
|
|
205
|
+
export interface CollectorPoliciesUpdateTagsOptionalParams extends coreClient.OperationOptions {
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// @public
|
|
209
|
+
export type CollectorPoliciesUpdateTagsResponse = CollectorPolicy;
|
|
210
|
+
|
|
211
|
+
// @public
|
|
212
|
+
export interface CollectorPolicy extends TrackedResource {
|
|
201
213
|
emissionPolicies?: EmissionPoliciesPropertiesFormat[];
|
|
202
214
|
readonly etag?: string;
|
|
203
215
|
ingestionPolicy?: IngestionPolicyPropertiesFormat;
|
|
204
216
|
readonly provisioningState?: ProvisioningState;
|
|
205
|
-
readonly systemData?: CollectorPolicySystemData;
|
|
206
217
|
}
|
|
207
218
|
|
|
208
219
|
// @public
|
|
@@ -211,10 +222,6 @@ export interface CollectorPolicyListResult {
|
|
|
211
222
|
value?: CollectorPolicy[];
|
|
212
223
|
}
|
|
213
224
|
|
|
214
|
-
// @public
|
|
215
|
-
export interface CollectorPolicySystemData extends SystemData {
|
|
216
|
-
}
|
|
217
|
-
|
|
218
225
|
// @public
|
|
219
226
|
export type CreatedByType = string;
|
|
220
227
|
|
|
@@ -235,6 +242,9 @@ export interface EmissionPolicyDestination {
|
|
|
235
242
|
// @public
|
|
236
243
|
export type EmissionType = string;
|
|
237
244
|
|
|
245
|
+
// @public
|
|
246
|
+
export function getContinuationToken(page: unknown): string | undefined;
|
|
247
|
+
|
|
238
248
|
// @public
|
|
239
249
|
export interface IngestionPolicyPropertiesFormat {
|
|
240
250
|
ingestionSources?: IngestionSourcesPropertiesFormat[];
|
|
@@ -250,6 +260,13 @@ export interface IngestionSourcesPropertiesFormat {
|
|
|
250
260
|
// @public
|
|
251
261
|
export type IngestionType = string;
|
|
252
262
|
|
|
263
|
+
// @public
|
|
264
|
+
export enum KnownApiVersionParameter {
|
|
265
|
+
TwoThousandTwentyTwo0501 = "2022-05-01",
|
|
266
|
+
TwoThousandTwentyTwo0801 = "2022-08-01",
|
|
267
|
+
TwoThousandTwentyTwo1101 = "2022-11-01"
|
|
268
|
+
}
|
|
269
|
+
|
|
253
270
|
// @public
|
|
254
271
|
export enum KnownCreatedByType {
|
|
255
272
|
Application = "Application",
|
|
@@ -357,7 +374,7 @@ export interface TagsObject {
|
|
|
357
374
|
// @public
|
|
358
375
|
export interface TrackedResource {
|
|
359
376
|
readonly id?: string;
|
|
360
|
-
location
|
|
377
|
+
location: string;
|
|
361
378
|
readonly name?: string;
|
|
362
379
|
readonly systemData?: TrackedResourceSystemData;
|
|
363
380
|
tags?: {
|
|
@@ -62,54 +62,60 @@ export class AzureTrafficCollectorClient extends coreClient.ServiceClient {
|
|
|
62
62
|
credential: credentials
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
const packageDetails = `azsdk-js-arm-networkfunction/
|
|
65
|
+
const packageDetails = `azsdk-js-arm-networkfunction/2.0.0`;
|
|
66
66
|
const userAgentPrefix =
|
|
67
67
|
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
68
68
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
69
69
|
: `${packageDetails}`;
|
|
70
70
|
|
|
71
|
-
if (!options.credentialScopes) {
|
|
72
|
-
options.credentialScopes = ["https://management.azure.com/.default"];
|
|
73
|
-
}
|
|
74
71
|
const optionsWithDefaults = {
|
|
75
72
|
...defaults,
|
|
76
73
|
...options,
|
|
77
74
|
userAgentOptions: {
|
|
78
75
|
userAgentPrefix
|
|
79
76
|
},
|
|
80
|
-
|
|
77
|
+
endpoint:
|
|
81
78
|
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
|
82
79
|
};
|
|
83
80
|
super(optionsWithDefaults);
|
|
84
81
|
|
|
82
|
+
let bearerTokenAuthenticationPolicyFound: boolean = false;
|
|
85
83
|
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
86
84
|
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
|
|
87
|
-
|
|
85
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
|
|
88
86
|
(pipelinePolicy) =>
|
|
89
87
|
pipelinePolicy.name ===
|
|
90
88
|
coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
91
89
|
);
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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
|
+
);
|
|
106
112
|
}
|
|
107
113
|
// Parameter assignments
|
|
108
114
|
this.subscriptionId = subscriptionId;
|
|
109
115
|
|
|
110
116
|
// Assigning values to Constant parameters
|
|
111
117
|
this.$host = options.$host || "https://management.azure.com";
|
|
112
|
-
this.apiVersion = options.apiVersion || "2022-
|
|
118
|
+
this.apiVersion = options.apiVersion || "2022-11-01";
|
|
113
119
|
this.networkFunction = new NetworkFunctionImpl(this);
|
|
114
120
|
this.azureTrafficCollectorsBySubscription = new AzureTrafficCollectorsBySubscriptionImpl(
|
|
115
121
|
this
|
package/src/index.ts
CHANGED