@@ -5033,6 +5033,255 @@ def __init__(self, **kwargs):
50335033 self .temp_disk = kwargs .get ('temp_disk' , None )
50345034
50355035
5036+ class VirtualMachineRunCommand (Resource ):
5037+ """Describes a Virtual Machine run command.
5038+
5039+ Variables are only populated by the server, and will be ignored when
5040+ sending a request.
5041+
5042+ All required parameters must be populated in order to send to Azure.
5043+
5044+ :ivar id: Resource Id
5045+ :vartype id: str
5046+ :ivar name: Resource name
5047+ :vartype name: str
5048+ :ivar type: Resource type
5049+ :vartype type: str
5050+ :param location: Required. Resource location
5051+ :type location: str
5052+ :param tags: Resource tags
5053+ :type tags: dict[str, str]
5054+ :param source: The source of the run command script.
5055+ :type source:
5056+ ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommandScriptSource
5057+ :param parameters: The parameters used by the script.
5058+ :type parameters:
5059+ list[~azure.mgmt.compute.v2020_06_01.models.RunCommandInputParameter]
5060+ :param protected_parameters: The parameters used by the script.
5061+ :type protected_parameters:
5062+ list[~azure.mgmt.compute.v2020_06_01.models.RunCommandInputParameter]
5063+ :param async_execution: Optional. If set to true, provisioning will
5064+ complete as soon as the script starts and will not wait for script to
5065+ complete. Default value: False .
5066+ :type async_execution: bool
5067+ :param run_as_user: Specifies the user account on the VM when executing
5068+ the run command.
5069+ :type run_as_user: str
5070+ :param run_as_password: Specifies the user account password on the VM when
5071+ executing the run command.
5072+ :type run_as_password: str
5073+ :param timeout_in_seconds: The timeout in seconds to execute the run
5074+ command.
5075+ :type timeout_in_seconds: int
5076+ :param output_blob_uri: Specifies the Azure storage blob where script
5077+ output stream will be uploaded.
5078+ :type output_blob_uri: str
5079+ :param error_blob_uri: Specifies the Azure storage blob where script error
5080+ stream will be uploaded.
5081+ :type error_blob_uri: str
5082+ :ivar provisioning_state: The provisioning state, which only appears in
5083+ the response.
5084+ :vartype provisioning_state: str
5085+ :ivar instance_view: The virtual machine run command instance view.
5086+ :vartype instance_view:
5087+ ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommandInstanceView
5088+ """
5089+
5090+ _validation = {
5091+ 'id' : {'readonly' : True },
5092+ 'name' : {'readonly' : True },
5093+ 'type' : {'readonly' : True },
5094+ 'location' : {'required' : True },
5095+ 'provisioning_state' : {'readonly' : True },
5096+ 'instance_view' : {'readonly' : True },
5097+ }
5098+
5099+ _attribute_map = {
5100+ 'id' : {'key' : 'id' , 'type' : 'str' },
5101+ 'name' : {'key' : 'name' , 'type' : 'str' },
5102+ 'type' : {'key' : 'type' , 'type' : 'str' },
5103+ 'location' : {'key' : 'location' , 'type' : 'str' },
5104+ 'tags' : {'key' : 'tags' , 'type' : '{str}' },
5105+ 'source' : {'key' : 'properties.source' , 'type' : 'VirtualMachineRunCommandScriptSource' },
5106+ 'parameters' : {'key' : 'properties.parameters' , 'type' : '[RunCommandInputParameter]' },
5107+ 'protected_parameters' : {'key' : 'properties.protectedParameters' , 'type' : '[RunCommandInputParameter]' },
5108+ 'async_execution' : {'key' : 'properties.asyncExecution' , 'type' : 'bool' },
5109+ 'run_as_user' : {'key' : 'properties.runAsUser' , 'type' : 'str' },
5110+ 'run_as_password' : {'key' : 'properties.runAsPassword' , 'type' : 'str' },
5111+ 'timeout_in_seconds' : {'key' : 'properties.timeoutInSeconds' , 'type' : 'int' },
5112+ 'output_blob_uri' : {'key' : 'properties.outputBlobUri' , 'type' : 'str' },
5113+ 'error_blob_uri' : {'key' : 'properties.errorBlobUri' , 'type' : 'str' },
5114+ 'provisioning_state' : {'key' : 'properties.provisioningState' , 'type' : 'str' },
5115+ 'instance_view' : {'key' : 'properties.instanceView' , 'type' : 'VirtualMachineRunCommandInstanceView' },
5116+ }
5117+
5118+ def __init__ (self , ** kwargs ):
5119+ super (VirtualMachineRunCommand , self ).__init__ (** kwargs )
5120+ self .source = kwargs .get ('source' , None )
5121+ self .parameters = kwargs .get ('parameters' , None )
5122+ self .protected_parameters = kwargs .get ('protected_parameters' , None )
5123+ self .async_execution = kwargs .get ('async_execution' , False )
5124+ self .run_as_user = kwargs .get ('run_as_user' , None )
5125+ self .run_as_password = kwargs .get ('run_as_password' , None )
5126+ self .timeout_in_seconds = kwargs .get ('timeout_in_seconds' , None )
5127+ self .output_blob_uri = kwargs .get ('output_blob_uri' , None )
5128+ self .error_blob_uri = kwargs .get ('error_blob_uri' , None )
5129+ self .provisioning_state = None
5130+ self .instance_view = None
5131+
5132+
5133+ class VirtualMachineRunCommandInstanceView (Model ):
5134+ """The instance view of a virtual machine run command.
5135+
5136+ :param execution_state: Script execution status. Possible values include:
5137+ 'Unknown', 'Pending', 'Running', 'Failed', 'Succeeded', 'TimedOut',
5138+ 'Canceled'
5139+ :type execution_state: str or
5140+ ~azure.mgmt.compute.v2020_06_01.models.ExecutionState
5141+ :param execution_message: Communicate script configuration errors or
5142+ execution messages.
5143+ :type execution_message: str
5144+ :param exit_code: Exit code returned from script execution.
5145+ :type exit_code: int
5146+ :param output: Script output stream.
5147+ :type output: str
5148+ :param error: Script error stream.
5149+ :type error: str
5150+ :param start_time: Script start time.
5151+ :type start_time: datetime
5152+ :param end_time: Script end time.
5153+ :type end_time: datetime
5154+ :param statuses: The resource status information.
5155+ :type statuses:
5156+ list[~azure.mgmt.compute.v2020_06_01.models.InstanceViewStatus]
5157+ """
5158+
5159+ _attribute_map = {
5160+ 'execution_state' : {'key' : 'executionState' , 'type' : 'str' },
5161+ 'execution_message' : {'key' : 'executionMessage' , 'type' : 'str' },
5162+ 'exit_code' : {'key' : 'exitCode' , 'type' : 'int' },
5163+ 'output' : {'key' : 'output' , 'type' : 'str' },
5164+ 'error' : {'key' : 'error' , 'type' : 'str' },
5165+ 'start_time' : {'key' : 'startTime' , 'type' : 'iso-8601' },
5166+ 'end_time' : {'key' : 'endTime' , 'type' : 'iso-8601' },
5167+ 'statuses' : {'key' : 'statuses' , 'type' : '[InstanceViewStatus]' },
5168+ }
5169+
5170+ def __init__ (self , ** kwargs ):
5171+ super (VirtualMachineRunCommandInstanceView , self ).__init__ (** kwargs )
5172+ self .execution_state = kwargs .get ('execution_state' , None )
5173+ self .execution_message = kwargs .get ('execution_message' , None )
5174+ self .exit_code = kwargs .get ('exit_code' , None )
5175+ self .output = kwargs .get ('output' , None )
5176+ self .error = kwargs .get ('error' , None )
5177+ self .start_time = kwargs .get ('start_time' , None )
5178+ self .end_time = kwargs .get ('end_time' , None )
5179+ self .statuses = kwargs .get ('statuses' , None )
5180+
5181+
5182+ class VirtualMachineRunCommandScriptSource (Model ):
5183+ """Describes the script sources for run command.
5184+
5185+ :param script: Specifies the script content to be executed on the VM.
5186+ :type script: str
5187+ :param script_uri: Specifies the script download location.
5188+ :type script_uri: str
5189+ :param command_id: Specifies a commandId of predefined built-in script.
5190+ :type command_id: str
5191+ """
5192+
5193+ _attribute_map = {
5194+ 'script' : {'key' : 'script' , 'type' : 'str' },
5195+ 'script_uri' : {'key' : 'scriptUri' , 'type' : 'str' },
5196+ 'command_id' : {'key' : 'commandId' , 'type' : 'str' },
5197+ }
5198+
5199+ def __init__ (self , ** kwargs ):
5200+ super (VirtualMachineRunCommandScriptSource , self ).__init__ (** kwargs )
5201+ self .script = kwargs .get ('script' , None )
5202+ self .script_uri = kwargs .get ('script_uri' , None )
5203+ self .command_id = kwargs .get ('command_id' , None )
5204+
5205+
5206+ class VirtualMachineRunCommandUpdate (UpdateResource ):
5207+ """Describes a Virtual Machine run command.
5208+
5209+ Variables are only populated by the server, and will be ignored when
5210+ sending a request.
5211+
5212+ :param tags: Resource tags
5213+ :type tags: dict[str, str]
5214+ :param source: The source of the run command script.
5215+ :type source:
5216+ ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommandScriptSource
5217+ :param parameters: The parameters used by the script.
5218+ :type parameters:
5219+ list[~azure.mgmt.compute.v2020_06_01.models.RunCommandInputParameter]
5220+ :param protected_parameters: The parameters used by the script.
5221+ :type protected_parameters:
5222+ list[~azure.mgmt.compute.v2020_06_01.models.RunCommandInputParameter]
5223+ :param async_execution: Optional. If set to true, provisioning will
5224+ complete as soon as the script starts and will not wait for script to
5225+ complete. Default value: False .
5226+ :type async_execution: bool
5227+ :param run_as_user: Specifies the user account on the VM when executing
5228+ the run command.
5229+ :type run_as_user: str
5230+ :param run_as_password: Specifies the user account password on the VM when
5231+ executing the run command.
5232+ :type run_as_password: str
5233+ :param timeout_in_seconds: The timeout in seconds to execute the run
5234+ command.
5235+ :type timeout_in_seconds: int
5236+ :param output_blob_uri: Specifies the Azure storage blob where script
5237+ output stream will be uploaded.
5238+ :type output_blob_uri: str
5239+ :param error_blob_uri: Specifies the Azure storage blob where script error
5240+ stream will be uploaded.
5241+ :type error_blob_uri: str
5242+ :ivar provisioning_state: The provisioning state, which only appears in
5243+ the response.
5244+ :vartype provisioning_state: str
5245+ :ivar instance_view: The virtual machine run command instance view.
5246+ :vartype instance_view:
5247+ ~azure.mgmt.compute.v2020_06_01.models.VirtualMachineRunCommandInstanceView
5248+ """
5249+
5250+ _validation = {
5251+ 'provisioning_state' : {'readonly' : True },
5252+ 'instance_view' : {'readonly' : True },
5253+ }
5254+
5255+ _attribute_map = {
5256+ 'tags' : {'key' : 'tags' , 'type' : '{str}' },
5257+ 'source' : {'key' : 'properties.source' , 'type' : 'VirtualMachineRunCommandScriptSource' },
5258+ 'parameters' : {'key' : 'properties.parameters' , 'type' : '[RunCommandInputParameter]' },
5259+ 'protected_parameters' : {'key' : 'properties.protectedParameters' , 'type' : '[RunCommandInputParameter]' },
5260+ 'async_execution' : {'key' : 'properties.asyncExecution' , 'type' : 'bool' },
5261+ 'run_as_user' : {'key' : 'properties.runAsUser' , 'type' : 'str' },
5262+ 'run_as_password' : {'key' : 'properties.runAsPassword' , 'type' : 'str' },
5263+ 'timeout_in_seconds' : {'key' : 'properties.timeoutInSeconds' , 'type' : 'int' },
5264+ 'output_blob_uri' : {'key' : 'properties.outputBlobUri' , 'type' : 'str' },
5265+ 'error_blob_uri' : {'key' : 'properties.errorBlobUri' , 'type' : 'str' },
5266+ 'provisioning_state' : {'key' : 'properties.provisioningState' , 'type' : 'str' },
5267+ 'instance_view' : {'key' : 'properties.instanceView' , 'type' : 'VirtualMachineRunCommandInstanceView' },
5268+ }
5269+
5270+ def __init__ (self , ** kwargs ):
5271+ super (VirtualMachineRunCommandUpdate , self ).__init__ (** kwargs )
5272+ self .source = kwargs .get ('source' , None )
5273+ self .parameters = kwargs .get ('parameters' , None )
5274+ self .protected_parameters = kwargs .get ('protected_parameters' , None )
5275+ self .async_execution = kwargs .get ('async_execution' , False )
5276+ self .run_as_user = kwargs .get ('run_as_user' , None )
5277+ self .run_as_password = kwargs .get ('run_as_password' , None )
5278+ self .timeout_in_seconds = kwargs .get ('timeout_in_seconds' , None )
5279+ self .output_blob_uri = kwargs .get ('output_blob_uri' , None )
5280+ self .error_blob_uri = kwargs .get ('error_blob_uri' , None )
5281+ self .provisioning_state = None
5282+ self .instance_view = None
5283+
5284+
50365285class VirtualMachineScaleSet (Resource ):
50375286 """Describes a Virtual Machine Scale Set.
50385287
0 commit comments