Virtual Machine Run Commands - List
Egy adott helyen lévő előfizetés összes elérhető futtatási parancsát felsorolja.
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands?api-version=2024-11-01
URI-paraméterek
Name | In | Kötelező | Típus | Description |
---|---|---|---|---|
location
|
path | True |
string minLength: 1 |
Az Azure-régió neve. |
subscription
|
path | True |
string minLength: 1 |
A cél-előfizetés azonosítója. |
api-version
|
query | True |
string minLength: 1 |
A művelethez használandó API-verzió. |
Válaszok
Name | Típus | Description |
---|---|---|
200 OK |
A kérés sikeres volt. Media Types: "application/json", "text/json" |
|
Other Status Codes |
Váratlan hibaválasz. Media Types: "application/json", "text/json" |
Biztonság
azure_auth
Azure Active Directory Oauth2-folyamat.
Típus:
oauth2
Folyamat:
implicit
Engedélyezési URL:
https://login.microsoftonline.com/common/oauth2/authorize
Hatókörök
Name | Description |
---|---|
user_impersonation | a felhasználói fiók megszemélyesítése |
Példák
VirtualMachineRunCommandList
Mintakérelem
Mintaválasz
{
"value": [
{
"$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json",
"id": "EnableRemotePS",
"osType": "Windows",
"label": "Enable remote PowerShell",
"description": "Configure the machine to enable remote PowerShell."
},
{
"$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json",
"id": "IPConfig",
"osType": "Windows",
"label": "List IP configuration",
"description": "Shows detailed information for the IP address, subnet mask and default gateway for each adapter bound to TCP/IP."
},
{
"$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json",
"id": "RunPowerShellScript",
"osType": "Windows",
"label": "Executes a PowerShell script",
"description": "Custom multiline PowerShell script should be defined in script property. Optional parameters can be set in parameters property."
},
{
"$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json",
"id": "RunShellScript",
"osType": "Linux",
"label": "Executes a Linux shell script",
"description": "Custom multiline shell script should be defined in script property. Optional parameters can be set in parameters property."
},
{
"$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json",
"id": "ifconfig",
"osType": "Linux",
"label": "List network configuration",
"description": "Get the configuration of all network interfaces."
},
{
"$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json",
"id": "EnableAdminAccount",
"osType": "Windows",
"label": "Enable administrator account",
"description": "Checks if the local Administrator account is disabled, and if so enables it."
},
{
"$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json",
"id": "ResetAccountPassword",
"osType": "Windows",
"label": "Reset built-in Administrator account password",
"description": "Reset built-in Administrator account password."
},
{
"$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json",
"id": "RDPSettings",
"osType": "Windows",
"label": "Verify RDP Listener Settings",
"description": "Checks registry settings and domain policy settings. Suggests policy actions if machine is part of a domain or modifies the settings to default values."
},
{
"$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json",
"id": "SetRDPPort",
"osType": "Windows",
"label": "Set Remote Desktop port",
"description": "Sets the default or user specified port number for Remote Desktop connections. Enables firewall rule for inbound access to the port."
},
{
"$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json",
"id": "ResetRDPCert",
"osType": "Windows",
"label": "Restore RDP Authentication mode to defaults",
"description": "Removes the SSL certificate tied to the RDP listener and restores the RDP listerner security to default. Use this script if you see any issues with the certificate."
}
]
}
Definíciók
Name | Description |
---|---|
Api |
Api-hiba. |
Api |
Api-hibabázis. |
Cloud |
Hibaválasz a Compute szolgáltatástól. |
Inner |
Belső hiba részletei. |
Operating |
Ez a tulajdonság lehetővé teszi a lemezen található operációs rendszer típusának megadását, ha virtuális gépet hoz létre felhasználói lemezképből vagy speciális VHD-ből. Lehetséges értékek: Windows,Linux. |
Run |
A futtatási parancs metaadatainak tulajdonságait ismerteti. |
Run |
A Virtuális gépek listázása művelet válasza. |
ApiError
Api-hiba.
Name | Típus | Description |
---|---|---|
code |
string |
A hibakód. |
details |
Az API-hiba részletei |
|
innererror |
Az Api belső hibája |
|
message |
string |
A hibaüzenet. |
target |
string |
Az adott hiba célja. |
ApiErrorBase
Api-hibabázis.
Name | Típus | Description |
---|---|---|
code |
string |
A hibakód. |
message |
string |
A hibaüzenet. |
target |
string |
Az adott hiba célja. |
CloudError
Hibaválasz a Compute szolgáltatástól.
Name | Típus | Description |
---|---|---|
error |
Api-hiba. |
InnerError
Belső hiba részletei.
Name | Típus | Description |
---|---|---|
errordetail |
string |
A belső hibaüzenet vagy kivételkép. |
exceptiontype |
string |
A kivétel típusa. |
OperatingSystemTypes
Ez a tulajdonság lehetővé teszi a lemezen található operációs rendszer típusának megadását, ha virtuális gépet hoz létre felhasználói lemezképből vagy speciális VHD-ből. Lehetséges értékek: Windows,Linux.
Érték | Description |
---|---|
Windows | |
Linux |
RunCommandDocumentBase
A futtatási parancs metaadatainak tulajdonságait ismerteti.
Name | Típus | Description |
---|---|---|
$schema |
string |
A virtuális gép futtatja a parancssémát. |
description |
string |
A virtuális gép futtatási parancsának leírása. |
id |
string |
A virtuális gép futtatási parancsazonosítója. |
label |
string |
A virtuális gép futtatja a parancscímkét. |
osType |
Az operációs rendszer típusa. |
RunCommandListResult
A Virtuális gépek listázása művelet válasza.
Name | Típus | Description |
---|---|---|
nextLink |
string (uri) |
A futtatási parancsok következő oldalának lekéréséhez tartozó uri. Ezzel hívja meg a ListNext() parancsot a futtatási parancsok következő oldalának lekéréséhez. |
value |
A virtuális gép futtatási parancsainak listája. |