{ "swagger": "2.0", "info": { "title": "MicrosoftSerialConsoleClient", "version": "2023-01-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" } } } }, "/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": { "SerialPortProperties": { "description": "The properties of the serial port.", "type": "object", "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 } }, "connectionState": { "description": "Specifies whether the port is currently active.", "type": "string", "enum": [ "active", "inactive" ], "x-ms-enum": { "name": "SerialPortConnectionState", "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": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" } ] }, "SerialPortListResult": { "title": "Serial port list result", "description": "The list serial ports operation response.", "type": "object", "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, "type": "object", "properties": { "error": { "$ref": "#/definitions/CloudErrorBody", "description": "Cloud error body." } } }, "CloudErrorBody": { "description": "An error response from the Batch service.", "x-ms-external": true, "type": "object", "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" }, "x-ms-identifiers": [ "code" ], "description": "A list of additional details about the error." } } } }, "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" } } }