Skip to content

Commit b42aab3

Browse files
author
SDKAuto
committed
CodeGen from PR 12348 in Azure/azure-rest-api-specs
Merge d1ac2953a4a9d45cd5167fa66aeb607e07e786f3 into 1c6cda0fb00f0f3fccf04cebcd2a1b439e6b3e24
1 parent cbfb037 commit b42aab3

File tree

12 files changed

+1505
-4
lines changed

12 files changed

+1505
-4
lines changed

sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_compute_management_client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
from .operations import VirtualMachineScaleSetVMsOperations
3434
from .operations import LogAnalyticsOperations
3535
from .operations import VirtualMachineRunCommandsOperations
36+
from .operations import VirtualMachineScaleSetVMRunCommandsOperations
3637
from . import models
3738

3839

@@ -82,6 +83,8 @@ class ComputeManagementClient(SDKClient):
8283
:vartype log_analytics: azure.mgmt.compute.v2020_06_01.operations.LogAnalyticsOperations
8384
:ivar virtual_machine_run_commands: VirtualMachineRunCommands operations
8485
:vartype virtual_machine_run_commands: azure.mgmt.compute.v2020_06_01.operations.VirtualMachineRunCommandsOperations
86+
:ivar virtual_machine_scale_set_vm_run_commands: VirtualMachineScaleSetVMRunCommands operations
87+
:vartype virtual_machine_scale_set_vm_run_commands: azure.mgmt.compute.v2020_06_01.operations.VirtualMachineScaleSetVMRunCommandsOperations
8588
8689
:param credentials: Credentials needed for the client to connect to Azure.
8790
:type credentials: :mod:`A msrestazure Credentials
@@ -144,3 +147,5 @@ def __init__(
144147
self._client, self.config, self._serialize, self._deserialize)
145148
self.virtual_machine_run_commands = VirtualMachineRunCommandsOperations(
146149
self._client, self.config, self._serialize, self._deserialize)
150+
self.virtual_machine_scale_set_vm_run_commands = VirtualMachineScaleSetVMRunCommandsOperations(
151+
self._client, self.config, self._serialize, self._deserialize)

sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/__init__.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@
132132
from ._models_py3 import VirtualMachineInstanceView
133133
from ._models_py3 import VirtualMachinePatchStatus
134134
from ._models_py3 import VirtualMachineReimageParameters
135+
from ._models_py3 import VirtualMachineRunCommand
136+
from ._models_py3 import VirtualMachineRunCommandInstanceView
137+
from ._models_py3 import VirtualMachineRunCommandScriptSource
138+
from ._models_py3 import VirtualMachineRunCommandUpdate
135139
from ._models_py3 import VirtualMachineScaleSet
136140
from ._models_py3 import VirtualMachineScaleSetDataDisk
137141
from ._models_py3 import VirtualMachineScaleSetExtension
@@ -304,6 +308,10 @@
304308
from ._models import VirtualMachineInstanceView
305309
from ._models import VirtualMachinePatchStatus
306310
from ._models import VirtualMachineReimageParameters
311+
from ._models import VirtualMachineRunCommand
312+
from ._models import VirtualMachineRunCommandInstanceView
313+
from ._models import VirtualMachineRunCommandScriptSource
314+
from ._models import VirtualMachineRunCommandUpdate
307315
from ._models import VirtualMachineScaleSet
308316
from ._models import VirtualMachineScaleSetDataDisk
309317
from ._models import VirtualMachineScaleSetExtension
@@ -364,6 +372,7 @@
364372
from ._paged_models import UpgradeOperationHistoricalStatusInfoPaged
365373
from ._paged_models import UsagePaged
366374
from ._paged_models import VirtualMachinePaged
375+
from ._paged_models import VirtualMachineRunCommandPaged
367376
from ._paged_models import VirtualMachineScaleSetExtensionPaged
368377
from ._paged_models import VirtualMachineScaleSetPaged
369378
from ._paged_models import VirtualMachineScaleSetSkuPaged
@@ -410,6 +419,7 @@
410419
RollingUpgradeActionType,
411420
IntervalInMins,
412421
OrchestrationServiceStateAction,
422+
ExecutionState,
413423
InstanceViewTypes,
414424
)
415425

@@ -536,6 +546,10 @@
536546
'VirtualMachineInstanceView',
537547
'VirtualMachinePatchStatus',
538548
'VirtualMachineReimageParameters',
549+
'VirtualMachineRunCommand',
550+
'VirtualMachineRunCommandInstanceView',
551+
'VirtualMachineRunCommandScriptSource',
552+
'VirtualMachineRunCommandUpdate',
539553
'VirtualMachineScaleSet',
540554
'VirtualMachineScaleSetDataDisk',
541555
'VirtualMachineScaleSetExtension',
@@ -601,6 +615,7 @@
601615
'VirtualMachineScaleSetExtensionPaged',
602616
'VirtualMachineScaleSetVMPaged',
603617
'RunCommandDocumentBasePaged',
618+
'VirtualMachineRunCommandPaged',
604619
'VmDiskTypes',
605620
'HyperVGenerationTypes',
606621
'StatusLevelTypes',
@@ -641,5 +656,6 @@
641656
'RollingUpgradeActionType',
642657
'IntervalInMins',
643658
'OrchestrationServiceStateAction',
659+
'ExecutionState',
644660
'InstanceViewTypes',
645661
]

sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_compute_management_client_enums.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,17 @@ class OrchestrationServiceStateAction(str, Enum):
444444
suspend = "Suspend"
445445

446446

447+
class ExecutionState(str, Enum):
448+
449+
unknown = "Unknown"
450+
pending = "Pending"
451+
running = "Running"
452+
failed = "Failed"
453+
succeeded = "Succeeded"
454+
timed_out = "TimedOut"
455+
canceled = "Canceled"
456+
457+
447458
class InstanceViewTypes(str, Enum):
448459

449460
instance_view = "instanceView"

sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/models/_models.py

Lines changed: 249 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
50365285
class VirtualMachineScaleSet(Resource):
50375286
"""Describes a Virtual Machine Scale Set.
50385287

0 commit comments

Comments
 (0)