diff --git a/profiles/ResourceSchemas.md b/profiles/ResourceSchemas.md index 7c0b7f6de217..73fdb670a19e 100644 --- a/profiles/ResourceSchemas.md +++ b/profiles/ResourceSchemas.md @@ -280,7 +280,8 @@ batch: - ../specification/web/resource-manager/Microsoft.Web/2016-03-01/ResourceProvider.json - ../specification/web/resource-manager/Microsoft.Web/2016-08-01/WebApps.json - ../specification/web/resource-manager/Microsoft.Web/2016-09-01/AppServiceEnvironments.json - - ../specification/web/resource-manager/Microsoft.Web/2016-09-01/AppServicePlans.json + - ../specification/web/resource-manager/Microsoft.Web/2016-09-01/AppServicePlans.json + - ../specification/kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/kusto.json # some invalid swagger # - ../specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/2017-02-28-preview/timeseriesinsights.json diff --git a/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoClustersCreateOrUpdate.json b/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoClustersCreateOrUpdate.json new file mode 100644 index 000000000000..5c4dbc44dd1a --- /dev/null +++ b/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoClustersCreateOrUpdate.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "12345678-1234-1234-1234-123456789098", + "resourceGroupName": "kustorptest", + "clusterName": "KustoClusterRPTest4", + "api-version": "2017-09-07-privatepreview", + "parameters": { + "location": "westus" + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/KustoClusterRPTest4", + "name": "KustoClusterRPTest4", + "type": "Microsoft.Kusto/Clusters", + "etag": "W/\"datetime'2017-12-06T12%3A05%3A57.2528942Z'\"", + "location": "westus", + "properties": { + "provisioningState": "Succeeded" + } + } + }, + "201": {} + } +} \ No newline at end of file diff --git a/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoClustersDelete.json b/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoClustersDelete.json new file mode 100644 index 000000000000..eec47eceacd7 --- /dev/null +++ b/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoClustersDelete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "12345678-1234-1234-1234-123456789098", + "resourceGroupName": "kustorptest", + "clusterName": "KustoClusterRPTest4", + "api-version": "2017-09-07-privatepreview" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} \ No newline at end of file diff --git a/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoClustersGet.json b/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoClustersGet.json new file mode 100644 index 000000000000..0d4827a551e9 --- /dev/null +++ b/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoClustersGet.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "12345678-1234-1234-1234-123456789098", + "resourceGroupName": "kustorptest", + "clusterName": "KustoClusterRPTest4", + "api-version": "2017-09-07-privatepreview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/KustoClusterRPTest4", + "name": "KustoClusterRPTest4", + "type": "Microsoft.Kusto/Clusters", + "etag": "W/\"datetime'2017-12-06T12%3A05%3A57.2528942Z'\"", + "location": "westus", + "properties": { + "provisioningState": "Succeeded" + } + } + } + } +} \ No newline at end of file diff --git a/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoClustersList.json b/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoClustersList.json new file mode 100644 index 000000000000..2cfa287edaac --- /dev/null +++ b/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoClustersList.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "subscriptionId": "12345678-1234-1234-1234-123456789098", + "api-version": "2017-09-07-privatepreview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/KustoClusterRPTest4", + "name": "KustoClusterRPTest4", + "type": "Microsoft.Kusto/Clusters", + "etag": "W/\"datetime'2017-12-06T12%3A05%3A57.2528942Z'\"", + "location": "westus", + "properties": { + "provisioningState": "Succeeded" + } + }, + { + "id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/KustoClusterRPTest3", + "name": "KustoClusterRPTest3", + "type": "Microsoft.Kusto/Clusters", + "etag": "W/\"datetime'2017-12-06T12%3A05%3A57.2528942Z'\"", + "location": "westus", + "properties": { + "provisioningState": "Succeeded" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoClustersListByResourceGroup.json b/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoClustersListByResourceGroup.json new file mode 100644 index 000000000000..417004d0553e --- /dev/null +++ b/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoClustersListByResourceGroup.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "subscriptionId": "12345678-1234-1234-1234-123456789098", + "resourceGroupName": "kustorptest", + "api-version": "2017-09-07-privatepreview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/KustoClusterRPTest4", + "name": "KustoClusterRPTest4", + "type": "Microsoft.Kusto/Clusters", + "etag": "W/\"datetime'2017-12-06T12%3A05%3A57.2528942Z'\"", + "location": "westus", + "properties": { + "provisioningState": "Succeeded" + } + }, + { + "id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/KustoClusterRPTest3", + "name": "KustoClusterRPTest3", + "type": "Microsoft.Kusto/Clusters", + "etag": "W/\"datetime'2017-12-06T12%3A05%3A57.2528942Z'\"", + "location": "westus", + "properties": { + "provisioningState": "Succeeded" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoClustersUpdate.json b/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoClustersUpdate.json new file mode 100644 index 000000000000..101e322f90e6 --- /dev/null +++ b/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoClustersUpdate.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "12345678-1234-1234-1234-123456789098", + "resourceGroupName": "kustorptest", + "clusterName": "KustoClusterRPTest4", + "api-version": "2017-09-07-privatepreview", + "parameters": { + "location": "westus" + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/KustoClusterRPTest4", + "name": "KustoClusterRPTest4", + "type": "Microsoft.Kusto/Clusters", + "etag": "W/\"datetime'2017-12-06T12%3A05%3A57.2528942Z'\"", + "location": "westus", + "properties": { + "provisioningState": "Succeeded" + } + } + }, + "201": {} + } +} \ No newline at end of file diff --git a/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoDatabasesCreateOrUpdate.json b/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoDatabasesCreateOrUpdate.json new file mode 100644 index 000000000000..43fc0a2e0680 --- /dev/null +++ b/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoDatabasesCreateOrUpdate.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "12345678-1234-1234-1234-123456789098", + "resourceGroupName": "kustorptest", + "clusterName": "KustoClusterRPTest4", + "databaseName": "KustoDatabase8", + "api-version": "2017-09-07-privatepreview", + "parameters": { + "location": "westus", + "properties": { + "softDeletePeriodInDays": 1 + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/KustoClusterRPTest4/Databases/KustoDatabase8", + "name": "KustoClusterRPTest4/KustoDatabase8", + "type": "Microsoft.Kusto/Clusters/Databases", + "etag": "W/\"datetime'2017-12-05T15%3A28%3A05.732611Z'\"", + "location": "westus", + "properties": { + "softDeletePeriodInDays": 1, + "provisioningState": "Succeeded" + } + } + }, + "201": {}, + "202": {} + } +} \ No newline at end of file diff --git a/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoDatabasesDelete.json b/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoDatabasesDelete.json new file mode 100644 index 000000000000..02b7d9d27903 --- /dev/null +++ b/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoDatabasesDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "12345678-1234-1234-1234-123456789098", + "resourceGroupName": "kustorptest", + "clusterName": "KustoClusterRPTest4", + "databaseName": "KustoDatabase8", + "api-version": "2017-09-07-privatepreview" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} \ No newline at end of file diff --git a/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoDatabasesGet.json b/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoDatabasesGet.json new file mode 100644 index 000000000000..4221ae88fd0a --- /dev/null +++ b/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoDatabasesGet.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "12345678-1234-1234-1234-123456789098", + "resourceGroupName": "kustorptest", + "clusterName": "KustoClusterRPTest4", + "databaseName": "KustoDatabase8", + "api-version": "2017-09-07-privatepreview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/KustoClusterRPTest4/Databases/KustoDatabase8", + "name": "KustoClusterRPTest4/KustoDatabase8", + "type": "Microsoft.Kusto/Clusters/Databases", + "etag": "W/\"datetime'2017-12-05T15%3A28%3A05.732611Z'\"", + "location": "westus", + "properties": { + "softDeletePeriodInDays": 1, + "provisioningState": "Succeeded" + } + } + } + } +} \ No newline at end of file diff --git a/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoDatabasesListByCluster.json b/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoDatabasesListByCluster.json new file mode 100644 index 000000000000..1f4cae96a677 --- /dev/null +++ b/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoDatabasesListByCluster.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "subscriptionId": "12345678-1234-1234-1234-123456789098", + "resourceGroupName": "kustorptest", + "clusterName": "KustoClusterRPTest4", + "api-version": "2017-09-07-privatepreview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/KustoClusterRPTest4/Databases/KustoDatabase8", + "name": "KustoClusterRPTest4/KustoDatabase8", + "type": "Microsoft.Kusto/Clusters/Databases", + "etag": "W/\"datetime'2017-12-05T15%3A28%3A05.732611Z'\"", + "location": "westus", + "properties": { + "softDeletePeriodInDays": 1, + "provisioningState": "Succeeded" + } + }, + { + "id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/KustoClusterRPTest4/Databases/KustoDatabase9", + "name": "KustoClusterRPTest4/KustoDatabase9", + "type": "Microsoft.Kusto/Clusters/Databases", + "etag": "W/\"datetime'2017-12-05T15%3A28%3A05.732611Z'\"", + "location": "westus", + "properties": { + "softDeletePeriodInDays": 1, + "provisioningState": "Succeeded" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoDatabasesUpdate.json b/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoDatabasesUpdate.json new file mode 100644 index 000000000000..1121894720f7 --- /dev/null +++ b/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoDatabasesUpdate.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "12345678-1234-1234-1234-123456789098", + "resourceGroupName": "kustorptest", + "clusterName": "KustoClusterRPTest4", + "databaseName": "KustoDatabase8", + "api-version": "2017-09-07-privatepreview", + "parameters": { + "location": "westus", + "properties": { + "softDeletePeriodInDays": 1 + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Kusto/Clusters/KustoClusterRPTest4/Databases/KustoDatabase8", + "name": "KustoClusterRPTest4/KustoDatabase8", + "type": "Microsoft.Kusto/Clusters/Databases", + "etag": "W/\"datetime'2017-12-05T15%3A28%3A05.732611Z'\"", + "location": "westus", + "properties": { + "softDeletePeriodInDays": 1, + "provisioningState": "Succeeded" + } + } + }, + "201": {}, + "202": {} + } +} \ No newline at end of file diff --git a/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoOperationsList.json b/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoOperationsList.json new file mode 100644 index 000000000000..daf102011299 --- /dev/null +++ b/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/examples/KustoOperationsList.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2017-09-07-privatepreview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "operationName", + "display": { + "provider": "providerName", + "resource": "resourceName", + "operation": "operationName", + "description": "description" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/kusto.json b/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/kusto.json new file mode 100644 index 000000000000..0bd1e4ed2a63 --- /dev/null +++ b/specification/azure-kusto/resource-manager/Microsoft.Kusto/2017-09-07-privatepreview/kusto.json @@ -0,0 +1,894 @@ +{ + "swagger": "2.0", + "info": { + "title": "KustoManagementClient", + "version": "2017-09-07-privatepreview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}": { + "get": { + "tags": [ + "Clusters" + ], + "operationId": "Clusters_Get", + "x-ms-examples": { + "KustoClustersGet": { + "$ref": "./examples/KustoClustersGet.json" + } + }, + "description": "Gets a Kusto cluster.", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ClusterNameParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The Kusto cluster.", + "schema": { + "$ref": "#/definitions/Cluster" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + }, + "put": { + "tags": [ + "Clusters" + ], + "operationId": "Clusters_CreateOrUpdate", + "x-ms-examples": { + "KustoClustersCreateOrUpdate": { + "$ref": "./examples/KustoClustersCreateOrUpdate.json" + } + }, + "x-ms-long-running-operation": true, + "description": "Create or update a Kusto cluster.", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ClusterNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Cluster" + }, + "description": "The Kusto cluster parameters supplied to the CreateOrUpdate operation." + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the Cluster.", + "schema": { + "$ref": "#/definitions/Cluster" + } + }, + "201": { + "description": "Successfully created the cluster.", + "schema": { + "$ref": "#/definitions/Cluster" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + }, + "patch": { + "tags": [ + "Clusters" + ], + "operationId": "Clusters_Update", + "x-ms-examples": { + "KustoClustersUpdate": { + "$ref": "./examples/KustoClustersUpdate.json" + } + }, + "x-ms-long-running-operation": true, + "description": "Update a Kusto cluster.", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ClusterNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ClusterUpdate" + }, + "description": "The Kusto cluster parameters supplied to the Update operation." + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the Cluster.", + "schema": { + "$ref": "#/definitions/Cluster" + } + }, + "201": { + "description": "Successfully updated the cluster.", + "schema": { + "$ref": "#/definitions/Cluster" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + }, + "delete": { + "tags": [ + "Clusters" + ], + "operationId": "Clusters_Delete", + "x-ms-examples": { + "KustoClustersDelete": { + "$ref": "./examples/KustoClustersDelete.json" + } + }, + "x-ms-long-running-operation": true, + "description": "Deletes a Kusto cluster.", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ClusterNameParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK -- cluster deleted successfully." + }, + "202": { + "description": "Accepted the delete cluster request." + }, + "204": { + "description": "NoContent -- cluster does not exist in the subscription." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters": { + "get": { + "tags": [ + "Clusters" + ], + "operationId": "Clusters_ListByResourceGroup", + "x-ms-examples": { + "KustoClustersListByResourceGroup": { + "$ref": "./examples/KustoClustersListByResourceGroup.json" + } + }, + "description": "Lists all Kusto clusters within a resource group.", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/ClusterListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Kusto/clusters": { + "get": { + "tags": [ + "Clusters" + ], + "operationId": "Clusters_List", + "x-ms-examples": { + "KustoClustersList": { + "$ref": "./examples/KustoClustersList.json" + } + }, + "description": "Lists all Kusto clusters within a subscription.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "", + "schema": { + "$ref": "#/definitions/ClusterListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases": { + "get": { + "tags": [ + "Databases" + ], + "description": "Returns the list of databases of the given Kusto cluster.", + "operationId": "Databases_ListByCluster", + "x-ms-examples": { + "KustoDatabasesListByCluster": { + "$ref": "./examples/KustoDatabasesListByCluster.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ClusterNameParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of databases.", + "schema": { + "$ref": "#/definitions/DatabaseListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/clusters/{clusterName}/databases/{databaseName}": { + "get": { + "tags": [ + "Databases" + ], + "description": "Returns a database.", + "operationId": "Databases_Get", + "x-ms-examples": { + "KustoDatabasesGet": { + "$ref": "./examples/KustoDatabasesGet.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ClusterNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified database.", + "schema": { + "$ref": "#/definitions/Database" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + }, + "put": { + "tags": [ + "Databases" + ], + "description": "Creates or updates a database.", + "operationId": "Databases_CreateOrUpdate", + "x-ms-examples": { + "KustoDatabasesCreateOrUpdate": { + "$ref": "./examples/KustoDatabasesCreateOrUpdate.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ClusterNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Database" + }, + "description": "The database parameters supplied to the CreateOrUpdate operation." + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the database.", + "schema": { + "$ref": "#/definitions/Database" + } + }, + "201": { + "description": "Successfully created the database.", + "schema": { + "$ref": "#/definitions/Database" + } + }, + "202": { + "description": "Accepted the create database request." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": true + }, + "patch": { + "tags": [ + "Databases" + ], + "description": "Updates a database.", + "operationId": "Databases_Update", + "x-ms-examples": { + "KustoDatabasesUpdate": { + "$ref": "./examples/KustoDatabasesUpdate.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ClusterNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseUpdate" + }, + "description": "The database parameters supplied to the Update operation." + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the database.", + "schema": { + "$ref": "#/definitions/Database" + } + }, + "201": { + "description": "Successfully updated the database.", + "schema": { + "$ref": "#/definitions/Database" + } + }, + "202": { + "description": "Accepted the update database request." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": true + }, + "delete": { + "tags": [ + "Databases" + ], + "description": "Deletes the database with the given name.", + "operationId": "Databases_Delete", + "x-ms-examples": { + "KustoDatabasesDelete": { + "$ref": "./examples/KustoDatabasesDelete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ClusterNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the database." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified database does not exist." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": true + } + }, + "/providers/Microsoft.Kusto/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "x-ms-examples": { + "KustoOperationsList": { + "$ref": "./examples/KustoOperationsList.json" + } + }, + "description": "Lists available operations for the Microsoft.Kusto provider", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The operation was successful. The response contains the list of available operations.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "ClusterProperties": { + "properties": { + "provisioningState": { + "type": "string", + "readOnly": true, + "description": "The provisioned state of the resource", + "enum": [ + "Running", + "Creating", + "Deleting", + "Succeeded", + "Failed" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + } + } + }, + "description": "Class representing the Kusto cluster properties." + }, + "DatabaseProperties": { + "properties": { + "provisioningState": { + "type": "string", + "readOnly": true, + "description": "The provisioned state of the resource", + "enum": [ + "Running", + "Creating", + "Deleting", + "Succeeded", + "Failed" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + } + }, + "softDeletePeriodInDays": { + "type": "integer", + "description": "The number of days data should be kept before it stops being accessible to queries." + } + }, + "required": [ + "softDeletePeriodInDays" + ], + "description": "Class representing the Kusto database properties." + }, + "Cluster": { + "properties": { + "location": { + "type": "string", + "description": "Resource location" + }, + "etag": { + "readOnly": true, + "type": "string", + "description": "An etag of the resource created" + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ClusterProperties" + } + }, + "allOf": [ + { + "$ref": "../../../../common-types/resource-management/v1/types.json#/definitions/TrackedResource" + } + ], + "description": "Class representing a Kusto cluster." + }, + "ClusterUpdate": { + "properties": { + "location": { + "type": "string", + "description": "Resource location" + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ClusterProperties" + } + }, + "allOf": [ + { + "$ref": "../../../../common-types/resource-management/v1/types.json#/definitions/Resource" + } + ], + "description": "Class representing an update to a Kusto cluster." + }, + "Database": { + "properties": { + "location": { + "type": "string", + "description": "Resource location" + }, + "etag": { + "readOnly": true, + "type": "string", + "description": "An etag of the resource created" + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/DatabaseProperties" + } + }, + "allOf": [ + { + "$ref": "../../../../common-types/resource-management/v1/types.json#/definitions/TrackedResource" + } + ], + "description": "Class representing a Kusto database." + }, + "DatabaseUpdate": { + "properties": { + "location": { + "type": "string", + "description": "Resource location" + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/DatabaseProperties" + } + }, + "allOf": [ + { + "$ref": "../../../../common-types/resource-management/v1/types.json#/definitions/Resource" + } + ], + "description": "Class representing an update to a Kusto database." + }, + "ClusterListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Cluster" + }, + "description": "The list of Kusto clusters." + } + }, + "description": "The list Kusto clusters operation response." + }, + "DatabaseListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Database" + }, + "description": "The list of Kusto databases." + } + }, + "description": "The list Kusto databases operation response." + }, + "CloudError": { + "x-ms-external": true, + "properties": { + "error": { + "$ref": "#/definitions/CloudErrorBody" + } + }, + "description": "An error response from Kusto." + }, + "CloudErrorBody": { + "x-ms-external": true, + "properties": { + "code": { + "type": "string", + "description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically." + }, + "message": { + "type": "string", + "description": "A message describing the error, intended to be suitable for displaying in a user interface." + }, + "target": { + "type": "string", + "description": "The target of the particular error. For example, the name of the property in error." + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudErrorBody" + }, + "description": "A list of additional details about the error." + } + }, + "description": "An error response from Kusto." + }, + "OperationListResult": { + "title": "Result of the request to list REST API operations. It contains a list of operations and a URL nextLink to get the next set of results.", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + }, + "title": "The list of operations supported by the resource provider." + }, + "nextLink": { + "type": "string", + "title": "The URL to get the next set of operation list results if there are any." + } + } + }, + "Operation": { + "title": "A REST API operation", + "type": "object", + "properties": { + "name": { + "title": "The operation name.", + "description": "This is of the format {provider}/{resource}/{operation}", + "type": "string" + }, + "display": { + "title": "The object that describes the operation.", + "properties": { + "provider": { + "title": "Friendly name of the resource provider.", + "type": "string" + }, + "operation": { + "title": "The operation type.", + "description": "For example: read, write, delete.", + "type": "string" + }, + "resource": { + "title": "The resource type on which the operation is performed.", + "type": "string" + }, + "description": { + "title": "The friendly name of the operation", + "type": "string" + } + } + }, + "origin": { + "title": "The intended executor of the operation.", + "type": "string" + }, + "properties": { + "title": "Properties of the operation.", + "type": "object" + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call." + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + }, + "ClusterNameParameter": { + "name": "clusterName", + "in": "path", + "description": "The name of the Kusto cluster.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ResourceGroupParameter": { + "name": "resourceGroupName", + "in": "path", + "description": "The name of the resource group containing the Kusto cluster.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database in the Kusto cluster.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} \ No newline at end of file diff --git a/specification/azure-kusto/resource-manager/readme.md b/specification/azure-kusto/resource-manager/readme.md new file mode 100644 index 000000000000..792c62a33834 --- /dev/null +++ b/specification/azure-kusto/resource-manager/readme.md @@ -0,0 +1,80 @@ +# Kusto + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for Kusto. + + + +--- +## Getting Started +To build the SDK for Kusto, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run: + +> `autorest` + +To see additional help and options, run: + +> `autorest --help` +--- + +## Configuration + + + +### Basic Information +These are the global settings for the Kusto API. + +``` yaml +title: KustoManagementClient +description: The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases. +openapi-type: arm +tag: package-2017-09-07-privatepreview +``` + +### Tag: package-2017-09-07-privatepreview + +These settings apply only when `--tag=package-2017-09-07-privatepreview` is specified on the command line. + +``` yaml $(tag) == 'package-2017-09-07-privatepreview' +input-file: + - Microsoft.Kusto/2017-09-07-privatepreview/kusto.json +``` + + +### Tag: schema-2017-09-07-privatepreview + +These settings apply only when `--tag=schema-2017-09-07-privatepreview` is specified on the command line. + +These can be regenerated by running the following PowerShell script from this readme file's folder: `dir .\Microsoft.Kusto\2017-09-07-privatepreview\ -File | Resolve-Path -Relative | % { " - $_".Replace("\", "/") }` + +``` yaml $(tag) == 'schema-2017-09-07-privatepreview' +input-file: + - Microsoft.Kusto/2017-09-07-privatepreview/kusto.json +``` + +# Code Generation + + +## Swagger to SDK + +This section describes what SDK should be generated by the automatic system. +This is not used by Autorest itself. + +``` yaml $(swagger-to-sdk) +swagger-to-sdk: + - repo: azure-sdk-for-python +``` + +## C# + +These settings apply only when `--csharp` is specified on the command line. +Please also specify `--csharp-sdks-folder=`. + +``` yaml $(csharp) +csharp: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + namespace: Microsoft.Azure.Management.Kusto + output-folder: $(csharp-sdks-folder)/Kusto/Management.Kusto/Generated + clear-output-folder: true +``` diff --git a/specification/azure-kusto/resource-manager/readme.python.md b/specification/azure-kusto/resource-manager/readme.python.md new file mode 100644 index 000000000000..22cad2f9da54 --- /dev/null +++ b/specification/azure-kusto/resource-manager/readme.python.md @@ -0,0 +1,27 @@ +## Python + +These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. +Use `--python-mode=update` if you already have a setup.py and just want to update the code itself. + +``` yaml $(python) +python-mode: create +python: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 2 + namespace: azure.mgmt.kusto + package-name: azure-mgmt-kusto + package-version: 0.1.0 + clear-output-folder: true +``` +``` yaml $(python) && $(python-mode) == 'update' +python: + no-namespace-folders: true + output-folder: $(python-sdks-folder)/azure-mgmt-kusto/azure/mgmt/kusto +``` +``` yaml $(python) && $(python-mode) == 'create' +python: + basic-setup-py: true + output-folder: $(python-sdks-folder)/azure-mgmt-kusto +```