@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.
Files changed (105) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/LICENSE +21 -0
  3. package/README.md +109 -0
  4. package/dist/index.js +1372 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/dist-esm/samples-dev/grafanaCreateSample.d.ts +2 -0
  9. package/dist-esm/samples-dev/grafanaCreateSample.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/grafanaCreateSample.js +38 -0
  11. package/dist-esm/samples-dev/grafanaCreateSample.js.map +1 -0
  12. package/dist-esm/samples-dev/grafanaDeleteSample.d.ts +2 -0
  13. package/dist-esm/samples-dev/grafanaDeleteSample.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/grafanaDeleteSample.js +31 -0
  15. package/dist-esm/samples-dev/grafanaDeleteSample.js.map +1 -0
  16. package/dist-esm/samples-dev/grafanaGetSample.d.ts +2 -0
  17. package/dist-esm/samples-dev/grafanaGetSample.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/grafanaGetSample.js +31 -0
  19. package/dist-esm/samples-dev/grafanaGetSample.js.map +1 -0
  20. package/dist-esm/samples-dev/grafanaListByResourceGroupSample.d.ts +2 -0
  21. package/dist-esm/samples-dev/grafanaListByResourceGroupSample.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/grafanaListByResourceGroupSample.js +44 -0
  23. package/dist-esm/samples-dev/grafanaListByResourceGroupSample.js.map +1 -0
  24. package/dist-esm/samples-dev/grafanaListSample.d.ts +2 -0
  25. package/dist-esm/samples-dev/grafanaListSample.d.ts.map +1 -0
  26. package/dist-esm/samples-dev/grafanaListSample.js +43 -0
  27. package/dist-esm/samples-dev/grafanaListSample.js.map +1 -0
  28. package/dist-esm/samples-dev/grafanaUpdateSample.d.ts +2 -0
  29. package/dist-esm/samples-dev/grafanaUpdateSample.d.ts.map +1 -0
  30. package/dist-esm/samples-dev/grafanaUpdateSample.js +34 -0
  31. package/dist-esm/samples-dev/grafanaUpdateSample.js.map +1 -0
  32. package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
  33. package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
  34. package/dist-esm/samples-dev/operationsListSample.js +43 -0
  35. package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
  36. package/dist-esm/src/dashboardManagementClient.d.ts +20 -0
  37. package/dist-esm/src/dashboardManagementClient.d.ts.map +1 -0
  38. package/dist-esm/src/dashboardManagementClient.js +71 -0
  39. package/dist-esm/src/dashboardManagementClient.js.map +1 -0
  40. package/dist-esm/src/index.d.ts +5 -0
  41. package/dist-esm/src/index.d.ts.map +1 -0
  42. package/dist-esm/src/index.js +12 -0
  43. package/dist-esm/src/index.js.map +1 -0
  44. package/dist-esm/src/lroImpl.d.ts +16 -0
  45. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  46. package/dist-esm/src/lroImpl.js +29 -0
  47. package/dist-esm/src/lroImpl.js.map +1 -0
  48. package/dist-esm/src/models/index.d.ts +414 -0
  49. package/dist-esm/src/models/index.d.ts.map +1 -0
  50. package/dist-esm/src/models/index.js +66 -0
  51. package/dist-esm/src/models/index.js.map +1 -0
  52. package/dist-esm/src/models/mappers.d.ts +16 -0
  53. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  54. package/dist-esm/src/models/mappers.js +485 -0
  55. package/dist-esm/src/models/mappers.js.map +1 -0
  56. package/dist-esm/src/models/parameters.d.ts +12 -0
  57. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  58. package/dist-esm/src/models/parameters.js +108 -0
  59. package/dist-esm/src/models/parameters.js.map +1 -0
  60. package/dist-esm/src/operations/grafana.d.ts +101 -0
  61. package/dist-esm/src/operations/grafana.d.ts.map +1 -0
  62. package/dist-esm/src/operations/grafana.js +458 -0
  63. package/dist-esm/src/operations/grafana.js.map +1 -0
  64. package/dist-esm/src/operations/index.d.ts +3 -0
  65. package/dist-esm/src/operations/index.d.ts.map +1 -0
  66. package/dist-esm/src/operations/index.js +10 -0
  67. package/dist-esm/src/operations/index.js.map +1 -0
  68. package/dist-esm/src/operations/operations.d.ts +32 -0
  69. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  70. package/dist-esm/src/operations/operations.js +120 -0
  71. package/dist-esm/src/operations/operations.js.map +1 -0
  72. package/dist-esm/src/operationsInterfaces/grafana.d.ts +65 -0
  73. package/dist-esm/src/operationsInterfaces/grafana.d.ts.map +1 -0
  74. package/dist-esm/src/operationsInterfaces/grafana.js +9 -0
  75. package/dist-esm/src/operationsInterfaces/grafana.js.map +1 -0
  76. package/dist-esm/src/operationsInterfaces/index.d.ts +3 -0
  77. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  78. package/dist-esm/src/operationsInterfaces/index.js +10 -0
  79. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  80. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  81. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  82. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  83. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  84. package/dist-esm/test/sampleTest.d.ts +2 -0
  85. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  86. package/dist-esm/test/sampleTest.js +40 -0
  87. package/dist-esm/test/sampleTest.js.map +1 -0
  88. package/package.json +118 -0
  89. package/review/arm-dashboard.api.md +355 -0
  90. package/rollup.config.js +122 -0
  91. package/src/dashboardManagementClient.ts +103 -0
  92. package/src/index.ts +12 -0
  93. package/src/lroImpl.ts +34 -0
  94. package/src/models/index.ts +467 -0
  95. package/src/models/mappers.ts +500 -0
  96. package/src/models/parameters.ts +126 -0
  97. package/src/operations/grafana.ts +595 -0
  98. package/src/operations/index.ts +10 -0
  99. package/src/operations/operations.ts +137 -0
  100. package/src/operationsInterfaces/grafana.ts +120 -0
  101. package/src/operationsInterfaces/index.ts +10 -0
  102. package/src/operationsInterfaces/operations.ts +22 -0
  103. package/tsconfig.json +33 -0
  104. package/types/arm-dashboard.d.ts +556 -0
  105. 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
+ }