diff --git a/CODEOWNERS b/CODEOWNERS index 41882de99153..04bcf82070f1 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -10,7 +10,7 @@ /specification/billing/ @wilcobmsft /specification/cdn/ @csmengwan @injyzarif @prakharsharma10 /specification/cognitiveservices/ @davidlicig @felixwa @yangyuan -/specification/compute/ @huangpf @hyonholee +/specification/compute/ @huangpf @hyonholee /specification/consumption/ @kjeur @panda-wang /specification/containerinstance/ @samkreter /specification/containerregistry/ @djyou @@ -43,7 +43,7 @@ /specification/mobileengagement/ @pshrosbree /specification/monitor/ @gucalder /specification/mysql/ @qingqingyuan -/specification/network/ @MikhailTryakhov +/specification/network/ @MikhailTryakhov /specification/notificationhubs/ @amolr @smithab /specification/operationalinsights/ @sw47 /specification/operationsmanagement/ @dashimi16 @@ -58,6 +58,7 @@ /specification/resources/ @rajshah11 @stankovski @vivsriaus /specification/scheduler/ @pinwang81 /specification/search/ @brjohnstmsft +/specification/serialconsole/ @amitchat @craigw @asinn826 /specification/service-map/ @daveirwin1 /specification/servicebus/ @sazeesha @v-ajnava /specification/servicefabric/ @juhacket @samedder diff --git a/profiles/ResourceSchemas.md b/profiles/ResourceSchemas.md index 16e1e8e9f613..eba0a06a8194 100644 --- a/profiles/ResourceSchemas.md +++ b/profiles/ResourceSchemas.md @@ -2,15 +2,15 @@ > see https://aka.ms/autorest -``` yaml +``` yaml batch: output-folder: c:/work/github/azure-resource-manager-schemas/generated override-info: title: $(name) - azureresourceschema: + azureresourceschema: note: This generates all the Azure Resource Schemas into the specified folder (merging as it goes) -``` +``` ## Specifications @@ -18,7 +18,7 @@ This should include every single REST-API specification for every Azure Resource ``` yaml batch: - input-file: + input-file: - ../specification/customer-insights/resource-manager/Microsoft.CustomerInsights/2017-01-01/customer-insights.json - ../specification/automation/resource-manager/Microsoft.Automation/2015-10-31/account.json - ../specification/automation/resource-manager/Microsoft.Automation/2015-10-31/certificate.json @@ -38,7 +38,7 @@ batch: - ../specification/automation/resource-manager/Microsoft.Automation/2015-10-31/schedule.json - ../specification/automation/resource-manager/Microsoft.Automation/2015-10-31/variable.json - ../specification/automation/resource-manager/Microsoft.Automation/2015-10-31/webhook.json - + - ../specification/advisor/resource-manager/Microsoft.Advisor/2016-07-12-preview/advisor.json - ../specification/advisor/resource-manager/Microsoft.Advisor/2017-03-31/advisor.json - ../specification/advisor/resource-manager/Microsoft.Advisor/2017-04-19/advisor.json @@ -93,7 +93,7 @@ batch: - ../specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/2016-06-27-preview/containerregistry.json - ../specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/2017-03-01/containerregistry.json - ../specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/2017-06-01-preview/containerregistry.json - + - ../specification/datalake-analytics/resource-manager/Microsoft.DataLakeAnalytics/2015-10-01-preview/account.json - ../specification/datalake-analytics/resource-manager/Microsoft.DataLakeAnalytics/2015-10-01-preview/catalog.json - ../specification/datalake-analytics/resource-manager/Microsoft.DataLakeAnalytics/2015-11-01-preview/job.json @@ -243,6 +243,7 @@ batch: - ../specification/scheduler/resource-manager/Microsoft.Scheduler/2016-03-01/scheduler.json - ../specification/search/resource-manager/Microsoft.Search/2015-02-28/search.json - ../specification/search/resource-manager/Microsoft.Search/2015-08-19/search.json + - ../specification/serialconsole/resource-manager/Microsoft.SerialConsole/2018-05-01/serialconsole.json - ../specification/servermanagement/resource-manager/Microsoft.ServerManagement/2015-07-01-preview/servermanagement.json - ../specification/servermanagement/resource-manager/Microsoft.ServerManagement/2016-07-01-preview/servermanagement.json - ../specification/service-map/resource-manager/Microsoft.OperationalInsights/2015-11-01-preview/arm-service-map.json @@ -268,7 +269,7 @@ batch: - ../specification/storage/resource-manager/Microsoft.Storage/2016-12-01/storage.json - ../specification/storageimportexport/resource-manager/Microsoft.ImportExport/2016-11-01/storageimportexport.json - ../specification/storsimple8000series/resource-manager/Microsoft.StorSimple/2017-06-01/storsimple.json - + - ../specification/trafficmanager/resource-manager/Microsoft.Network/2015-11-01/trafficmanager.json - ../specification/trafficmanager/resource-manager/Microsoft.Network/2017-03-01/trafficmanager.json - ../specification/web/resource-manager/Microsoft.CertificateRegistration/2015-08-01/AppServiceCertificateOrders.json @@ -283,9 +284,9 @@ 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 -``` \ No newline at end of file +``` \ No newline at end of file diff --git a/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/DisableConsoleExamples.json b/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/DisableConsoleExamples.json new file mode 100644 index 000000000000..062479774669 --- /dev/null +++ b/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/DisableConsoleExamples.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "subscriptionId": "00000000-00000-0000-0000-000000000000", + "default": "default" + }, + "responses": { + "200": { + "body": { + "disabled": true + } + }, + "default": { + "body": { + "errorMessage": "This message will contain details on failure" + } + } + } +} \ No newline at end of file diff --git a/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/EnableConsoleExamples.json b/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/EnableConsoleExamples.json new file mode 100644 index 000000000000..05ca5ee88f45 --- /dev/null +++ b/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/EnableConsoleExamples.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "subscriptionId": "00000000-00000-0000-0000-000000000000", + "default": "default" + }, + "responses": { + "200": { + "body": { + "disabled": false + } + }, + "default": { + "body": { + "errorMessage": "This message will contain details on failure" + } + } + } +} \ No newline at end of file diff --git a/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/GetConsoleDisabledExamples.json b/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/GetConsoleDisabledExamples.json new file mode 100644 index 000000000000..970c46eeb354 --- /dev/null +++ b/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/GetConsoleDisabledExamples.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "subscriptionId": "00000000-00000-0000-0000-000000000000", + "default": "default" + }, + "responses": { + "200": { + "body": { + "disabled": true + } + }, + "default": { + "body": { + "errorMessage": "This message contains details on failure" + } + } + } +} \ No newline at end of file diff --git a/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/GetOperationsExample.json b/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/GetOperationsExample.json new file mode 100644 index 000000000000..f36e22c435ad --- /dev/null +++ b/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/GetOperationsExample.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "subscriptionId": "00000000-00000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": "Get operations response" + } + } + } +} \ No newline at end of file diff --git a/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/serialconsole.json b/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/serialconsole.json new file mode 100644 index 000000000000..d38015475c13 --- /dev/null +++ b/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/serialconsole.json @@ -0,0 +1,280 @@ +{ + "swagger": "2.0", + "info": { + "title": "MicrosoftSerialConsoleClient", + "version": "2018-05-01", + "description": "Azure Virtual Machine Serial Console allows you to access serial console of a Virtual Machine" + }, + "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}/providers/Microsoft.SerialConsole/operations": { + "get": { + "tags": [ + "SerialConsole" + ], + "operationId": "List_Operations", + "description": "Gets a list of Serial Console API operations.", + "x-ms-examples": { + "List all Serial Console management operations supported by Serial Console RP": { + "$ref": "./examples/GetOperationsExample.json" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - returns a JSON object", + "schema": { + "$ref": "#/definitions/SerialConsoleOperations" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}": { + "get": { + "tags": [ + "ConsoleDisabled" + ], + "operationId": "ListConsole_Disabled", + "description": "Gets if Serial Console is disabled for a subscription.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/default" + } + ], + "responses": { + "200": { + "description": "OK - Returns a JSON object", + "schema": { + "$ref": "#/definitions/GetDisabledResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DeploymentValidateResult" + } + } + }, + "x-ms-examples": { + "Successfully get whether or not Serial Console is disabled": { + "$ref": "./examples/GetConsoleDisabledExamples.json" + }, + "Get whether or not Serial Console is disabled and receive error": { + "$ref": "./examples/GetConsoleDisabledExamples.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/providers/consoleServices/{default}/enableConsole": { + "post": { + "tags": [ + "EnableConsole" + ], + "operationId": "Console_EnableConsole", + "description": "Enables Serial Console for a VM", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/default" + } + ], + "responses": { + "200": { + "description": "OK - Serial Console disabled", + "schema": { + "$ref": "#/definitions/SetDisabledResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DeploymentValidateResult" + } + } + }, + "x-ms-examples": { + "Enable console successfully": { + "$ref": "./examples/EnableConsoleExamples.json" + }, + "Enable console with error": { + "$ref": "./examples/EnableConsoleExamples.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/providers/consoleServices/{default}/disableConsole": { + "post": { + "tags": [ + "DisableConsole" + ], + "operationId": "Console_DisableConsole", + "description": "Disables Serial Console for a VM", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/default" + } + ], + "responses": { + "200": { + "description": "OK - Serial Console disabled", + "schema": { + "$ref": "#/definitions/SetDisabledResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/DeploymentValidateResult" + } + } + }, + "x-ms-examples": { + "Enable console successfully": { + "$ref": "./examples/DisableConsoleExamples.json" + }, + "Disable console with error": { + "$ref": "./examples/DisableConsoleExamples.json" + } + } + } + } + }, + "definitions": { + "SerialConsoleGetResult": { + "title": "Serial Console GET Result", + "description": "Returns whether or not Serial Console is disabled.", + "properties": { + "value": { + "description": "Whether or not Serial Console is disabled.", + "type": "boolean" + } + } + }, + "GetDisabledResult": { + "title": "Get Disabled result", + "description": "Returns whether or not Serial Console is disabled for this given subscription", + "properties": { + "disabled": { + "description": "Disabled result", + "type": "boolean" + } + } + }, + "SetDisabledResult": { + "title": "Set Disabled result", + "description": "Sets disable status and returns whether or not Serial Console is now disabled for this given subscription", + "properties": { + "disabled": { + "description": "Disabled result", + "type": "boolean" + } + } + }, + "DeploymentValidateResult": { + "title": "Details on Failure", + "description": "Details on Failure", + "properties": { + "errorMessage": { + "description": "Error message", + "type": "string" + } + } + }, + "SerialConsoleOperations": { + "title": "Serial Console operations", + "description": "Serial Console operations", + "type": "object", + "properties": { + "value": { + "description": "Serial Console operations", + "type": "string" + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of the target subscription." + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for this operation." + }, + "default" :{ + "name": "default", + "in": "path", + "required": true, + "type": "string", + "description": "Default string modeled as parameter for URL to work correctly.", + "enum": [ + "default" + ], + "x-ms-parameter-location": "method" + } + } +} \ No newline at end of file diff --git a/specification/serialconsole/resource-manager/readme.md b/specification/serialconsole/resource-manager/readme.md new file mode 100644 index 000000000000..862338399d21 --- /dev/null +++ b/specification/serialconsole/resource-manager/readme.md @@ -0,0 +1,54 @@ +# Serial Console +> see https://aka.ms/autorest + +This is the AutoRest configuration file for Serial Console. + +## Getting Started +To build the SDKs for Serial Console, simply install AutoRest via `npm` (`npm install -g autorest`) and then run: +> `autorest readme.md` + +To see additional help and options, run: +> `autorest --help` + +For other options on installation see [Installing AutoRest](https://aka.ms/autorest/install) on the AutoRest github page. + +--- + +## Configuration + +### Basic Information +These are the global settings for the Serial Console API. + +``` yaml +openapi-type: arm +azure-arm: true +tag: package-2018-05 +input-file: +- Microsoft.SerialConsole/stable/2018-05-01/serialconsole.json +output-folder: ./Generated +``` + + +--- +# Code Generation + +## C# + +These settings apply only when `--csharp` is specified on the command line. + +``` yaml $(csharp) +csharp: + azure-arm: true + output-folder: ./Generated + clear-output-folder: true +``` + +## 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 +``` diff --git a/specification/serialconsole/resource-manager/readme.python.md b/specification/serialconsole/resource-manager/readme.python.md new file mode 100644 index 000000000000..9b944e408033 --- /dev/null +++ b/specification/serialconsole/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.serialconsole + package-name: azure-mgmt-serialconsole + 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-serialconsole/azure/mgmt/serialconsole +``` +``` yaml $(python) && $(python-mode) == 'create' +python: + basic-setup-py: true + output-folder: $(python-sdks-folder)/azure-mgmt-serialconsole +``` \ No newline at end of file