Skip to content

Commit 394395e

Browse files
aim-for-betterZhenyu Zhou
andauthored
[HDInsight] Support the latest azure monitor api (Azure#14496)
* Add networkProperties and clusterId * Add Azure Monitor API * Add azure monitor examples and modify descriptions and add related api in 2015-03-01-preview Co-authored-by: Zhenyu Zhou <zhezhou@microsoft.com>
1 parent 3f6f4e9 commit 394395e

File tree

8 files changed

+506
-0
lines changed

8 files changed

+506
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"parameters": {
3+
"clusterName": "cluster1",
4+
"resourceGroupName": "rg1",
5+
"api-version": "2015-03-01-preview",
6+
"subscriptionId": "subid"
7+
},
8+
"responses": {
9+
"200": {},
10+
"202": {},
11+
"204": {}
12+
}
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"parameters": {
3+
"clusterName": "cluster1",
4+
"resourceGroupName": "rg1",
5+
"api-version": "2015-03-01-preview",
6+
"subscriptionId": "subid",
7+
"parameters": {
8+
"workspaceId": "a2090ead-8c9f-4fba-b70e-533e3e003163",
9+
"primaryKey": "**********"
10+
}
11+
},
12+
"responses": {
13+
"200": {},
14+
"202": {}
15+
}
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"parameters": {
3+
"clusterName": "cluster1",
4+
"resourceGroupName": "rg1",
5+
"api-version": "2015-03-01-preview",
6+
"subscriptionId": "subid"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"clusterMonitoringEnabled": true,
12+
"workspaceId": "id"
13+
}
14+
}
15+
}
16+
}

specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2015-03-01-preview/extensions.json

Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,148 @@
176176
}
177177
}
178178
},
179+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/azureMonitor": {
180+
"put": {
181+
"tags": [
182+
"Extensions"
183+
],
184+
"description": "Enables the Azure Monitor on the HDInsight cluster.",
185+
"x-ms-examples": {
186+
"Enable cluster monitoring": {
187+
"$ref": "./examples/EnableLinuxClusterAzureMonitor.json"
188+
}
189+
},
190+
"operationId": "Extensions_EnableAzureMonitor",
191+
"parameters": [
192+
{
193+
"$ref": "#/parameters/SubscriptionIdParameter"
194+
},
195+
{
196+
"$ref": "#/parameters/ResourceGroupNameParameter"
197+
},
198+
{
199+
"$ref": "#/parameters/ClusterNameParameter"
200+
},
201+
{
202+
"$ref": "#/parameters/ApiVersionParameter"
203+
},
204+
{
205+
"name": "parameters",
206+
"in": "body",
207+
"required": true,
208+
"schema": {
209+
"$ref": "#/definitions/AzureMonitorRequest"
210+
},
211+
"description": "The Log Analytics workspace parameters."
212+
}
213+
],
214+
"responses": {
215+
"default": {
216+
"description": "Error response describing why the operation failed.",
217+
"schema": {
218+
"$ref": "./operations.json#/definitions/ErrorResponse"
219+
}
220+
},
221+
"200": {
222+
"description": "Ok response definition."
223+
},
224+
"202": {
225+
"description": "Accepted response definition."
226+
}
227+
},
228+
"x-ms-long-running-operation": true,
229+
"x-ms-long-running-operation-options": {
230+
"final-state-via": "location"
231+
}
232+
},
233+
"get": {
234+
"tags": [
235+
"Extensions"
236+
],
237+
"description": "Gets the status of Azure Monitor on the HDInsight cluster.",
238+
"x-ms-examples": {
239+
"Enable cluster monitoring": {
240+
"$ref": "./examples/GetLinuxClusterAzureMonitorStatus.json"
241+
}
242+
},
243+
"operationId": "Extensions_GetAzureMonitorStatus",
244+
"parameters": [
245+
{
246+
"$ref": "#/parameters/SubscriptionIdParameter"
247+
},
248+
{
249+
"$ref": "#/parameters/ResourceGroupNameParameter"
250+
},
251+
{
252+
"$ref": "#/parameters/ClusterNameParameter"
253+
},
254+
{
255+
"$ref": "#/parameters/ApiVersionParameter"
256+
}
257+
],
258+
"responses": {
259+
"default": {
260+
"description": "Error response describing why the operation failed.",
261+
"schema": {
262+
"$ref": "./operations.json#/definitions/ErrorResponse"
263+
}
264+
},
265+
"200": {
266+
"description": "OK. The request has succeeded.",
267+
"schema": {
268+
"$ref": "#/definitions/AzureMonitorResponse"
269+
}
270+
}
271+
}
272+
},
273+
"delete": {
274+
"tags": [
275+
"Extensions"
276+
],
277+
"description": "Disables the Azure Monitor on the HDInsight cluster.",
278+
"x-ms-examples": {
279+
"Enable cluster monitoring": {
280+
"$ref": "./examples/DisableLinuxClusterAzureMonitor.json"
281+
}
282+
},
283+
"operationId": "Extensions_DisableAzureMonitor",
284+
"parameters": [
285+
{
286+
"$ref": "#/parameters/SubscriptionIdParameter"
287+
},
288+
{
289+
"$ref": "#/parameters/ResourceGroupNameParameter"
290+
},
291+
{
292+
"$ref": "#/parameters/ClusterNameParameter"
293+
},
294+
{
295+
"$ref": "#/parameters/ApiVersionParameter"
296+
}
297+
],
298+
"responses": {
299+
"default": {
300+
"description": "Error response describing why the operation failed.",
301+
"schema": {
302+
"$ref": "./operations.json#/definitions/ErrorResponse"
303+
}
304+
},
305+
"200": {
306+
"description": "Ok response definition."
307+
},
308+
"202": {
309+
"description": "OK response definition."
310+
},
311+
"204": {
312+
"description": "No Content response definition."
313+
}
314+
},
315+
"x-ms-long-running-operation": true,
316+
"x-ms-long-running-operation-options": {
317+
"final-state-via": "location"
318+
}
319+
}
320+
},
179321
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/{extensionName}": {
180322
"put": {
181323
"tags": [
@@ -415,6 +557,72 @@
415557
"type": "string"
416558
}
417559
}
560+
},
561+
"AzureMonitorRequest": {
562+
"description": "The azure monitor parameters.",
563+
"properties": {
564+
"workspaceId": {
565+
"description": "The Log Analytics workspace ID.",
566+
"type": "string"
567+
},
568+
"primaryKey": {
569+
"description": "The Log Analytics workspace key.",
570+
"type": "string"
571+
},
572+
"selectedConfigurations": {
573+
"description": "The selected configurations.",
574+
"$ref": "#/definitions/AzureMonitorSelectedConfigurations"
575+
}
576+
}
577+
},
578+
"AzureMonitorResponse": {
579+
"description": "The azure monitor status response.",
580+
"properties": {
581+
"clusterMonitoringEnabled": {
582+
"description": "The status of the monitor on the HDInsight cluster.",
583+
"type": "boolean"
584+
},
585+
"workspaceId": {
586+
"description": "The workspace ID of the monitor on the HDInsight cluster.",
587+
"type": "string"
588+
},
589+
"selectedConfigurations": {
590+
"description": "The selected configurations.",
591+
"$ref": "#/definitions/AzureMonitorSelectedConfigurations"
592+
}
593+
}
594+
},
595+
"AzureMonitorSelectedConfigurations": {
596+
"description": "The selected configurations for azure monitor.",
597+
"properties": {
598+
"configurationVersion": {
599+
"description": "The configuration version.",
600+
"type": "string"
601+
},
602+
"globalConfigurations": {
603+
"description": "The global configurations of selected configurations.",
604+
"type": "object",
605+
"additionalProperties": {
606+
"type": "string"
607+
}
608+
},
609+
"tableList": {
610+
"description": "The table list.",
611+
"type": "array",
612+
"items": {
613+
"$ref": "#/definitions/AzureMonitorTableConfiguration"
614+
}
615+
}
616+
}
617+
},
618+
"AzureMonitorTableConfiguration": {
619+
"description": "The table configuration for the Log Analytics integration.",
620+
"properties": {
621+
"name": {
622+
"description": "The name.",
623+
"type": "string"
624+
}
625+
}
418626
}
419627
},
420628
"parameters": {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"parameters": {
3+
"clusterName": "cluster1",
4+
"resourceGroupName": "rg1",
5+
"api-version": "2018-06-01-preview",
6+
"subscriptionId": "subid"
7+
},
8+
"responses": {
9+
"200": {},
10+
"202": {},
11+
"204": {}
12+
}
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"parameters": {
3+
"clusterName": "cluster1",
4+
"resourceGroupName": "rg1",
5+
"api-version": "2018-06-01-preview",
6+
"subscriptionId": "subid",
7+
"parameters": {
8+
"workspaceId": "a2090ead-8c9f-4fba-b70e-533e3e003163",
9+
"primaryKey": "**********"
10+
}
11+
},
12+
"responses": {
13+
"200": {},
14+
"202": {}
15+
}
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"parameters": {
3+
"clusterName": "cluster1",
4+
"resourceGroupName": "rg1",
5+
"api-version": "2018-06-01-preview",
6+
"subscriptionId": "subid"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"clusterMonitoringEnabled": true,
12+
"workspaceId": "id"
13+
}
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)