@azure/arm-maps 3.1.0-beta.2 → 3.1.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 +42 -28
- package/LICENSE +1 -1
- package/README.md +1 -1
- package/dist/index.js +219 -64
- 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/accountsCreateOrUpdateSample.js +63 -12
- package/dist-esm/samples-dev/accountsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/accountsDeleteSample.js +12 -4
- package/dist-esm/samples-dev/accountsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/accountsGetSample.js +12 -4
- package/dist-esm/samples-dev/accountsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/accountsListByResourceGroupSample.js +24 -9
- package/dist-esm/samples-dev/accountsListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/accountsListBySubscriptionSample.js +23 -8
- package/dist-esm/samples-dev/accountsListBySubscriptionSample.js.map +1 -1
- package/dist-esm/samples-dev/accountsListKeysSample.js +12 -4
- package/dist-esm/samples-dev/accountsListKeysSample.js.map +1 -1
- package/dist-esm/samples-dev/accountsListSasSample.js +12 -4
- package/dist-esm/samples-dev/accountsListSasSample.js.map +1 -1
- package/dist-esm/samples-dev/accountsRegenerateKeysSample.js +12 -4
- package/dist-esm/samples-dev/accountsRegenerateKeysSample.js.map +1 -1
- package/dist-esm/samples-dev/accountsUpdateSample.js +63 -16
- package/dist-esm/samples-dev/accountsUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/creatorsCreateOrUpdateSample.js +12 -4
- package/dist-esm/samples-dev/creatorsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/creatorsDeleteSample.js +12 -4
- package/dist-esm/samples-dev/creatorsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/creatorsGetSample.js +12 -4
- package/dist-esm/samples-dev/creatorsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/creatorsListByAccountSample.js +24 -9
- package/dist-esm/samples-dev/creatorsListByAccountSample.js.map +1 -1
- package/dist-esm/samples-dev/creatorsUpdateSample.js +12 -4
- package/dist-esm/samples-dev/creatorsUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/mapsListOperationsSample.js +22 -9
- package/dist-esm/samples-dev/mapsListOperationsSample.js.map +1 -1
- package/dist-esm/samples-dev/mapsListSubscriptionOperationsSample.js +23 -8
- package/dist-esm/samples-dev/mapsListSubscriptionOperationsSample.js.map +1 -1
- package/dist-esm/src/azureMapsManagementClient.d.ts +2 -1
- package/dist-esm/src/azureMapsManagementClient.d.ts.map +1 -1
- package/dist-esm/src/azureMapsManagementClient.js +9 -11
- package/dist-esm/src/azureMapsManagementClient.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +142 -50
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +32 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +4 -1
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +109 -17
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.js +1 -1
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/accounts.js +24 -12
- package/dist-esm/src/operations/accounts.js.map +1 -1
- package/dist-esm/src/operations/creators.js +12 -6
- package/dist-esm/src/operations/creators.js.map +1 -1
- package/dist-esm/src/operations/maps.js +24 -12
- package/dist-esm/src/operations/maps.js.map +1 -1
- package/dist-esm/src/pagingHelper.d.ts +4 -4
- package/dist-esm/src/pagingHelper.js +4 -4
- package/dist-esm/test/maps_operations_test.spec.d.ts +4 -0
- package/dist-esm/test/maps_operations_test.spec.d.ts.map +1 -0
- package/dist-esm/test/maps_operations_test.spec.js +140 -0
- package/dist-esm/test/maps_operations_test.spec.js.map +1 -0
- package/package.json +11 -10
- package/review/arm-maps.api.md +65 -12
- package/src/azureMapsManagementClient.ts +19 -5
- package/src/models/index.ts +127 -32
- package/src/models/mappers.ts +112 -19
- package/src/models/parameters.ts +1 -1
- package/src/operations/accounts.ts +0 -2
- package/src/operations/creators.ts +0 -1
- package/src/operations/maps.ts +0 -2
- package/src/pagingHelper.ts +4 -4
- package/types/arm-maps.d.ts +143 -42
- package/types/tsdoc-metadata.json +1 -1
- package/dist-esm/test/sampleTest.d.ts +0 -2
- package/dist-esm/test/sampleTest.d.ts.map +0 -1
- package/dist-esm/test/sampleTest.js +0 -38
- package/dist-esm/test/sampleTest.js.map +0 -1
|
@@ -10,35 +10,50 @@ import { __asyncValues, __awaiter } from "tslib";
|
|
|
10
10
|
// Licensed under the MIT License.
|
|
11
11
|
import { AzureMapsManagementClient } from "@azure/arm-maps";
|
|
12
12
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
13
15
|
/**
|
|
14
16
|
* This sample demonstrates how to Get all Maps Accounts in a Resource Group
|
|
15
17
|
*
|
|
16
18
|
* @summary Get all Maps Accounts in a Resource Group
|
|
17
|
-
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/
|
|
19
|
+
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/ListAccountsByResourceGroup.json
|
|
18
20
|
*/
|
|
19
21
|
function listAccountsByResourceGroup() {
|
|
20
|
-
var e_1,
|
|
22
|
+
var _a, e_1, _b, _c;
|
|
21
23
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
const subscriptionId = "
|
|
23
|
-
|
|
24
|
+
const subscriptionId = process.env["MAPS_SUBSCRIPTION_ID"] ||
|
|
25
|
+
"21a9967a-e8a9-4656-a70b-96ff1c4d05a0";
|
|
26
|
+
const resourceGroupName = process.env["MAPS_RESOURCE_GROUP"] || "myResourceGroup";
|
|
24
27
|
const credential = new DefaultAzureCredential();
|
|
25
28
|
const client = new AzureMapsManagementClient(credential, subscriptionId);
|
|
26
29
|
const resArray = new Array();
|
|
27
30
|
try {
|
|
28
|
-
for (var
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
for (var _d = true, _e = __asyncValues(client.accounts.listByResourceGroup(resourceGroupName)), _f; _f = yield _e.next(), _a = _f.done, !_a;) {
|
|
32
|
+
_c = _f.value;
|
|
33
|
+
_d = false;
|
|
34
|
+
try {
|
|
35
|
+
let item = _c;
|
|
36
|
+
resArray.push(item);
|
|
37
|
+
}
|
|
38
|
+
finally {
|
|
39
|
+
_d = true;
|
|
40
|
+
}
|
|
31
41
|
}
|
|
32
42
|
}
|
|
33
43
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
34
44
|
finally {
|
|
35
45
|
try {
|
|
36
|
-
if (
|
|
46
|
+
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
|
|
37
47
|
}
|
|
38
48
|
finally { if (e_1) throw e_1.error; }
|
|
39
49
|
}
|
|
40
50
|
console.log(resArray);
|
|
41
51
|
});
|
|
42
52
|
}
|
|
43
|
-
|
|
53
|
+
function main() {
|
|
54
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
listAccountsByResourceGroup();
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
main().catch(console.error);
|
|
44
59
|
//# sourceMappingURL=accountsListByResourceGroupSample.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accountsListByResourceGroupSample.js","sourceRoot":"","sources":["../../samples-dev/accountsListByResourceGroupSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"accountsListByResourceGroupSample.js","sourceRoot":"","sources":["../../samples-dev/accountsListByResourceGroupSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,2BAA2B;;;QACxC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;YACnC,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,IAAI,iBAAiB,CAAC;QAC1D,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,yBAAyB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACzE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CACxD,iBAAiB,CAClB,CAAA,IAAA;gBAFsB,cAEtB;gBAFsB,WAEtB;;oBAFU,IAAI,IAAI,KAAA,CAAA;oBAGjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;;;;;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,2BAA2B,EAAE,CAAC;IAChC,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -10,34 +10,49 @@ import { __asyncValues, __awaiter } from "tslib";
|
|
|
10
10
|
// Licensed under the MIT License.
|
|
11
11
|
import { AzureMapsManagementClient } from "@azure/arm-maps";
|
|
12
12
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
13
15
|
/**
|
|
14
16
|
* This sample demonstrates how to Get all Maps Accounts in a Subscription
|
|
15
17
|
*
|
|
16
18
|
* @summary Get all Maps Accounts in a Subscription
|
|
17
|
-
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/
|
|
19
|
+
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/ListAccountsBySubscription.json
|
|
18
20
|
*/
|
|
19
21
|
function listAccountsBySubscription() {
|
|
20
|
-
var e_1,
|
|
22
|
+
var _a, e_1, _b, _c;
|
|
21
23
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
const subscriptionId = "
|
|
24
|
+
const subscriptionId = process.env["MAPS_SUBSCRIPTION_ID"] ||
|
|
25
|
+
"21a9967a-e8a9-4656-a70b-96ff1c4d05a0";
|
|
23
26
|
const credential = new DefaultAzureCredential();
|
|
24
27
|
const client = new AzureMapsManagementClient(credential, subscriptionId);
|
|
25
28
|
const resArray = new Array();
|
|
26
29
|
try {
|
|
27
|
-
for (var
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
for (var _d = true, _e = __asyncValues(client.accounts.listBySubscription()), _f; _f = yield _e.next(), _a = _f.done, !_a;) {
|
|
31
|
+
_c = _f.value;
|
|
32
|
+
_d = false;
|
|
33
|
+
try {
|
|
34
|
+
let item = _c;
|
|
35
|
+
resArray.push(item);
|
|
36
|
+
}
|
|
37
|
+
finally {
|
|
38
|
+
_d = true;
|
|
39
|
+
}
|
|
30
40
|
}
|
|
31
41
|
}
|
|
32
42
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
33
43
|
finally {
|
|
34
44
|
try {
|
|
35
|
-
if (
|
|
45
|
+
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
|
|
36
46
|
}
|
|
37
47
|
finally { if (e_1) throw e_1.error; }
|
|
38
48
|
}
|
|
39
49
|
console.log(resArray);
|
|
40
50
|
});
|
|
41
51
|
}
|
|
42
|
-
|
|
52
|
+
function main() {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
listAccountsBySubscription();
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
main().catch(console.error);
|
|
43
58
|
//# sourceMappingURL=accountsListBySubscriptionSample.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accountsListBySubscriptionSample.js","sourceRoot":"","sources":["../../samples-dev/accountsListBySubscriptionSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"accountsListBySubscriptionSample.js","sourceRoot":"","sources":["../../samples-dev/accountsListBySubscriptionSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,0BAA0B;;;QACvC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;YACnC,sCAAsC,CAAC;QACzC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,yBAAyB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACzE,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,QAAQ,CAAC,kBAAkB,EAAE,CAAA,IAAA;gBAApC,cAAoC;gBAApC,WAAoC;;oBAAhD,IAAI,IAAI,KAAA,CAAA;oBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;;;;;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,SAAe,IAAI;;QACjB,0BAA0B,EAAE,CAAC;IAC/B,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -10,16 +10,19 @@ import { __awaiter } from "tslib";
|
|
|
10
10
|
// Licensed under the MIT License.
|
|
11
11
|
import { AzureMapsManagementClient } from "@azure/arm-maps";
|
|
12
12
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
13
15
|
/**
|
|
14
16
|
* This sample demonstrates how to Get the keys to use with the Maps APIs. A key is used to authenticate and authorize access to the Maps REST APIs. Only one key is needed at a time; two are given to provide seamless key regeneration.
|
|
15
17
|
*
|
|
16
18
|
* @summary Get the keys to use with the Maps APIs. A key is used to authenticate and authorize access to the Maps REST APIs. Only one key is needed at a time; two are given to provide seamless key regeneration.
|
|
17
|
-
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/
|
|
19
|
+
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/ListKeys.json
|
|
18
20
|
*/
|
|
19
21
|
function listKeys() {
|
|
20
22
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const subscriptionId = "
|
|
22
|
-
|
|
23
|
+
const subscriptionId = process.env["MAPS_SUBSCRIPTION_ID"] ||
|
|
24
|
+
"21a9967a-e8a9-4656-a70b-96ff1c4d05a0";
|
|
25
|
+
const resourceGroupName = process.env["MAPS_RESOURCE_GROUP"] || "myResourceGroup";
|
|
23
26
|
const accountName = "myMapsAccount";
|
|
24
27
|
const credential = new DefaultAzureCredential();
|
|
25
28
|
const client = new AzureMapsManagementClient(credential, subscriptionId);
|
|
@@ -27,5 +30,10 @@ function listKeys() {
|
|
|
27
30
|
console.log(result);
|
|
28
31
|
});
|
|
29
32
|
}
|
|
30
|
-
|
|
33
|
+
function main() {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
listKeys();
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
main().catch(console.error);
|
|
31
39
|
//# sourceMappingURL=accountsListKeysSample.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accountsListKeysSample.js","sourceRoot":"","sources":["../../samples-dev/accountsListKeysSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"accountsListKeysSample.js","sourceRoot":"","sources":["../../samples-dev/accountsListKeysSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,QAAQ;;QACrB,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;YACnC,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,IAAI,iBAAiB,CAAC;QAC1D,MAAM,WAAW,GAAG,eAAe,CAAC;QACpC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,yBAAyB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACzE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC;QAC9E,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,QAAQ,EAAE,CAAC;IACb,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -10,6 +10,8 @@ import { __awaiter } from "tslib";
|
|
|
10
10
|
// Licensed under the MIT License.
|
|
11
11
|
import { AzureMapsManagementClient } from "@azure/arm-maps";
|
|
12
12
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
13
15
|
/**
|
|
14
16
|
* This sample demonstrates how to Create and list an account shared access signature token. Use this SAS token for authentication to Azure Maps REST APIs through various Azure Maps SDKs. As prerequisite to create a SAS Token.
|
|
15
17
|
|
|
@@ -22,12 +24,13 @@ Prerequisites:
|
|
|
22
24
|
Prerequisites:
|
|
23
25
|
1. Create or have an existing User Assigned Managed Identity in the same Azure region as the account.
|
|
24
26
|
2. Create or update an Azure Map account with the same Azure region as the User Assigned Managed Identity is placed.
|
|
25
|
-
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/
|
|
27
|
+
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/AccountListSAS.json
|
|
26
28
|
*/
|
|
27
29
|
function listAccountSas() {
|
|
28
30
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
const subscriptionId = "
|
|
30
|
-
|
|
31
|
+
const subscriptionId = process.env["MAPS_SUBSCRIPTION_ID"] ||
|
|
32
|
+
"21a9967a-e8a9-4656-a70b-96ff1c4d05a0";
|
|
33
|
+
const resourceGroupName = process.env["MAPS_RESOURCE_GROUP"] || "myResourceGroup";
|
|
31
34
|
const accountName = "myMapsAccount";
|
|
32
35
|
const mapsAccountSasParameters = {
|
|
33
36
|
expiry: "2017-05-24T11:42:03.1567373Z",
|
|
@@ -43,5 +46,10 @@ function listAccountSas() {
|
|
|
43
46
|
console.log(result);
|
|
44
47
|
});
|
|
45
48
|
}
|
|
46
|
-
|
|
49
|
+
function main() {
|
|
50
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
listAccountSas();
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
main().catch(console.error);
|
|
47
55
|
//# sourceMappingURL=accountsListSasSample.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accountsListSasSample.js","sourceRoot":"","sources":["../../samples-dev/accountsListSasSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,yBAAyB,EAC1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"accountsListSasSample.js","sourceRoot":"","sources":["../../samples-dev/accountsListSasSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,yBAAyB,EAC1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;;;;;;;;;GAaG;AACH,SAAe,cAAc;;QAC3B,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;YACnC,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,IAAI,iBAAiB,CAAC;QAC1D,MAAM,WAAW,GAAG,eAAe,CAAC;QACpC,MAAM,wBAAwB,GAAyB;YACrD,MAAM,EAAE,8BAA8B;YACtC,gBAAgB,EAAE,GAAG;YACrB,WAAW,EAAE,sCAAsC;YACnD,OAAO,EAAE,CAAC,QAAQ,CAAC;YACnB,UAAU,EAAE,YAAY;YACxB,KAAK,EAAE,8BAA8B;SACtC,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,yBAAyB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACzE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,OAAO,CAC1C,iBAAiB,EACjB,WAAW,EACX,wBAAwB,CACzB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,cAAc,EAAE,CAAC;IACnB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -10,16 +10,19 @@ import { __awaiter } from "tslib";
|
|
|
10
10
|
// Licensed under the MIT License.
|
|
11
11
|
import { AzureMapsManagementClient } from "@azure/arm-maps";
|
|
12
12
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
13
15
|
/**
|
|
14
16
|
* This sample demonstrates how to Regenerate either the primary or secondary key for use with the Maps APIs. The old key will stop working immediately.
|
|
15
17
|
*
|
|
16
18
|
* @summary Regenerate either the primary or secondary key for use with the Maps APIs. The old key will stop working immediately.
|
|
17
|
-
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/
|
|
19
|
+
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/RegenerateKey.json
|
|
18
20
|
*/
|
|
19
21
|
function regenerateKey() {
|
|
20
22
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const subscriptionId = "
|
|
22
|
-
|
|
23
|
+
const subscriptionId = process.env["MAPS_SUBSCRIPTION_ID"] ||
|
|
24
|
+
"21a9967a-e8a9-4656-a70b-96ff1c4d05a0";
|
|
25
|
+
const resourceGroupName = process.env["MAPS_RESOURCE_GROUP"] || "myResourceGroup";
|
|
23
26
|
const accountName = "myMapsAccount";
|
|
24
27
|
const keySpecification = { keyType: "primary" };
|
|
25
28
|
const credential = new DefaultAzureCredential();
|
|
@@ -28,5 +31,10 @@ function regenerateKey() {
|
|
|
28
31
|
console.log(result);
|
|
29
32
|
});
|
|
30
33
|
}
|
|
31
|
-
|
|
34
|
+
function main() {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
regenerateKey();
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
main().catch(console.error);
|
|
32
40
|
//# sourceMappingURL=accountsRegenerateKeysSample.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accountsRegenerateKeysSample.js","sourceRoot":"","sources":["../../samples-dev/accountsRegenerateKeysSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,yBAAyB,EAC1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"accountsRegenerateKeysSample.js","sourceRoot":"","sources":["../../samples-dev/accountsRegenerateKeysSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,yBAAyB,EAC1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,aAAa;;QAC1B,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;YACnC,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,IAAI,iBAAiB,CAAC;QAC1D,MAAM,WAAW,GAAG,eAAe,CAAC;QACpC,MAAM,gBAAgB,GAAyB,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;QACtE,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,yBAAyB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACzE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,cAAc,CACjD,iBAAiB,EACjB,WAAW,EACX,gBAAgB,CACjB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,aAAa,EAAE,CAAC;IAClB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -10,16 +10,54 @@ import { __awaiter } from "tslib";
|
|
|
10
10
|
// Licensed under the MIT License.
|
|
11
11
|
import { AzureMapsManagementClient } from "@azure/arm-maps";
|
|
12
12
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
13
15
|
/**
|
|
14
16
|
* This sample demonstrates how to Updates a Maps Account. Only a subset of the parameters may be updated after creation, such as Sku, Tags, Properties.
|
|
15
17
|
*
|
|
16
18
|
* @summary Updates a Maps Account. Only a subset of the parameters may be updated after creation, such as Sku, Tags, Properties.
|
|
17
|
-
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/
|
|
19
|
+
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccountEncryption.json
|
|
20
|
+
*/
|
|
21
|
+
function updateAccountEncryption() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
const subscriptionId = process.env["MAPS_SUBSCRIPTION_ID"] ||
|
|
24
|
+
"21a9967a-e8a9-4656-a70b-96ff1c4d05a0";
|
|
25
|
+
const resourceGroupName = process.env["MAPS_RESOURCE_GROUP"] || "myResourceGroup";
|
|
26
|
+
const accountName = "myMapsAccount";
|
|
27
|
+
const mapsAccountUpdateParameters = {
|
|
28
|
+
encryption: {
|
|
29
|
+
customerManagedKeyEncryption: {
|
|
30
|
+
keyEncryptionKeyIdentity: {
|
|
31
|
+
identityType: "systemAssignedIdentity",
|
|
32
|
+
userAssignedIdentityResourceId: undefined
|
|
33
|
+
},
|
|
34
|
+
keyEncryptionKeyUrl: "https://contosovault.vault.azure.net/keys/contosokek"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
identity: {
|
|
38
|
+
type: "SystemAssigned",
|
|
39
|
+
userAssignedIdentities: {
|
|
40
|
+
"/subscriptions/21a9967aE8a94656A70b96ff1c4d05a0/resourceGroups/myResourceGroup/providers/MicrosoftManagedIdentity/userAssignedIdentities/identityName": {}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const credential = new DefaultAzureCredential();
|
|
45
|
+
const client = new AzureMapsManagementClient(credential, subscriptionId);
|
|
46
|
+
const result = yield client.accounts.update(resourceGroupName, accountName, mapsAccountUpdateParameters);
|
|
47
|
+
console.log(result);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* This sample demonstrates how to Updates a Maps Account. Only a subset of the parameters may be updated after creation, such as Sku, Tags, Properties.
|
|
52
|
+
*
|
|
53
|
+
* @summary Updates a Maps Account. Only a subset of the parameters may be updated after creation, such as Sku, Tags, Properties.
|
|
54
|
+
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccountManagedIdentity.json
|
|
18
55
|
*/
|
|
19
56
|
function updateAccountManagedIdentities() {
|
|
20
57
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const subscriptionId = "
|
|
22
|
-
|
|
58
|
+
const subscriptionId = process.env["MAPS_SUBSCRIPTION_ID"] ||
|
|
59
|
+
"21a9967a-e8a9-4656-a70b-96ff1c4d05a0";
|
|
60
|
+
const resourceGroupName = process.env["MAPS_RESOURCE_GROUP"] || "myResourceGroup";
|
|
23
61
|
const accountName = "myMapsAccount";
|
|
24
62
|
const mapsAccountUpdateParameters = {
|
|
25
63
|
identity: {
|
|
@@ -43,17 +81,17 @@ function updateAccountManagedIdentities() {
|
|
|
43
81
|
console.log(result);
|
|
44
82
|
});
|
|
45
83
|
}
|
|
46
|
-
updateAccountManagedIdentities().catch(console.error);
|
|
47
84
|
/**
|
|
48
85
|
* This sample demonstrates how to Updates a Maps Account. Only a subset of the parameters may be updated after creation, such as Sku, Tags, Properties.
|
|
49
86
|
*
|
|
50
87
|
* @summary Updates a Maps Account. Only a subset of the parameters may be updated after creation, such as Sku, Tags, Properties.
|
|
51
|
-
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/
|
|
88
|
+
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccount.json
|
|
52
89
|
*/
|
|
53
90
|
function updateAccountTags() {
|
|
54
91
|
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
-
const subscriptionId = "
|
|
56
|
-
|
|
92
|
+
const subscriptionId = process.env["MAPS_SUBSCRIPTION_ID"] ||
|
|
93
|
+
"21a9967a-e8a9-4656-a70b-96ff1c4d05a0";
|
|
94
|
+
const resourceGroupName = process.env["MAPS_RESOURCE_GROUP"] || "myResourceGroup";
|
|
57
95
|
const accountName = "myMapsAccount";
|
|
58
96
|
const mapsAccountUpdateParameters = {
|
|
59
97
|
tags: { specialTag: "true" }
|
|
@@ -64,17 +102,17 @@ function updateAccountTags() {
|
|
|
64
102
|
console.log(result);
|
|
65
103
|
});
|
|
66
104
|
}
|
|
67
|
-
updateAccountTags().catch(console.error);
|
|
68
105
|
/**
|
|
69
106
|
* This sample demonstrates how to Updates a Maps Account. Only a subset of the parameters may be updated after creation, such as Sku, Tags, Properties.
|
|
70
107
|
*
|
|
71
108
|
* @summary Updates a Maps Account. Only a subset of the parameters may be updated after creation, such as Sku, Tags, Properties.
|
|
72
|
-
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/
|
|
109
|
+
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccountGen1.json
|
|
73
110
|
*/
|
|
74
111
|
function updateToGen1Account() {
|
|
75
112
|
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
-
const subscriptionId = "
|
|
77
|
-
|
|
113
|
+
const subscriptionId = process.env["MAPS_SUBSCRIPTION_ID"] ||
|
|
114
|
+
"21a9967a-e8a9-4656-a70b-96ff1c4d05a0";
|
|
115
|
+
const resourceGroupName = process.env["MAPS_RESOURCE_GROUP"] || "myResourceGroup";
|
|
78
116
|
const accountName = "myMapsAccount";
|
|
79
117
|
const mapsAccountUpdateParameters = {
|
|
80
118
|
kind: "Gen1",
|
|
@@ -86,17 +124,17 @@ function updateToGen1Account() {
|
|
|
86
124
|
console.log(result);
|
|
87
125
|
});
|
|
88
126
|
}
|
|
89
|
-
updateToGen1Account().catch(console.error);
|
|
90
127
|
/**
|
|
91
128
|
* This sample demonstrates how to Updates a Maps Account. Only a subset of the parameters may be updated after creation, such as Sku, Tags, Properties.
|
|
92
129
|
*
|
|
93
130
|
* @summary Updates a Maps Account. Only a subset of the parameters may be updated after creation, such as Sku, Tags, Properties.
|
|
94
|
-
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/
|
|
131
|
+
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/UpdateAccountGen2.json
|
|
95
132
|
*/
|
|
96
133
|
function updateToGen2Account() {
|
|
97
134
|
return __awaiter(this, void 0, void 0, function* () {
|
|
98
|
-
const subscriptionId = "
|
|
99
|
-
|
|
135
|
+
const subscriptionId = process.env["MAPS_SUBSCRIPTION_ID"] ||
|
|
136
|
+
"21a9967a-e8a9-4656-a70b-96ff1c4d05a0";
|
|
137
|
+
const resourceGroupName = process.env["MAPS_RESOURCE_GROUP"] || "myResourceGroup";
|
|
100
138
|
const accountName = "myMapsAccount";
|
|
101
139
|
const mapsAccountUpdateParameters = {
|
|
102
140
|
kind: "Gen2",
|
|
@@ -108,5 +146,14 @@ function updateToGen2Account() {
|
|
|
108
146
|
console.log(result);
|
|
109
147
|
});
|
|
110
148
|
}
|
|
111
|
-
|
|
149
|
+
function main() {
|
|
150
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
+
updateAccountEncryption();
|
|
152
|
+
updateAccountManagedIdentities();
|
|
153
|
+
updateAccountTags();
|
|
154
|
+
updateToGen1Account();
|
|
155
|
+
updateToGen2Account();
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
main().catch(console.error);
|
|
112
159
|
//# sourceMappingURL=accountsUpdateSample.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accountsUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/accountsUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,yBAAyB,EAC1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"accountsUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/accountsUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAEL,yBAAyB,EAC1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,Q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AAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,uBAAuB,EAAE,CAAC;QAC1B,8BAA8B,EAAE,CAAC;QACjC,iBAAiB,EAAE,CAAC;QACpB,mBAAmB,EAAE,CAAC;QACtB,mBAAmB,EAAE,CAAC;IACxB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -10,16 +10,19 @@ import { __awaiter } from "tslib";
|
|
|
10
10
|
// Licensed under the MIT License.
|
|
11
11
|
import { AzureMapsManagementClient } from "@azure/arm-maps";
|
|
12
12
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
13
15
|
/**
|
|
14
16
|
* This sample demonstrates how to Create or update a Maps Creator resource. Creator resource will manage Azure resources required to populate a custom set of mapping data. It requires an account to exist before it can be created.
|
|
15
17
|
*
|
|
16
18
|
* @summary Create or update a Maps Creator resource. Creator resource will manage Azure resources required to populate a custom set of mapping data. It requires an account to exist before it can be created.
|
|
17
|
-
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/
|
|
19
|
+
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/CreateMapsCreator.json
|
|
18
20
|
*/
|
|
19
21
|
function createCreatorResource() {
|
|
20
22
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const subscriptionId = "
|
|
22
|
-
|
|
23
|
+
const subscriptionId = process.env["MAPS_SUBSCRIPTION_ID"] ||
|
|
24
|
+
"21a9967a-e8a9-4656-a70b-96ff1c4d05a0";
|
|
25
|
+
const resourceGroupName = process.env["MAPS_RESOURCE_GROUP"] || "myResourceGroup";
|
|
23
26
|
const accountName = "myMapsAccount";
|
|
24
27
|
const creatorName = "myCreator";
|
|
25
28
|
const creatorResource = {
|
|
@@ -33,5 +36,10 @@ function createCreatorResource() {
|
|
|
33
36
|
console.log(result);
|
|
34
37
|
});
|
|
35
38
|
}
|
|
36
|
-
|
|
39
|
+
function main() {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
createCreatorResource();
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
main().catch(console.error);
|
|
37
45
|
//# sourceMappingURL=creatorsCreateOrUpdateSample.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creatorsCreateOrUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/creatorsCreateOrUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAW,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"creatorsCreateOrUpdateSample.js","sourceRoot":"","sources":["../../samples-dev/creatorsCreateOrUpdateSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAW,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,qBAAqB;;QAClC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;YACnC,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,IAAI,iBAAiB,CAAC;QAC1D,MAAM,WAAW,GAAG,eAAe,CAAC;QACpC,MAAM,WAAW,GAAG,WAAW,CAAC;QAChC,MAAM,eAAe,GAAY;YAC/B,QAAQ,EAAE,SAAS;YACnB,UAAU,EAAE,EAAE,YAAY,EAAE,CAAC,EAAE;YAC/B,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;SACvB,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,yBAAyB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACzE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,cAAc,CACjD,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,eAAe,CAChB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,qBAAqB,EAAE,CAAC;IAC1B,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -10,16 +10,19 @@ import { __awaiter } from "tslib";
|
|
|
10
10
|
// Licensed under the MIT License.
|
|
11
11
|
import { AzureMapsManagementClient } from "@azure/arm-maps";
|
|
12
12
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
13
15
|
/**
|
|
14
16
|
* This sample demonstrates how to Delete a Maps Creator resource.
|
|
15
17
|
*
|
|
16
18
|
* @summary Delete a Maps Creator resource.
|
|
17
|
-
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/
|
|
19
|
+
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/DeleteMapsCreator.json
|
|
18
20
|
*/
|
|
19
21
|
function deleteCreatorResource() {
|
|
20
22
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const subscriptionId = "
|
|
22
|
-
|
|
23
|
+
const subscriptionId = process.env["MAPS_SUBSCRIPTION_ID"] ||
|
|
24
|
+
"21a9967a-e8a9-4656-a70b-96ff1c4d05a0";
|
|
25
|
+
const resourceGroupName = process.env["MAPS_RESOURCE_GROUP"] || "myResourceGroup";
|
|
23
26
|
const accountName = "myMapsAccount";
|
|
24
27
|
const creatorName = "myCreator";
|
|
25
28
|
const credential = new DefaultAzureCredential();
|
|
@@ -28,5 +31,10 @@ function deleteCreatorResource() {
|
|
|
28
31
|
console.log(result);
|
|
29
32
|
});
|
|
30
33
|
}
|
|
31
|
-
|
|
34
|
+
function main() {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
deleteCreatorResource();
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
main().catch(console.error);
|
|
32
40
|
//# sourceMappingURL=creatorsDeleteSample.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creatorsDeleteSample.js","sourceRoot":"","sources":["../../samples-dev/creatorsDeleteSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"creatorsDeleteSample.js","sourceRoot":"","sources":["../../samples-dev/creatorsDeleteSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,qBAAqB;;QAClC,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;YACnC,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,IAAI,iBAAiB,CAAC;QAC1D,MAAM,WAAW,GAAG,eAAe,CAAC;QACpC,MAAM,WAAW,GAAG,WAAW,CAAC;QAChC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,yBAAyB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACzE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,MAAM,CACzC,iBAAiB,EACjB,WAAW,EACX,WAAW,CACZ,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,qBAAqB,EAAE,CAAC;IAC1B,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -10,16 +10,19 @@ import { __awaiter } from "tslib";
|
|
|
10
10
|
// Licensed under the MIT License.
|
|
11
11
|
import { AzureMapsManagementClient } from "@azure/arm-maps";
|
|
12
12
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
13
15
|
/**
|
|
14
16
|
* This sample demonstrates how to Get a Maps Creator resource.
|
|
15
17
|
*
|
|
16
18
|
* @summary Get a Maps Creator resource.
|
|
17
|
-
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/
|
|
19
|
+
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/GetMapsCreator.json
|
|
18
20
|
*/
|
|
19
21
|
function getCreatorResource() {
|
|
20
22
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const subscriptionId = "
|
|
22
|
-
|
|
23
|
+
const subscriptionId = process.env["MAPS_SUBSCRIPTION_ID"] ||
|
|
24
|
+
"21a9967a-e8a9-4656-a70b-96ff1c4d05a0";
|
|
25
|
+
const resourceGroupName = process.env["MAPS_RESOURCE_GROUP"] || "myResourceGroup";
|
|
23
26
|
const accountName = "myMapsAccount";
|
|
24
27
|
const creatorName = "myCreator";
|
|
25
28
|
const credential = new DefaultAzureCredential();
|
|
@@ -28,5 +31,10 @@ function getCreatorResource() {
|
|
|
28
31
|
console.log(result);
|
|
29
32
|
});
|
|
30
33
|
}
|
|
31
|
-
|
|
34
|
+
function main() {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
getCreatorResource();
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
main().catch(console.error);
|
|
32
40
|
//# sourceMappingURL=creatorsGetSample.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creatorsGetSample.js","sourceRoot":"","sources":["../../samples-dev/creatorsGetSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"creatorsGetSample.js","sourceRoot":"","sources":["../../samples-dev/creatorsGetSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,kBAAkB;;QAC/B,MAAM,cAAc,GAClB,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;YACnC,sCAAsC,CAAC;QACzC,MAAM,iBAAiB,GACrB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,IAAI,iBAAiB,CAAC;QAC1D,MAAM,WAAW,GAAG,eAAe,CAAC;QACpC,MAAM,WAAW,GAAG,WAAW,CAAC;QAChC,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,yBAAyB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACzE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,GAAG,CACtC,iBAAiB,EACjB,WAAW,EACX,WAAW,CACZ,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,SAAe,IAAI;;QACjB,kBAAkB,EAAE,CAAC;IACvB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -10,36 +10,51 @@ import { __asyncValues, __awaiter } from "tslib";
|
|
|
10
10
|
// Licensed under the MIT License.
|
|
11
11
|
import { AzureMapsManagementClient } from "@azure/arm-maps";
|
|
12
12
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
13
15
|
/**
|
|
14
16
|
* This sample demonstrates how to Get all Creator instances for an Azure Maps Account
|
|
15
17
|
*
|
|
16
18
|
* @summary Get all Creator instances for an Azure Maps Account
|
|
17
|
-
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/
|
|
19
|
+
* x-ms-original-file: specification/maps/resource-manager/Microsoft.Maps/stable/2023-06-01/examples/ListMapsCreatorsByAccount.json
|
|
18
20
|
*/
|
|
19
21
|
function listCreatorResourcesByAccount() {
|
|
20
|
-
var e_1,
|
|
22
|
+
var _a, e_1, _b, _c;
|
|
21
23
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
const subscriptionId = "
|
|
23
|
-
|
|
24
|
+
const subscriptionId = process.env["MAPS_SUBSCRIPTION_ID"] ||
|
|
25
|
+
"21a9967a-e8a9-4656-a70b-96ff1c4d05a0";
|
|
26
|
+
const resourceGroupName = process.env["MAPS_RESOURCE_GROUP"] || "myResourceGroup";
|
|
24
27
|
const accountName = "myMapsAccount";
|
|
25
28
|
const credential = new DefaultAzureCredential();
|
|
26
29
|
const client = new AzureMapsManagementClient(credential, subscriptionId);
|
|
27
30
|
const resArray = new Array();
|
|
28
31
|
try {
|
|
29
|
-
for (var
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
for (var _d = true, _e = __asyncValues(client.creators.listByAccount(resourceGroupName, accountName)), _f; _f = yield _e.next(), _a = _f.done, !_a;) {
|
|
33
|
+
_c = _f.value;
|
|
34
|
+
_d = false;
|
|
35
|
+
try {
|
|
36
|
+
let item = _c;
|
|
37
|
+
resArray.push(item);
|
|
38
|
+
}
|
|
39
|
+
finally {
|
|
40
|
+
_d = true;
|
|
41
|
+
}
|
|
32
42
|
}
|
|
33
43
|
}
|
|
34
44
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
35
45
|
finally {
|
|
36
46
|
try {
|
|
37
|
-
if (
|
|
47
|
+
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
|
|
38
48
|
}
|
|
39
49
|
finally { if (e_1) throw e_1.error; }
|
|
40
50
|
}
|
|
41
51
|
console.log(resArray);
|
|
42
52
|
});
|
|
43
53
|
}
|
|
44
|
-
|
|
54
|
+
function main() {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
listCreatorResourcesByAccount();
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
main().catch(console.error);
|
|
45
60
|
//# sourceMappingURL=creatorsListByAccountSample.js.map
|