diff --git a/azure-mgmt-dns/azure/mgmt/dns/models/__init__.py b/azure-mgmt-dns/azure/mgmt/dns/models/__init__.py index f21e613b8e09..43d1fc220079 100644 --- a/azure-mgmt-dns/azure/mgmt/dns/models/__init__.py +++ b/azure-mgmt-dns/azure/mgmt/dns/models/__init__.py @@ -23,6 +23,7 @@ from .record_set_update_parameters import RecordSetUpdateParameters from .sub_resource import SubResource from .zone import Zone +from .zone_update import ZoneUpdate from .resource import Resource from .record_set_paged import RecordSetPaged from .zone_paged import ZonePaged @@ -46,6 +47,7 @@ 'RecordSetUpdateParameters', 'SubResource', 'Zone', + 'ZoneUpdate', 'Resource', 'RecordSetPaged', 'ZonePaged', diff --git a/azure-mgmt-dns/azure/mgmt/dns/models/resource.py b/azure-mgmt-dns/azure/mgmt/dns/models/resource.py index 664761f0c5a0..6e4361306992 100644 --- a/azure-mgmt-dns/azure/mgmt/dns/models/resource.py +++ b/azure-mgmt-dns/azure/mgmt/dns/models/resource.py @@ -34,6 +34,7 @@ class Resource(Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'location': {'required': True}, } _attribute_map = { @@ -44,7 +45,7 @@ class Resource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, location=None, tags=None): + def __init__(self, location, tags=None): super(Resource, self).__init__() self.id = None self.name = None diff --git a/azure-mgmt-dns/azure/mgmt/dns/models/zone.py b/azure-mgmt-dns/azure/mgmt/dns/models/zone.py index db941eafe71d..729b4c4be264 100644 --- a/azure-mgmt-dns/azure/mgmt/dns/models/zone.py +++ b/azure-mgmt-dns/azure/mgmt/dns/models/zone.py @@ -60,6 +60,7 @@ class Zone(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'location': {'required': True}, 'max_number_of_record_sets': {'readonly': True}, 'number_of_record_sets': {'readonly': True}, 'name_servers': {'readonly': True}, @@ -80,7 +81,7 @@ class Zone(Resource): 'resolution_virtual_networks': {'key': 'properties.resolutionVirtualNetworks', 'type': '[SubResource]'}, } - def __init__(self, location=None, tags=None, etag=None, zone_type="Public", registration_virtual_networks=None, resolution_virtual_networks=None): + def __init__(self, location, tags=None, etag=None, zone_type="Public", registration_virtual_networks=None, resolution_virtual_networks=None): super(Zone, self).__init__(location=location, tags=tags) self.etag = etag self.max_number_of_record_sets = None diff --git a/azure-mgmt-dns/azure/mgmt/dns/models/zone_update.py b/azure-mgmt-dns/azure/mgmt/dns/models/zone_update.py new file mode 100644 index 000000000000..d9a94ed8f072 --- /dev/null +++ b/azure-mgmt-dns/azure/mgmt/dns/models/zone_update.py @@ -0,0 +1,28 @@ +# 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 ZoneUpdate(Model): + """Describes a request to update a DNS zone. + + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, tags=None): + super(ZoneUpdate, self).__init__() + self.tags = tags diff --git a/azure-mgmt-dns/azure/mgmt/dns/operations/zones_operations.py b/azure-mgmt-dns/azure/mgmt/dns/operations/zones_operations.py index 0841468ffcb8..130319509bdc 100644 --- a/azure-mgmt-dns/azure/mgmt/dns/operations/zones_operations.py +++ b/azure-mgmt-dns/azure/mgmt/dns/operations/zones_operations.py @@ -297,7 +297,7 @@ def get( get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}'} def update( - self, resource_group_name, zone_name, parameters, if_match=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, zone_name, if_match=None, tags=None, custom_headers=None, raw=False, **operation_config): """Updates a DNS zone. Does not modify DNS records within the zone. :param resource_group_name: The name of the resource group. @@ -305,12 +305,12 @@ def update( :param zone_name: The name of the DNS zone (without a terminating dot). :type zone_name: str - :param parameters: Parameters supplied to the Update operation. - :type parameters: ~azure.mgmt.dns.models.Zone :param if_match: The etag of the DNS zone. Omit this value to always overwrite the current zone. Specify the last-seen etag value to prevent accidentally overwritting any concurrent changes. :type if_match: str + :param tags: Resource tags. + :type tags: dict[str, str] :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -321,6 +321,8 @@ def update( ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + parameters = models.ZoneUpdate(tags=tags) + # Construct URL url = self.update.metadata['url'] path_format_arguments = { @@ -347,7 +349,7 @@ def update( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, 'Zone') + body_content = self._serialize.body(parameters, 'ZoneUpdate') # Construct and send request request = self._client.patch(url, query_parameters) diff --git a/azure-mgmt-dns/azure/mgmt/dns/version.py b/azure-mgmt-dns/azure/mgmt/dns/version.py index 8d86cf0470d7..623d610ecc13 100644 --- a/azure-mgmt-dns/azure/mgmt/dns/version.py +++ b/azure-mgmt-dns/azure/mgmt/dns/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "2.0.0rc1" +VERSION = "2018-03-01-preview"