Skip to content

Commit 2a6625e

Browse files
authored
[AutoPR compute/resource-manager] RunCommands 2018-06-01 (#2935)
* Generated from 8d08b9c279f07fa5a919205934fd785e329dad64 RunCommands 2018-06-01 * Generated from 9c64257f21823a1d72ec25cd640375f0100638e2 Take examples from 2018-04-01
1 parent 8175b81 commit 2a6625e

20 files changed

+985
-0
lines changed

azure-mgmt-compute/azure/mgmt/compute/compute_management_client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,7 @@ def virtual_machine_run_commands(self):
467467
* 2017-03-30: :class:`VirtualMachineRunCommandsOperations<azure.mgmt.compute.v2017_03_30.operations.VirtualMachineRunCommandsOperations>`
468468
* 2017-12-01: :class:`VirtualMachineRunCommandsOperations<azure.mgmt.compute.v2017_12_01.operations.VirtualMachineRunCommandsOperations>`
469469
* 2018-04-01: :class:`VirtualMachineRunCommandsOperations<azure.mgmt.compute.v2018_04_01.operations.VirtualMachineRunCommandsOperations>`
470+
* 2018-06-01: :class:`VirtualMachineRunCommandsOperations<azure.mgmt.compute.v2018_06_01.operations.VirtualMachineRunCommandsOperations>`
470471
"""
471472
api_version = self._get_api_version('virtual_machine_run_commands')
472473
if api_version == '2017-03-30':
@@ -475,6 +476,8 @@ def virtual_machine_run_commands(self):
475476
from .v2017_12_01.operations import VirtualMachineRunCommandsOperations as OperationClass
476477
elif api_version == '2018-04-01':
477478
from .v2018_04_01.operations import VirtualMachineRunCommandsOperations as OperationClass
479+
elif api_version == '2018-06-01':
480+
from .v2018_06_01.operations import VirtualMachineRunCommandsOperations as OperationClass
478481
else:
479482
raise NotImplementedError("APIVersion {} is not available".format(api_version))
480483
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/compute_management_client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
from .operations.virtual_machine_scale_set_rolling_upgrades_operations import VirtualMachineScaleSetRollingUpgradesOperations
2828
from .operations.virtual_machine_scale_set_vms_operations import VirtualMachineScaleSetVMsOperations
2929
from .operations.log_analytics_operations import LogAnalyticsOperations
30+
from .operations.virtual_machine_run_commands_operations import VirtualMachineRunCommandsOperations
3031
from .operations.galleries_operations import GalleriesOperations
3132
from .operations.gallery_images_operations import GalleryImagesOperations
3233
from .operations.gallery_image_versions_operations import GalleryImageVersionsOperations
@@ -101,6 +102,8 @@ class ComputeManagementClient(SDKClient):
101102
:vartype virtual_machine_scale_set_vms: azure.mgmt.compute.v2018_06_01.operations.VirtualMachineScaleSetVMsOperations
102103
:ivar log_analytics: LogAnalytics operations
103104
:vartype log_analytics: azure.mgmt.compute.v2018_06_01.operations.LogAnalyticsOperations
105+
:ivar virtual_machine_run_commands: VirtualMachineRunCommands operations
106+
:vartype virtual_machine_run_commands: azure.mgmt.compute.v2018_06_01.operations.VirtualMachineRunCommandsOperations
104107
:ivar galleries: Galleries operations
105108
:vartype galleries: azure.mgmt.compute.v2018_06_01.operations.GalleriesOperations
106109
:ivar gallery_images: GalleryImages operations
@@ -157,6 +160,8 @@ def __init__(
157160
self._client, self.config, self._serialize, self._deserialize)
158161
self.log_analytics = LogAnalyticsOperations(
159162
self._client, self.config, self._serialize, self._deserialize)
163+
self.virtual_machine_run_commands = VirtualMachineRunCommandsOperations(
164+
self._client, self.config, self._serialize, self._deserialize)
160165
self.galleries = GalleriesOperations(
161166
self._client, self.config, self._serialize, self._deserialize)
162167
self.gallery_images = GalleryImagesOperations(

azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/__init__.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,12 @@
132132
from .log_analytics_input_base_py3 import LogAnalyticsInputBase
133133
from .log_analytics_output_py3 import LogAnalyticsOutput
134134
from .log_analytics_operation_result_py3 import LogAnalyticsOperationResult
135+
from .run_command_input_parameter_py3 import RunCommandInputParameter
136+
from .run_command_input_py3 import RunCommandInput
137+
from .run_command_parameter_definition_py3 import RunCommandParameterDefinition
138+
from .run_command_document_base_py3 import RunCommandDocumentBase
139+
from .run_command_document_py3 import RunCommandDocument
140+
from .run_command_result_py3 import RunCommandResult
135141
from .gallery_identifier_py3 import GalleryIdentifier
136142
from .gallery_py3 import Gallery
137143
from .gallery_image_identifier_py3 import GalleryImageIdentifier
@@ -274,6 +280,12 @@
274280
from .log_analytics_input_base import LogAnalyticsInputBase
275281
from .log_analytics_output import LogAnalyticsOutput
276282
from .log_analytics_operation_result import LogAnalyticsOperationResult
283+
from .run_command_input_parameter import RunCommandInputParameter
284+
from .run_command_input import RunCommandInput
285+
from .run_command_parameter_definition import RunCommandParameterDefinition
286+
from .run_command_document_base import RunCommandDocumentBase
287+
from .run_command_document import RunCommandDocument
288+
from .run_command_result import RunCommandResult
277289
from .gallery_identifier import GalleryIdentifier
278290
from .gallery import Gallery
279291
from .gallery_image_identifier import GalleryImageIdentifier
@@ -304,6 +316,7 @@
304316
from .upgrade_operation_historical_status_info_paged import UpgradeOperationHistoricalStatusInfoPaged
305317
from .virtual_machine_scale_set_extension_paged import VirtualMachineScaleSetExtensionPaged
306318
from .virtual_machine_scale_set_vm_paged import VirtualMachineScaleSetVMPaged
319+
from .run_command_document_base_paged import RunCommandDocumentBasePaged
307320
from .gallery_paged import GalleryPaged
308321
from .gallery_image_paged import GalleryImagePaged
309322
from .gallery_image_version_paged import GalleryImageVersionPaged
@@ -462,6 +475,12 @@
462475
'LogAnalyticsInputBase',
463476
'LogAnalyticsOutput',
464477
'LogAnalyticsOperationResult',
478+
'RunCommandInputParameter',
479+
'RunCommandInput',
480+
'RunCommandParameterDefinition',
481+
'RunCommandDocumentBase',
482+
'RunCommandDocument',
483+
'RunCommandResult',
465484
'GalleryIdentifier',
466485
'Gallery',
467486
'GalleryImageIdentifier',
@@ -492,6 +511,7 @@
492511
'UpgradeOperationHistoricalStatusInfoPaged',
493512
'VirtualMachineScaleSetExtensionPaged',
494513
'VirtualMachineScaleSetVMPaged',
514+
'RunCommandDocumentBasePaged',
495515
'GalleryPaged',
496516
'GalleryImagePaged',
497517
'GalleryImageVersionPaged',
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from .run_command_document_base import RunCommandDocumentBase
13+
14+
15+
class RunCommandDocument(RunCommandDocumentBase):
16+
"""Describes the properties of a Run Command.
17+
18+
All required parameters must be populated in order to send to Azure.
19+
20+
:param schema: Required. The VM run command schema.
21+
:type schema: str
22+
:param id: Required. The VM run command id.
23+
:type id: str
24+
:param os_type: Required. The Operating System type. Possible values
25+
include: 'Windows', 'Linux'
26+
:type os_type: str or
27+
~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes
28+
:param label: Required. The VM run command label.
29+
:type label: str
30+
:param description: Required. The VM run command description.
31+
:type description: str
32+
:param script: Required. The script to be executed.
33+
:type script: list[str]
34+
:param parameters: The parameters used by the script.
35+
:type parameters:
36+
list[~azure.mgmt.compute.v2018_06_01.models.RunCommandParameterDefinition]
37+
"""
38+
39+
_validation = {
40+
'schema': {'required': True},
41+
'id': {'required': True},
42+
'os_type': {'required': True},
43+
'label': {'required': True},
44+
'description': {'required': True},
45+
'script': {'required': True},
46+
}
47+
48+
_attribute_map = {
49+
'schema': {'key': '$schema', 'type': 'str'},
50+
'id': {'key': 'id', 'type': 'str'},
51+
'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'},
52+
'label': {'key': 'label', 'type': 'str'},
53+
'description': {'key': 'description', 'type': 'str'},
54+
'script': {'key': 'script', 'type': '[str]'},
55+
'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'},
56+
}
57+
58+
def __init__(self, **kwargs):
59+
super(RunCommandDocument, self).__init__(**kwargs)
60+
self.script = kwargs.get('script', None)
61+
self.parameters = kwargs.get('parameters', None)
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.serialization import Model
13+
14+
15+
class RunCommandDocumentBase(Model):
16+
"""Describes the properties of a Run Command metadata.
17+
18+
All required parameters must be populated in order to send to Azure.
19+
20+
:param schema: Required. The VM run command schema.
21+
:type schema: str
22+
:param id: Required. The VM run command id.
23+
:type id: str
24+
:param os_type: Required. The Operating System type. Possible values
25+
include: 'Windows', 'Linux'
26+
:type os_type: str or
27+
~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes
28+
:param label: Required. The VM run command label.
29+
:type label: str
30+
:param description: Required. The VM run command description.
31+
:type description: str
32+
"""
33+
34+
_validation = {
35+
'schema': {'required': True},
36+
'id': {'required': True},
37+
'os_type': {'required': True},
38+
'label': {'required': True},
39+
'description': {'required': True},
40+
}
41+
42+
_attribute_map = {
43+
'schema': {'key': '$schema', 'type': 'str'},
44+
'id': {'key': 'id', 'type': 'str'},
45+
'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'},
46+
'label': {'key': 'label', 'type': 'str'},
47+
'description': {'key': 'description', 'type': 'str'},
48+
}
49+
50+
def __init__(self, **kwargs):
51+
super(RunCommandDocumentBase, self).__init__(**kwargs)
52+
self.schema = kwargs.get('schema', None)
53+
self.id = kwargs.get('id', None)
54+
self.os_type = kwargs.get('os_type', None)
55+
self.label = kwargs.get('label', None)
56+
self.description = kwargs.get('description', None)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.paging import Paged
13+
14+
15+
class RunCommandDocumentBasePaged(Paged):
16+
"""
17+
A paging container for iterating over a list of :class:`RunCommandDocumentBase <azure.mgmt.compute.v2018_06_01.models.RunCommandDocumentBase>` object
18+
"""
19+
20+
_attribute_map = {
21+
'next_link': {'key': 'nextLink', 'type': 'str'},
22+
'current_page': {'key': 'value', 'type': '[RunCommandDocumentBase]'}
23+
}
24+
25+
def __init__(self, *args, **kwargs):
26+
27+
super(RunCommandDocumentBasePaged, self).__init__(*args, **kwargs)
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.serialization import Model
13+
14+
15+
class RunCommandDocumentBase(Model):
16+
"""Describes the properties of a Run Command metadata.
17+
18+
All required parameters must be populated in order to send to Azure.
19+
20+
:param schema: Required. The VM run command schema.
21+
:type schema: str
22+
:param id: Required. The VM run command id.
23+
:type id: str
24+
:param os_type: Required. The Operating System type. Possible values
25+
include: 'Windows', 'Linux'
26+
:type os_type: str or
27+
~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes
28+
:param label: Required. The VM run command label.
29+
:type label: str
30+
:param description: Required. The VM run command description.
31+
:type description: str
32+
"""
33+
34+
_validation = {
35+
'schema': {'required': True},
36+
'id': {'required': True},
37+
'os_type': {'required': True},
38+
'label': {'required': True},
39+
'description': {'required': True},
40+
}
41+
42+
_attribute_map = {
43+
'schema': {'key': '$schema', 'type': 'str'},
44+
'id': {'key': 'id', 'type': 'str'},
45+
'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'},
46+
'label': {'key': 'label', 'type': 'str'},
47+
'description': {'key': 'description', 'type': 'str'},
48+
}
49+
50+
def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, **kwargs) -> None:
51+
super(RunCommandDocumentBase, self).__init__(**kwargs)
52+
self.schema = schema
53+
self.id = id
54+
self.os_type = os_type
55+
self.label = label
56+
self.description = description
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from .run_command_document_base_py3 import RunCommandDocumentBase
13+
14+
15+
class RunCommandDocument(RunCommandDocumentBase):
16+
"""Describes the properties of a Run Command.
17+
18+
All required parameters must be populated in order to send to Azure.
19+
20+
:param schema: Required. The VM run command schema.
21+
:type schema: str
22+
:param id: Required. The VM run command id.
23+
:type id: str
24+
:param os_type: Required. The Operating System type. Possible values
25+
include: 'Windows', 'Linux'
26+
:type os_type: str or
27+
~azure.mgmt.compute.v2018_06_01.models.OperatingSystemTypes
28+
:param label: Required. The VM run command label.
29+
:type label: str
30+
:param description: Required. The VM run command description.
31+
:type description: str
32+
:param script: Required. The script to be executed.
33+
:type script: list[str]
34+
:param parameters: The parameters used by the script.
35+
:type parameters:
36+
list[~azure.mgmt.compute.v2018_06_01.models.RunCommandParameterDefinition]
37+
"""
38+
39+
_validation = {
40+
'schema': {'required': True},
41+
'id': {'required': True},
42+
'os_type': {'required': True},
43+
'label': {'required': True},
44+
'description': {'required': True},
45+
'script': {'required': True},
46+
}
47+
48+
_attribute_map = {
49+
'schema': {'key': '$schema', 'type': 'str'},
50+
'id': {'key': 'id', 'type': 'str'},
51+
'os_type': {'key': 'osType', 'type': 'OperatingSystemTypes'},
52+
'label': {'key': 'label', 'type': 'str'},
53+
'description': {'key': 'description', 'type': 'str'},
54+
'script': {'key': 'script', 'type': '[str]'},
55+
'parameters': {'key': 'parameters', 'type': '[RunCommandParameterDefinition]'},
56+
}
57+
58+
def __init__(self, *, schema: str, id: str, os_type, label: str, description: str, script, parameters=None, **kwargs) -> None:
59+
super(RunCommandDocument, self).__init__(schema=schema, id=id, os_type=os_type, label=label, description=description, **kwargs)
60+
self.script = script
61+
self.parameters = parameters

0 commit comments

Comments
 (0)