@@ -57,9 +57,11 @@ public DnsZone CreateDnsZone(string name, string resourceGroupName, Hashtable[]
57
57
Location = DnsResourceLocation ,
58
58
Name = name ,
59
59
Tags = TagsConversionHelper . CreateTagDictionary ( tags , validate : true ) ,
60
+ ETag = null ,
60
61
Properties = new ZoneProperties
61
62
{
62
- ETag = null ,
63
+ NumberOfRecordSets = null ,
64
+ MaxNumberOfRecordSets = null ,
63
65
}
64
66
}
65
67
} ) ;
@@ -68,7 +70,7 @@ public DnsZone CreateDnsZone(string name, string resourceGroupName, Hashtable[]
68
70
{
69
71
Name = response . Zone . Name ,
70
72
ResourceGroupName = resourceGroupName ,
71
- Etag = response . Zone . Properties . ETag ,
73
+ Etag = response . Zone . ETag ,
72
74
Tags = TagsConversionHelper . CreateTagHashtable ( response . Zone . Tags ) ,
73
75
} ;
74
76
}
@@ -85,9 +87,9 @@ public DnsZone UpdateDnsZone(DnsZone zone, bool overwrite)
85
87
Location = DnsResourceLocation ,
86
88
Name = zone . Name ,
87
89
Tags = TagsConversionHelper . CreateTagDictionary ( zone . Tags , validate : true ) ,
90
+ ETag = overwrite ? "*" : zone . Etag ,
88
91
Properties = new ZoneProperties
89
92
{
90
- ETag = overwrite ? "*" : zone . Etag ,
91
93
}
92
94
}
93
95
} ) ;
@@ -96,7 +98,7 @@ public DnsZone UpdateDnsZone(DnsZone zone, bool overwrite)
96
98
{
97
99
Name = response . Zone . Name ,
98
100
ResourceGroupName = zone . ResourceGroupName ,
99
- Etag = response . Zone . Properties . ETag ,
101
+ Etag = response . Zone . ETag ,
100
102
Tags = TagsConversionHelper . CreateTagHashtable ( response . Zone . Tags ) ,
101
103
} ;
102
104
}
@@ -121,7 +123,7 @@ public DnsZone GetDnsZone(string name, string resourceGroupName)
121
123
{
122
124
Name = getResponse . Zone . Name ,
123
125
ResourceGroupName = resourceGroupName ,
124
- Etag = getResponse . Zone . Properties . ETag ,
126
+ Etag = getResponse . Zone . ETag ,
125
127
Tags = TagsConversionHelper . CreateTagHashtable ( getResponse . Zone . Tags ) ,
126
128
} ;
127
129
}
@@ -138,7 +140,7 @@ public List<DnsZone> ListDnsZones(string resourceGroupName, string endsWith)
138
140
{
139
141
Name = zoneInResponse . Name ,
140
142
ResourceGroupName = resourceGroupName ,
141
- Etag = zoneInResponse . Properties . ETag ,
143
+ Etag = zoneInResponse . ETag ,
142
144
Tags = TagsConversionHelper . CreateTagHashtable ( zoneInResponse . Tags ) ,
143
145
} )
144
146
. ToList ( ) ;
@@ -159,9 +161,9 @@ public DnsRecordSet CreateDnsRecordSet(string zoneName, string resourceGroupName
159
161
Name = relativeRecordSetName ,
160
162
Location = DnsResourceLocation ,
161
163
Tags = TagsConversionHelper . CreateTagDictionary ( tags , validate : true ) ,
164
+ ETag = null ,
162
165
Properties = new RecordSetProperties
163
166
{
164
- ETag = null ,
165
167
Ttl = ttl ,
166
168
AaaaRecords = recordType == RecordType . AAAA ? new List < Management . Dns . Models . AaaaRecord > ( ) : null ,
167
169
ARecords = recordType == RecordType . A ? new List < Management . Dns . Models . ARecord > ( ) : null ,
@@ -194,9 +196,9 @@ public DnsRecordSet UpdateDnsRecordSet(DnsRecordSet recordSet, bool overwrite)
194
196
Name = recordSet . Name ,
195
197
Location = DnsResourceLocation ,
196
198
Tags = TagsConversionHelper . CreateTagDictionary ( recordSet . Tags , validate : true ) ,
199
+ ETag = overwrite ? "*" : recordSet . Etag ,
197
200
Properties = new RecordSetProperties
198
201
{
199
- ETag = overwrite ? "*" : recordSet . Etag ,
200
202
Ttl = recordSet . Ttl ,
201
203
AaaaRecords = recordSet . RecordType == RecordType . AAAA ? GetMamlRecords < AaaaRecord , Management . Dns . Models . AaaaRecord > ( recordSet . Records ) : null ,
202
204
ARecords = recordSet . RecordType == RecordType . A ? GetMamlRecords < ARecord , Management . Dns . Models . ARecord > ( recordSet . Records ) : null ,
@@ -271,7 +273,7 @@ private static DnsRecordSet GetPowerShellRecordSet(string zoneName, string resou
271
273
272
274
return new DnsRecordSet
273
275
{
274
- Etag = mamlRecordSet . Properties . ETag ,
276
+ Etag = mamlRecordSet . ETag ,
275
277
Name = mamlRecordSet . Name ,
276
278
RecordType = recordType ,
277
279
Records = GetPowerShellRecords ( mamlRecordSet ) ,
0 commit comments