@azure/arm-extendedlocation 1.0.0-beta.1 → 1.0.0-beta.3
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 +51 -0
- package/LICENSE +1 -1
- package/README.md +24 -9
- package/dist/index.js +921 -113
- 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 +50 -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 +39 -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 +42 -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 +39 -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 +52 -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 +51 -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 +53 -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 +51 -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 +42 -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 +49 -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 +40 -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 +40 -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 +53 -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 +42 -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 +83 -4
- package/dist-esm/src/customLocationsManagementClient.js.map +1 -1
- package/dist-esm/src/index.d.ts +1 -1
- package/dist-esm/src/index.d.ts.map +1 -1
- package/dist-esm/src/index.js +1 -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 +114 -34
- 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 +411 -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/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/sampleTest.js +11 -13
- package/dist-esm/test/sampleTest.js.map +1 -1
- package/package.json +58 -27
- package/review/arm-extendedlocation.api.md +142 -27
- package/rollup.config.js +6 -72
- package/src/customLocationsManagementClient.ts +115 -5
- package/src/index.ts +1 -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 +148 -46
- package/src/operations/index.ts +1 -0
- package/src/operations/resourceSyncRules.ts +575 -0
- package/src/operationsInterfaces/customLocations.ts +18 -1
- package/src/operationsInterfaces/index.ts +1 -0
- package/src/operationsInterfaces/resourceSyncRules.ts +136 -0
- package/src/pagingHelper.ts +39 -0
- package/tsconfig.json +19 -5
- package/types/arm-extendedlocation.d.ts +266 -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,51 @@
|
|
|
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
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
15
|
+
/**
|
|
16
|
+
* This sample demonstrates how to Gets a list of Custom Locations in the specified subscription. The operation returns properties of each Custom Location
|
|
17
|
+
*
|
|
18
|
+
* @summary Gets a list of Custom Locations in the specified subscription. The operation returns properties of each Custom Location
|
|
19
|
+
* x-ms-original-file: specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/CustomLocationsListBySubscription.json
|
|
20
|
+
*/
|
|
21
|
+
function listCustomLocationsBySubscription() {
|
|
22
|
+
var e_1, _a;
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const subscriptionId = process.env["EXTENDEDLOCATION_SUBSCRIPTION_ID"] ||
|
|
25
|
+
"11111111-2222-3333-4444-555555555555";
|
|
26
|
+
const credential = new DefaultAzureCredential();
|
|
27
|
+
const client = new CustomLocationsManagementClient(credential, subscriptionId);
|
|
28
|
+
const resArray = new Array();
|
|
29
|
+
try {
|
|
30
|
+
for (var _b = __asyncValues(client.customLocations.listBySubscription()), _c; _c = yield _b.next(), !_c.done;) {
|
|
31
|
+
let item = _c.value;
|
|
32
|
+
resArray.push(item);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
36
|
+
finally {
|
|
37
|
+
try {
|
|
38
|
+
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
|
39
|
+
}
|
|
40
|
+
finally { if (e_1) throw e_1.error; }
|
|
41
|
+
}
|
|
42
|
+
console.log(resArray);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function main() {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
listCustomLocationsBySubscription();
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
main().catch(console.error);
|
|
51
|
+
//# sourceMappingURL=customLocationsListBySubscriptionSample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customLocationsListBySubscriptionSample.js","sourceRoot":"","sources":["../../samples-dev/customLocationsListBySubscriptionSample.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;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,iCAAiC;;;QAC9C,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC;YAC/C,sCAAsC,CAAC;QACzC,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,kBAAkB,EAAE,CAAA,IAAA;gBAAvD,IAAI,IAAI,WAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,iCAAiC,EAAE,CAAC;IACtC,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customLocationsListEnabledResourceTypesSample.d.ts","sourceRoot":"","sources":["../../samples-dev/customLocationsListEnabledResourceTypesSample.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
15
|
+
/**
|
|
16
|
+
* This sample demonstrates how to Gets the list of the Enabled Resource Types.
|
|
17
|
+
*
|
|
18
|
+
* @summary Gets the list of the Enabled Resource Types.
|
|
19
|
+
* x-ms-original-file: specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/CustomLocationsListEnabledResourceTypes.json
|
|
20
|
+
*/
|
|
21
|
+
function getCustomLocation() {
|
|
22
|
+
var e_1, _a;
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const subscriptionId = process.env["EXTENDEDLOCATION_SUBSCRIPTION_ID"] ||
|
|
25
|
+
"11111111-2222-3333-4444-555555555555";
|
|
26
|
+
const resourceGroupName = process.env["EXTENDEDLOCATION_RESOURCE_GROUP"] || "testresourcegroup";
|
|
27
|
+
const resourceName = "customLocation01";
|
|
28
|
+
const credential = new DefaultAzureCredential();
|
|
29
|
+
const client = new CustomLocationsManagementClient(credential, subscriptionId);
|
|
30
|
+
const resArray = new Array();
|
|
31
|
+
try {
|
|
32
|
+
for (var _b = __asyncValues(client.customLocations.listEnabledResourceTypes(resourceGroupName, resourceName)), _c; _c = yield _b.next(), !_c.done;) {
|
|
33
|
+
let item = _c.value;
|
|
34
|
+
resArray.push(item);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
38
|
+
finally {
|
|
39
|
+
try {
|
|
40
|
+
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
|
41
|
+
}
|
|
42
|
+
finally { if (e_1) throw e_1.error; }
|
|
43
|
+
}
|
|
44
|
+
console.log(resArray);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function main() {
|
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
getCustomLocation();
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
main().catch(console.error);
|
|
53
|
+
//# 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;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,iBAAiB;;;QAC9B,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC;YAC/C,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,IAAI,mBAAmB,CAAC;QACxE,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,SAAe,IAAI;;QACjB,iBAAiB,EAAE,CAAC;IACtB,CAAC;CAAA;AAED,IAAI,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,51 @@
|
|
|
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
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
15
|
+
/**
|
|
16
|
+
* This sample demonstrates how to Lists all available Custom Locations operations.
|
|
17
|
+
*
|
|
18
|
+
* @summary Lists all available Custom Locations operations.
|
|
19
|
+
* x-ms-original-file: specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/CustomLocationsListOperations.json
|
|
20
|
+
*/
|
|
21
|
+
function listCustomLocationsOperations() {
|
|
22
|
+
var e_1, _a;
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const subscriptionId = process.env["EXTENDEDLOCATION_SUBSCRIPTION_ID"] ||
|
|
25
|
+
"00000000-0000-0000-0000-000000000000";
|
|
26
|
+
const credential = new DefaultAzureCredential();
|
|
27
|
+
const client = new CustomLocationsManagementClient(credential, subscriptionId);
|
|
28
|
+
const resArray = new Array();
|
|
29
|
+
try {
|
|
30
|
+
for (var _b = __asyncValues(client.customLocations.listOperations()), _c; _c = yield _b.next(), !_c.done;) {
|
|
31
|
+
let item = _c.value;
|
|
32
|
+
resArray.push(item);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
36
|
+
finally {
|
|
37
|
+
try {
|
|
38
|
+
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
|
39
|
+
}
|
|
40
|
+
finally { if (e_1) throw e_1.error; }
|
|
41
|
+
}
|
|
42
|
+
console.log(resArray);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function main() {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
listCustomLocationsOperations();
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
main().catch(console.error);
|
|
51
|
+
//# 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;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,6BAA6B;;;QAC1C,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC;YAC/C,sCAAsC,CAAC;QACzC,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,SAAe,IAAI;;QACjB,6BAA6B,EAAE,CAAC;IAClC,CAAC;CAAA;AAED,IAAI,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,42 @@
|
|
|
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
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
15
|
+
/**
|
|
16
|
+
* This sample demonstrates how to Updates a Custom Location with the specified Resource Name in the specified Resource Group and Subscription.
|
|
17
|
+
*
|
|
18
|
+
* @summary Updates a Custom Location with the specified Resource Name in the specified Resource Group and Subscription.
|
|
19
|
+
* x-ms-original-file: specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/CustomLocationsPatch.json
|
|
20
|
+
*/
|
|
21
|
+
function updateCustomLocation() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const subscriptionId = process.env["EXTENDEDLOCATION_SUBSCRIPTION_ID"] ||
|
|
24
|
+
"11111111-2222-3333-4444-555555555555";
|
|
25
|
+
const resourceGroupName = process.env["EXTENDEDLOCATION_RESOURCE_GROUP"] || "testresourcegroup";
|
|
26
|
+
const resourceName = "customLocation01";
|
|
27
|
+
const identity = { type: "SystemAssigned" };
|
|
28
|
+
const tags = { archv3: "", tier: "testing" };
|
|
29
|
+
const options = { identity, tags };
|
|
30
|
+
const credential = new DefaultAzureCredential();
|
|
31
|
+
const client = new CustomLocationsManagementClient(credential, subscriptionId);
|
|
32
|
+
const result = yield client.customLocations.update(resourceGroupName, resourceName, options);
|
|
33
|
+
console.log(result);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function main() {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
updateCustomLocation();
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
main().catch(console.error);
|
|
42
|
+
//# 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;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,oBAAoB;;QACjC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC;YAC/C,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,IAAI,mBAAmB,CAAC;QACxE,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,SAAe,IAAI;;QACjB,oBAAoB,EAAE,CAAC;IACzB,CAAC;CAAA;AAED,IAAI,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,49 @@
|
|
|
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
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
15
|
+
/**
|
|
16
|
+
* This sample demonstrates how to Creates or updates a Resource Sync Rule in the parent Custom Location, Subscription Id and Resource Group
|
|
17
|
+
*
|
|
18
|
+
* @summary Creates or updates a Resource Sync Rule in the parent Custom Location, Subscription Id and Resource Group
|
|
19
|
+
* x-ms-original-file: specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/ResourceSyncRulesCreate_Update.json
|
|
20
|
+
*/
|
|
21
|
+
function createOrUpdateResourceSyncRule() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const subscriptionId = process.env["EXTENDEDLOCATION_SUBSCRIPTION_ID"] ||
|
|
24
|
+
"11111111-2222-3333-4444-555555555555";
|
|
25
|
+
const resourceGroupName = process.env["EXTENDEDLOCATION_RESOURCE_GROUP"] || "testresourcegroup";
|
|
26
|
+
const resourceName = "customLocation01";
|
|
27
|
+
const childResourceName = "resourceSyncRule01";
|
|
28
|
+
const parameters = {
|
|
29
|
+
location: "West US",
|
|
30
|
+
priority: 999,
|
|
31
|
+
selector: {
|
|
32
|
+
matchExpressions: [{ key: "key4", operator: "In", values: ["value4"] }],
|
|
33
|
+
matchLabels: { key1: "value1" }
|
|
34
|
+
},
|
|
35
|
+
targetResourceGroup: "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/testresourcegroup"
|
|
36
|
+
};
|
|
37
|
+
const credential = new DefaultAzureCredential();
|
|
38
|
+
const client = new CustomLocationsManagementClient(credential, subscriptionId);
|
|
39
|
+
const result = yield client.resourceSyncRules.beginCreateOrUpdateAndWait(resourceGroupName, resourceName, childResourceName, parameters);
|
|
40
|
+
console.log(result);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function main() {
|
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
createOrUpdateResourceSyncRule();
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
main().catch(console.error);
|
|
49
|
+
//# 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;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,8BAA8B;;QAC3C,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC;YAC/C,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,IAAI,mBAAmB,CAAC;QACxE,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,SAAe,IAAI;;QACjB,8BAA8B,EAAE,CAAC;IACnC,CAAC;CAAA;AAED,IAAI,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,40 @@
|
|
|
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
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
15
|
+
/**
|
|
16
|
+
* 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.
|
|
17
|
+
*
|
|
18
|
+
* @summary Deletes the Resource Sync Rule with the specified Resource Sync Rule Name, Custom Location Resource Name, Resource Group, and Subscription Id.
|
|
19
|
+
* x-ms-original-file: specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/ResourceSyncRulesDelete.json
|
|
20
|
+
*/
|
|
21
|
+
function deleteResourceSyncRule() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const subscriptionId = process.env["EXTENDEDLOCATION_SUBSCRIPTION_ID"] ||
|
|
24
|
+
"11111111-2222-3333-4444-555555555555";
|
|
25
|
+
const resourceGroupName = process.env["EXTENDEDLOCATION_RESOURCE_GROUP"] || "testresourcegroup";
|
|
26
|
+
const resourceName = "customLocation01";
|
|
27
|
+
const childResourceName = "resourceSyncRule01";
|
|
28
|
+
const credential = new DefaultAzureCredential();
|
|
29
|
+
const client = new CustomLocationsManagementClient(credential, subscriptionId);
|
|
30
|
+
const result = yield client.resourceSyncRules.delete(resourceGroupName, resourceName, childResourceName);
|
|
31
|
+
console.log(result);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function main() {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
deleteResourceSyncRule();
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
main().catch(console.error);
|
|
40
|
+
//# 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;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,sBAAsB;;QACnC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC;YAC/C,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,IAAI,mBAAmB,CAAC;QACxE,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,SAAe,IAAI;;QACjB,sBAAsB,EAAE,CAAC;IAC3B,CAAC;CAAA;AAED,IAAI,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,40 @@
|
|
|
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
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
15
|
+
/**
|
|
16
|
+
* 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.
|
|
17
|
+
*
|
|
18
|
+
* @summary Gets the details of the resourceSyncRule with a specified resource group, subscription id Custom Location resource name and Resource Sync Rule name.
|
|
19
|
+
* x-ms-original-file: specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/ResourceSyncRulesGet.json
|
|
20
|
+
*/
|
|
21
|
+
function getCustomLocation() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const subscriptionId = process.env["EXTENDEDLOCATION_SUBSCRIPTION_ID"] ||
|
|
24
|
+
"11111111-2222-3333-4444-555555555555";
|
|
25
|
+
const resourceGroupName = process.env["EXTENDEDLOCATION_RESOURCE_GROUP"] || "testresourcegroup";
|
|
26
|
+
const resourceName = "customLocation01";
|
|
27
|
+
const childResourceName = "resourceSyncRule01";
|
|
28
|
+
const credential = new DefaultAzureCredential();
|
|
29
|
+
const client = new CustomLocationsManagementClient(credential, subscriptionId);
|
|
30
|
+
const result = yield client.resourceSyncRules.get(resourceGroupName, resourceName, childResourceName);
|
|
31
|
+
console.log(result);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function main() {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
getCustomLocation();
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
main().catch(console.error);
|
|
40
|
+
//# 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;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,iBAAiB;;QAC9B,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC;YAC/C,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,IAAI,mBAAmB,CAAC;QACxE,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,SAAe,IAAI;;QACjB,iBAAiB,EAAE,CAAC;IACtB,CAAC;CAAA;AAED,IAAI,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,53 @@
|
|
|
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
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
15
|
+
/**
|
|
16
|
+
* 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
|
|
17
|
+
*
|
|
18
|
+
* @summary Gets a list of Resource Sync Rules in the specified subscription. The operation returns properties of each Resource Sync Rule
|
|
19
|
+
* x-ms-original-file: specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/ResourceSyncRulesListByCustomLocationID.json
|
|
20
|
+
*/
|
|
21
|
+
function listResourceSyncRulesBySubscription() {
|
|
22
|
+
var e_1, _a;
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const subscriptionId = process.env["EXTENDEDLOCATION_SUBSCRIPTION_ID"] ||
|
|
25
|
+
"11111111-2222-3333-4444-555555555555";
|
|
26
|
+
const resourceGroupName = process.env["EXTENDEDLOCATION_RESOURCE_GROUP"] || "testresourcegroup";
|
|
27
|
+
const resourceName = "customLocation01";
|
|
28
|
+
const credential = new DefaultAzureCredential();
|
|
29
|
+
const client = new CustomLocationsManagementClient(credential, subscriptionId);
|
|
30
|
+
const resArray = new Array();
|
|
31
|
+
try {
|
|
32
|
+
for (var _b = __asyncValues(client.resourceSyncRules.listByCustomLocationID(resourceGroupName, resourceName)), _c; _c = yield _b.next(), !_c.done;) {
|
|
33
|
+
let item = _c.value;
|
|
34
|
+
resArray.push(item);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
38
|
+
finally {
|
|
39
|
+
try {
|
|
40
|
+
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
|
41
|
+
}
|
|
42
|
+
finally { if (e_1) throw e_1.error; }
|
|
43
|
+
}
|
|
44
|
+
console.log(resArray);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function main() {
|
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
listResourceSyncRulesBySubscription();
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
main().catch(console.error);
|
|
53
|
+
//# 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;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,mCAAmC;;;QAChD,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC;YAC/C,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,IAAI,mBAAmB,CAAC;QACxE,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,SAAe,IAAI;;QACjB,mCAAmC,EAAE,CAAC;IACxC,CAAC;CAAA;AAED,IAAI,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,42 @@
|
|
|
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
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
15
|
+
/**
|
|
16
|
+
* 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.
|
|
17
|
+
*
|
|
18
|
+
* @summary Updates a Resource Sync Rule with the specified Resource Sync Rule name in the specified Resource Group, Subscription and Custom Location name.
|
|
19
|
+
* x-ms-original-file: specification/extendedlocation/resource-manager/Microsoft.ExtendedLocation/preview/2021-08-31-preview/examples/ResourceSyncRulesPatch.json
|
|
20
|
+
*/
|
|
21
|
+
function updateResourceSyncRule() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const subscriptionId = process.env["EXTENDEDLOCATION_SUBSCRIPTION_ID"] ||
|
|
24
|
+
"11111111-2222-3333-4444-555555555555";
|
|
25
|
+
const resourceGroupName = process.env["EXTENDEDLOCATION_RESOURCE_GROUP"] || "testresourcegroup";
|
|
26
|
+
const resourceName = "customLocation01";
|
|
27
|
+
const childResourceName = "resourceSyncRule01";
|
|
28
|
+
const tags = { tier: "testing" };
|
|
29
|
+
const options = { tags };
|
|
30
|
+
const credential = new DefaultAzureCredential();
|
|
31
|
+
const client = new CustomLocationsManagementClient(credential, subscriptionId);
|
|
32
|
+
const result = yield client.resourceSyncRules.beginUpdateAndWait(resourceGroupName, resourceName, childResourceName, options);
|
|
33
|
+
console.log(result);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function main() {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
updateResourceSyncRule();
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
main().catch(console.error);
|
|
42
|
+
//# 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;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,sBAAsB;;QACnC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC;YAC/C,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,IAAI,mBAAmB,CAAC;QACxE,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,SAAe,IAAI;;QACjB,sBAAsB,EAAE,CAAC;IAC3B,CAAC;CAAA;AAED,IAAI,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;IA6EzD,8GAA8G;IAC9G,OAAO,CAAC,yBAAyB;IA2BjC,eAAe,EAAE,eAAe,CAAC;IACjC,iBAAiB,EAAE,iBAAiB,CAAC;CACtC"}
|