Skip to content

Commit

Permalink
Update RunCommand operation output as valid json object (#3364)
Browse files Browse the repository at this point in the history
  • Loading branch information
koralski authored and jianghaolu committed Jul 10, 2018
1 parent 1076f0f commit 4b1a869
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,22 @@
},
"responses": {
"200": {
"body": [
{
"code": "ComponentStatus/StdOut/succeeded",
"level": "Info",
"displayStatus": "Provisioning succeeded",
"message": "This is a sample script with parameters value1 value2"
},
{
"code":"ComponentStatus/StdErr/succeeded",
"level":"Info",
"displayStatus":"Provisioning succeeded",
"message":""
}
]
"body": {
"value": [
{
"code": "ComponentStatus/StdOut/succeeded",
"level": "Info",
"displayStatus": "Provisioning succeeded",
"message": "This is a sample script with parameters value1 value2"
},
{
"code": "ComponentStatus/StdErr/succeeded",
"level": "Info",
"displayStatus": "Provisioning succeeded",
"message": ""
}
]
}
},
"202": {
"body": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
],
"operationId": "VirtualMachineRunCommands_List",
"x-ms-examples": {
"VirtualMachineRunCommandList": { "$ref": "./examples/VirtualMachineRunCommandList.json" }
"VirtualMachineRunCommandList": { "$ref": "./examples/VirtualMachineRunCommandList.json" }
},
"description": "Lists all available run commands for a subscription in a location.",
"parameters": [
Expand Down Expand Up @@ -82,7 +82,7 @@
],
"operationId": "VirtualMachineRunCommands_Get",
"x-ms-examples": {
"VirtualMachineRunCommandGet": { "$ref": "./examples/VirtualMachineRunCommandGet.json" }
"VirtualMachineRunCommandGet": { "$ref": "./examples/VirtualMachineRunCommandGet.json" }
},
"description": "Gets specific run command for a subscription in a location.",
"parameters": [
Expand Down Expand Up @@ -125,7 +125,7 @@
],
"operationId": "VirtualMachines_RunCommand",
"x-ms-examples": {
"VirtualMachineRunCommand": { "$ref": "./examples/VirtualMachineRunCommand.json" }
"VirtualMachineRunCommand": { "$ref": "./examples/VirtualMachineRunCommand.json" }
},
"description": "Run command on the VM.",
"parameters": [
Expand Down Expand Up @@ -163,10 +163,7 @@
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/InstanceViewStatus"
}
"$ref": "#/definitions/RunCommandResult"
}
},
"202": {
Expand All @@ -175,7 +172,69 @@
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via":"location"
"final-state-via": "location"
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/runCommand": {
"post": {
"tags": [
"VirtualMachineScaleSetVMs"
],
"operationId": "VirtualMachineScaleSetVMs_RunCommand",
"description": "Run command on a virtual machine in a VM scale set.",
"parameters": [
{
"name": "resourceGroupName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the resource group."
},
{
"name": "vmScaleSetName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the VM scale set."
},
{
"name": "instanceId",
"in": "path",
"required": true,
"type": "string",
"description": "The instance ID of the virtual machine."
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/RunCommandInput"
},
"description": "Parameters supplied to the Run command operation."
},
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/RunCommandResult"
}
},
"202": {
"description": "Accepted"
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
}
}
}
Expand Down Expand Up @@ -336,24 +395,6 @@
],
"description": "The List Virtual Machine operation response."
},
"RunCommandResultProperties": {
"properties": {
"output": {
"type": "object",
"description": "Operation output data (raw JSON)"
}
},
"description": "Compute-specific operation properties, including output"
},
"RunCommandResult": {
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/RunCommandResultProperties"
}
},
"description": "Run command operation response."
},
"InstanceViewStatus": {
"properties": {
"code": {
Expand Down Expand Up @@ -388,6 +429,17 @@
}
},
"description": "Instance view status."
},
"RunCommandResult": {
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/InstanceViewStatus"
},
"description": "Run command operation response."
}
}
}
},
"parameters": {
Expand Down

0 comments on commit 4b1a869

Please sign in to comment.