swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector VirtualMachineScaleSetVMRunCommands API schemes: - https tags: - name: VirtualMachineScaleSetVMRunCommands paths: ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName} : put: tags: - VirtualMachineScaleSetVMRunCommands operationId: microsoftAzureVirtualmachinescalesetvmruncommandsCreateorupdate description: The operation to create or update the VMSS VM run command. 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: runCommandName in: path required: true type: string description: The name of the virtual machine run command. - name: runCommand in: body required: true schema: $ref: '#/definitions/VirtualMachineRunCommand' description: Parameters supplied to the Create Virtual Machine RunCommand operation. - $ref: ../../../common-types/v1/common.json#/parameters/ApiVersionParameter - $ref: ../../../common-types/v1/common.json#/parameters/SubscriptionIdParameter responses: '200': description: OK schema: $ref: '#/definitions/VirtualMachineRunCommand' '201': description: Created schema: $ref: '#/definitions/VirtualMachineRunCommand' default: description: Error response describing why the operation failed. schema: $ref: ../../../common-types/v1/common.json#/definitions/CloudError x-ms-long-running-operation: true x-ms-examples: Create VirtualMachineScaleSet VM run command.: $ref: ./examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_CreateOrUpdate.json summary: Microsoft Azure Put Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Compute Virtualmachinescalesets Vmscalesetname Virtualmachines Instanceid Runcommands Runcommandname patch: tags: - VirtualMachineScaleSetVMRunCommands operationId: microsoftAzureVirtualmachinescalesetvmruncommandsUpdate description: The operation to update the VMSS VM run command. 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: runCommandName in: path required: true type: string description: The name of the virtual machine run command. - name: runCommand in: body required: true schema: $ref: '#/definitions/VirtualMachineRunCommandUpdate' description: Parameters supplied to the Update Virtual Machine RunCommand operation. - $ref: ../../../common-types/v1/common.json#/parameters/ApiVersionParameter - $ref: ../../../common-types/v1/common.json#/parameters/SubscriptionIdParameter responses: '200': description: OK schema: $ref: '#/definitions/VirtualMachineRunCommand' default: description: Error response describing why the operation failed. schema: $ref: ../../../common-types/v1/common.json#/definitions/CloudError x-ms-long-running-operation: true x-ms-examples: Update VirtualMachineScaleSet VM run command.: $ref: ./examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_Update.json summary: Microsoft Azure Patch Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Compute Virtualmachinescalesets Vmscalesetname Virtualmachines Instanceid Runcommands Runcommandname delete: tags: - VirtualMachineScaleSetVMRunCommands operationId: microsoftAzureVirtualmachinescalesetvmruncommandsDelete description: The operation to delete the VMSS VM run command. 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: runCommandName in: path required: true type: string description: The name of the virtual machine run command. - $ref: ../../../common-types/v1/common.json#/parameters/ApiVersionParameter - $ref: ../../../common-types/v1/common.json#/parameters/SubscriptionIdParameter responses: '200': description: OK '202': description: Accepted '204': description: No Content default: description: Error response describing why the operation failed. schema: $ref: ../../../common-types/v1/common.json#/definitions/CloudError x-ms-long-running-operation: true x-ms-examples: Delete VirtualMachineScaleSet VM run command.: $ref: ./examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_Delete.json summary: Microsoft Azure Delete Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Compute Virtualmachinescalesets Vmscalesetname Virtualmachines Instanceid Runcommands Runcommandname get: tags: - VirtualMachineScaleSetVMRunCommands operationId: microsoftAzureVirtualmachinescalesetvmruncommandsGet description: The operation to get the VMSS VM run command. 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: runCommandName in: path required: true type: string description: The name of the virtual machine run command. - name: $expand in: query required: false type: string description: The expand expression to apply on the operation. - $ref: ../../../common-types/v1/common.json#/parameters/ApiVersionParameter - $ref: ../../../common-types/v1/common.json#/parameters/SubscriptionIdParameter responses: '200': description: OK schema: $ref: '#/definitions/VirtualMachineRunCommand' default: description: Error response describing why the operation failed. schema: $ref: ../../../common-types/v1/common.json#/definitions/CloudError x-ms-examples: Get VirtualMachineScaleSet VM run commands.: $ref: ./examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_Get.json summary: Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Compute Virtualmachinescalesets Vmscalesetname Virtualmachines Instanceid Runcommands Runcommandname ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands : get: tags: - VirtualMachineScaleSetVMRunCommands operationId: microsoftAzureVirtualmachinescalesetvmruncommandsList description: The operation to get all run commands of an instance in Virtual Machine Scaleset. 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: $expand in: query required: false type: string description: The expand expression to apply on the operation. - $ref: ../../../common-types/v1/common.json#/parameters/ApiVersionParameter - $ref: ../../../common-types/v1/common.json#/parameters/SubscriptionIdParameter responses: '200': description: OK schema: $ref: '#/definitions/VirtualMachineRunCommandsListResult' default: description: Error response describing why the operation failed. schema: $ref: ../../../common-types/v1/common.json#/definitions/CloudError x-ms-pageable: nextLinkName: nextLink x-ms-examples: List run commands in Vmss instance.: $ref: ./examples/runCommandExamples/VirtualMachineScaleSetVMRunCommand_List.json summary: Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Compute Virtualmachinescalesets Vmscalesetname Virtualmachines Instanceid Runcommands definitions: VirtualMachineRunCommandUpdate: properties: properties: x-ms-client-flatten: true $ref: '#/definitions/VirtualMachineRunCommandProperties' allOf: - $ref: ./computeRPCommon.json#/definitions/UpdateResource type: object description: Describes a Virtual Machine run command. VirtualMachineRunCommand: properties: properties: x-ms-client-flatten: true $ref: '#/definitions/VirtualMachineRunCommandProperties' allOf: - $ref: ../../../common-types/v1/common.json#/definitions/Resource type: object description: Describes a Virtual Machine run command. VirtualMachineRunCommandProperties: properties: source: $ref: '#/definitions/VirtualMachineRunCommandScriptSource' description: The source of the run command script. parameters: type: array items: $ref: '#/definitions/RunCommandInputParameter' x-ms-identifiers: - name description: The parameters used by the script. protectedParameters: type: array items: $ref: '#/definitions/RunCommandInputParameter' x-ms-identifiers: - name description: The parameters used by the script. asyncExecution: type: boolean description: Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete. default: false runAsUser: type: string description: Specifies the user account on the VM when executing the run command. runAsPassword: type: string description: Specifies the user account password on the VM when executing the run command. timeoutInSeconds: type: integer format: int32 description: The timeout in seconds to execute the run command. outputBlobUri: type: string description: 'Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer outputBlobManagedIdentity parameter. ' errorBlobUri: type: string description: Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer errorBlobManagedIdentity parameter. outputBlobManagedIdentity: $ref: '#/definitions/RunCommandManagedIdentity' description: 'User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob''s container with ''Storage Blob Data Contributor'' role assignment. In case of user-assigned identity, make sure you add it under VM''s identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged ' errorBlobManagedIdentity: $ref: '#/definitions/RunCommandManagedIdentity' description: 'User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob''s container with ''Storage Blob Data Contributor'' role assignment. In case of user-assigned identity, make sure you add it under VM''s identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged ' provisioningState: readOnly: true type: string description: 'The provisioning state, which only appears in the response. If treatFailureAsDeploymentFailure set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. If treatFailureAsDeploymentFailure set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results ' instanceView: readOnly: true $ref: '#/definitions/VirtualMachineRunCommandInstanceView' description: The virtual machine run command instance view. treatFailureAsDeploymentFailure: type: boolean description: 'Optional. If set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. If set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results ' default: false type: object description: Describes the properties of a Virtual Machine run command. RunCommandManagedIdentity: properties: clientId: type: string description: Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. objectId: type: string description: Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided. type: object description: ' Contains clientId or objectId (use only one, not both) of a user-assigned managed identity that has access to storage blob used in Run Command. Use an empty RunCommandManagedIdentity object in case of system-assigned identity. Make sure the Azure storage blob exists in case of scriptUri, and managed identity has been given access to blob''s container with ''Storage Blob Data Reader'' role assignment with scriptUri blob and ''Storage Blob Data Contributor'' for Append blobs(outputBlobUri, errorBlobUri). In case of user assigned identity, make sure you add it under VM''s identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged.' VirtualMachineRunCommandInstanceView: properties: executionState: type: string description: Script execution status. enum: - Unknown - Pending - Running - Failed - Succeeded - TimedOut - Canceled x-ms-enum: name: ExecutionState modelAsString: true executionMessage: type: string description: Communicate script configuration errors or execution messages. exitCode: type: integer format: int32 description: Exit code returned from script execution. output: type: string description: Script output stream. error: type: string description: Script error stream. startTime: type: string format: date-time description: Script start time. endTime: type: string format: date-time description: Script end time. statuses: type: array items: $ref: ./computeRPCommon.json#/definitions/InstanceViewStatus x-ms-identifiers: [] description: The resource status information. type: object description: The instance view of a virtual machine run command. VirtualMachineRunCommandScriptSource: properties: script: type: string description: Specifies the script content to be executed on the VM. scriptUri: type: string description: Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI. commandId: type: string description: Specifies a commandId of predefined built-in script. scriptUriManagedIdentity: $ref: '#/definitions/RunCommandManagedIdentity' description: User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. type: object description: Describes the script sources for run command. Use only one of script, scriptUri, commandId. VirtualMachineRunCommandsListResult: properties: value: type: array items: $ref: '#/definitions/VirtualMachineRunCommand' description: The list of run commands nextLink: type: string description: The uri to fetch the next page of run commands. required: - value type: object description: The List run command operation response RunCommandInputParameter: properties: name: type: string description: The run command parameter name. value: type: string description: The run command parameter value. required: - name - value type: object description: Describes the properties of a run command parameter. x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'