diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/__init__.py b/azure-mgmt-automation/azure/mgmt/automation/models/__init__.py index dc9f43c635b7..a7e86f06a02d 100644 --- a/azure-mgmt-automation/azure/mgmt/automation/models/__init__.py +++ b/azure-mgmt-automation/azure/mgmt/automation/models/__init__.py @@ -80,6 +80,9 @@ from .watcher_update_parameters_py3 import WatcherUpdateParameters from .windows_properties_py3 import WindowsProperties from .linux_properties_py3 import LinuxProperties + from .tag_settings_properties_py3 import TagSettingsProperties + from .azure_query_properties_py3 import AzureQueryProperties + from .target_properties_py3 import TargetProperties from .update_configuration_py3 import UpdateConfiguration from .software_update_configuration_py3 import SoftwareUpdateConfiguration from .collection_item_update_configuration_py3 import CollectionItemUpdateConfiguration @@ -208,6 +211,9 @@ from .watcher_update_parameters import WatcherUpdateParameters from .windows_properties import WindowsProperties from .linux_properties import LinuxProperties + from .tag_settings_properties import TagSettingsProperties + from .azure_query_properties import AzureQueryProperties + from .target_properties import TargetProperties from .update_configuration import UpdateConfiguration from .software_update_configuration import SoftwareUpdateConfiguration from .collection_item_update_configuration import CollectionItemUpdateConfiguration @@ -308,6 +314,7 @@ OperatingSystemType, WindowsUpdateClasses, LinuxUpdateClasses, + TagOperators, SourceType, TokenType, ProvisioningState, @@ -395,6 +402,9 @@ 'WatcherUpdateParameters', 'WindowsProperties', 'LinuxProperties', + 'TagSettingsProperties', + 'AzureQueryProperties', + 'TargetProperties', 'UpdateConfiguration', 'SoftwareUpdateConfiguration', 'CollectionItemUpdateConfiguration', @@ -494,6 +504,7 @@ 'OperatingSystemType', 'WindowsUpdateClasses', 'LinuxUpdateClasses', + 'TagOperators', 'SourceType', 'TokenType', 'ProvisioningState', diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/automation_client_enums.py b/azure-mgmt-automation/azure/mgmt/automation/models/automation_client_enums.py index a8709b1ba7f8..390b88163978 100644 --- a/azure-mgmt-automation/azure/mgmt/automation/models/automation_client_enums.py +++ b/azure-mgmt-automation/azure/mgmt/automation/models/automation_client_enums.py @@ -128,6 +128,12 @@ class LinuxUpdateClasses(str, Enum): other = "Other" +class TagOperators(str, Enum): + + all = "All" + any = "Any" + + class SourceType(str, Enum): vso_git = "VsoGit" diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/azure_query_properties.py b/azure-mgmt-automation/azure/mgmt/automation/models/azure_query_properties.py new file mode 100644 index 000000000000..cd8526e0f5f4 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/azure_query_properties.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureQueryProperties(Model): + """Azure query for the update configuration. + + :param scope: List of Subscription or Resource Group ARM Ids. + :type scope: list[str] + :param location: List of locations to scope the query to. + :type location: list[str] + :param tag_settings: Tag settings for the VM. + :type tag_settings: ~azure.mgmt.automation.models.TagSettingsProperties + """ + + _attribute_map = { + 'scope': {'key': 'scope', 'type': '[str]'}, + 'location': {'key': 'location', 'type': '[str]'}, + 'tag_settings': {'key': 'tagSettings', 'type': 'TagSettingsProperties'}, + } + + def __init__(self, **kwargs): + super(AzureQueryProperties, self).__init__(**kwargs) + self.scope = kwargs.get('scope', None) + self.location = kwargs.get('location', None) + self.tag_settings = kwargs.get('tag_settings', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/azure_query_properties_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/azure_query_properties_py3.py new file mode 100644 index 000000000000..1e12644f7f54 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/azure_query_properties_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureQueryProperties(Model): + """Azure query for the update configuration. + + :param scope: List of Subscription or Resource Group ARM Ids. + :type scope: list[str] + :param location: List of locations to scope the query to. + :type location: list[str] + :param tag_settings: Tag settings for the VM. + :type tag_settings: ~azure.mgmt.automation.models.TagSettingsProperties + """ + + _attribute_map = { + 'scope': {'key': 'scope', 'type': '[str]'}, + 'location': {'key': 'location', 'type': '[str]'}, + 'tag_settings': {'key': 'tagSettings', 'type': 'TagSettingsProperties'}, + } + + def __init__(self, *, scope=None, location=None, tag_settings=None, **kwargs) -> None: + super(AzureQueryProperties, self).__init__(**kwargs) + self.scope = scope + self.location = location + self.tag_settings = tag_settings diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/tag_settings_properties.py b/azure-mgmt-automation/azure/mgmt/automation/models/tag_settings_properties.py new file mode 100644 index 000000000000..a6a4294f0bec --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/tag_settings_properties.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TagSettingsProperties(Model): + """Tag filter information for the VM. + + :param tags: Dictionary of tags with its list of values. + :type tags: dict[str, list[str]] + :param filter_operator: Filter VMs by Any or All specified tags. Possible + values include: 'All', 'Any' + :type filter_operator: str or ~azure.mgmt.automation.models.TagOperators + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{[str]}'}, + 'filter_operator': {'key': 'filterOperator', 'type': 'TagOperators'}, + } + + def __init__(self, **kwargs): + super(TagSettingsProperties, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.filter_operator = kwargs.get('filter_operator', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/tag_settings_properties_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/tag_settings_properties_py3.py new file mode 100644 index 000000000000..58472eda9e74 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/tag_settings_properties_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TagSettingsProperties(Model): + """Tag filter information for the VM. + + :param tags: Dictionary of tags with its list of values. + :type tags: dict[str, list[str]] + :param filter_operator: Filter VMs by Any or All specified tags. Possible + values include: 'All', 'Any' + :type filter_operator: str or ~azure.mgmt.automation.models.TagOperators + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{[str]}'}, + 'filter_operator': {'key': 'filterOperator', 'type': 'TagOperators'}, + } + + def __init__(self, *, tags=None, filter_operator=None, **kwargs) -> None: + super(TagSettingsProperties, self).__init__(**kwargs) + self.tags = tags + self.filter_operator = filter_operator diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/target_properties.py b/azure-mgmt-automation/azure/mgmt/automation/models/target_properties.py new file mode 100644 index 000000000000..60fd0c2ff7ae --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/target_properties.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TargetProperties(Model): + """Group specific to the update configuration. + + :param azure_queries: List of Azure queries in the software update + configuration. + :type azure_queries: + list[~azure.mgmt.automation.models.AzureQueryProperties] + """ + + _attribute_map = { + 'azure_queries': {'key': 'azureQueries', 'type': '[AzureQueryProperties]'}, + } + + def __init__(self, **kwargs): + super(TargetProperties, self).__init__(**kwargs) + self.azure_queries = kwargs.get('azure_queries', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/target_properties_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/target_properties_py3.py new file mode 100644 index 000000000000..7acb8d5465d6 --- /dev/null +++ b/azure-mgmt-automation/azure/mgmt/automation/models/target_properties_py3.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TargetProperties(Model): + """Group specific to the update configuration. + + :param azure_queries: List of Azure queries in the software update + configuration. + :type azure_queries: + list[~azure.mgmt.automation.models.AzureQueryProperties] + """ + + _attribute_map = { + 'azure_queries': {'key': 'azureQueries', 'type': '[AzureQueryProperties]'}, + } + + def __init__(self, *, azure_queries=None, **kwargs) -> None: + super(TargetProperties, self).__init__(**kwargs) + self.azure_queries = azure_queries diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/update_configuration.py b/azure-mgmt-automation/azure/mgmt/automation/models/update_configuration.py index 0f8336bba09c..eae909d83463 100644 --- a/azure-mgmt-automation/azure/mgmt/automation/models/update_configuration.py +++ b/azure-mgmt-automation/azure/mgmt/automation/models/update_configuration.py @@ -35,6 +35,8 @@ class UpdateConfiguration(Model): :param non_azure_computer_names: List of names of non-azure machines targeted by the software update configuration. :type non_azure_computer_names: list[str] + :param targets: Group targets for the software update configuration. + :type targets: ~azure.mgmt.automation.models.TargetProperties """ _validation = { @@ -48,6 +50,7 @@ class UpdateConfiguration(Model): 'duration': {'key': 'duration', 'type': 'duration'}, 'azure_virtual_machines': {'key': 'azureVirtualMachines', 'type': '[str]'}, 'non_azure_computer_names': {'key': 'nonAzureComputerNames', 'type': '[str]'}, + 'targets': {'key': 'targets', 'type': 'TargetProperties'}, } def __init__(self, **kwargs): @@ -58,3 +61,4 @@ def __init__(self, **kwargs): self.duration = kwargs.get('duration', None) self.azure_virtual_machines = kwargs.get('azure_virtual_machines', None) self.non_azure_computer_names = kwargs.get('non_azure_computer_names', None) + self.targets = kwargs.get('targets', None) diff --git a/azure-mgmt-automation/azure/mgmt/automation/models/update_configuration_py3.py b/azure-mgmt-automation/azure/mgmt/automation/models/update_configuration_py3.py index 05c73897ed11..1b20e4171503 100644 --- a/azure-mgmt-automation/azure/mgmt/automation/models/update_configuration_py3.py +++ b/azure-mgmt-automation/azure/mgmt/automation/models/update_configuration_py3.py @@ -35,6 +35,8 @@ class UpdateConfiguration(Model): :param non_azure_computer_names: List of names of non-azure machines targeted by the software update configuration. :type non_azure_computer_names: list[str] + :param targets: Group targets for the software update configuration. + :type targets: ~azure.mgmt.automation.models.TargetProperties """ _validation = { @@ -48,9 +50,10 @@ class UpdateConfiguration(Model): 'duration': {'key': 'duration', 'type': 'duration'}, 'azure_virtual_machines': {'key': 'azureVirtualMachines', 'type': '[str]'}, 'non_azure_computer_names': {'key': 'nonAzureComputerNames', 'type': '[str]'}, + 'targets': {'key': 'targets', 'type': 'TargetProperties'}, } - def __init__(self, *, operating_system, windows=None, linux=None, duration=None, azure_virtual_machines=None, non_azure_computer_names=None, **kwargs) -> None: + def __init__(self, *, operating_system, windows=None, linux=None, duration=None, azure_virtual_machines=None, non_azure_computer_names=None, targets=None, **kwargs) -> None: super(UpdateConfiguration, self).__init__(**kwargs) self.operating_system = operating_system self.windows = windows @@ -58,3 +61,4 @@ def __init__(self, *, operating_system, windows=None, linux=None, duration=None, self.duration = duration self.azure_virtual_machines = azure_virtual_machines self.non_azure_computer_names = non_azure_computer_names + self.targets = targets