@azure/arm-dashboard 1.0.0-beta.1
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 +5 -0
- package/LICENSE +21 -0
- package/README.md +109 -0
- package/dist/index.js +1372 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/samples-dev/grafanaCreateSample.d.ts +2 -0
- package/dist-esm/samples-dev/grafanaCreateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/grafanaCreateSample.js +38 -0
- package/dist-esm/samples-dev/grafanaCreateSample.js.map +1 -0
- package/dist-esm/samples-dev/grafanaDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/grafanaDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/grafanaDeleteSample.js +31 -0
- package/dist-esm/samples-dev/grafanaDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/grafanaGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/grafanaGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/grafanaGetSample.js +31 -0
- package/dist-esm/samples-dev/grafanaGetSample.js.map +1 -0
- package/dist-esm/samples-dev/grafanaListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/grafanaListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/grafanaListByResourceGroupSample.js +44 -0
- package/dist-esm/samples-dev/grafanaListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/grafanaListSample.d.ts +2 -0
- package/dist-esm/samples-dev/grafanaListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/grafanaListSample.js +43 -0
- package/dist-esm/samples-dev/grafanaListSample.js.map +1 -0
- package/dist-esm/samples-dev/grafanaUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/grafanaUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/grafanaUpdateSample.js +34 -0
- package/dist-esm/samples-dev/grafanaUpdateSample.js.map +1 -0
- 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/operationsListSample.js +43 -0
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
- package/dist-esm/src/dashboardManagementClient.d.ts +20 -0
- package/dist-esm/src/dashboardManagementClient.d.ts.map +1 -0
- package/dist-esm/src/dashboardManagementClient.js +71 -0
- package/dist-esm/src/dashboardManagementClient.js.map +1 -0
- package/dist-esm/src/index.d.ts +5 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +12 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +16 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +29 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +414 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +66 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +16 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +485 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +12 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +108 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/grafana.d.ts +101 -0
- package/dist-esm/src/operations/grafana.d.ts.map +1 -0
- package/dist-esm/src/operations/grafana.js +458 -0
- package/dist-esm/src/operations/grafana.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +3 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +10 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +32 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +120 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/grafana.d.ts +65 -0
- package/dist-esm/src/operationsInterfaces/grafana.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/grafana.js +9 -0
- package/dist-esm/src/operationsInterfaces/grafana.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +3 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +10 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.js +9 -0
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/test/sampleTest.d.ts +2 -0
- package/dist-esm/test/sampleTest.d.ts.map +1 -0
- package/dist-esm/test/sampleTest.js +40 -0
- package/dist-esm/test/sampleTest.js.map +1 -0
- package/package.json +118 -0
- package/review/arm-dashboard.api.md +355 -0
- package/rollup.config.js +122 -0
- package/src/dashboardManagementClient.ts +103 -0
- package/src/index.ts +12 -0
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +467 -0
- package/src/models/mappers.ts +500 -0
- package/src/models/parameters.ts +126 -0
- package/src/operations/grafana.ts +595 -0
- package/src/operations/index.ts +10 -0
- package/src/operations/operations.ts +137 -0
- package/src/operationsInterfaces/grafana.ts +120 -0
- package/src/operationsInterfaces/index.ts +10 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/tsconfig.json +33 -0
- package/types/arm-dashboard.d.ts +556 -0
- package/types/tsdoc-metadata.json +11 -0
|
@@ -0,0 +1,137 @@
|
|
|
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
|
+
|
|
9
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { Operations } from "../operationsInterfaces";
|
|
11
|
+
import * as coreClient from "@azure/core-client";
|
|
12
|
+
import * as Mappers from "../models/mappers";
|
|
13
|
+
import * as Parameters from "../models/parameters";
|
|
14
|
+
import { DashboardManagementClient } from "../dashboardManagementClient";
|
|
15
|
+
import {
|
|
16
|
+
OperationResult,
|
|
17
|
+
OperationsListNextOptionalParams,
|
|
18
|
+
OperationsListOptionalParams,
|
|
19
|
+
OperationsListResponse,
|
|
20
|
+
OperationsListNextResponse
|
|
21
|
+
} from "../models";
|
|
22
|
+
|
|
23
|
+
/// <reference lib="esnext.asynciterable" />
|
|
24
|
+
/** Class containing Operations operations. */
|
|
25
|
+
export class OperationsImpl implements Operations {
|
|
26
|
+
private readonly client: DashboardManagementClient;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Initialize a new instance of the class Operations class.
|
|
30
|
+
* @param client Reference to the service client
|
|
31
|
+
*/
|
|
32
|
+
constructor(client: DashboardManagementClient) {
|
|
33
|
+
this.client = client;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* List all available API operations provided by Microsoft.Dashboard.
|
|
38
|
+
* @param options The options parameters.
|
|
39
|
+
*/
|
|
40
|
+
public list(
|
|
41
|
+
options?: OperationsListOptionalParams
|
|
42
|
+
): PagedAsyncIterableIterator<OperationResult> {
|
|
43
|
+
const iter = this.listPagingAll(options);
|
|
44
|
+
return {
|
|
45
|
+
next() {
|
|
46
|
+
return iter.next();
|
|
47
|
+
},
|
|
48
|
+
[Symbol.asyncIterator]() {
|
|
49
|
+
return this;
|
|
50
|
+
},
|
|
51
|
+
byPage: () => {
|
|
52
|
+
return this.listPagingPage(options);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
private async *listPagingPage(
|
|
58
|
+
options?: OperationsListOptionalParams
|
|
59
|
+
): AsyncIterableIterator<OperationResult[]> {
|
|
60
|
+
let result = await this._list(options);
|
|
61
|
+
yield result.value || [];
|
|
62
|
+
let continuationToken = result.nextLink;
|
|
63
|
+
while (continuationToken) {
|
|
64
|
+
result = await this._listNext(continuationToken, options);
|
|
65
|
+
continuationToken = result.nextLink;
|
|
66
|
+
yield result.value || [];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
private async *listPagingAll(
|
|
71
|
+
options?: OperationsListOptionalParams
|
|
72
|
+
): AsyncIterableIterator<OperationResult> {
|
|
73
|
+
for await (const page of this.listPagingPage(options)) {
|
|
74
|
+
yield* page;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* List all available API operations provided by Microsoft.Dashboard.
|
|
80
|
+
* @param options The options parameters.
|
|
81
|
+
*/
|
|
82
|
+
private _list(
|
|
83
|
+
options?: OperationsListOptionalParams
|
|
84
|
+
): Promise<OperationsListResponse> {
|
|
85
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* ListNext
|
|
90
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
91
|
+
* @param options The options parameters.
|
|
92
|
+
*/
|
|
93
|
+
private _listNext(
|
|
94
|
+
nextLink: string,
|
|
95
|
+
options?: OperationsListNextOptionalParams
|
|
96
|
+
): Promise<OperationsListNextResponse> {
|
|
97
|
+
return this.client.sendOperationRequest(
|
|
98
|
+
{ nextLink, options },
|
|
99
|
+
listNextOperationSpec
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
// Operation Specifications
|
|
104
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
105
|
+
|
|
106
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
107
|
+
path: "/providers/Microsoft.Dashboard/operations",
|
|
108
|
+
httpMethod: "GET",
|
|
109
|
+
responses: {
|
|
110
|
+
200: {
|
|
111
|
+
bodyMapper: Mappers.OperationListResult
|
|
112
|
+
},
|
|
113
|
+
default: {
|
|
114
|
+
bodyMapper: Mappers.ErrorResponse
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
queryParameters: [Parameters.apiVersion],
|
|
118
|
+
urlParameters: [Parameters.$host],
|
|
119
|
+
headerParameters: [Parameters.accept],
|
|
120
|
+
serializer
|
|
121
|
+
};
|
|
122
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
123
|
+
path: "{nextLink}",
|
|
124
|
+
httpMethod: "GET",
|
|
125
|
+
responses: {
|
|
126
|
+
200: {
|
|
127
|
+
bodyMapper: Mappers.OperationListResult
|
|
128
|
+
},
|
|
129
|
+
default: {
|
|
130
|
+
bodyMapper: Mappers.ErrorResponse
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
queryParameters: [Parameters.apiVersion],
|
|
134
|
+
urlParameters: [Parameters.$host, Parameters.nextLink],
|
|
135
|
+
headerParameters: [Parameters.accept],
|
|
136
|
+
serializer
|
|
137
|
+
};
|
|
@@ -0,0 +1,120 @@
|
|
|
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
|
+
|
|
9
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { PollerLike, PollOperationState } from "@azure/core-lro";
|
|
11
|
+
import {
|
|
12
|
+
ManagedGrafana,
|
|
13
|
+
GrafanaListOptionalParams,
|
|
14
|
+
GrafanaListByResourceGroupOptionalParams,
|
|
15
|
+
GrafanaGetOptionalParams,
|
|
16
|
+
GrafanaGetResponse,
|
|
17
|
+
GrafanaCreateOptionalParams,
|
|
18
|
+
GrafanaCreateResponse,
|
|
19
|
+
ManagedGrafanaUpdateParameters,
|
|
20
|
+
GrafanaUpdateOptionalParams,
|
|
21
|
+
GrafanaUpdateResponse,
|
|
22
|
+
GrafanaDeleteOptionalParams
|
|
23
|
+
} from "../models";
|
|
24
|
+
|
|
25
|
+
/// <reference lib="esnext.asynciterable" />
|
|
26
|
+
/** Interface representing a Grafana. */
|
|
27
|
+
export interface Grafana {
|
|
28
|
+
/**
|
|
29
|
+
* List all resources of workspaces for Grafana under the specified subscription.
|
|
30
|
+
* @param options The options parameters.
|
|
31
|
+
*/
|
|
32
|
+
list(
|
|
33
|
+
options?: GrafanaListOptionalParams
|
|
34
|
+
): PagedAsyncIterableIterator<ManagedGrafana>;
|
|
35
|
+
/**
|
|
36
|
+
* List all resources of workspaces for Grafana under the specified resource group.
|
|
37
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
38
|
+
* @param options The options parameters.
|
|
39
|
+
*/
|
|
40
|
+
listByResourceGroup(
|
|
41
|
+
resourceGroupName: string,
|
|
42
|
+
options?: GrafanaListByResourceGroupOptionalParams
|
|
43
|
+
): PagedAsyncIterableIterator<ManagedGrafana>;
|
|
44
|
+
/**
|
|
45
|
+
* Get the properties of a specific workspace for Grafana resource.
|
|
46
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
47
|
+
* @param workspaceName The workspace name of Azure Managed Grafana.
|
|
48
|
+
* @param options The options parameters.
|
|
49
|
+
*/
|
|
50
|
+
get(
|
|
51
|
+
resourceGroupName: string,
|
|
52
|
+
workspaceName: string,
|
|
53
|
+
options?: GrafanaGetOptionalParams
|
|
54
|
+
): Promise<GrafanaGetResponse>;
|
|
55
|
+
/**
|
|
56
|
+
* Create or update a workspace for Grafana resource. This API is idempotent, so user can either create
|
|
57
|
+
* a new grafana or update an existing grafana.
|
|
58
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
59
|
+
* @param workspaceName The workspace name of Azure Managed Grafana.
|
|
60
|
+
* @param requestBodyParameters The grafana resource type.
|
|
61
|
+
* @param options The options parameters.
|
|
62
|
+
*/
|
|
63
|
+
beginCreate(
|
|
64
|
+
resourceGroupName: string,
|
|
65
|
+
workspaceName: string,
|
|
66
|
+
requestBodyParameters: ManagedGrafana,
|
|
67
|
+
options?: GrafanaCreateOptionalParams
|
|
68
|
+
): Promise<
|
|
69
|
+
PollerLike<PollOperationState<GrafanaCreateResponse>, GrafanaCreateResponse>
|
|
70
|
+
>;
|
|
71
|
+
/**
|
|
72
|
+
* Create or update a workspace for Grafana resource. This API is idempotent, so user can either create
|
|
73
|
+
* a new grafana or update an existing grafana.
|
|
74
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
75
|
+
* @param workspaceName The workspace name of Azure Managed Grafana.
|
|
76
|
+
* @param requestBodyParameters The grafana resource type.
|
|
77
|
+
* @param options The options parameters.
|
|
78
|
+
*/
|
|
79
|
+
beginCreateAndWait(
|
|
80
|
+
resourceGroupName: string,
|
|
81
|
+
workspaceName: string,
|
|
82
|
+
requestBodyParameters: ManagedGrafana,
|
|
83
|
+
options?: GrafanaCreateOptionalParams
|
|
84
|
+
): Promise<GrafanaCreateResponse>;
|
|
85
|
+
/**
|
|
86
|
+
* Update a workspace for Grafana resource.
|
|
87
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
88
|
+
* @param workspaceName The workspace name of Azure Managed Grafana.
|
|
89
|
+
* @param requestBodyParameters The parameters for a PATCH request to a grafana resource.
|
|
90
|
+
* @param options The options parameters.
|
|
91
|
+
*/
|
|
92
|
+
update(
|
|
93
|
+
resourceGroupName: string,
|
|
94
|
+
workspaceName: string,
|
|
95
|
+
requestBodyParameters: ManagedGrafanaUpdateParameters,
|
|
96
|
+
options?: GrafanaUpdateOptionalParams
|
|
97
|
+
): Promise<GrafanaUpdateResponse>;
|
|
98
|
+
/**
|
|
99
|
+
* Delete a workspace for Grafana resource.
|
|
100
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
101
|
+
* @param workspaceName The workspace name of Azure Managed Grafana.
|
|
102
|
+
* @param options The options parameters.
|
|
103
|
+
*/
|
|
104
|
+
beginDelete(
|
|
105
|
+
resourceGroupName: string,
|
|
106
|
+
workspaceName: string,
|
|
107
|
+
options?: GrafanaDeleteOptionalParams
|
|
108
|
+
): Promise<PollerLike<PollOperationState<void>, void>>;
|
|
109
|
+
/**
|
|
110
|
+
* Delete a workspace for Grafana resource.
|
|
111
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
112
|
+
* @param workspaceName The workspace name of Azure Managed Grafana.
|
|
113
|
+
* @param options The options parameters.
|
|
114
|
+
*/
|
|
115
|
+
beginDeleteAndWait(
|
|
116
|
+
resourceGroupName: string,
|
|
117
|
+
workspaceName: string,
|
|
118
|
+
options?: GrafanaDeleteOptionalParams
|
|
119
|
+
): Promise<void>;
|
|
120
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
|
|
9
|
+
export * from "./operations";
|
|
10
|
+
export * from "./grafana";
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
|
|
9
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { OperationResult, OperationsListOptionalParams } from "../models";
|
|
11
|
+
|
|
12
|
+
/// <reference lib="esnext.asynciterable" />
|
|
13
|
+
/** Interface representing a Operations. */
|
|
14
|
+
export interface Operations {
|
|
15
|
+
/**
|
|
16
|
+
* List all available API operations provided by Microsoft.Dashboard.
|
|
17
|
+
* @param options The options parameters.
|
|
18
|
+
*/
|
|
19
|
+
list(
|
|
20
|
+
options?: OperationsListOptionalParams
|
|
21
|
+
): PagedAsyncIterableIterator<OperationResult>;
|
|
22
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "es6",
|
|
4
|
+
"moduleResolution": "node",
|
|
5
|
+
"strict": true,
|
|
6
|
+
"target": "es6",
|
|
7
|
+
"sourceMap": true,
|
|
8
|
+
"declarationMap": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"allowSyntheticDefaultImports": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true,
|
|
12
|
+
"lib": [
|
|
13
|
+
"es6",
|
|
14
|
+
"dom"
|
|
15
|
+
],
|
|
16
|
+
"declaration": true,
|
|
17
|
+
"outDir": "./dist-esm",
|
|
18
|
+
"importHelpers": true,
|
|
19
|
+
"paths": {
|
|
20
|
+
"@azure/arm-dashboard": [
|
|
21
|
+
"./src/index"
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"include": [
|
|
26
|
+
"./src/**/*.ts",
|
|
27
|
+
"./test/**/*.ts",
|
|
28
|
+
"samples-dev/**/*.ts"
|
|
29
|
+
],
|
|
30
|
+
"exclude": [
|
|
31
|
+
"node_modules"
|
|
32
|
+
]
|
|
33
|
+
}
|