Skip to content
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

Added data connection check name availability operation #5648

Merged
merged 12 commits into from
May 7, 2019
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"location": "wus",
"clusterName": {
"name": "kuskusprod",
"type": "Microsoft.Kusto/Clusters"
"type": "Microsoft.Kusto/clusters"
}
},
"responses": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
"clusterName": "KustoClusterRPTest4",
"databaseName": "KustoDatabase8",
"api-version": "2019-01-21",
"dataConnectionName": "DataConnections8",
"parameters": {
"kind": "EventHub",
"dataConnectionName": "DataConnections8",
"properties": {
liatbezalel marked this conversation as resolved.
Show resolved Hide resolved
"eventHubResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1",
"consumerGroup": "testConsumerGroup1"
"kind": "EventHub",
"properties": {
"eventHubResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1",
"consumerGroup": "testConsumerGroup1"
}
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"parameters": {
"subscriptionId": "12345678-1234-1234-123456789098",
"api-version": "2019-01-21",
"clusterName": "kustoProd",
"databaseName": "kustorptest",
"resourceGroupName": "kustorptest",
"dataConnectionName": {
"name": "DataConnections7",
"type": "Microsoft.Kusto/clusters/databases/dataConnections"
}
},
"responses": {
"200": {
"body": {
"name": "DataConnections7",
"nameAvailable": false,
"message": "Name 'DataConnections7' is already taken. Please specify a different name.",
"reason": "AlreadyExists"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,19 @@
}
}
},
"201": {},
"201": {
"body": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/KustoClusterRPTest4/Databases/KustoDatabase8/DataConnections/DataConnections8",
"name": "KustoClusterRPTest4/KustoDatabase8/DataConnections8",
"type": "Microsoft.Kusto/Clusters/Databases/DataConnections",
"location": "westus",
"kind": "EventHub",
"properties": {
"eventHubResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1",
"consumerGroup": "testConsumerGroup1"
}
}
},
"202": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,19 @@
}
}
},
"201": {},
"201": {
"body": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/KustoClusterRPTest4/Databases/KustoDatabase8/DataConnections/DataConnections8",
"name": "KustoClusterRPTest4/KustoDatabase8/DataConnections8",
"type": "Microsoft.Kusto/Clusters/Databases/DataConnections",
"location": "westus",
"kind": "EventHub",
"properties": {
"eventHubResourceId": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.EventHub/namespaces/eventhubTestns1/eventhubs/eventhubTest1",
"consumerGroup": "testConsumerGroup1"
}
}
},
"202": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"clusterName": "kustoProd",
"databaseName": {
"name": "kuskus",
"type": "Microsoft.Kusto/Clusters/Databases"
"type": "Microsoft.Kusto/clusters/databases"
}
},
"responses": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,60 @@
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/checkNameAvailability": {
"post": {
"tags": [
"DataConnections"
],
"operationId": "DataConnections_CheckNameAvailability",
"x-ms-examples": {
"KustoDatabaseCheckNameAvailability": {
"$ref": "./examples/KustoDataConnectionsCheckNameAvailability.json"
}
},
"description": "Checks that the data connection name is valid and is not already in use.",
"parameters": [
{
"$ref": "#/parameters/ResourceGroupParameter"
},
{
"$ref": "#/parameters/ClusterNameParameter"
},
{
"$ref": "#/parameters/DatabaseNameParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"name": "dataConnectionName",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/DataConnectionCheckNameRequest"
},
"description": "The name of the data connection."
}
],
"responses": {
"200": {
"description": "OK -- Operation to check the Kusto resource name availability was successful.",
"schema": {
"$ref": "#/definitions/CheckNameResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}/dataConnections/{dataConnectionName}": {
"get": {
Expand Down Expand Up @@ -2002,24 +2056,61 @@
],
"description": "The result returned from a database check name availability request."
},
"CheckNameResult": {
"type": "object",
"properties": {
"nameAvailable": {
"type": "boolean",
"description": "Specifies a Boolean value that indicates if the name is available."
},
"name": {
"type": "string",
"description": "The name that was checked."
},
"message": {
"type": "string",
"description": "Message indicating an unavailable name due to a conflict, or a description of the naming rules that are violated."
}
},
"description": "The result returned from a check name availability request."
},
"DataConnectionCheckNameRequest": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Data Connection name."
},
"type": {
"type": "string",
"enum": [
"Microsoft.Kusto/clusters/databases/dataConnections"
],
"x-ms-enum": {
"name": "Type",
"modelAsString": false
},
"description": "The type of resource, Microsoft.Kusto/clusters/databases/dataConnections."
}
},
"required": [
"name",
"type"
],
"description": "The result returned from a data connections check name availability request."
},
"CheckNameResult": {
"type": "object",
"properties": {
"nameAvailable": {
"type": "boolean",
"description": "Specifies a Boolean value that indicates if the name is available."
},
"name": {
"type": "string",
"description": "The name that was checked."
},
"message": {
"type": "string",
"description": "Message indicating an unavailable name due to a conflict, or a description of the naming rules that are violated."
},
"reason": {
"type": "string",
"enum": [
"Invalid",
"AlreadyExists"
],
"x-ms-enum": {
"name": "reason",
"modelAsString": true
},
"description": "Message providing the reason why the given name is invalid."
}
},
"description": "The result returned from a check name availability request."
},
"ListResourceSkusResult": {
"description": "List of available SKUs for an existing Kusto Cluster.",
"type": "object",
Expand Down