Skip to content

Commit d737a24

Browse files
authored
[AutoPR automation/resource-manager] Swagger change for Update configuration dynamic group (#3552)
* Generated from da88a237aa03b5de9cc7e5e0081c0f25bbb720dc Swagger change for Update configuration dynamic group * Generated from fc491695edaba989b6f14e4a7541852d0e98b780 Addressing the feedback and adding the sample examples * Generated from 010387285df8d64aa4d2a36593fce01cd95e2efe fixing the capitalization and grammer on the description * Generated from 7546ceb3e18b6db70ad4da5aadf2d1db24d621e4 Changes after reviewing the decriptions * Generated from 915d19ed0f6a41d54a20040b8166514b5c9ef7f8 Changes after reviewing the descriptions
1 parent 1cd45d3 commit d737a24

10 files changed

+224
-1
lines changed

azure-mgmt-automation/azure/mgmt/automation/models/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@
8080
from .watcher_update_parameters_py3 import WatcherUpdateParameters
8181
from .windows_properties_py3 import WindowsProperties
8282
from .linux_properties_py3 import LinuxProperties
83+
from .tag_settings_properties_py3 import TagSettingsProperties
84+
from .azure_query_properties_py3 import AzureQueryProperties
85+
from .target_properties_py3 import TargetProperties
8386
from .update_configuration_py3 import UpdateConfiguration
8487
from .software_update_configuration_py3 import SoftwareUpdateConfiguration
8588
from .collection_item_update_configuration_py3 import CollectionItemUpdateConfiguration
@@ -208,6 +211,9 @@
208211
from .watcher_update_parameters import WatcherUpdateParameters
209212
from .windows_properties import WindowsProperties
210213
from .linux_properties import LinuxProperties
214+
from .tag_settings_properties import TagSettingsProperties
215+
from .azure_query_properties import AzureQueryProperties
216+
from .target_properties import TargetProperties
211217
from .update_configuration import UpdateConfiguration
212218
from .software_update_configuration import SoftwareUpdateConfiguration
213219
from .collection_item_update_configuration import CollectionItemUpdateConfiguration
@@ -308,6 +314,7 @@
308314
OperatingSystemType,
309315
WindowsUpdateClasses,
310316
LinuxUpdateClasses,
317+
TagOperators,
311318
SourceType,
312319
TokenType,
313320
ProvisioningState,
@@ -395,6 +402,9 @@
395402
'WatcherUpdateParameters',
396403
'WindowsProperties',
397404
'LinuxProperties',
405+
'TagSettingsProperties',
406+
'AzureQueryProperties',
407+
'TargetProperties',
398408
'UpdateConfiguration',
399409
'SoftwareUpdateConfiguration',
400410
'CollectionItemUpdateConfiguration',
@@ -494,6 +504,7 @@
494504
'OperatingSystemType',
495505
'WindowsUpdateClasses',
496506
'LinuxUpdateClasses',
507+
'TagOperators',
497508
'SourceType',
498509
'TokenType',
499510
'ProvisioningState',

azure-mgmt-automation/azure/mgmt/automation/models/automation_client_enums.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@ class LinuxUpdateClasses(str, Enum):
128128
other = "Other"
129129

130130

131+
class TagOperators(str, Enum):
132+
133+
all = "All"
134+
any = "Any"
135+
136+
131137
class SourceType(str, Enum):
132138

133139
vso_git = "VsoGit"
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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 AzureQueryProperties(Model):
16+
"""Azure query for the update configuration.
17+
18+
:param scope: List of Subscription or Resource Group ARM Ids.
19+
:type scope: list[str]
20+
:param location: List of locations to scope the query to.
21+
:type location: list[str]
22+
:param tag_settings: Tag settings for the VM.
23+
:type tag_settings: ~azure.mgmt.automation.models.TagSettingsProperties
24+
"""
25+
26+
_attribute_map = {
27+
'scope': {'key': 'scope', 'type': '[str]'},
28+
'location': {'key': 'location', 'type': '[str]'},
29+
'tag_settings': {'key': 'tagSettings', 'type': 'TagSettingsProperties'},
30+
}
31+
32+
def __init__(self, **kwargs):
33+
super(AzureQueryProperties, self).__init__(**kwargs)
34+
self.scope = kwargs.get('scope', None)
35+
self.location = kwargs.get('location', None)
36+
self.tag_settings = kwargs.get('tag_settings', None)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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 AzureQueryProperties(Model):
16+
"""Azure query for the update configuration.
17+
18+
:param scope: List of Subscription or Resource Group ARM Ids.
19+
:type scope: list[str]
20+
:param location: List of locations to scope the query to.
21+
:type location: list[str]
22+
:param tag_settings: Tag settings for the VM.
23+
:type tag_settings: ~azure.mgmt.automation.models.TagSettingsProperties
24+
"""
25+
26+
_attribute_map = {
27+
'scope': {'key': 'scope', 'type': '[str]'},
28+
'location': {'key': 'location', 'type': '[str]'},
29+
'tag_settings': {'key': 'tagSettings', 'type': 'TagSettingsProperties'},
30+
}
31+
32+
def __init__(self, *, scope=None, location=None, tag_settings=None, **kwargs) -> None:
33+
super(AzureQueryProperties, self).__init__(**kwargs)
34+
self.scope = scope
35+
self.location = location
36+
self.tag_settings = tag_settings
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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 TagSettingsProperties(Model):
16+
"""Tag filter information for the VM.
17+
18+
:param tags: Dictionary of tags with its list of values.
19+
:type tags: dict[str, list[str]]
20+
:param filter_operator: Filter VMs by Any or All specified tags. Possible
21+
values include: 'All', 'Any'
22+
:type filter_operator: str or ~azure.mgmt.automation.models.TagOperators
23+
"""
24+
25+
_attribute_map = {
26+
'tags': {'key': 'tags', 'type': '{[str]}'},
27+
'filter_operator': {'key': 'filterOperator', 'type': 'TagOperators'},
28+
}
29+
30+
def __init__(self, **kwargs):
31+
super(TagSettingsProperties, self).__init__(**kwargs)
32+
self.tags = kwargs.get('tags', None)
33+
self.filter_operator = kwargs.get('filter_operator', None)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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 TagSettingsProperties(Model):
16+
"""Tag filter information for the VM.
17+
18+
:param tags: Dictionary of tags with its list of values.
19+
:type tags: dict[str, list[str]]
20+
:param filter_operator: Filter VMs by Any or All specified tags. Possible
21+
values include: 'All', 'Any'
22+
:type filter_operator: str or ~azure.mgmt.automation.models.TagOperators
23+
"""
24+
25+
_attribute_map = {
26+
'tags': {'key': 'tags', 'type': '{[str]}'},
27+
'filter_operator': {'key': 'filterOperator', 'type': 'TagOperators'},
28+
}
29+
30+
def __init__(self, *, tags=None, filter_operator=None, **kwargs) -> None:
31+
super(TagSettingsProperties, self).__init__(**kwargs)
32+
self.tags = tags
33+
self.filter_operator = filter_operator
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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 TargetProperties(Model):
16+
"""Group specific to the update configuration.
17+
18+
:param azure_queries: List of Azure queries in the software update
19+
configuration.
20+
:type azure_queries:
21+
list[~azure.mgmt.automation.models.AzureQueryProperties]
22+
"""
23+
24+
_attribute_map = {
25+
'azure_queries': {'key': 'azureQueries', 'type': '[AzureQueryProperties]'},
26+
}
27+
28+
def __init__(self, **kwargs):
29+
super(TargetProperties, self).__init__(**kwargs)
30+
self.azure_queries = kwargs.get('azure_queries', None)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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 TargetProperties(Model):
16+
"""Group specific to the update configuration.
17+
18+
:param azure_queries: List of Azure queries in the software update
19+
configuration.
20+
:type azure_queries:
21+
list[~azure.mgmt.automation.models.AzureQueryProperties]
22+
"""
23+
24+
_attribute_map = {
25+
'azure_queries': {'key': 'azureQueries', 'type': '[AzureQueryProperties]'},
26+
}
27+
28+
def __init__(self, *, azure_queries=None, **kwargs) -> None:
29+
super(TargetProperties, self).__init__(**kwargs)
30+
self.azure_queries = azure_queries

azure-mgmt-automation/azure/mgmt/automation/models/update_configuration.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ class UpdateConfiguration(Model):
3535
:param non_azure_computer_names: List of names of non-azure machines
3636
targeted by the software update configuration.
3737
:type non_azure_computer_names: list[str]
38+
:param targets: Group targets for the software update configuration.
39+
:type targets: ~azure.mgmt.automation.models.TargetProperties
3840
"""
3941

4042
_validation = {
@@ -48,6 +50,7 @@ class UpdateConfiguration(Model):
4850
'duration': {'key': 'duration', 'type': 'duration'},
4951
'azure_virtual_machines': {'key': 'azureVirtualMachines', 'type': '[str]'},
5052
'non_azure_computer_names': {'key': 'nonAzureComputerNames', 'type': '[str]'},
53+
'targets': {'key': 'targets', 'type': 'TargetProperties'},
5154
}
5255

5356
def __init__(self, **kwargs):
@@ -58,3 +61,4 @@ def __init__(self, **kwargs):
5861
self.duration = kwargs.get('duration', None)
5962
self.azure_virtual_machines = kwargs.get('azure_virtual_machines', None)
6063
self.non_azure_computer_names = kwargs.get('non_azure_computer_names', None)
64+
self.targets = kwargs.get('targets', None)

azure-mgmt-automation/azure/mgmt/automation/models/update_configuration_py3.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ class UpdateConfiguration(Model):
3535
:param non_azure_computer_names: List of names of non-azure machines
3636
targeted by the software update configuration.
3737
:type non_azure_computer_names: list[str]
38+
:param targets: Group targets for the software update configuration.
39+
:type targets: ~azure.mgmt.automation.models.TargetProperties
3840
"""
3941

4042
_validation = {
@@ -48,13 +50,15 @@ class UpdateConfiguration(Model):
4850
'duration': {'key': 'duration', 'type': 'duration'},
4951
'azure_virtual_machines': {'key': 'azureVirtualMachines', 'type': '[str]'},
5052
'non_azure_computer_names': {'key': 'nonAzureComputerNames', 'type': '[str]'},
53+
'targets': {'key': 'targets', 'type': 'TargetProperties'},
5154
}
5255

53-
def __init__(self, *, operating_system, windows=None, linux=None, duration=None, azure_virtual_machines=None, non_azure_computer_names=None, **kwargs) -> None:
56+
def __init__(self, *, operating_system, windows=None, linux=None, duration=None, azure_virtual_machines=None, non_azure_computer_names=None, targets=None, **kwargs) -> None:
5457
super(UpdateConfiguration, self).__init__(**kwargs)
5558
self.operating_system = operating_system
5659
self.windows = windows
5760
self.linux = linux
5861
self.duration = duration
5962
self.azure_virtual_machines = azure_virtual_machines
6063
self.non_azure_computer_names = non_azure_computer_names
64+
self.targets = targets

0 commit comments

Comments
 (0)