forked from Azure/azure-rest-api-specs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[HDInsight] Add two new APIs: listhosts and restart node (Azure#8794)
- Loading branch information
1 parent
e27ee31
commit 530bcd7
Showing
4 changed files
with
279 additions
and
0 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
...ger/Microsoft.HDInsight/stable/2018-06-01-preview/examples/GetClusterVirtualMachines.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2018-06-01-preview", | ||
"subscriptionId": "subid", | ||
"resourceGroupName": "rg1", | ||
"clusterName": "cluster1" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"value": [ | ||
{ | ||
"name": "gateway1" | ||
}, | ||
{ | ||
"name": "gateway3" | ||
}, | ||
{ | ||
"name": "headnode0" | ||
}, | ||
{ | ||
"name": "headnode3" | ||
}, | ||
{ | ||
"name": "workernode0" | ||
}, | ||
{ | ||
"name": "workernode1" | ||
}, | ||
{ | ||
"name": "zookeepernode0" | ||
}, | ||
{ | ||
"name": "zookeepernode2" | ||
}, | ||
{ | ||
"name": "zookeepernode3" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
...crosoft.HDInsight/stable/2018-06-01-preview/examples/RestartVirtualMachinesOperation.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2018-06-01-preview", | ||
"subscriptionId": "subid", | ||
"resourceGroupName": "rg1", | ||
"clusterName": "cluster1", | ||
"hosts": [ | ||
"gateway1", | ||
"gateway3" | ||
] | ||
}, | ||
"responses": { | ||
"202": { | ||
"headers": { | ||
"location": "https://management.azure.com/subscriptions/subid/providers/Microsoft.HDInsight/pathToOperationResult" | ||
} | ||
}, | ||
"200": { | ||
"headers": { | ||
"location": "https://management.azure.com/subscriptions/subid/providers/Microsoft.HDInsight/pathToOperationResult" | ||
} | ||
} | ||
} | ||
} |
210 changes: 210 additions & 0 deletions
210
...sight/resource-manager/Microsoft.HDInsight/stable/2018-06-01-preview/virtualMachines.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,210 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "HDInsightManagementClient", | ||
"description": "The HDInsight Management Client.", | ||
"version": "2018-06-01-preview" | ||
}, | ||
"host": "management.azure.com", | ||
"schemes": [ | ||
"https" | ||
], | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"security": [ | ||
{ | ||
"azure_auth": [ | ||
"user_impersonation" | ||
] | ||
} | ||
], | ||
"securityDefinitions": { | ||
"azure_auth": { | ||
"type": "oauth2", | ||
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", | ||
"flow": "implicit", | ||
"description": "Azure Active Directory OAuth2 Flow", | ||
"scopes": { | ||
"user_impersonation": "impersonate your user account" | ||
} | ||
} | ||
}, | ||
"paths": { | ||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/listHosts": { | ||
"post": { | ||
"tags": [ | ||
"VirtualMachines" | ||
], | ||
"operationId": "VirtualMachines_ListHosts", | ||
"description": "Lists the HDInsight clusters hosts", | ||
"x-ms-examples": { | ||
"Get All hosts in the cluster": { | ||
"$ref": "./examples/GetClusterVirtualMachines.json" | ||
} | ||
}, | ||
"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": "#/definitions/ErrorResponse" | ||
} | ||
}, | ||
"200": { | ||
"description": "OK response definition.", | ||
"schema": { | ||
"$ref": "#/definitions/HostInfoListResult" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/restartHosts": { | ||
"post": { | ||
"tags": [ | ||
"VirtualMachines" | ||
], | ||
"operationId": "VirtualMachines_RestartHosts", | ||
"description": "Restarts the specified HDInsight cluster hosts.", | ||
"x-ms-examples": { | ||
"Restarts the specified HDInsight cluster hosts.": { | ||
"$ref": "./examples/RestartVirtualMachinesOperation.json" | ||
} | ||
}, | ||
"parameters": [ | ||
{ | ||
"$ref": "#/parameters/SubscriptionIdParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/ResourceGroupNameParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/ClusterNameParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/ApiVersionParameter" | ||
}, | ||
{ | ||
"name": "hosts", | ||
"in": "body", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/RestartHostsParameters" | ||
}, | ||
"description": "The list of hosts to restart" | ||
} | ||
], | ||
"responses": { | ||
"default": { | ||
"description": "Error response describing why the operation failed.", | ||
"schema": { | ||
"$ref": "#/definitions/ErrorResponse" | ||
} | ||
}, | ||
"200": { | ||
"description": "OK response definition." | ||
}, | ||
"202": { | ||
"description": "Accepted response definition." | ||
} | ||
}, | ||
"x-ms-long-running-operation": true | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"HostInfo": { | ||
"description": "The cluster host information.", | ||
"properties": { | ||
"name": { | ||
"description": "The host name", | ||
"type": "string" | ||
} | ||
}, | ||
"readOnly": true | ||
}, | ||
"HostInfoListResult": { | ||
"description": "Result of the request to list cluster hosts", | ||
"properties": { | ||
"value": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/HostInfo" | ||
}, | ||
"description": "The list of cluster hosts." | ||
} | ||
}, | ||
"readOnly": true | ||
}, | ||
"RestartHostsParameters": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"description": "The list of hosts which need to be restarted." | ||
}, | ||
"ErrorResponse": { | ||
"description": "Describes the format of Error response.", | ||
"type": "object", | ||
"properties": { | ||
"code": { | ||
"description": "Error code", | ||
"type": "string" | ||
}, | ||
"message": { | ||
"description": "Error message indicating why the operation failed.", | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"parameters": { | ||
"SubscriptionIdParameter": { | ||
"name": "subscriptionId", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "The subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call." | ||
}, | ||
"ResourceGroupNameParameter": { | ||
"name": "resourceGroupName", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "The name of the resource group.", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"ClusterNameParameter": { | ||
"name": "clusterName", | ||
"in": "path", | ||
"required": true, | ||
"type": "string", | ||
"description": "The name of the cluster.", | ||
"x-ms-parameter-location": "method" | ||
}, | ||
"ApiVersionParameter": { | ||
"name": "api-version", | ||
"in": "query", | ||
"required": true, | ||
"type": "string", | ||
"description": "The HDInsight client API Version." | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters