-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HDInsight] - Update configuration related APIs #5477
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -427,6 +427,100 @@ | |
}, | ||
"x-ms-long-running-operation": true | ||
} | ||
}, | ||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/getGatewaySettings": { | ||
"post": { | ||
"tags": [ | ||
"Clusters" | ||
], | ||
"operationId": "Clusters_GetGatewaySettings", | ||
"description": "Gets the gateway settings for the specified cluster.", | ||
"x-ms-examples": { | ||
"Get HTTP settings": { | ||
"$ref": "./examples/HDI_Clusters_GetGatewaySettings.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": "./operations.json#/definitions/ErrorResponse" | ||
} | ||
}, | ||
"200": { | ||
"description": "OK response definition.", | ||
"schema": { | ||
"$ref": "#/definitions/GatewaySettings" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/updateGatewaySettings": { | ||
"post": { | ||
"tags": [ | ||
"Clusters" | ||
], | ||
"operationId": "Clusters_UpdateGatewaySettings", | ||
"description": "Configures the gateway settings on the specified cluster.", | ||
"x-ms-examples": { | ||
"Enable HTTP connectivity": { | ||
"$ref": "./examples/HDI_Clusters_UpdateGatewaySettings_Enable.json" | ||
} | ||
}, | ||
"parameters": [ | ||
{ | ||
"$ref": "#/parameters/SubscriptionIdParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/ResourceGroupNameParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/ClusterNameParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/ApiVersionParameter" | ||
}, | ||
{ | ||
"name": "parameters", | ||
"in": "body", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/UpdateGatewaySettingsParameters" | ||
}, | ||
"description": "The cluster configurations." | ||
} | ||
], | ||
"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 | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
|
@@ -1228,6 +1322,50 @@ | |
} | ||
} | ||
}, | ||
"UpdateGatewaySettingsParameters": { | ||
"properties": { | ||
"restAuthCredential.isEnabled": { | ||
"type": "boolean", | ||
"default": true, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi, we set There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @shahabhijeet any suggestions here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using Your service has to assume There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @fearthecowboy Thanks for your reply. Is it possible to specify default value? In this case, our service always needs |
||
"x-ms-client-name": "isCredentialEnabled", | ||
"description": "Indicates whether or not the gateway settings based authorization is enabled." | ||
}, | ||
"restAuthCredential.username": { | ||
"type": "string", | ||
"x-ms-client-name": "userName", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AutoRest validation fails due to error |
||
"description": "The gateway settings user name." | ||
}, | ||
"restAuthCredential.password": { | ||
"type": "string", | ||
"x-ms-client-name": "password", | ||
"description": "The gateway settings user password." | ||
} | ||
}, | ||
"description": "The update gateway settings request parameters." | ||
}, | ||
"GatewaySettings": { | ||
"properties": { | ||
"restAuthCredential.isEnabled": { | ||
"type": "string", | ||
"x-ms-client-name": "isCredentialEnabled", | ||
"description": "Indicates whether or not the gateway settings based authorization is enabled.", | ||
"readOnly": true | ||
}, | ||
"restAuthCredential.username": { | ||
"type": "string", | ||
"x-ms-client-name": "userName", | ||
"description": "The gateway settings user name.", | ||
"readOnly": true | ||
}, | ||
"restAuthCredential.password": { | ||
"type": "string", | ||
"x-ms-client-name": "password", | ||
"description": "The gateway settings user password.", | ||
"readOnly": true | ||
} | ||
}, | ||
"description": "Gateway settings." | ||
}, | ||
"OperationResource": { | ||
"properties": { | ||
"status": { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,13 +32,56 @@ | |
} | ||
}, | ||
"paths": { | ||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/configurations": { | ||
"post": { | ||
"tags": [ | ||
"Configurations" | ||
], | ||
"operationId": "Configurations_List", | ||
"description": "Gets all configuration information for an HDI cluster.", | ||
"x-ms-examples": { | ||
"Get all configuration information": { | ||
"$ref": "./examples/HDI_Configurations_List.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": "./operations.json#/definitions/ErrorResponse" | ||
} | ||
}, | ||
"200": { | ||
"description": "OK response definition.", | ||
"schema": { | ||
"$ref": "#/definitions/ClusterConfigurations" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/configurations/{configurationName}": { | ||
"post": { | ||
"tags": [ | ||
"Configurations" | ||
], | ||
"operationId": "Configurations_UpdateHTTPSettings", | ||
"description": "Configures the HTTP settings on the specified cluster.", | ||
"operationId": "Configurations_Update", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would be a breaking change from the SDK's perspective. Since the changes are still in preview we should be fine. |
||
"description": "Configures the HTTP settings on the specified cluster. This API is deprecated, please use UpdateGatewaySettings in cluster endpoint instead.", | ||
"deprecated": true, | ||
"x-ms-examples": { | ||
"Enable HTTP connectivity": { | ||
"$ref": "./examples/ChangeHttpConnectivityEnable.json" | ||
|
@@ -97,10 +140,10 @@ | |
"Configurations" | ||
], | ||
"operationId": "Configurations_Get", | ||
"description": "The configuration object for the specified cluster.", | ||
"description": "The configuration object for the specified cluster. This API is not recommended and might be removed in the future. Please consider using List configurations API instead.", | ||
"x-ms-examples": { | ||
"Get HTTP settings": { | ||
"$ref": "./examples/GetHttpConnectivity.json" | ||
"Get Core site settings": { | ||
"$ref": "./examples/HDI_Configurations_Get.json" | ||
} | ||
}, | ||
"parameters": [ | ||
|
@@ -144,6 +187,18 @@ | |
"type": "string" | ||
}, | ||
"description": "The configuration object for the specified configuration for the specified cluster." | ||
}, | ||
"ClusterConfigurations": { | ||
"properties": { | ||
"configurations": { | ||
"description": "The configuration object for the specified configuration for the specified cluster.", | ||
"type": "object", | ||
"additionalProperties": { | ||
"$ref": "#/definitions/ClusterConfiguration" | ||
} | ||
} | ||
}, | ||
"description": "The configuration object for the specified cluster." | ||
} | ||
}, | ||
"parameters": { | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"parameters": { | ||
"clusterName": "cluster1", | ||
"resourceGroupName": "rg1", | ||
"api-version": "2015-03-01-preview", | ||
"subscriptionId": "subid", | ||
"configurationName": "core-site" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"fs.defaultFS":"wasb://test.blob.core.windows.net", | ||
"fs.azure.account.key.test.blob.core.windows.net":"accountKey" | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"parameters": { | ||
"clusterName": "cluster1", | ||
"resourceGroupName": "rg1", | ||
"api-version": "2015-03-01-preview", | ||
"subscriptionId": "subid" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"configurations": { | ||
"core-site": { | ||
"fs.defaultFS": "wasb://test.blob.core.windows.net", | ||
"fs.azure.account.key.test.blob.core.windows.net": "accountKey" | ||
}, | ||
"gateway": { | ||
"restAuthCredential.isEnabled": "true", | ||
"restAuthCredential.username": "admin", | ||
"restAuthCredential.password": "**********" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this something that the user would want to do with an ARM template?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a RESTful API for user to update credential.