@azure/arm-extendedlocation 1.0.0-beta.1 → 1.0.0-beta.2
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 +41 -0
- package/LICENSE +1 -1
- package/README.md +23 -8
- package/dist/index.js +806 -83
- 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/customLocationsCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/customLocationsCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/customLocationsCreateOrUpdateSample.js +42 -0
- package/dist-esm/samples-dev/customLocationsCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/customLocationsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/customLocationsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/customLocationsDeleteSample.js +31 -0
- package/dist-esm/samples-dev/customLocationsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/customLocationsFindTargetResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/customLocationsFindTargetResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/customLocationsFindTargetResourceGroupSample.js +34 -0
- package/dist-esm/samples-dev/customLocationsFindTargetResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/customLocationsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/customLocationsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/customLocationsGetSample.js +31 -0
- package/dist-esm/samples-dev/customLocationsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/customLocationsListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/customLocationsListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/customLocationsListByResourceGroupSample.js +44 -0
- package/dist-esm/samples-dev/customLocationsListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/customLocationsListBySubscriptionSample.d.ts +2 -0
- package/dist-esm/samples-dev/customLocationsListBySubscriptionSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/customLocationsListBySubscriptionSample.js +43 -0
- package/dist-esm/samples-dev/customLocationsListBySubscriptionSample.js.map +1 -0
- package/dist-esm/samples-dev/customLocationsListEnabledResourceTypesSample.d.ts +2 -0
- package/dist-esm/samples-dev/customLocationsListEnabledResourceTypesSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/customLocationsListEnabledResourceTypesSample.js +45 -0
- package/dist-esm/samples-dev/customLocationsListEnabledResourceTypesSample.js.map +1 -0
- package/dist-esm/samples-dev/customLocationsListOperationsSample.d.ts +2 -0
- package/dist-esm/samples-dev/customLocationsListOperationsSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/customLocationsListOperationsSample.js +43 -0
- package/dist-esm/samples-dev/customLocationsListOperationsSample.js.map +1 -0
- package/dist-esm/samples-dev/customLocationsUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/customLocationsUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/customLocationsUpdateSample.js +34 -0
- package/dist-esm/samples-dev/customLocationsUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/resourceSyncRulesCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/resourceSyncRulesCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/resourceSyncRulesCreateOrUpdateSample.js +41 -0
- package/dist-esm/samples-dev/resourceSyncRulesCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/resourceSyncRulesDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/resourceSyncRulesDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/resourceSyncRulesDeleteSample.js +32 -0
- package/dist-esm/samples-dev/resourceSyncRulesDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/resourceSyncRulesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/resourceSyncRulesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/resourceSyncRulesGetSample.js +32 -0
- package/dist-esm/samples-dev/resourceSyncRulesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/resourceSyncRulesListByCustomLocationIdSample.d.ts +2 -0
- package/dist-esm/samples-dev/resourceSyncRulesListByCustomLocationIdSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/resourceSyncRulesListByCustomLocationIdSample.js +45 -0
- package/dist-esm/samples-dev/resourceSyncRulesListByCustomLocationIdSample.js.map +1 -0
- package/dist-esm/samples-dev/resourceSyncRulesUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/resourceSyncRulesUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/resourceSyncRulesUpdateSample.js +34 -0
- package/dist-esm/samples-dev/resourceSyncRulesUpdateSample.js.map +1 -0
- package/dist-esm/src/customLocationsManagementClient.d.ts +9 -3
- package/dist-esm/src/customLocationsManagementClient.d.ts.map +1 -1
- package/dist-esm/src/customLocationsManagementClient.js +81 -4
- package/dist-esm/src/customLocationsManagementClient.js.map +1 -1
- package/dist-esm/src/index.d.ts +0 -1
- package/dist-esm/src/index.d.ts.map +1 -1
- package/dist-esm/src/index.js +0 -1
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +172 -25
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +7 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +8 -1
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +228 -29
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts +7 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +41 -2
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/customLocations.d.ts +12 -3
- package/dist-esm/src/operations/customLocations.d.ts.map +1 -1
- package/dist-esm/src/operations/customLocations.js +41 -2
- package/dist-esm/src/operations/customLocations.js.map +1 -1
- package/dist-esm/src/operations/index.d.ts +1 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -1
- package/dist-esm/src/operations/index.js +1 -0
- package/dist-esm/src/operations/index.js.map +1 -1
- package/dist-esm/src/operations/resourceSyncRules.d.ts +97 -0
- package/dist-esm/src/operations/resourceSyncRules.d.ts.map +1 -0
- package/dist-esm/src/operations/resourceSyncRules.js +400 -0
- package/dist-esm/src/operations/resourceSyncRules.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/customLocations.d.ts +10 -1
- package/dist-esm/src/operationsInterfaces/customLocations.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.d.ts +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.js +1 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/resourceSyncRules.d.ts +71 -0
- package/dist-esm/src/operationsInterfaces/resourceSyncRules.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/resourceSyncRules.js +9 -0
- package/dist-esm/src/operationsInterfaces/resourceSyncRules.js.map +1 -0
- package/dist-esm/test/sampleTest.js +11 -13
- package/dist-esm/test/sampleTest.js.map +1 -1
- package/package.json +54 -25
- package/review/arm-extendedlocation.api.md +139 -27
- package/rollup.config.js +6 -72
- package/src/customLocationsManagementClient.ts +109 -5
- package/src/index.ts +0 -1
- package/src/models/index.ts +186 -26
- package/src/models/mappers.ts +243 -30
- package/src/models/parameters.ts +53 -2
- package/src/operations/customLocations.ts +57 -5
- package/src/operations/index.ts +1 -0
- package/src/operations/resourceSyncRules.ts +562 -0
- package/src/operationsInterfaces/customLocations.ts +18 -1
- package/src/operationsInterfaces/index.ts +1 -0
- package/src/operationsInterfaces/resourceSyncRules.ts +136 -0
- package/tsconfig.json +19 -5
- package/types/arm-extendedlocation.d.ts +257 -20
- package/types/tsdoc-metadata.json +1 -1
- package/dist-esm/src/customLocationsManagementClientContext.d.ts +0 -16
- package/dist-esm/src/customLocationsManagementClientContext.d.ts.map +0 -1
- package/dist-esm/src/customLocationsManagementClientContext.js +0 -49
- package/dist-esm/src/customLocationsManagementClientContext.js.map +0 -1
- package/src/customLocationsManagementClientContext.ts +0 -70
|
@@ -0,0 +1,45 @@
|
|
|
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 { __asyncValues, __awaiter } from "tslib";
|
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { CustomLocationsManagementClient } from "@azure/arm-extendedlocation";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Gets the list of the Enabled Resource Types.
|
|
15
|
+
*
|
|
16
|
+
* @summary Gets the list of the Enabled Resource Types.
|
|
17
|
+
* x-ms-original-file: specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/CustomLocationsListEnabledResourceTypes.json
|
|
18
|
+
*/
|
|
19
|
+
function getCustomLocation() {
|
|
20
|
+
var e_1, _a;
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
const subscriptionId = "11111111-2222-3333-4444-555555555555";
|
|
23
|
+
const resourceGroupName = "testresourcegroup";
|
|
24
|
+
const resourceName = "customLocation01";
|
|
25
|
+
const credential = new DefaultAzureCredential();
|
|
26
|
+
const client = new CustomLocationsManagementClient(credential, subscriptionId);
|
|
27
|
+
const resArray = new Array();
|
|
28
|
+
try {
|
|
29
|
+
for (var _b = __asyncValues(client.customLocations.listEnabledResourceTypes(resourceGroupName, resourceName)), _c; _c = yield _b.next(), !_c.done;) {
|
|
30
|
+
let item = _c.value;
|
|
31
|
+
resArray.push(item);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
35
|
+
finally {
|
|
36
|
+
try {
|
|
37
|
+
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
|
38
|
+
}
|
|
39
|
+
finally { if (e_1) throw e_1.error; }
|
|
40
|
+
}
|
|
41
|
+
console.log(resArray);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
getCustomLocation().catch(console.error);
|
|
45
|
+
//# sourceMappingURL=customLocationsListEnabledResourceTypesSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customLocationsListEnabledResourceTypesSample.js","sourceRoot":"","sources":["../../samples-dev/customLocationsListEnabledResourceTypesSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,+BAA+B,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,iBAAiB;;;QAC9B,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;QAC9C,MAAM,YAAY,GAAG,kBAAkB,CAAC;QACxC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,+BAA+B,CAChD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,eAAe,CAAC,wBAAwB,CACpE,iBAAiB,EACjB,YAAY,CACb,CAAA,IAAA;gBAHU,IAAI,IAAI,WAAA,CAAA;gBAIjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,iBAAiB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customLocationsListOperationsSample.d.ts","sourceRoot":"","sources":["../../samples-dev/customLocationsListOperationsSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,43 @@
|
|
|
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 { __asyncValues, __awaiter } from "tslib";
|
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { CustomLocationsManagementClient } from "@azure/arm-extendedlocation";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Lists all available Custom Locations operations.
|
|
15
|
+
*
|
|
16
|
+
* @summary Lists all available Custom Locations operations.
|
|
17
|
+
* x-ms-original-file: specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/CustomLocationsListOperations.json
|
|
18
|
+
*/
|
|
19
|
+
function listCustomLocationsOperations() {
|
|
20
|
+
var e_1, _a;
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
23
|
+
const credential = new DefaultAzureCredential();
|
|
24
|
+
const client = new CustomLocationsManagementClient(credential, subscriptionId);
|
|
25
|
+
const resArray = new Array();
|
|
26
|
+
try {
|
|
27
|
+
for (var _b = __asyncValues(client.customLocations.listOperations()), _c; _c = yield _b.next(), !_c.done;) {
|
|
28
|
+
let item = _c.value;
|
|
29
|
+
resArray.push(item);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
33
|
+
finally {
|
|
34
|
+
try {
|
|
35
|
+
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
|
36
|
+
}
|
|
37
|
+
finally { if (e_1) throw e_1.error; }
|
|
38
|
+
}
|
|
39
|
+
console.log(resArray);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
listCustomLocationsOperations().catch(console.error);
|
|
43
|
+
//# sourceMappingURL=customLocationsListOperationsSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customLocationsListOperationsSample.js","sourceRoot":"","sources":["../../samples-dev/customLocationsListOperationsSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,+BAA+B,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,6BAA6B;;;QAC1C,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,+BAA+B,CAChD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,eAAe,CAAC,cAAc,EAAE,CAAA,IAAA;gBAAnD,IAAI,IAAI,WAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,6BAA6B,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customLocationsUpdateSample.d.ts","sourceRoot":"","sources":["../../samples-dev/customLocationsUpdateSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { CustomLocationsManagementClient } from "@azure/arm-extendedlocation";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Updates a Custom Location with the specified Resource Name in the specified Resource Group and Subscription.
|
|
15
|
+
*
|
|
16
|
+
* @summary Updates a Custom Location with the specified Resource Name in the specified Resource Group and Subscription.
|
|
17
|
+
* x-ms-original-file: specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/CustomLocationsPatch.json
|
|
18
|
+
*/
|
|
19
|
+
function updateCustomLocation() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const subscriptionId = "11111111-2222-3333-4444-555555555555";
|
|
22
|
+
const resourceGroupName = "testresourcegroup";
|
|
23
|
+
const resourceName = "customLocation01";
|
|
24
|
+
const identity = { type: "SystemAssigned" };
|
|
25
|
+
const tags = { archv3: "", tier: "testing" };
|
|
26
|
+
const options = { identity, tags };
|
|
27
|
+
const credential = new DefaultAzureCredential();
|
|
28
|
+
const client = new CustomLocationsManagementClient(credential, subscriptionId);
|
|
29
|
+
const result = yield client.customLocations.update(resourceGroupName, resourceName, options);
|
|
30
|
+
console.log(result);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
updateCustomLocation().catch(console.error);
|
|
34
|
+
//# sourceMappingURL=customLocationsUpdateSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customLocationsUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/customLocationsUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,+BAA+B,EAChC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,oBAAoB;;QACjC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;QAC9C,MAAM,YAAY,GAAG,kBAAkB,CAAC;QACxC,MAAM,QAAQ,GAAG,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;QAC5C,MAAM,IAAI,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QAC7C,MAAM,OAAO,GAAwC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QACxE,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,+BAA+B,CAChD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,MAAM,CAChD,iBAAiB,EACjB,YAAY,EACZ,OAAO,CACR,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,oBAAoB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceSyncRulesCreateOrUpdateSample.d.ts","sourceRoot":"","sources":["../../samples-dev/resourceSyncRulesCreateOrUpdateSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { CustomLocationsManagementClient } from "@azure/arm-extendedlocation";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Creates or updates a Resource Sync Rule in the parent Custom Location, Subscription Id and Resource Group
|
|
15
|
+
*
|
|
16
|
+
* @summary Creates or updates a Resource Sync Rule in the parent Custom Location, Subscription Id and Resource Group
|
|
17
|
+
* x-ms-original-file: specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/ResourceSyncRulesCreate_Update.json
|
|
18
|
+
*/
|
|
19
|
+
function createOrUpdateResourceSyncRule() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const subscriptionId = "11111111-2222-3333-4444-555555555555";
|
|
22
|
+
const resourceGroupName = "testresourcegroup";
|
|
23
|
+
const resourceName = "customLocation01";
|
|
24
|
+
const childResourceName = "resourceSyncRule01";
|
|
25
|
+
const parameters = {
|
|
26
|
+
location: "West US",
|
|
27
|
+
priority: 999,
|
|
28
|
+
selector: {
|
|
29
|
+
matchExpressions: [{ key: "key4", operator: "In", values: ["value4"] }],
|
|
30
|
+
matchLabels: { key1: "value1" }
|
|
31
|
+
},
|
|
32
|
+
targetResourceGroup: "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/testresourcegroup"
|
|
33
|
+
};
|
|
34
|
+
const credential = new DefaultAzureCredential();
|
|
35
|
+
const client = new CustomLocationsManagementClient(credential, subscriptionId);
|
|
36
|
+
const result = yield client.resourceSyncRules.beginCreateOrUpdateAndWait(resourceGroupName, resourceName, childResourceName, parameters);
|
|
37
|
+
console.log(result);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
createOrUpdateResourceSyncRule().catch(console.error);
|
|
41
|
+
//# sourceMappingURL=resourceSyncRulesCreateOrUpdateSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceSyncRulesCreateOrUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/resourceSyncRulesCreateOrUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,+BAA+B,EAChC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,8BAA8B;;QAC3C,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;QAC9C,MAAM,YAAY,GAAG,kBAAkB,CAAC;QACxC,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;QAC/C,MAAM,UAAU,GAAqB;YACnC,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE,GAAG;YACb,QAAQ,EAAE;gBACR,gBAAgB,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACvE,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;aAChC;YACD,mBAAmB,EACjB,sFAAsF;SACzF,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,+BAA+B,CAChD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,0BAA0B,CACtE,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,UAAU,CACX,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,8BAA8B,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceSyncRulesDeleteSample.d.ts","sourceRoot":"","sources":["../../samples-dev/resourceSyncRulesDeleteSample.ts"],"names":[],"mappings":""}
|
|
@@ -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
|
+
import { __awaiter } from "tslib";
|
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { CustomLocationsManagementClient } from "@azure/arm-extendedlocation";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Deletes the Resource Sync Rule with the specified Resource Sync Rule Name, Custom Location Resource Name, Resource Group, and Subscription Id.
|
|
15
|
+
*
|
|
16
|
+
* @summary Deletes the Resource Sync Rule with the specified Resource Sync Rule Name, Custom Location Resource Name, Resource Group, and Subscription Id.
|
|
17
|
+
* x-ms-original-file: specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/ResourceSyncRulesDelete.json
|
|
18
|
+
*/
|
|
19
|
+
function deleteResourceSyncRule() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const subscriptionId = "11111111-2222-3333-4444-555555555555";
|
|
22
|
+
const resourceGroupName = "testresourcegroup";
|
|
23
|
+
const resourceName = "customLocation01";
|
|
24
|
+
const childResourceName = "resourceSyncRule01";
|
|
25
|
+
const credential = new DefaultAzureCredential();
|
|
26
|
+
const client = new CustomLocationsManagementClient(credential, subscriptionId);
|
|
27
|
+
const result = yield client.resourceSyncRules.delete(resourceGroupName, resourceName, childResourceName);
|
|
28
|
+
console.log(result);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
deleteResourceSyncRule().catch(console.error);
|
|
32
|
+
//# sourceMappingURL=resourceSyncRulesDeleteSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceSyncRulesDeleteSample.js","sourceRoot":"","sources":["../../samples-dev/resourceSyncRulesDeleteSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,+BAA+B,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,sBAAsB;;QACnC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;QAC9C,MAAM,YAAY,GAAG,kBAAkB,CAAC;QACxC,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;QAC/C,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,+BAA+B,CAChD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,MAAM,CAClD,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,CAClB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,sBAAsB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceSyncRulesGetSample.d.ts","sourceRoot":"","sources":["../../samples-dev/resourceSyncRulesGetSample.ts"],"names":[],"mappings":""}
|
|
@@ -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
|
+
import { __awaiter } from "tslib";
|
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { CustomLocationsManagementClient } from "@azure/arm-extendedlocation";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Gets the details of the resourceSyncRule with a specified resource group, subscription id Custom Location resource name and Resource Sync Rule name.
|
|
15
|
+
*
|
|
16
|
+
* @summary Gets the details of the resourceSyncRule with a specified resource group, subscription id Custom Location resource name and Resource Sync Rule name.
|
|
17
|
+
* x-ms-original-file: specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/ResourceSyncRulesGet.json
|
|
18
|
+
*/
|
|
19
|
+
function getCustomLocation() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const subscriptionId = "11111111-2222-3333-4444-555555555555";
|
|
22
|
+
const resourceGroupName = "testresourcegroup";
|
|
23
|
+
const resourceName = "customLocation01";
|
|
24
|
+
const childResourceName = "resourceSyncRule01";
|
|
25
|
+
const credential = new DefaultAzureCredential();
|
|
26
|
+
const client = new CustomLocationsManagementClient(credential, subscriptionId);
|
|
27
|
+
const result = yield client.resourceSyncRules.get(resourceGroupName, resourceName, childResourceName);
|
|
28
|
+
console.log(result);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
getCustomLocation().catch(console.error);
|
|
32
|
+
//# sourceMappingURL=resourceSyncRulesGetSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceSyncRulesGetSample.js","sourceRoot":"","sources":["../../samples-dev/resourceSyncRulesGetSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,+BAA+B,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,iBAAiB;;QAC9B,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;QAC9C,MAAM,YAAY,GAAG,kBAAkB,CAAC;QACxC,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;QAC/C,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,+BAA+B,CAChD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,GAAG,CAC/C,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,CAClB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,iBAAiB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceSyncRulesListByCustomLocationIdSample.d.ts","sourceRoot":"","sources":["../../samples-dev/resourceSyncRulesListByCustomLocationIdSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,45 @@
|
|
|
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 { __asyncValues, __awaiter } from "tslib";
|
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { CustomLocationsManagementClient } from "@azure/arm-extendedlocation";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Gets a list of Resource Sync Rules in the specified subscription. The operation returns properties of each Resource Sync Rule
|
|
15
|
+
*
|
|
16
|
+
* @summary Gets a list of Resource Sync Rules in the specified subscription. The operation returns properties of each Resource Sync Rule
|
|
17
|
+
* x-ms-original-file: specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/ResourceSyncRulesListByCustomLocationID.json
|
|
18
|
+
*/
|
|
19
|
+
function listResourceSyncRulesBySubscription() {
|
|
20
|
+
var e_1, _a;
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
const subscriptionId = "11111111-2222-3333-4444-555555555555";
|
|
23
|
+
const resourceGroupName = "testresourcegroup";
|
|
24
|
+
const resourceName = "customLocation01";
|
|
25
|
+
const credential = new DefaultAzureCredential();
|
|
26
|
+
const client = new CustomLocationsManagementClient(credential, subscriptionId);
|
|
27
|
+
const resArray = new Array();
|
|
28
|
+
try {
|
|
29
|
+
for (var _b = __asyncValues(client.resourceSyncRules.listByCustomLocationID(resourceGroupName, resourceName)), _c; _c = yield _b.next(), !_c.done;) {
|
|
30
|
+
let item = _c.value;
|
|
31
|
+
resArray.push(item);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
35
|
+
finally {
|
|
36
|
+
try {
|
|
37
|
+
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
|
38
|
+
}
|
|
39
|
+
finally { if (e_1) throw e_1.error; }
|
|
40
|
+
}
|
|
41
|
+
console.log(resArray);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
listResourceSyncRulesBySubscription().catch(console.error);
|
|
45
|
+
//# sourceMappingURL=resourceSyncRulesListByCustomLocationIdSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceSyncRulesListByCustomLocationIdSample.js","sourceRoot":"","sources":["../../samples-dev/resourceSyncRulesListByCustomLocationIdSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,+BAA+B,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,mCAAmC;;;QAChD,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;QAC9C,MAAM,YAAY,GAAG,kBAAkB,CAAC;QACxC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,+BAA+B,CAChD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,iBAAiB,CAAC,sBAAsB,CACpE,iBAAiB,EACjB,YAAY,CACb,CAAA,IAAA;gBAHU,IAAI,IAAI,WAAA,CAAA;gBAIjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,mCAAmC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceSyncRulesUpdateSample.d.ts","sourceRoot":"","sources":["../../samples-dev/resourceSyncRulesUpdateSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT License.
|
|
11
|
+
import { CustomLocationsManagementClient } from "@azure/arm-extendedlocation";
|
|
12
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
/**
|
|
14
|
+
* This sample demonstrates how to Updates a Resource Sync Rule with the specified Resource Sync Rule name in the specified Resource Group, Subscription and Custom Location name.
|
|
15
|
+
*
|
|
16
|
+
* @summary Updates a Resource Sync Rule with the specified Resource Sync Rule name in the specified Resource Group, Subscription and Custom Location name.
|
|
17
|
+
* x-ms-original-file: specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/ResourceSyncRulesPatch.json
|
|
18
|
+
*/
|
|
19
|
+
function updateResourceSyncRule() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const subscriptionId = "11111111-2222-3333-4444-555555555555";
|
|
22
|
+
const resourceGroupName = "testresourcegroup";
|
|
23
|
+
const resourceName = "customLocation01";
|
|
24
|
+
const childResourceName = "resourceSyncRule01";
|
|
25
|
+
const tags = { tier: "testing" };
|
|
26
|
+
const options = { tags };
|
|
27
|
+
const credential = new DefaultAzureCredential();
|
|
28
|
+
const client = new CustomLocationsManagementClient(credential, subscriptionId);
|
|
29
|
+
const result = yield client.resourceSyncRules.beginUpdateAndWait(resourceGroupName, resourceName, childResourceName, options);
|
|
30
|
+
console.log(result);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
updateResourceSyncRule().catch(console.error);
|
|
34
|
+
//# sourceMappingURL=resourceSyncRulesUpdateSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceSyncRulesUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/resourceSyncRulesUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,+BAA+B,EAChC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;;;;GAKG;AACH,SAAe,sBAAsB;;QACnC,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;QAC9C,MAAM,YAAY,GAAG,kBAAkB,CAAC;QACxC,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;QAC/C,MAAM,IAAI,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QACjC,MAAM,OAAO,GAA0C,EAAE,IAAI,EAAE,CAAC;QAChE,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,+BAA+B,CAChD,UAAU,EACV,cAAc,CACf,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,kBAAkB,CAC9D,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,OAAO,CACR,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,sBAAsB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import * as coreClient from "@azure/core-client";
|
|
1
2
|
import * as coreAuth from "@azure/core-auth";
|
|
2
|
-
import { CustomLocations } from "./operationsInterfaces";
|
|
3
|
-
import { CustomLocationsManagementClientContext } from "./customLocationsManagementClientContext";
|
|
3
|
+
import { CustomLocations, ResourceSyncRules } from "./operationsInterfaces";
|
|
4
4
|
import { CustomLocationsManagementClientOptionalParams } from "./models";
|
|
5
|
-
export declare class CustomLocationsManagementClient extends
|
|
5
|
+
export declare class CustomLocationsManagementClient extends coreClient.ServiceClient {
|
|
6
|
+
$host: string;
|
|
7
|
+
apiVersion: string;
|
|
8
|
+
subscriptionId: string;
|
|
6
9
|
/**
|
|
7
10
|
* Initializes a new instance of the CustomLocationsManagementClient class.
|
|
8
11
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
@@ -10,6 +13,9 @@ export declare class CustomLocationsManagementClient extends CustomLocationsMana
|
|
|
10
13
|
* @param options The parameter options
|
|
11
14
|
*/
|
|
12
15
|
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: CustomLocationsManagementClientOptionalParams);
|
|
16
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
17
|
+
private addCustomApiVersionPolicy;
|
|
13
18
|
customLocations: CustomLocations;
|
|
19
|
+
resourceSyncRules: ResourceSyncRules;
|
|
14
20
|
}
|
|
15
21
|
//# sourceMappingURL=customLocationsManagementClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customLocationsManagementClient.d.ts","sourceRoot":"","sources":["../../src/customLocationsManagementClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"customLocationsManagementClient.d.ts","sourceRoot":"","sources":["../../src/customLocationsManagementClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAOjD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,6CAA6C,EAAE,MAAM,UAAU,CAAC;AAEzE,qBAAa,+BAAgC,SAAQ,UAAU,CAAC,aAAa;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;OAKG;gBAED,WAAW,EAAE,QAAQ,CAAC,eAAe,EACrC,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,6CAA6C;IAuEzD,8GAA8G;IAC9G,OAAO,CAAC,yBAAyB;IA2BjC,eAAe,EAAE,eAAe,CAAC;IACjC,iBAAiB,EAAE,iBAAiB,CAAC;CACtC"}
|
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
|
|
8
|
+
import { __awaiter } from "tslib";
|
|
9
|
+
import * as coreClient from "@azure/core-client";
|
|
10
|
+
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
|
11
|
+
import { CustomLocationsImpl, ResourceSyncRulesImpl } from "./operations";
|
|
12
|
+
export class CustomLocationsManagementClient extends coreClient.ServiceClient {
|
|
11
13
|
/**
|
|
12
14
|
* Initializes a new instance of the CustomLocationsManagementClient class.
|
|
13
15
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
@@ -15,8 +17,83 @@ export class CustomLocationsManagementClient extends CustomLocationsManagementCl
|
|
|
15
17
|
* @param options The parameter options
|
|
16
18
|
*/
|
|
17
19
|
constructor(credentials, subscriptionId, options) {
|
|
18
|
-
|
|
20
|
+
var _a, _b;
|
|
21
|
+
if (credentials === undefined) {
|
|
22
|
+
throw new Error("'credentials' cannot be null");
|
|
23
|
+
}
|
|
24
|
+
if (subscriptionId === undefined) {
|
|
25
|
+
throw new Error("'subscriptionId' cannot be null");
|
|
26
|
+
}
|
|
27
|
+
// Initializing default values for options
|
|
28
|
+
if (!options) {
|
|
29
|
+
options = {};
|
|
30
|
+
}
|
|
31
|
+
const defaults = {
|
|
32
|
+
requestContentType: "application/json; charset=utf-8",
|
|
33
|
+
credential: credentials
|
|
34
|
+
};
|
|
35
|
+
const packageDetails = `azsdk-js-arm-extendedlocation/1.0.0-beta.2`;
|
|
36
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
37
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
38
|
+
: `${packageDetails}`;
|
|
39
|
+
if (!options.credentialScopes) {
|
|
40
|
+
options.credentialScopes = ["https://management.azure.com/.default"];
|
|
41
|
+
}
|
|
42
|
+
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
43
|
+
userAgentPrefix
|
|
44
|
+
}, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
45
|
+
super(optionsWithDefaults);
|
|
46
|
+
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
47
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
48
|
+
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
49
|
+
coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
|
50
|
+
if (!bearerTokenAuthenticationPolicyFound) {
|
|
51
|
+
this.pipeline.removePolicy({
|
|
52
|
+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
53
|
+
});
|
|
54
|
+
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
55
|
+
scopes: `${optionsWithDefaults.baseUri}/.default`,
|
|
56
|
+
challengeCallbacks: {
|
|
57
|
+
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
|
|
58
|
+
}
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
// Parameter assignments
|
|
63
|
+
this.subscriptionId = subscriptionId;
|
|
64
|
+
// Assigning values to Constant parameters
|
|
65
|
+
this.$host = options.$host || "https://management.azure.com";
|
|
66
|
+
this.apiVersion = options.apiVersion || "2021-08-31-preview";
|
|
19
67
|
this.customLocations = new CustomLocationsImpl(this);
|
|
68
|
+
this.resourceSyncRules = new ResourceSyncRulesImpl(this);
|
|
69
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
70
|
+
}
|
|
71
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
72
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
73
|
+
if (!apiVersion) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
const apiVersionPolicy = {
|
|
77
|
+
name: "CustomApiVersionPolicy",
|
|
78
|
+
sendRequest(request, next) {
|
|
79
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
const param = request.url.split("?");
|
|
81
|
+
if (param.length > 1) {
|
|
82
|
+
const newParams = param[1].split("&").map((item) => {
|
|
83
|
+
if (item.indexOf("api-version") > -1) {
|
|
84
|
+
return "api-version=" + apiVersion;
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
return item;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
91
|
+
}
|
|
92
|
+
return next(request);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
20
97
|
}
|
|
21
98
|
}
|
|
22
99
|
//# sourceMappingURL=customLocationsManagementClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customLocationsManagementClient.js","sourceRoot":"","sources":["../../src/customLocationsManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"customLocationsManagementClient.js","sourceRoot":"","sources":["../../src/customLocationsManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAI1E,MAAM,OAAO,+BAAgC,SAAQ,UAAU,CAAC,aAAa;IAK3E;;;;;OAKG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAAuD;;QAEvD,IAAI,WAAW,KAAK,SAAS,EAAE;YAC7B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;SACjD;QACD,IAAI,cAAc,KAAK,SAAS,EAAE;YAChC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;SACpD;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QACD,MAAM,QAAQ,GAAkD;YAC9D,kBAAkB,EAAE,iCAAiC;YACrD,UAAU,EAAE,WAAW;SACxB,CAAC;QAEF,MAAM,cAAc,GAAG,4CAA4C,CAAC;QACpE,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE;YAC7B,OAAO,CAAC,gBAAgB,GAAG,CAAC,uCAAuC,CAAC,CAAC;SACtE;QACD,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EACL,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,8BAA8B,GACxE,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAE3B,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,KAAI,OAAO,CAAC,QAAQ,CAAC,kBAAkB,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE;YACzE,MAAM,gBAAgB,GAAsC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,EAAE,CAAC;YAClG,MAAM,oCAAoC,GAAG,gBAAgB,CAAC,IAAI,CAChE,CAAC,cAAc,EAAE,EAAE,CACjB,cAAc,CAAC,IAAI;gBACnB,gBAAgB,CAAC,mCAAmC,CACvD,CAAC;YACF,IAAI,CAAC,oCAAoC,EAAE;gBACzC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC;oBACzB,IAAI,EAAE,gBAAgB,CAAC,mCAAmC;iBAC3D,CAAC,CAAC;gBACH,IAAI,CAAC,QAAQ,CAAC,SAAS,CACrB,gBAAgB,CAAC,+BAA+B,CAAC;oBAC/C,MAAM,EAAE,GAAG,mBAAmB,CAAC,OAAO,WAAW;oBACjD,kBAAkB,EAAE;wBAClB,2BAA2B,EACzB,UAAU,CAAC,gCAAgC;qBAC9C;iBACF,CAAC,CACH,CAAC;aACH;SACF;QACD,wBAAwB;QACxB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QAErC,0CAA0C;QAC1C,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,8BAA8B,CAAC;QAC7D,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,oBAAoB,CAAC;QAC7D,IAAI,CAAC,eAAe,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;QACrD,IAAI,CAAC,iBAAiB,GAAG,IAAI,qBAAqB,CAAC,IAAI,CAAC,CAAC;QACzD,IAAI,CAAC,yBAAyB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACrD,CAAC;IAED,8GAA8G;IACtG,yBAAyB,CAAC,UAAmB;QACnD,IAAI,CAAC,UAAU,EAAE;YACf,OAAO;SACR;QACD,MAAM,gBAAgB,GAAG;YACvB,IAAI,EAAE,wBAAwB;YACxB,WAAW,CACf,OAAwB,EACxB,IAAiB;;oBAEjB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;oBACrC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;wBACpB,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;4BACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE;gCACpC,OAAO,cAAc,GAAG,UAAU,CAAC;6BACpC;iCAAM;gCACL,OAAO,IAAI,CAAC;6BACb;wBACH,CAAC,CAAC,CAAC;wBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;qBACpD;oBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;gBACvB,CAAC;aAAA;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAIF"}
|
package/dist-esm/src/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.asynciterable" />
|
|
2
2
|
export * from "./models";
|
|
3
3
|
export { CustomLocationsManagementClient } from "./customLocationsManagementClient";
|
|
4
|
-
export { CustomLocationsManagementClientContext } from "./customLocationsManagementClientContext";
|
|
5
4
|
export * from "./operationsInterfaces";
|
|
6
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AASA,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AACpF,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AASA,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AACpF,cAAc,wBAAwB,CAAC"}
|
package/dist-esm/src/index.js
CHANGED
|
@@ -8,6 +8,5 @@
|
|
|
8
8
|
/// <reference lib="esnext.asynciterable" />
|
|
9
9
|
export * from "./models";
|
|
10
10
|
export { CustomLocationsManagementClient } from "./customLocationsManagementClient";
|
|
11
|
-
export { CustomLocationsManagementClientContext } from "./customLocationsManagementClientContext";
|
|
12
11
|
export * from "./operationsInterfaces";
|
|
13
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,4CAA4C;AAC5C,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AACpF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,4CAA4C;AAC5C,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AACpF,cAAc,wBAAwB,CAAC"}
|