@azure/arm-resourcegraph 5.0.0-beta.1 → 5.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 +2 -2
- package/README.md +12 -1
- package/dist/index.js +113 -16
- 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/operationsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/{operationsList.js → operationsListSample.js} +3 -3
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
- package/dist-esm/samples-dev/resourcesHistorySample.d.ts +2 -0
- package/dist-esm/samples-dev/resourcesHistorySample.d.ts.map +1 -0
- package/dist-esm/samples-dev/{resourceHistoryManagementGroupScopeQuery.js → resourcesHistorySample.js} +28 -3
- package/dist-esm/samples-dev/resourcesHistorySample.js.map +1 -0
- package/dist-esm/samples-dev/resourcesSample.d.ts +2 -0
- package/dist-esm/samples-dev/resourcesSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/resourcesSample.js +245 -0
- package/dist-esm/samples-dev/resourcesSample.js.map +1 -0
- package/dist-esm/src/index.d.ts +1 -0
- package/dist-esm/src/index.d.ts.map +1 -1
- package/dist-esm/src/index.js +1 -0
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +4 -4
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/operations/operations.d.ts.map +1 -1
- package/dist-esm/src/operations/operations.js +8 -4
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/pagingHelper.d.ts +13 -0
- package/dist-esm/src/pagingHelper.d.ts.map +1 -0
- package/dist-esm/src/pagingHelper.js +32 -0
- package/dist-esm/src/pagingHelper.js.map +1 -0
- package/dist-esm/src/resourceGraphClient.d.ts +2 -0
- package/dist-esm/src/resourceGraphClient.d.ts.map +1 -1
- package/dist-esm/src/resourceGraphClient.js +54 -5
- package/dist-esm/src/resourceGraphClient.js.map +1 -1
- package/dist-esm/test/sampleTest.js +11 -13
- package/dist-esm/test/sampleTest.js.map +1 -1
- package/package.json +41 -22
- package/review/arm-resourcegraph.api.md +10 -7
- package/rollup.config.js +6 -72
- package/src/index.ts +1 -0
- package/src/models/index.ts +5 -4
- package/src/operations/operations.ts +10 -5
- package/src/pagingHelper.ts +39 -0
- package/src/resourceGraphClient.ts +70 -5
- package/tsconfig.json +18 -5
- package/types/arm-resourcegraph.d.ts +15 -4
- package/types/tsdoc-metadata.json +1 -1
- package/LICENSE.txt +0 -21
- package/dist-esm/samples-dev/accessAPropertiesField.d.ts +0 -2
- package/dist-esm/samples-dev/accessAPropertiesField.d.ts.map +0 -1
- package/dist-esm/samples-dev/accessAPropertiesField.js +0 -32
- package/dist-esm/samples-dev/accessAPropertiesField.js.map +0 -1
- package/dist-esm/samples-dev/basicManagementGroupQuery.d.ts +0 -2
- package/dist-esm/samples-dev/basicManagementGroupQuery.d.ts.map +0 -1
- package/dist-esm/samples-dev/basicManagementGroupQuery.js +0 -32
- package/dist-esm/samples-dev/basicManagementGroupQuery.js.map +0 -1
- package/dist-esm/samples-dev/basicQuery.d.ts +0 -2
- package/dist-esm/samples-dev/basicQuery.d.ts.map +0 -1
- package/dist-esm/samples-dev/basicQuery.js +0 -32
- package/dist-esm/samples-dev/basicQuery.js.map +0 -1
- package/dist-esm/samples-dev/basicTenantQuery.d.ts +0 -2
- package/dist-esm/samples-dev/basicTenantQuery.d.ts.map +0 -1
- package/dist-esm/samples-dev/basicTenantQuery.js +0 -31
- package/dist-esm/samples-dev/basicTenantQuery.js.map +0 -1
- package/dist-esm/samples-dev/complexQuery.d.ts +0 -2
- package/dist-esm/samples-dev/complexQuery.d.ts.map +0 -1
- package/dist-esm/samples-dev/complexQuery.js +0 -32
- package/dist-esm/samples-dev/complexQuery.js.map +0 -1
- package/dist-esm/samples-dev/filterResources.d.ts +0 -2
- package/dist-esm/samples-dev/filterResources.d.ts.map +0 -1
- package/dist-esm/samples-dev/filterResources.js +0 -32
- package/dist-esm/samples-dev/filterResources.js.map +0 -1
- package/dist-esm/samples-dev/firstPageQuery.d.ts +0 -2
- package/dist-esm/samples-dev/firstPageQuery.d.ts.map +0 -1
- package/dist-esm/samples-dev/firstPageQuery.js +0 -33
- package/dist-esm/samples-dev/firstPageQuery.js.map +0 -1
- package/dist-esm/samples-dev/nextPageQuery.d.ts +0 -2
- package/dist-esm/samples-dev/nextPageQuery.d.ts.map +0 -1
- package/dist-esm/samples-dev/nextPageQuery.js +0 -35
- package/dist-esm/samples-dev/nextPageQuery.js.map +0 -1
- package/dist-esm/samples-dev/operationsList.d.ts +0 -2
- package/dist-esm/samples-dev/operationsList.d.ts.map +0 -1
- package/dist-esm/samples-dev/operationsList.js.map +0 -1
- package/dist-esm/samples-dev/queryWithAFacetRequest.d.ts +0 -2
- package/dist-esm/samples-dev/queryWithAFacetRequest.d.ts.map +0 -1
- package/dist-esm/samples-dev/queryWithAFacetRequest.js +0 -51
- package/dist-esm/samples-dev/queryWithAFacetRequest.js.map +0 -1
- package/dist-esm/samples-dev/randomPageQuery.d.ts +0 -2
- package/dist-esm/samples-dev/randomPageQuery.d.ts.map +0 -1
- package/dist-esm/samples-dev/randomPageQuery.js +0 -33
- package/dist-esm/samples-dev/randomPageQuery.js.map +0 -1
- package/dist-esm/samples-dev/resourceHistoryManagementGroupScopeQuery.d.ts +0 -2
- package/dist-esm/samples-dev/resourceHistoryManagementGroupScopeQuery.d.ts.map +0 -1
- package/dist-esm/samples-dev/resourceHistoryManagementGroupScopeQuery.js.map +0 -1
- package/dist-esm/samples-dev/resourceHistoryQuery.d.ts +0 -2
- package/dist-esm/samples-dev/resourceHistoryQuery.d.ts.map +0 -1
- package/dist-esm/samples-dev/resourceHistoryQuery.js +0 -38
- package/dist-esm/samples-dev/resourceHistoryQuery.js.map +0 -1
- package/dist-esm/samples-dev/summarizeResourcesByLocation.d.ts +0 -2
- package/dist-esm/samples-dev/summarizeResourcesByLocation.d.ts.map +0 -1
- package/dist-esm/samples-dev/summarizeResourcesByLocation.js +0 -32
- package/dist-esm/samples-dev/summarizeResourcesByLocation.js.map +0 -1
package/tsconfig.json
CHANGED
|
@@ -9,12 +9,25 @@
|
|
|
9
9
|
"esModuleInterop": true,
|
|
10
10
|
"allowSyntheticDefaultImports": true,
|
|
11
11
|
"forceConsistentCasingInFileNames": true,
|
|
12
|
-
"lib": [
|
|
12
|
+
"lib": [
|
|
13
|
+
"es6",
|
|
14
|
+
"dom"
|
|
15
|
+
],
|
|
13
16
|
"declaration": true,
|
|
14
17
|
"outDir": "./dist-esm",
|
|
15
18
|
"importHelpers": true,
|
|
16
|
-
"paths": {
|
|
19
|
+
"paths": {
|
|
20
|
+
"@azure/arm-resourcegraph": [
|
|
21
|
+
"./src/index"
|
|
22
|
+
]
|
|
23
|
+
}
|
|
17
24
|
},
|
|
18
|
-
"include": [
|
|
19
|
-
|
|
20
|
-
|
|
25
|
+
"include": [
|
|
26
|
+
"./src/**/*.ts",
|
|
27
|
+
"./test/**/*.ts",
|
|
28
|
+
"samples-dev/**/*.ts"
|
|
29
|
+
],
|
|
30
|
+
"exclude": [
|
|
31
|
+
"node_modules"
|
|
32
|
+
]
|
|
33
|
+
}
|
|
@@ -59,12 +59,12 @@ export declare interface Facet {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
/** A facet whose execution resulted in an error. */
|
|
62
|
-
export declare
|
|
62
|
+
export declare interface FacetError extends Facet {
|
|
63
63
|
/** Polymorphic discriminator, which specifies the different types this object can be */
|
|
64
64
|
resultType: "FacetError";
|
|
65
65
|
/** An array containing detected facet errors with details. */
|
|
66
66
|
errors: ErrorDetails[];
|
|
67
|
-
}
|
|
67
|
+
}
|
|
68
68
|
|
|
69
69
|
/** A request to compute additional statistics (facets) over the query results. */
|
|
70
70
|
export declare interface FacetRequest {
|
|
@@ -87,7 +87,7 @@ export declare interface FacetRequestOptions {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
/** Successfully executed facet containing additional statistics on the response of a query. */
|
|
90
|
-
export declare
|
|
90
|
+
export declare interface FacetResult extends Facet {
|
|
91
91
|
/** Polymorphic discriminator, which specifies the different types this object can be */
|
|
92
92
|
resultType: "FacetResult";
|
|
93
93
|
/** Number of total records in the facet results. */
|
|
@@ -96,13 +96,22 @@ export declare type FacetResult = Facet & {
|
|
|
96
96
|
count: number;
|
|
97
97
|
/** A JObject array or Table containing the desired facets. Only present if the facet is valid. */
|
|
98
98
|
data: Record<string, unknown>;
|
|
99
|
-
}
|
|
99
|
+
}
|
|
100
100
|
|
|
101
101
|
/** Defines values for FacetSortOrder. */
|
|
102
102
|
export declare type FacetSortOrder = "asc" | "desc";
|
|
103
103
|
|
|
104
104
|
export declare type FacetUnion = Facet | FacetResult | FacetError;
|
|
105
105
|
|
|
106
|
+
/**
|
|
107
|
+
* Given the last `.value` produced by the `byPage` iterator,
|
|
108
|
+
* returns a continuation token that can be used to begin paging from
|
|
109
|
+
* that point later.
|
|
110
|
+
* @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
|
|
111
|
+
* @returns The continuation token that can be passed into byPage() during future calls.
|
|
112
|
+
*/
|
|
113
|
+
export declare function getContinuationToken(page: unknown): string | undefined;
|
|
114
|
+
|
|
106
115
|
/** Resource Graph REST API operation definition. */
|
|
107
116
|
export declare interface Operation {
|
|
108
117
|
/** Operation name: {provider}/{resource}/{operation} */
|
|
@@ -202,6 +211,8 @@ export declare class ResourceGraphClient extends coreClient.ServiceClient {
|
|
|
202
211
|
* @param options The parameter options
|
|
203
212
|
*/
|
|
204
213
|
constructor(credentials: coreAuth.TokenCredential, options?: ResourceGraphClientOptionalParams);
|
|
214
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
215
|
+
private addCustomApiVersionPolicy;
|
|
205
216
|
/**
|
|
206
217
|
* Queries the resources managed by Azure Resource Manager for scopes specified in the request.
|
|
207
218
|
* @param query Request specifying query and its options.
|
package/LICENSE.txt
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2021 Microsoft
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"accessAPropertiesField.d.ts","sourceRoot":"","sources":["../../samples-dev/accessAPropertiesField.ts"],"names":[],"mappings":""}
|
|
@@ -1,32 +0,0 @@
|
|
|
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
|
-
/**
|
|
12
|
-
* This sample demonstrates how to Queries the resources managed by Azure Resource Manager for scopes specified in the request.
|
|
13
|
-
*
|
|
14
|
-
* @summary Queries the resources managed by Azure Resource Manager for scopes specified in the request.
|
|
15
|
-
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2021-06-01-preview/examples/ResourcesPropertiesQuery.json
|
|
16
|
-
*/
|
|
17
|
-
import { ResourceGraphClient } from "@azure/arm-resourcegraph";
|
|
18
|
-
import { DefaultAzureCredential } from "@azure/identity";
|
|
19
|
-
function accessAPropertiesField() {
|
|
20
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const query = {
|
|
22
|
-
query: "Resources | where type =~ 'Microsoft.Compute/virtualMachines' | summarize count() by tostring(properties.storageProfile.osDisk.osType)",
|
|
23
|
-
subscriptions: ["cfbbd179-59d2-4052-aa06-9270a38aa9d6"]
|
|
24
|
-
};
|
|
25
|
-
const credential = new DefaultAzureCredential();
|
|
26
|
-
const client = new ResourceGraphClient(credential);
|
|
27
|
-
const result = yield client.resources(query);
|
|
28
|
-
console.log(result);
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
accessAPropertiesField().catch(console.error);
|
|
32
|
-
//# sourceMappingURL=accessAPropertiesField.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"accessAPropertiesField.js","sourceRoot":"","sources":["../../samples-dev/accessAPropertiesField.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC;;;;;GAKG;AACH,OAAO,EAAgB,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,SAAe,sBAAsB;;QACnC,MAAM,KAAK,GAAiB;YAC1B,KAAK,EACH,wIAAwI;YAC1I,aAAa,EAAE,CAAC,sCAAsC,CAAC;SACxD,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,UAAU,CAAC,CAAC;QACnD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC7C,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,sBAAsB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"basicManagementGroupQuery.d.ts","sourceRoot":"","sources":["../../samples-dev/basicManagementGroupQuery.ts"],"names":[],"mappings":""}
|
|
@@ -1,32 +0,0 @@
|
|
|
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
|
-
/**
|
|
12
|
-
* This sample demonstrates how to Queries the resources managed by Azure Resource Manager for scopes specified in the request.
|
|
13
|
-
*
|
|
14
|
-
* @summary Queries the resources managed by Azure Resource Manager for scopes specified in the request.
|
|
15
|
-
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2021-06-01-preview/examples/ResourcesMgBasicQuery.json
|
|
16
|
-
*/
|
|
17
|
-
import { ResourceGraphClient } from "@azure/arm-resourcegraph";
|
|
18
|
-
import { DefaultAzureCredential } from "@azure/identity";
|
|
19
|
-
function basicManagementGroupQuery() {
|
|
20
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const query = {
|
|
22
|
-
managementGroups: ["e927f598-c1d4-4f72-8541-95d83a6a4ac8", "ProductionMG"],
|
|
23
|
-
query: "Resources | project id, name, type, location, tags | limit 3"
|
|
24
|
-
};
|
|
25
|
-
const credential = new DefaultAzureCredential();
|
|
26
|
-
const client = new ResourceGraphClient(credential);
|
|
27
|
-
const result = yield client.resources(query);
|
|
28
|
-
console.log(result);
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
basicManagementGroupQuery().catch(console.error);
|
|
32
|
-
//# sourceMappingURL=basicManagementGroupQuery.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"basicManagementGroupQuery.js","sourceRoot":"","sources":["../../samples-dev/basicManagementGroupQuery.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC;;;;;GAKG;AACH,OAAO,EAAgB,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,SAAe,yBAAyB;;QACtC,MAAM,KAAK,GAAiB;YAC1B,gBAAgB,EAAE,CAAC,sCAAsC,EAAE,cAAc,CAAC;YAC1E,KAAK,EAAE,8DAA8D;SACtE,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,UAAU,CAAC,CAAC;QACnD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC7C,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,yBAAyB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"basicQuery.d.ts","sourceRoot":"","sources":["../../samples-dev/basicQuery.ts"],"names":[],"mappings":""}
|
|
@@ -1,32 +0,0 @@
|
|
|
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
|
-
/**
|
|
12
|
-
* This sample demonstrates how to Queries the resources managed by Azure Resource Manager for scopes specified in the request.
|
|
13
|
-
*
|
|
14
|
-
* @summary Queries the resources managed by Azure Resource Manager for scopes specified in the request.
|
|
15
|
-
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2021-06-01-preview/examples/ResourcesBasicQuery.json
|
|
16
|
-
*/
|
|
17
|
-
import { ResourceGraphClient } from "@azure/arm-resourcegraph";
|
|
18
|
-
import { DefaultAzureCredential } from "@azure/identity";
|
|
19
|
-
function basicQuery() {
|
|
20
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const query = {
|
|
22
|
-
query: "Resources | project id, name, type, location, tags | limit 3",
|
|
23
|
-
subscriptions: ["cfbbd179-59d2-4052-aa06-9270a38aa9d6"]
|
|
24
|
-
};
|
|
25
|
-
const credential = new DefaultAzureCredential();
|
|
26
|
-
const client = new ResourceGraphClient(credential);
|
|
27
|
-
const result = yield client.resources(query);
|
|
28
|
-
console.log(result);
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
basicQuery().catch(console.error);
|
|
32
|
-
//# sourceMappingURL=basicQuery.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"basicQuery.js","sourceRoot":"","sources":["../../samples-dev/basicQuery.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC;;;;;GAKG;AACH,OAAO,EAAgB,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,SAAe,UAAU;;QACvB,MAAM,KAAK,GAAiB;YAC1B,KAAK,EAAE,8DAA8D;YACrE,aAAa,EAAE,CAAC,sCAAsC,CAAC;SACxD,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,UAAU,CAAC,CAAC;QACnD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC7C,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,UAAU,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"basicTenantQuery.d.ts","sourceRoot":"","sources":["../../samples-dev/basicTenantQuery.ts"],"names":[],"mappings":""}
|
|
@@ -1,31 +0,0 @@
|
|
|
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
|
-
/**
|
|
12
|
-
* This sample demonstrates how to Queries the resources managed by Azure Resource Manager for scopes specified in the request.
|
|
13
|
-
*
|
|
14
|
-
* @summary Queries the resources managed by Azure Resource Manager for scopes specified in the request.
|
|
15
|
-
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2021-06-01-preview/examples/ResourcesTenantBasicQuery.json
|
|
16
|
-
*/
|
|
17
|
-
import { ResourceGraphClient } from "@azure/arm-resourcegraph";
|
|
18
|
-
import { DefaultAzureCredential } from "@azure/identity";
|
|
19
|
-
function basicTenantQuery() {
|
|
20
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const query = {
|
|
22
|
-
query: "Resources | project id, name, type, location, tags | limit 3"
|
|
23
|
-
};
|
|
24
|
-
const credential = new DefaultAzureCredential();
|
|
25
|
-
const client = new ResourceGraphClient(credential);
|
|
26
|
-
const result = yield client.resources(query);
|
|
27
|
-
console.log(result);
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
basicTenantQuery().catch(console.error);
|
|
31
|
-
//# sourceMappingURL=basicTenantQuery.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"basicTenantQuery.js","sourceRoot":"","sources":["../../samples-dev/basicTenantQuery.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC;;;;;GAKG;AACH,OAAO,EAAgB,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,SAAe,gBAAgB;;QAC7B,MAAM,KAAK,GAAiB;YAC1B,KAAK,EAAE,8DAA8D;SACtE,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,UAAU,CAAC,CAAC;QACnD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC7C,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,gBAAgB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"complexQuery.d.ts","sourceRoot":"","sources":["../../samples-dev/complexQuery.ts"],"names":[],"mappings":""}
|
|
@@ -1,32 +0,0 @@
|
|
|
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
|
-
/**
|
|
12
|
-
* This sample demonstrates how to Queries the resources managed by Azure Resource Manager for scopes specified in the request.
|
|
13
|
-
*
|
|
14
|
-
* @summary Queries the resources managed by Azure Resource Manager for scopes specified in the request.
|
|
15
|
-
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2021-06-01-preview/examples/ResourcesComplexQuery.json
|
|
16
|
-
*/
|
|
17
|
-
import { ResourceGraphClient } from "@azure/arm-resourcegraph";
|
|
18
|
-
import { DefaultAzureCredential } from "@azure/identity";
|
|
19
|
-
function complexQuery() {
|
|
20
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const query = {
|
|
22
|
-
query: "Resources | project id, name, type, location | where type =~ 'Microsoft.Compute/virtualMachines' | summarize count() by location | top 3 by count_",
|
|
23
|
-
subscriptions: ["cfbbd179-59d2-4052-aa06-9270a38aa9d6"]
|
|
24
|
-
};
|
|
25
|
-
const credential = new DefaultAzureCredential();
|
|
26
|
-
const client = new ResourceGraphClient(credential);
|
|
27
|
-
const result = yield client.resources(query);
|
|
28
|
-
console.log(result);
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
complexQuery().catch(console.error);
|
|
32
|
-
//# sourceMappingURL=complexQuery.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"complexQuery.js","sourceRoot":"","sources":["../../samples-dev/complexQuery.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC;;;;;GAKG;AACH,OAAO,EAAgB,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,SAAe,YAAY;;QACzB,MAAM,KAAK,GAAiB;YAC1B,KAAK,EACH,oJAAoJ;YACtJ,aAAa,EAAE,CAAC,sCAAsC,CAAC;SACxD,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,UAAU,CAAC,CAAC;QACnD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC7C,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,YAAY,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filterResources.d.ts","sourceRoot":"","sources":["../../samples-dev/filterResources.ts"],"names":[],"mappings":""}
|
|
@@ -1,32 +0,0 @@
|
|
|
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
|
-
/**
|
|
12
|
-
* This sample demonstrates how to Queries the resources managed by Azure Resource Manager for scopes specified in the request.
|
|
13
|
-
*
|
|
14
|
-
* @summary Queries the resources managed by Azure Resource Manager for scopes specified in the request.
|
|
15
|
-
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2021-06-01-preview/examples/ResourcesFilterQuery.json
|
|
16
|
-
*/
|
|
17
|
-
import { ResourceGraphClient } from "@azure/arm-resourcegraph";
|
|
18
|
-
import { DefaultAzureCredential } from "@azure/identity";
|
|
19
|
-
function filterResources() {
|
|
20
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const query = {
|
|
22
|
-
query: "Resources | project id, name, type, location | where type =~ 'Microsoft.Compute/virtualMachines' | limit 3",
|
|
23
|
-
subscriptions: ["cfbbd179-59d2-4052-aa06-9270a38aa9d6"]
|
|
24
|
-
};
|
|
25
|
-
const credential = new DefaultAzureCredential();
|
|
26
|
-
const client = new ResourceGraphClient(credential);
|
|
27
|
-
const result = yield client.resources(query);
|
|
28
|
-
console.log(result);
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
filterResources().catch(console.error);
|
|
32
|
-
//# sourceMappingURL=filterResources.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filterResources.js","sourceRoot":"","sources":["../../samples-dev/filterResources.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC;;;;;GAKG;AACH,OAAO,EAAgB,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,SAAe,eAAe;;QAC5B,MAAM,KAAK,GAAiB;YAC1B,KAAK,EACH,4GAA4G;YAC9G,aAAa,EAAE,CAAC,sCAAsC,CAAC;SACxD,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,UAAU,CAAC,CAAC;QACnD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC7C,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,eAAe,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"firstPageQuery.d.ts","sourceRoot":"","sources":["../../samples-dev/firstPageQuery.ts"],"names":[],"mappings":""}
|
|
@@ -1,33 +0,0 @@
|
|
|
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
|
-
/**
|
|
12
|
-
* This sample demonstrates how to Queries the resources managed by Azure Resource Manager for scopes specified in the request.
|
|
13
|
-
*
|
|
14
|
-
* @summary Queries the resources managed by Azure Resource Manager for scopes specified in the request.
|
|
15
|
-
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2021-06-01-preview/examples/ResourcesFirstPageQuery.json
|
|
16
|
-
*/
|
|
17
|
-
import { ResourceGraphClient } from "@azure/arm-resourcegraph";
|
|
18
|
-
import { DefaultAzureCredential } from "@azure/identity";
|
|
19
|
-
function firstPageQuery() {
|
|
20
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const query = {
|
|
22
|
-
options: { skip: 0, top: 3 },
|
|
23
|
-
query: "Resources | where name contains 'test' | project id, name, type, location",
|
|
24
|
-
subscriptions: ["cfbbd179-59d2-4052-aa06-9270a38aa9d6"]
|
|
25
|
-
};
|
|
26
|
-
const credential = new DefaultAzureCredential();
|
|
27
|
-
const client = new ResourceGraphClient(credential);
|
|
28
|
-
const result = yield client.resources(query);
|
|
29
|
-
console.log(result);
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
firstPageQuery().catch(console.error);
|
|
33
|
-
//# sourceMappingURL=firstPageQuery.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"firstPageQuery.js","sourceRoot":"","sources":["../../samples-dev/firstPageQuery.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC;;;;;GAKG;AACH,OAAO,EAAgB,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,SAAe,cAAc;;QAC3B,MAAM,KAAK,GAAiB;YAC1B,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE;YAC5B,KAAK,EACH,2EAA2E;YAC7E,aAAa,EAAE,CAAC,sCAAsC,CAAC;SACxD,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,UAAU,CAAC,CAAC;QACnD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC7C,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,cAAc,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nextPageQuery.d.ts","sourceRoot":"","sources":["../../samples-dev/nextPageQuery.ts"],"names":[],"mappings":""}
|
|
@@ -1,35 +0,0 @@
|
|
|
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
|
-
/**
|
|
12
|
-
* This sample demonstrates how to Queries the resources managed by Azure Resource Manager for scopes specified in the request.
|
|
13
|
-
*
|
|
14
|
-
* @summary Queries the resources managed by Azure Resource Manager for scopes specified in the request.
|
|
15
|
-
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2021-06-01-preview/examples/ResourcesNextPageQuery.json
|
|
16
|
-
*/
|
|
17
|
-
import { ResourceGraphClient } from "@azure/arm-resourcegraph";
|
|
18
|
-
import { DefaultAzureCredential } from "@azure/identity";
|
|
19
|
-
function nextPageQuery() {
|
|
20
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const query = {
|
|
22
|
-
options: {
|
|
23
|
-
skipToken: "eyAibm8iOiAibHVjayIsICJidXQiOiAibmljZSIsICJ0cnkiOiAiISIgfQ=="
|
|
24
|
-
},
|
|
25
|
-
query: "Resources | where name contains 'test' | project id, name, type, location",
|
|
26
|
-
subscriptions: ["cfbbd179-59d2-4052-aa06-9270a38aa9d6"]
|
|
27
|
-
};
|
|
28
|
-
const credential = new DefaultAzureCredential();
|
|
29
|
-
const client = new ResourceGraphClient(credential);
|
|
30
|
-
const result = yield client.resources(query);
|
|
31
|
-
console.log(result);
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
nextPageQuery().catch(console.error);
|
|
35
|
-
//# sourceMappingURL=nextPageQuery.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nextPageQuery.js","sourceRoot":"","sources":["../../samples-dev/nextPageQuery.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC;;;;;GAKG;AACH,OAAO,EAAgB,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,SAAe,aAAa;;QAC1B,MAAM,KAAK,GAAiB;YAC1B,OAAO,EAAE;gBACP,SAAS,EAAE,8DAA8D;aAC1E;YACD,KAAK,EACH,2EAA2E;YAC7E,aAAa,EAAE,CAAC,sCAAsC,CAAC;SACxD,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,UAAU,CAAC,CAAC;QACnD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC7C,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,aAAa,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operationsList.d.ts","sourceRoot":"","sources":["../../samples-dev/operationsList.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operationsList.js","sourceRoot":"","sources":["../../samples-dev/operationsList.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC;;;;;GAKG;AACH,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,SAAe,cAAc;;;QAC3B,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,UAAU,CAAC,CAAC;QACnD,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAE,CAAC;;YAC7B,KAAuB,IAAA,KAAA,cAAA,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,CAAA,IAAA;gBAApC,IAAI,IAAI,WAAA,CAAA;gBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACrB;;;;;;;;;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;;CACvB;AAED,cAAc,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"queryWithAFacetRequest.d.ts","sourceRoot":"","sources":["../../samples-dev/queryWithAFacetRequest.ts"],"names":[],"mappings":""}
|
|
@@ -1,51 +0,0 @@
|
|
|
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
|
-
/**
|
|
12
|
-
* This sample demonstrates how to Queries the resources managed by Azure Resource Manager for scopes specified in the request.
|
|
13
|
-
*
|
|
14
|
-
* @summary Queries the resources managed by Azure Resource Manager for scopes specified in the request.
|
|
15
|
-
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2021-06-01-preview/examples/ResourcesFacetQuery.json
|
|
16
|
-
*/
|
|
17
|
-
import { ResourceGraphClient } from "@azure/arm-resourcegraph";
|
|
18
|
-
import { DefaultAzureCredential } from "@azure/identity";
|
|
19
|
-
function queryWithAFacetRequest() {
|
|
20
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const query = {
|
|
22
|
-
facets: [
|
|
23
|
-
{ expression: "location", options: { top: 3, sortOrder: "desc" } },
|
|
24
|
-
{
|
|
25
|
-
expression: "properties.storageProfile.osDisk.osType",
|
|
26
|
-
options: { top: 3, sortOrder: "desc" }
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
expression: "nonExistingColumn",
|
|
30
|
-
options: { top: 3, sortOrder: "desc" }
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
expression: "resourceGroup",
|
|
34
|
-
options: { top: 3, sortBy: "tolower(resourceGroup)", sortOrder: "asc" }
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
expression: "resourceGroup",
|
|
38
|
-
options: { top: 3, filter: "resourceGroup contains 'test'" }
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
|
-
query: "Resources | where type =~ 'Microsoft.Compute/virtualMachines' | project id, name, location, resourceGroup, properties.storageProfile.osDisk.osType | limit 5",
|
|
42
|
-
subscriptions: ["cfbbd179-59d2-4052-aa06-9270a38aa9d6"]
|
|
43
|
-
};
|
|
44
|
-
const credential = new DefaultAzureCredential();
|
|
45
|
-
const client = new ResourceGraphClient(credential);
|
|
46
|
-
const result = yield client.resources(query);
|
|
47
|
-
console.log(result);
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
queryWithAFacetRequest().catch(console.error);
|
|
51
|
-
//# sourceMappingURL=queryWithAFacetRequest.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"queryWithAFacetRequest.js","sourceRoot":"","sources":["../../samples-dev/queryWithAFacetRequest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC;;;;;GAKG;AACH,OAAO,EAAgB,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,SAAe,sBAAsB;;QACnC,MAAM,KAAK,GAAiB;YAC1B,MAAM,EAAE;gBACN,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE;gBAClE;oBACE,UAAU,EAAE,yCAAyC;oBACrD,OAAO,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE;iBACvC;gBACD;oBACE,UAAU,EAAE,mBAAmB;oBAC/B,OAAO,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE;iBACvC;gBACD;oBACE,UAAU,EAAE,eAAe;oBAC3B,OAAO,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,wBAAwB,EAAE,SAAS,EAAE,KAAK,EAAE;iBACxE;gBACD;oBACE,UAAU,EAAE,eAAe;oBAC3B,OAAO,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,+BAA+B,EAAE;iBAC7D;aACF;YACD,KAAK,EACH,8JAA8J;YAChK,aAAa,EAAE,CAAC,sCAAsC,CAAC;SACxD,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,UAAU,CAAC,CAAC;QACnD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC7C,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,sBAAsB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"randomPageQuery.d.ts","sourceRoot":"","sources":["../../samples-dev/randomPageQuery.ts"],"names":[],"mappings":""}
|
|
@@ -1,33 +0,0 @@
|
|
|
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
|
-
/**
|
|
12
|
-
* This sample demonstrates how to Queries the resources managed by Azure Resource Manager for scopes specified in the request.
|
|
13
|
-
*
|
|
14
|
-
* @summary Queries the resources managed by Azure Resource Manager for scopes specified in the request.
|
|
15
|
-
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2021-06-01-preview/examples/ResourcesRandomPageQuery.json
|
|
16
|
-
*/
|
|
17
|
-
import { ResourceGraphClient } from "@azure/arm-resourcegraph";
|
|
18
|
-
import { DefaultAzureCredential } from "@azure/identity";
|
|
19
|
-
function randomPageQuery() {
|
|
20
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const query = {
|
|
22
|
-
options: { skip: 10, top: 2 },
|
|
23
|
-
query: "Resources | where name contains 'test' | project id, name, type, location",
|
|
24
|
-
subscriptions: ["cfbbd179-59d2-4052-aa06-9270a38aa9d6"]
|
|
25
|
-
};
|
|
26
|
-
const credential = new DefaultAzureCredential();
|
|
27
|
-
const client = new ResourceGraphClient(credential);
|
|
28
|
-
const result = yield client.resources(query);
|
|
29
|
-
console.log(result);
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
randomPageQuery().catch(console.error);
|
|
33
|
-
//# sourceMappingURL=randomPageQuery.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"randomPageQuery.js","sourceRoot":"","sources":["../../samples-dev/randomPageQuery.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC;;;;;GAKG;AACH,OAAO,EAAgB,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,SAAe,eAAe;;QAC5B,MAAM,KAAK,GAAiB;YAC1B,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE;YAC7B,KAAK,EACH,2EAA2E;YAC7E,aAAa,EAAE,CAAC,sCAAsC,CAAC;SACxD,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,UAAU,CAAC,CAAC;QACnD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC7C,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,eAAe,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resourceHistoryManagementGroupScopeQuery.d.ts","sourceRoot":"","sources":["../../samples-dev/resourceHistoryManagementGroupScopeQuery.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resourceHistoryManagementGroupScopeQuery.js","sourceRoot":"","sources":["../../samples-dev/resourceHistoryManagementGroupScopeQuery.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC;;;;;GAKG;AACH,OAAO,EAEL,mBAAmB,EACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,SAAe,wCAAwC;;QACrD,MAAM,OAAO,GAA4B;YACvC,gBAAgB,EAAE,CAAC,sCAAsC,EAAE,cAAc,CAAC;YAC1E,OAAO,EAAE;gBACP,QAAQ,EAAE;oBACR,GAAG,EAAE,IAAI,IAAI,CAAC,8BAA8B,CAAC;oBAC7C,KAAK,EAAE,IAAI,IAAI,CAAC,8BAA8B,CAAC;iBAChD;aACF;YACD,KAAK,EAAE,gEAAgE;SACxE,CAAC;QACF,MAAM,UAAU,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,UAAU,CAAC,CAAC;QACnD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QACtD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CAAA;AAED,wCAAwC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|