Skip to content

Commit e1da74e

Browse files
authored
Generated from 4cd4e98cda01544d59ad18dbbb293473560c88cd (#3271)
Py DNS 2018-05
1 parent 66b4ec2 commit e1da74e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+3098
-0
lines changed

azure-mgmt-dns/azure/mgmt/dns/dns_management_client.py

+23
Original file line numberDiff line numberDiff line change
@@ -106,27 +106,47 @@ def models(cls, api_version=DEFAULT_API_VERSION):
106106
107107
* 2016-04-01: :mod:`v2016_04_01.models<azure.mgmt.dns.v2016_04_01.models>`
108108
* 2018-03-01-preview: :mod:`v2018_03_01_preview.models<azure.mgmt.dns.v2018_03_01_preview.models>`
109+
* 2018-05-01: :mod:`v2018_05_01.models<azure.mgmt.dns.v2018_05_01.models>`
109110
"""
110111
if api_version == '2016-04-01':
111112
from .v2016_04_01 import models
112113
return models
113114
elif api_version == '2018-03-01-preview':
114115
from .v2018_03_01_preview import models
115116
return models
117+
elif api_version == '2018-05-01':
118+
from .v2018_05_01 import models
119+
return models
116120
raise NotImplementedError("APIVersion {} is not available".format(api_version))
117121

122+
@property
123+
def dns_resource_reference(self):
124+
"""Instance depends on the API version:
125+
126+
* 2018-05-01: :class:`DnsResourceReferenceOperations<azure.mgmt.dns.v2018_05_01.operations.DnsResourceReferenceOperations>`
127+
"""
128+
api_version = self._get_api_version('dns_resource_reference')
129+
if api_version == '2018-05-01':
130+
from .v2018_05_01.operations import DnsResourceReferenceOperations as OperationClass
131+
else:
132+
raise NotImplementedError("APIVersion {} is not available".format(api_version))
133+
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
134+
118135
@property
119136
def record_sets(self):
120137
"""Instance depends on the API version:
121138
122139
* 2016-04-01: :class:`RecordSetsOperations<azure.mgmt.dns.v2016_04_01.operations.RecordSetsOperations>`
123140
* 2018-03-01-preview: :class:`RecordSetsOperations<azure.mgmt.dns.v2018_03_01_preview.operations.RecordSetsOperations>`
141+
* 2018-05-01: :class:`RecordSetsOperations<azure.mgmt.dns.v2018_05_01.operations.RecordSetsOperations>`
124142
"""
125143
api_version = self._get_api_version('record_sets')
126144
if api_version == '2016-04-01':
127145
from .v2016_04_01.operations import RecordSetsOperations as OperationClass
128146
elif api_version == '2018-03-01-preview':
129147
from .v2018_03_01_preview.operations import RecordSetsOperations as OperationClass
148+
elif api_version == '2018-05-01':
149+
from .v2018_05_01.operations import RecordSetsOperations as OperationClass
130150
else:
131151
raise NotImplementedError("APIVersion {} is not available".format(api_version))
132152
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -137,12 +157,15 @@ def zones(self):
137157
138158
* 2016-04-01: :class:`ZonesOperations<azure.mgmt.dns.v2016_04_01.operations.ZonesOperations>`
139159
* 2018-03-01-preview: :class:`ZonesOperations<azure.mgmt.dns.v2018_03_01_preview.operations.ZonesOperations>`
160+
* 2018-05-01: :class:`ZonesOperations<azure.mgmt.dns.v2018_05_01.operations.ZonesOperations>`
140161
"""
141162
api_version = self._get_api_version('zones')
142163
if api_version == '2016-04-01':
143164
from .v2016_04_01.operations import ZonesOperations as OperationClass
144165
elif api_version == '2018-03-01-preview':
145166
from .v2018_03_01_preview.operations import ZonesOperations as OperationClass
167+
elif api_version == '2018-05-01':
168+
from .v2018_05_01.operations import ZonesOperations as OperationClass
146169
else:
147170
raise NotImplementedError("APIVersion {} is not available".format(api_version))
148171
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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 .dns_management_client import DnsManagementClient
13+
from .version import VERSION
14+
15+
__all__ = ['DnsManagementClient']
16+
17+
__version__ = VERSION
18+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
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.service_client import SDKClient
13+
from msrest import Serializer, Deserializer
14+
from msrestazure import AzureConfiguration
15+
from .version import VERSION
16+
from .operations.record_sets_operations import RecordSetsOperations
17+
from .operations.zones_operations import ZonesOperations
18+
from .operations.dns_resource_reference_operations import DnsResourceReferenceOperations
19+
from . import models
20+
21+
22+
class DnsManagementClientConfiguration(AzureConfiguration):
23+
"""Configuration for DnsManagementClient
24+
Note that all parameters used to create this instance are saved as instance
25+
attributes.
26+
27+
:param credentials: Credentials needed for the client to connect to Azure.
28+
:type credentials: :mod:`A msrestazure Credentials
29+
object<msrestazure.azure_active_directory>`
30+
:param subscription_id: Specifies the Azure subscription ID, which
31+
uniquely identifies the Microsoft Azure subscription.
32+
:type subscription_id: str
33+
:param str base_url: Service URL
34+
"""
35+
36+
def __init__(
37+
self, credentials, subscription_id, base_url=None):
38+
39+
if credentials is None:
40+
raise ValueError("Parameter 'credentials' must not be None.")
41+
if subscription_id is None:
42+
raise ValueError("Parameter 'subscription_id' must not be None.")
43+
if not base_url:
44+
base_url = 'https://management.azure.com'
45+
46+
super(DnsManagementClientConfiguration, self).__init__(base_url)
47+
48+
self.add_user_agent('azure-mgmt-dns/{}'.format(VERSION))
49+
self.add_user_agent('Azure-SDK-For-Python')
50+
51+
self.credentials = credentials
52+
self.subscription_id = subscription_id
53+
54+
55+
class DnsManagementClient(SDKClient):
56+
"""The DNS Management Client.
57+
58+
:ivar config: Configuration for client.
59+
:vartype config: DnsManagementClientConfiguration
60+
61+
:ivar record_sets: RecordSets operations
62+
:vartype record_sets: azure.mgmt.dns.v2018_05_01.operations.RecordSetsOperations
63+
:ivar zones: Zones operations
64+
:vartype zones: azure.mgmt.dns.v2018_05_01.operations.ZonesOperations
65+
:ivar dns_resource_reference: DnsResourceReference operations
66+
:vartype dns_resource_reference: azure.mgmt.dns.v2018_05_01.operations.DnsResourceReferenceOperations
67+
68+
:param credentials: Credentials needed for the client to connect to Azure.
69+
:type credentials: :mod:`A msrestazure Credentials
70+
object<msrestazure.azure_active_directory>`
71+
:param subscription_id: Specifies the Azure subscription ID, which
72+
uniquely identifies the Microsoft Azure subscription.
73+
:type subscription_id: str
74+
:param str base_url: Service URL
75+
"""
76+
77+
def __init__(
78+
self, credentials, subscription_id, base_url=None):
79+
80+
self.config = DnsManagementClientConfiguration(credentials, subscription_id, base_url)
81+
super(DnsManagementClient, self).__init__(self.config.credentials, self.config)
82+
83+
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
84+
self.api_version = '2018-05-01'
85+
self._serialize = Serializer(client_models)
86+
self._deserialize = Deserializer(client_models)
87+
88+
self.record_sets = RecordSetsOperations(
89+
self._client, self.config, self._serialize, self._deserialize)
90+
self.zones = ZonesOperations(
91+
self._client, self.config, self._serialize, self._deserialize)
92+
self.dns_resource_reference = DnsResourceReferenceOperations(
93+
self._client, self.config, self._serialize, self._deserialize)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
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+
try:
13+
from .arecord_py3 import ARecord
14+
from .aaaa_record_py3 import AaaaRecord
15+
from .mx_record_py3 import MxRecord
16+
from .ns_record_py3 import NsRecord
17+
from .ptr_record_py3 import PtrRecord
18+
from .srv_record_py3 import SrvRecord
19+
from .txt_record_py3 import TxtRecord
20+
from .cname_record_py3 import CnameRecord
21+
from .soa_record_py3 import SoaRecord
22+
from .caa_record_py3 import CaaRecord
23+
from .sub_resource_py3 import SubResource
24+
from .record_set_py3 import RecordSet
25+
from .record_set_update_parameters_py3 import RecordSetUpdateParameters
26+
from .zone_py3 import Zone
27+
from .zone_update_py3 import ZoneUpdate
28+
from .dns_resource_reference_request_py3 import DnsResourceReferenceRequest
29+
from .dns_resource_reference_py3 import DnsResourceReference
30+
from .dns_resource_reference_result_py3 import DnsResourceReferenceResult
31+
from .resource_py3 import Resource
32+
except (SyntaxError, ImportError):
33+
from .arecord import ARecord
34+
from .aaaa_record import AaaaRecord
35+
from .mx_record import MxRecord
36+
from .ns_record import NsRecord
37+
from .ptr_record import PtrRecord
38+
from .srv_record import SrvRecord
39+
from .txt_record import TxtRecord
40+
from .cname_record import CnameRecord
41+
from .soa_record import SoaRecord
42+
from .caa_record import CaaRecord
43+
from .sub_resource import SubResource
44+
from .record_set import RecordSet
45+
from .record_set_update_parameters import RecordSetUpdateParameters
46+
from .zone import Zone
47+
from .zone_update import ZoneUpdate
48+
from .dns_resource_reference_request import DnsResourceReferenceRequest
49+
from .dns_resource_reference import DnsResourceReference
50+
from .dns_resource_reference_result import DnsResourceReferenceResult
51+
from .resource import Resource
52+
from .record_set_paged import RecordSetPaged
53+
from .zone_paged import ZonePaged
54+
from .dns_management_client_enums import (
55+
ZoneType,
56+
RecordType,
57+
)
58+
59+
__all__ = [
60+
'ARecord',
61+
'AaaaRecord',
62+
'MxRecord',
63+
'NsRecord',
64+
'PtrRecord',
65+
'SrvRecord',
66+
'TxtRecord',
67+
'CnameRecord',
68+
'SoaRecord',
69+
'CaaRecord',
70+
'SubResource',
71+
'RecordSet',
72+
'RecordSetUpdateParameters',
73+
'Zone',
74+
'ZoneUpdate',
75+
'DnsResourceReferenceRequest',
76+
'DnsResourceReference',
77+
'DnsResourceReferenceResult',
78+
'Resource',
79+
'RecordSetPaged',
80+
'ZonePaged',
81+
'ZoneType',
82+
'RecordType',
83+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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 AaaaRecord(Model):
16+
"""An AAAA record.
17+
18+
:param ipv6_address: The IPv6 address of this AAAA record.
19+
:type ipv6_address: str
20+
"""
21+
22+
_attribute_map = {
23+
'ipv6_address': {'key': 'ipv6Address', 'type': 'str'},
24+
}
25+
26+
def __init__(self, **kwargs):
27+
super(AaaaRecord, self).__init__(**kwargs)
28+
self.ipv6_address = kwargs.get('ipv6_address', None)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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 AaaaRecord(Model):
16+
"""An AAAA record.
17+
18+
:param ipv6_address: The IPv6 address of this AAAA record.
19+
:type ipv6_address: str
20+
"""
21+
22+
_attribute_map = {
23+
'ipv6_address': {'key': 'ipv6Address', 'type': 'str'},
24+
}
25+
26+
def __init__(self, *, ipv6_address: str=None, **kwargs) -> None:
27+
super(AaaaRecord, self).__init__(**kwargs)
28+
self.ipv6_address = ipv6_address
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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 ARecord(Model):
16+
"""An A record.
17+
18+
:param ipv4_address: The IPv4 address of this A record.
19+
:type ipv4_address: str
20+
"""
21+
22+
_attribute_map = {
23+
'ipv4_address': {'key': 'ipv4Address', 'type': 'str'},
24+
}
25+
26+
def __init__(self, **kwargs):
27+
super(ARecord, self).__init__(**kwargs)
28+
self.ipv4_address = kwargs.get('ipv4_address', None)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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 ARecord(Model):
16+
"""An A record.
17+
18+
:param ipv4_address: The IPv4 address of this A record.
19+
:type ipv4_address: str
20+
"""
21+
22+
_attribute_map = {
23+
'ipv4_address': {'key': 'ipv4Address', 'type': 'str'},
24+
}
25+
26+
def __init__(self, *, ipv4_address: str=None, **kwargs) -> None:
27+
super(ARecord, self).__init__(**kwargs)
28+
self.ipv4_address = ipv4_address

0 commit comments

Comments
 (0)