Skip to content

Commit

Permalink
[HDInsight] Support the latest azure monitor api (Azure#14496)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
2 people authored and mkarmark committed Jul 20, 2021
1 parent efe6545 commit 8cb2b20
Show file tree
Hide file tree
Showing 8 changed files with 506 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"clusterName": "cluster1",
"resourceGroupName": "rg1",
"api-version": "2015-03-01-preview",
"subscriptionId": "subid"
},
"responses": {
"200": {},
"202": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"parameters": {
"clusterName": "cluster1",
"resourceGroupName": "rg1",
"api-version": "2015-03-01-preview",
"subscriptionId": "subid",
"parameters": {
"workspaceId": "a2090ead-8c9f-4fba-b70e-533e3e003163",
"primaryKey": "**********"
}
},
"responses": {
"200": {},
"202": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"parameters": {
"clusterName": "cluster1",
"resourceGroupName": "rg1",
"api-version": "2015-03-01-preview",
"subscriptionId": "subid"
},
"responses": {
"200": {
"body": {
"clusterMonitoringEnabled": true,
"workspaceId": "id"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,148 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/azureMonitor": {
"put": {
"tags": [
"Extensions"
],
"description": "Enables the Azure Monitor on the HDInsight cluster.",
"x-ms-examples": {
"Enable cluster monitoring": {
"$ref": "./examples/EnableLinuxClusterAzureMonitor.json"
}
},
"operationId": "Extensions_EnableAzureMonitor",
"parameters": [
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ClusterNameParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AzureMonitorRequest"
},
"description": "The Log Analytics workspace parameters."
}
],
"responses": {
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./operations.json#/definitions/ErrorResponse"
}
},
"200": {
"description": "Ok response definition."
},
"202": {
"description": "Accepted response definition."
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
}
},
"get": {
"tags": [
"Extensions"
],
"description": "Gets the status of Azure Monitor on the HDInsight cluster.",
"x-ms-examples": {
"Enable cluster monitoring": {
"$ref": "./examples/GetLinuxClusterAzureMonitorStatus.json"
}
},
"operationId": "Extensions_GetAzureMonitorStatus",
"parameters": [
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ClusterNameParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./operations.json#/definitions/ErrorResponse"
}
},
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/AzureMonitorResponse"
}
}
}
},
"delete": {
"tags": [
"Extensions"
],
"description": "Disables the Azure Monitor on the HDInsight cluster.",
"x-ms-examples": {
"Enable cluster monitoring": {
"$ref": "./examples/DisableLinuxClusterAzureMonitor.json"
}
},
"operationId": "Extensions_DisableAzureMonitor",
"parameters": [
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ClusterNameParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./operations.json#/definitions/ErrorResponse"
}
},
"200": {
"description": "Ok response definition."
},
"202": {
"description": "OK response definition."
},
"204": {
"description": "No Content response definition."
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/{extensionName}": {
"put": {
"tags": [
Expand Down Expand Up @@ -415,6 +557,72 @@
"type": "string"
}
}
},
"AzureMonitorRequest": {
"description": "The azure monitor parameters.",
"properties": {
"workspaceId": {
"description": "The Log Analytics workspace ID.",
"type": "string"
},
"primaryKey": {
"description": "The Log Analytics workspace key.",
"type": "string"
},
"selectedConfigurations": {
"description": "The selected configurations.",
"$ref": "#/definitions/AzureMonitorSelectedConfigurations"
}
}
},
"AzureMonitorResponse": {
"description": "The azure monitor status response.",
"properties": {
"clusterMonitoringEnabled": {
"description": "The status of the monitor on the HDInsight cluster.",
"type": "boolean"
},
"workspaceId": {
"description": "The workspace ID of the monitor on the HDInsight cluster.",
"type": "string"
},
"selectedConfigurations": {
"description": "The selected configurations.",
"$ref": "#/definitions/AzureMonitorSelectedConfigurations"
}
}
},
"AzureMonitorSelectedConfigurations": {
"description": "The selected configurations for azure monitor.",
"properties": {
"configurationVersion": {
"description": "The configuration version.",
"type": "string"
},
"globalConfigurations": {
"description": "The global configurations of selected configurations.",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"tableList": {
"description": "The table list.",
"type": "array",
"items": {
"$ref": "#/definitions/AzureMonitorTableConfiguration"
}
}
}
},
"AzureMonitorTableConfiguration": {
"description": "The table configuration for the Log Analytics integration.",
"properties": {
"name": {
"description": "The name.",
"type": "string"
}
}
}
},
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"clusterName": "cluster1",
"resourceGroupName": "rg1",
"api-version": "2018-06-01-preview",
"subscriptionId": "subid"
},
"responses": {
"200": {},
"202": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"parameters": {
"clusterName": "cluster1",
"resourceGroupName": "rg1",
"api-version": "2018-06-01-preview",
"subscriptionId": "subid",
"parameters": {
"workspaceId": "a2090ead-8c9f-4fba-b70e-533e3e003163",
"primaryKey": "**********"
}
},
"responses": {
"200": {},
"202": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"parameters": {
"clusterName": "cluster1",
"resourceGroupName": "rg1",
"api-version": "2018-06-01-preview",
"subscriptionId": "subid"
},
"responses": {
"200": {
"body": {
"clusterMonitoringEnabled": true,
"workspaceId": "id"
}
}
}
}
Loading

0 comments on commit 8cb2b20

Please sign in to comment.