diff --git a/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/CreateSerialPort.json b/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/CreateSerialPort.json new file mode 100644 index 000000000000..c4177b3a144f --- /dev/null +++ b/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/CreateSerialPort.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "subscriptionId": "00000000-00000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "resourceProviderNamespace": "Microsoft.Compute", + "parentResourceType": "virtualMachines", + "parentResource": "myVM", + "serialPort": "0", + "parameters": { + "properties": { + "state": "enabled" + } + } + }, + "responses": { + "201": { + "body": { + "name": "0", + "id": "/subscriptions/00000000-00000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/providers/Microsoft.SerialConsole/serialPorts/0", + "type": "Microsoft.SerialConsole/serialPorts", + "properties": { + "state": "enabled" + } + } + } + } +} diff --git a/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/DeleteSerialPort.json b/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/DeleteSerialPort.json new file mode 100644 index 000000000000..02bc98e3b764 --- /dev/null +++ b/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/DeleteSerialPort.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "subscriptionId": "00000000-00000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "resourceProviderNamespace": "Microsoft.Compute", + "parentResourceType": "virtualMachines", + "parentResource": "myVM", + "serialPort": "0" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/GetSerialPort.json b/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/GetSerialPort.json new file mode 100644 index 000000000000..1828a0fcbcec --- /dev/null +++ b/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/GetSerialPort.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "subscriptionId": "00000000-00000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "resourceProviderNamespace": "Microsoft.Compute", + "parentResourceType": "virtualMachines", + "parentResource": "myVM", + "serialPort": "0" + }, + "responses": { + "200": { + "body": { + "name": "0", + "id": "/subscriptions/00000000-00000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/providers/Microsoft.SerialConsole/serialPorts/0", + "type": "Microsoft.SerialConsole/serialPorts", + "properties": { + "state": "enabled" + } + } + } + } +} diff --git a/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/ListSerialPort.json b/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/ListSerialPort.json new file mode 100644 index 000000000000..e103105fe075 --- /dev/null +++ b/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/ListSerialPort.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "subscriptionId": "00000000-00000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "resourceProviderNamespace": "Microsoft.Compute", + "parentResourceType": "virtualMachines", + "parentResource": "myVM" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "0", + "id": "/subscriptions/00000000-00000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/providers/Microsoft.SerialConsole/serialPorts/0", + "type": "Microsoft.SerialConsole/serialPorts", + "properties": { + "state": "enabled" + } + } + ] + } + } + } +} diff --git a/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/ListSerialPortSubscription.json b/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/ListSerialPortSubscription.json new file mode 100644 index 000000000000..da182d78413e --- /dev/null +++ b/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/ListSerialPortSubscription.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "subscriptionId": "00000000-00000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "0", + "id": "/subscriptions/00000000-00000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/providers/Microsoft.SerialConsole/serialPorts/0", + "type": "Microsoft.SerialConsole/serialPorts", + "properties": { + "state": "enabled" + } + } + ] + } + } + } +} diff --git a/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/SerialPortConnectVM.json b/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/SerialPortConnectVM.json new file mode 100644 index 000000000000..1621ef85457c --- /dev/null +++ b/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/SerialPortConnectVM.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "subscriptionId": "00000000-00000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "resourceProviderNamespace": "Microsoft.Compute", + "parentResourceType": "virtualMachines", + "parentResource": "myVM", + "serialPort": "0" + }, + "responses": { + "200": { + "body": { + "connectionString": "wss://eastus.gateway.serialconsole.azure.com/n/connector/{containerid}/sessions/{sessionId}/client" + } + } + } +} diff --git a/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/SerialPortConnectVMSS.json b/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/SerialPortConnectVMSS.json new file mode 100644 index 000000000000..b85bb80eb823 --- /dev/null +++ b/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/examples/SerialPortConnectVMSS.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "subscriptionId": "00000000-00000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "resourceProviderNamespace": "Microsoft.Compute", + "parentResourceType": "virtualMachineScaleSets", + "parentResource": "myscaleset/virtualMachines/2", + "serialPort": "0" + }, + "responses": { + "200": { + "body": { + "connectionString": "wss://eastus.gateway.serialconsole.azure.com/n/connector/{containerid}/sessions/{sessionId}/client" + } + } + } +} diff --git a/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/serialport.json b/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/serialport.json new file mode 100644 index 000000000000..429bb8ef7f9d --- /dev/null +++ b/specification/serialconsole/resource-manager/Microsoft.SerialConsole/stable/2018-05-01/serialport.json @@ -0,0 +1,528 @@ +{ + "swagger": "2.0", + "info": { + "title": "MicrosoftSerialConsoleClient", + "version": "2018-05-01", + "description": "The Azure Serial Console allows you to access the serial console of a Virtual Machine or VM scale set instance" + }, + "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/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts": { + "get": { + "tags": [ + "SerialPorts" + ], + "operationId": "SerialPorts_List", + "description": "Lists all of the configured serial ports for a parent resource ", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceProviderNamespaceParameter" + }, + { + "$ref": "#/parameters/ParentResourceTypeParameter" + }, + { + "$ref": "#/parameters/ParentResourceParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/SerialPortListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "List Serial Ports for parent resources": { + "$ref": "./examples/ListSerialPort.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts/{serialPort}": { + "get": { + "tags": [ + "SerialPorts" + ], + "operationId": "SerialPorts_Get", + "description": "Gets the configured settings for a serial port", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceProviderNamespaceParameter" + }, + { + "$ref": "#/parameters/ParentResourceTypeParameter" + }, + { + "$ref": "#/parameters/ParentResourceParameter" + }, + { + "name": "serialPort", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the serial port to connect to." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/SerialPort" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Get the serial port for a parent resource": { + "$ref": "./examples/GetSerialPort.json" + } + } + }, + "put": { + "tags": [ + "SerialPorts" + ], + "operationId": "SerialPorts_Create", + "description": "Creates or updates a serial port", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceProviderNamespaceParameter" + }, + { + "$ref": "#/parameters/ParentResourceTypeParameter" + }, + { + "$ref": "#/parameters/ParentResourceParameter" + }, + { + "name": "serialPort", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the serial port to create." + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SerialPort" + }, + "description": "Parameters supplied to create the serial port." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/SerialPort" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Create a new serial port resource.": { + "$ref": "./examples/CreateSerialPort.json" + } + } + }, + "delete": { + "tags": [ + "SerialPorts" + ], + "operationId": "SerialPorts_Delete", + "description": "Deletes a serial port", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceProviderNamespaceParameter" + }, + { + "$ref": "#/parameters/ParentResourceTypeParameter" + }, + { + "$ref": "#/parameters/ParentResourceParameter" + }, + { + "name": "serialPort", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the serial port to delete." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "204": { + "description": "No Content" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Delete a serial port resource": { + "$ref": "./examples/DeleteSerialPort.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/serialPorts": { + "get": { + "tags": [ + "SerialPorts" + ], + "description": "Handles requests to list all SerialPort resources in a subscription.", + "operationId": "SerialPorts_ListBySubscriptions", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Return a list of SerialPort resources", + "schema": { + "$ref": "#/definitions/SerialPortListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "List Serial Ports for subscription": { + "$ref": "./examples/ListSerialPortSubscription.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourceType}/{parentResource}/providers/Microsoft.SerialConsole/serialPorts/{serialPort}/connect": { + "post": { + "tags": [ + "SerialPorts" + ], + "operationId": "SerialPorts_Connect", + "description": "Connect to serial port of the target resource", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceProviderNamespaceParameter" + }, + { + "$ref": "#/parameters/ParentResourceTypeParameter" + }, + { + "$ref": "#/parameters/ParentResourceParameter" + }, + { + "name": "serialPort", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the serial port to connect to." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Return a connection string", + "schema": { + "$ref": "#/definitions/SerialPortConnectResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Connect to a virtual machine serial port": { + "$ref": "./examples/SerialPortConnectVM.json" + }, + "Connect to a scale set instance serial port": { + "$ref": "./examples/SerialPortConnectVMSS.json" + } + } + } + } + }, + "definitions": { + "Resource": { + "description": "The Resource model definition.", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "Resource Id" + }, + "name": { + "readOnly": true, + "type": "string", + "description": "Resource name" + }, + "type": { + "readOnly": true, + "type": "string", + "description": "Resource type" + } + }, + "x-ms-azure-resource": true + }, + "ProxyResource": { + "description": "The resource model definition for a ARM proxy resource. It will have everything other than required location and tags", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "SerialPortProperties": { + "description": "The properties of the serial port.", + "properties": { + "state": { + "description": "Specifies whether the port is enabled for a serial console connection.", + "type": "string", + "enum": [ + "enabled", + "disabled" + ], + "x-ms-enum": { + "name": "SerialPortState", + "modelAsString": false + } + } + } + }, + "SerialPort": { + "title": "Serial port", + "description": "Represents the serial port of the parent resource.", + "type": "object", + "properties": { + "properties": { + "description": "The properties of the serial port.", + "x-ms-client-flatten": true, + "$ref": "#/definitions/SerialPortProperties" + } + }, + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ] + }, + "SerialPortListResult": { + "title": "Serial port list result", + "description": "The list serial ports operation response.", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/SerialPort" + }, + "description": "The list of serial ports." + } + } + }, + "SerialPortConnectResult": { + "title": "Serial port connect result", + "description": "Returns a connection string to the serial port of the resource.", + "type": "object", + "properties": { + "connectionString": { + "description": "Connection string to the serial port of the resource.", + "type": "string" + } + } + }, + "CloudError": { + "description": "An error response from the service.", + "x-ms-external": true, + "properties": { + "error": { + "$ref": "#/definitions/CloudErrorBody", + "description": "Cloud error body." + } + } + }, + "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 display 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 the Batch service." + } + }, + "parameters": { + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for this operation." + }, + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "Subscription ID which uniquely identifies the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call requiring it." + }, + "defaultParameter": { + "name": "default", + "in": "path", + "required": true, + "type": "string", + "description": "Default parameter. Leave the value as \"default\".", + "x-ms-parameter-location": "method" + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group.", + "x-ms-parameter-location": "method" + }, + "ResourceProviderNamespaceParameter": { + "name": "resourceProviderNamespace", + "in": "path", + "required": true, + "type": "string", + "description": "The namespace of the resource provider.", + "x-ms-parameter-location": "method" + }, + "ParentResourceTypeParameter": { + "name": "parentResourceType", + "in": "path", + "required": true, + "type": "string", + "description": "The resource type of the parent resource. For example: 'virtualMachines' or 'virtualMachineScaleSets'", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "ParentResourceParameter": { + "name": "parentResource", + "in": "path", + "required": true, + "type": "string", + "description": "The resource name, or subordinate path, for the parent of the serial port. For example: the name of the virtual machine.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/serialconsole/resource-manager/readme.azureresourceschema.md b/specification/serialconsole/resource-manager/readme.azureresourceschema.md index 3b81576bee0f..275b646822c7 100644 --- a/specification/serialconsole/resource-manager/readme.azureresourceschema.md +++ b/specification/serialconsole/resource-manager/readme.azureresourceschema.md @@ -20,5 +20,6 @@ output-folder: $(azureresourceschema-folder)/schemas # all the input files in this apiVersion input-file: - Microsoft.SerialConsole/stable/2018-05-01/serialconsole.json + - Microsoft.SerialConsole/stable/2018-05-01/serialport.json ``` diff --git a/specification/serialconsole/resource-manager/readme.md b/specification/serialconsole/resource-manager/readme.md index 5d0c5c41e52b..49d8fbeff380 100644 --- a/specification/serialconsole/resource-manager/readme.md +++ b/specification/serialconsole/resource-manager/readme.md @@ -32,6 +32,7 @@ These settings apply only when `--tag=package-2018-05` is specified on the comma ``` yaml $(tag) == 'package-2018-05' input-file: - Microsoft.SerialConsole/stable/2018-05-01/serialconsole.json +- Microsoft.SerialConsole/stable/2018-05-01/serialport.json ``` ---