Обновления набор записей в пределах зоны DNS.
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}?api-version=2018-05-01
Параметры URI
Имя |
В |
Обязательно |
Тип |
Описание |
recordType
|
path |
True
|
RecordType
|
Тип записи DNS в этом наборе записей.
|
relativeRecordSetName
|
path |
True
|
string
|
Имя набора записей относительно имени зоны.
|
resourceGroupName
|
path |
True
|
string
|
Имя группы ресурсов.
|
subscriptionId
|
path |
True
|
string
|
Указывает идентификатор подписки Azure, который однозначно идентифицирует подписку Microsoft Azure.
|
zoneName
|
path |
True
|
string
|
Имя зоны DNS (без конечной точки).
|
api-version
|
query |
True
|
string
|
Задает версию API.
|
Имя |
Обязательно |
Тип |
Описание |
If-Match
|
|
string
|
Etag набора записей. Пропустите это значение, чтобы всегда перезаписывать текущий набор записей. Укажите значение etag последнего просмотра, чтобы предотвратить случайную перезапись параллельных изменений.
|
Текст запроса
Имя |
Тип |
Описание |
etag
|
string
|
Etag набора записей.
|
properties.AAAARecords
|
AaaaRecord[]
|
Список записей AAAA в наборе записей.
|
properties.ARecords
|
ARecord[]
|
Список записей A в наборе записей.
|
properties.CNAMERecord
|
CnameRecord
|
Запись CNAME в наборе записей.
|
properties.MXRecords
|
MxRecord[]
|
Список записей MX в наборе записей.
|
properties.NSRecords
|
NsRecord[]
|
Список записей NS в наборе записей.
|
properties.PTRRecords
|
PtrRecord[]
|
Список записей PTR в наборе записей.
|
properties.SOARecord
|
SoaRecord
|
Запись SOA в наборе записей.
|
properties.SRVRecords
|
SrvRecord[]
|
Список записей SRV в наборе записей.
|
properties.TTL
|
integer
|
Срок жизни (срок жизни) записей в наборе записей.
|
properties.TXTRecords
|
TxtRecord[]
|
Список записей ТИПА TXT в наборе записей.
|
properties.caaRecords
|
CaaRecord[]
|
Список записей CAA в наборе записей.
|
properties.metadata
|
object
|
Метаданные, присоединенные к набору записей.
|
properties.targetResource
|
SubResource
|
Ссылка на ресурс Azure, из которого берется значение ресурса DNS.
|
Ответы
Имя |
Тип |
Описание |
200 OK
|
RecordSet
|
Набор записей обновлен.
|
Other Status Codes
|
CloudError
|
Ответ по умолчанию. Он будет десериализоваться согласно определению Error.
|
Примеры
Patch A recordset
Sample Request
PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/A/record1?api-version=2018-05-01
{
"properties": {
"metadata": {
"key2": "value2"
}
}
}
import com.azure.resourcemanager.dns.fluent.models.RecordSetInner;
import com.azure.resourcemanager.dns.models.RecordType;
import java.util.HashMap;
import java.util.Map;
/** Samples for RecordSets Update. */
public final class Main {
/*
* x-ms-original-file:
* specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchARecordset.json
*/
/**
* Sample code: Patch A recordset.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void patchARecordset(com.azure.resourcemanager.AzureResourceManager azure) {
azure.dnsZones().manager().serviceClient().getRecordSets().updateWithResponse("rg1", "zone1", "record1",
RecordType.A, new RecordSetInner().withMetadata(mapOf("key2", "fakeTokenPlaceholder")), null,
com.azure.core.util.Context.NONE);
}
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.dns import DnsManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-dns
# USAGE
python patch_arecordset.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = DnsManagementClient(
credential=DefaultAzureCredential(),
subscription_id="subid",
)
response = client.record_sets.update(
resource_group_name="rg1",
zone_name="zone1",
relative_record_set_name="record1",
record_type="A",
parameters={"properties": {"metadata": {"key2": "value2"}}},
)
print(response)
# x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchARecordset.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armdns_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchARecordset.json
func ExampleRecordSetsClient_Update_patchARecordset() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdns.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewRecordSetsClient().Update(ctx, "rg1", "zone1", "record1", armdns.RecordTypeA, armdns.RecordSet{
Properties: &armdns.RecordSetProperties{
Metadata: map[string]*string{
"key2": to.Ptr("value2"),
},
},
}, &armdns.RecordSetsClientUpdateOptions{IfMatch: nil})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.RecordSet = armdns.RecordSet{
// Name: to.Ptr("record1"),
// Type: to.Ptr("Microsoft.Network/dnsZones/A"),
// Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/A/record1"),
// Properties: &armdns.RecordSetProperties{
// ARecords: []*armdns.ARecord{
// {
// IPv4Address: to.Ptr("127.0.0.1"),
// }},
// TTL: to.Ptr[int64](3600),
// Fqdn: to.Ptr("record1.zone1"),
// Metadata: map[string]*string{
// "key2": to.Ptr("value2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { DnsManagementClient } = require("@azure/arm-dns");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Updates a record set within a DNS zone.
*
* @summary Updates a record set within a DNS zone.
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchARecordset.json
*/
async function patchARecordset() {
const subscriptionId = "subid";
const resourceGroupName = "rg1";
const zoneName = "zone1";
const relativeRecordSetName = "record1";
const recordType = "A";
const parameters = { metadata: { key2: "value2" } };
const credential = new DefaultAzureCredential();
const client = new DnsManagementClient(credential, subscriptionId);
const result = await client.recordSets.update(
resourceGroupName,
zoneName,
relativeRecordSetName,
recordType,
parameters
);
console.log(result);
}
patchARecordset().catch(console.error);
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/A/record1",
"etag": "00000000-0000-0000-0000-000000000000",
"name": "record1",
"type": "Microsoft.Network/dnsZones/A",
"properties": {
"metadata": {
"key2": "value2"
},
"TTL": 3600,
"fqdn": "record1.zone1",
"ARecords": [
{
"ipv4Address": "127.0.0.1"
}
]
}
}
Patch AAAA recordset
Sample Request
PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/AAAA/record1?api-version=2018-05-01
{
"properties": {
"metadata": {
"key2": "value2"
}
}
}
import com.azure.resourcemanager.dns.fluent.models.RecordSetInner;
import com.azure.resourcemanager.dns.models.RecordType;
import java.util.HashMap;
import java.util.Map;
/** Samples for RecordSets Update. */
public final class Main {
/*
* x-ms-original-file:
* specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchAAAARecordset.json
*/
/**
* Sample code: Patch AAAA recordset.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void patchAAAARecordset(com.azure.resourcemanager.AzureResourceManager azure) {
azure.dnsZones().manager().serviceClient().getRecordSets().updateWithResponse("rg1", "zone1", "record1",
RecordType.AAAA, new RecordSetInner().withMetadata(mapOf("key2", "fakeTokenPlaceholder")), null,
com.azure.core.util.Context.NONE);
}
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.dns import DnsManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-dns
# USAGE
python patch_aaaa_recordset.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = DnsManagementClient(
credential=DefaultAzureCredential(),
subscription_id="subid",
)
response = client.record_sets.update(
resource_group_name="rg1",
zone_name="zone1",
relative_record_set_name="record1",
record_type="AAAA",
parameters={"properties": {"metadata": {"key2": "value2"}}},
)
print(response)
# x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchAAAARecordset.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armdns_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchAAAARecordset.json
func ExampleRecordSetsClient_Update_patchAaaaRecordset() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdns.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewRecordSetsClient().Update(ctx, "rg1", "zone1", "record1", armdns.RecordTypeAAAA, armdns.RecordSet{
Properties: &armdns.RecordSetProperties{
Metadata: map[string]*string{
"key2": to.Ptr("value2"),
},
},
}, &armdns.RecordSetsClientUpdateOptions{IfMatch: nil})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.RecordSet = armdns.RecordSet{
// Name: to.Ptr("record1"),
// Type: to.Ptr("Microsoft.Network/dnsZones/AAAA"),
// Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/AAAA/record1"),
// Properties: &armdns.RecordSetProperties{
// AaaaRecords: []*armdns.AaaaRecord{
// {
// IPv6Address: to.Ptr("::1"),
// }},
// TTL: to.Ptr[int64](3600),
// Fqdn: to.Ptr("record1.zone1"),
// Metadata: map[string]*string{
// "key2": to.Ptr("value2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { DnsManagementClient } = require("@azure/arm-dns");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Updates a record set within a DNS zone.
*
* @summary Updates a record set within a DNS zone.
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchAAAARecordset.json
*/
async function patchAaaaRecordset() {
const subscriptionId = "subid";
const resourceGroupName = "rg1";
const zoneName = "zone1";
const relativeRecordSetName = "record1";
const recordType = "AAAA";
const parameters = { metadata: { key2: "value2" } };
const credential = new DefaultAzureCredential();
const client = new DnsManagementClient(credential, subscriptionId);
const result = await client.recordSets.update(
resourceGroupName,
zoneName,
relativeRecordSetName,
recordType,
parameters
);
console.log(result);
}
patchAaaaRecordset().catch(console.error);
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/AAAA/record1",
"etag": "00000000-0000-0000-0000-000000000000",
"name": "record1",
"type": "Microsoft.Network/dnsZones/AAAA",
"properties": {
"metadata": {
"key2": "value2"
},
"TTL": 3600,
"fqdn": "record1.zone1",
"AAAARecords": [
{
"ipv6Address": "::1"
}
]
}
}
Patch CAA recordset
Sample Request
PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CAA/record1?api-version=2018-05-01
{
"properties": {
"metadata": {
"key2": "value2"
}
}
}
import com.azure.resourcemanager.dns.fluent.models.RecordSetInner;
import com.azure.resourcemanager.dns.models.RecordType;
import java.util.HashMap;
import java.util.Map;
/** Samples for RecordSets Update. */
public final class Main {
/*
* x-ms-original-file:
* specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchCaaRecordset.json
*/
/**
* Sample code: Patch CAA recordset.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void patchCAARecordset(com.azure.resourcemanager.AzureResourceManager azure) {
azure.dnsZones().manager().serviceClient().getRecordSets().updateWithResponse("rg1", "zone1", "record1",
RecordType.CAA, new RecordSetInner().withMetadata(mapOf("key2", "fakeTokenPlaceholder")), null,
com.azure.core.util.Context.NONE);
}
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.dns import DnsManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-dns
# USAGE
python patch_caa_recordset.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = DnsManagementClient(
credential=DefaultAzureCredential(),
subscription_id="subid",
)
response = client.record_sets.update(
resource_group_name="rg1",
zone_name="zone1",
relative_record_set_name="record1",
record_type="CAA",
parameters={"properties": {"metadata": {"key2": "value2"}}},
)
print(response)
# x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchCaaRecordset.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armdns_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchCaaRecordset.json
func ExampleRecordSetsClient_Update_patchCaaRecordset() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdns.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewRecordSetsClient().Update(ctx, "rg1", "zone1", "record1", armdns.RecordTypeCAA, armdns.RecordSet{
Properties: &armdns.RecordSetProperties{
Metadata: map[string]*string{
"key2": to.Ptr("value2"),
},
},
}, &armdns.RecordSetsClientUpdateOptions{IfMatch: nil})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.RecordSet = armdns.RecordSet{
// Name: to.Ptr("record1"),
// Type: to.Ptr("Microsoft.Network/dnsZones/CAA"),
// Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CAA/record1"),
// Properties: &armdns.RecordSetProperties{
// TTL: to.Ptr[int64](3600),
// CaaRecords: []*armdns.CaaRecord{
// {
// Flags: to.Ptr[int32](0),
// Tag: to.Ptr("issue"),
// Value: to.Ptr("ca.contoso.com"),
// }},
// Fqdn: to.Ptr("record1.zone1"),
// Metadata: map[string]*string{
// "key2": to.Ptr("value2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { DnsManagementClient } = require("@azure/arm-dns");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Updates a record set within a DNS zone.
*
* @summary Updates a record set within a DNS zone.
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchCaaRecordset.json
*/
async function patchCaaRecordset() {
const subscriptionId = "subid";
const resourceGroupName = "rg1";
const zoneName = "zone1";
const relativeRecordSetName = "record1";
const recordType = "CAA";
const parameters = { metadata: { key2: "value2" } };
const credential = new DefaultAzureCredential();
const client = new DnsManagementClient(credential, subscriptionId);
const result = await client.recordSets.update(
resourceGroupName,
zoneName,
relativeRecordSetName,
recordType,
parameters
);
console.log(result);
}
patchCaaRecordset().catch(console.error);
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CAA/record1",
"etag": "00000000-0000-0000-0000-000000000000",
"name": "record1",
"type": "Microsoft.Network/dnsZones/CAA",
"properties": {
"metadata": {
"key2": "value2"
},
"TTL": 3600,
"fqdn": "record1.zone1",
"caaRecords": [
{
"flags": 0,
"tag": "issue",
"value": "ca.contoso.com"
}
]
}
}
Patch CNAME recordset
Sample Request
PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CNAME/record1?api-version=2018-05-01
{
"properties": {
"metadata": {
"key2": "value2"
}
}
}
import com.azure.resourcemanager.dns.fluent.models.RecordSetInner;
import com.azure.resourcemanager.dns.models.RecordType;
import java.util.HashMap;
import java.util.Map;
/** Samples for RecordSets Update. */
public final class Main {
/*
* x-ms-original-file:
* specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchCNAMERecordset.json
*/
/**
* Sample code: Patch CNAME recordset.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void patchCNAMERecordset(com.azure.resourcemanager.AzureResourceManager azure) {
azure.dnsZones().manager().serviceClient().getRecordSets().updateWithResponse("rg1", "zone1", "record1",
RecordType.CNAME, new RecordSetInner().withMetadata(mapOf("key2", "fakeTokenPlaceholder")), null,
com.azure.core.util.Context.NONE);
}
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.dns import DnsManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-dns
# USAGE
python patch_cname_recordset.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = DnsManagementClient(
credential=DefaultAzureCredential(),
subscription_id="subid",
)
response = client.record_sets.update(
resource_group_name="rg1",
zone_name="zone1",
relative_record_set_name="record1",
record_type="CNAME",
parameters={"properties": {"metadata": {"key2": "value2"}}},
)
print(response)
# x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchCNAMERecordset.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armdns_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchCNAMERecordset.json
func ExampleRecordSetsClient_Update_patchCnameRecordset() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdns.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewRecordSetsClient().Update(ctx, "rg1", "zone1", "record1", armdns.RecordTypeCNAME, armdns.RecordSet{
Properties: &armdns.RecordSetProperties{
Metadata: map[string]*string{
"key2": to.Ptr("value2"),
},
},
}, &armdns.RecordSetsClientUpdateOptions{IfMatch: nil})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.RecordSet = armdns.RecordSet{
// Name: to.Ptr("record1"),
// Type: to.Ptr("Microsoft.Network/dnsZones/CNAME"),
// Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CNAME/record1"),
// Properties: &armdns.RecordSetProperties{
// CnameRecord: &armdns.CnameRecord{
// Cname: to.Ptr("contoso.com"),
// },
// TTL: to.Ptr[int64](3600),
// Fqdn: to.Ptr("record1.zone1"),
// Metadata: map[string]*string{
// "key2": to.Ptr("value2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { DnsManagementClient } = require("@azure/arm-dns");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Updates a record set within a DNS zone.
*
* @summary Updates a record set within a DNS zone.
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchCNAMERecordset.json
*/
async function patchCnameRecordset() {
const subscriptionId = "subid";
const resourceGroupName = "rg1";
const zoneName = "zone1";
const relativeRecordSetName = "record1";
const recordType = "CNAME";
const parameters = { metadata: { key2: "value2" } };
const credential = new DefaultAzureCredential();
const client = new DnsManagementClient(credential, subscriptionId);
const result = await client.recordSets.update(
resourceGroupName,
zoneName,
relativeRecordSetName,
recordType,
parameters
);
console.log(result);
}
patchCnameRecordset().catch(console.error);
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CNAME/record1",
"etag": "00000000-0000-0000-0000-000000000000",
"name": "record1",
"type": "Microsoft.Network/dnsZones/CNAME",
"properties": {
"metadata": {
"key2": "value2"
},
"TTL": 3600,
"fqdn": "record1.zone1",
"CNAMERecord": {
"cname": "contoso.com"
}
}
}
Patch MX recordset
Sample Request
PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/MX/record1?api-version=2018-05-01
{
"properties": {
"metadata": {
"key2": "value2"
}
}
}
import com.azure.resourcemanager.dns.fluent.models.RecordSetInner;
import com.azure.resourcemanager.dns.models.RecordType;
import java.util.HashMap;
import java.util.Map;
/** Samples for RecordSets Update. */
public final class Main {
/*
* x-ms-original-file:
* specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchMXRecordset.json
*/
/**
* Sample code: Patch MX recordset.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void patchMXRecordset(com.azure.resourcemanager.AzureResourceManager azure) {
azure.dnsZones().manager().serviceClient().getRecordSets().updateWithResponse("rg1", "zone1", "record1",
RecordType.MX, new RecordSetInner().withMetadata(mapOf("key2", "fakeTokenPlaceholder")), null,
com.azure.core.util.Context.NONE);
}
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.dns import DnsManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-dns
# USAGE
python patch_mx_recordset.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = DnsManagementClient(
credential=DefaultAzureCredential(),
subscription_id="subid",
)
response = client.record_sets.update(
resource_group_name="rg1",
zone_name="zone1",
relative_record_set_name="record1",
record_type="MX",
parameters={"properties": {"metadata": {"key2": "value2"}}},
)
print(response)
# x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchMXRecordset.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armdns_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchMXRecordset.json
func ExampleRecordSetsClient_Update_patchMxRecordset() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdns.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewRecordSetsClient().Update(ctx, "rg1", "zone1", "record1", armdns.RecordTypeMX, armdns.RecordSet{
Properties: &armdns.RecordSetProperties{
Metadata: map[string]*string{
"key2": to.Ptr("value2"),
},
},
}, &armdns.RecordSetsClientUpdateOptions{IfMatch: nil})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.RecordSet = armdns.RecordSet{
// Name: to.Ptr("record1"),
// Type: to.Ptr("Microsoft.Network/dnsZones/MX"),
// Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/MX/record1"),
// Properties: &armdns.RecordSetProperties{
// MxRecords: []*armdns.MxRecord{
// {
// Exchange: to.Ptr("mail.contoso.com"),
// Preference: to.Ptr[int32](0),
// }},
// TTL: to.Ptr[int64](3600),
// Fqdn: to.Ptr("record1.zone1"),
// Metadata: map[string]*string{
// "key2": to.Ptr("value2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { DnsManagementClient } = require("@azure/arm-dns");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Updates a record set within a DNS zone.
*
* @summary Updates a record set within a DNS zone.
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchMXRecordset.json
*/
async function patchMxRecordset() {
const subscriptionId = "subid";
const resourceGroupName = "rg1";
const zoneName = "zone1";
const relativeRecordSetName = "record1";
const recordType = "MX";
const parameters = { metadata: { key2: "value2" } };
const credential = new DefaultAzureCredential();
const client = new DnsManagementClient(credential, subscriptionId);
const result = await client.recordSets.update(
resourceGroupName,
zoneName,
relativeRecordSetName,
recordType,
parameters
);
console.log(result);
}
patchMxRecordset().catch(console.error);
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/MX/record1",
"etag": "00000000-0000-0000-0000-000000000000",
"name": "record1",
"type": "Microsoft.Network/dnsZones/MX",
"properties": {
"metadata": {
"key2": "value2"
},
"TTL": 3600,
"fqdn": "record1.zone1",
"MXRecords": [
{
"preference": 0,
"exchange": "mail.contoso.com"
}
]
}
}
Patch NS recordset
Sample Request
PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/NS/record1?api-version=2018-05-01
{
"properties": {
"metadata": {
"key2": "value2"
}
}
}
import com.azure.resourcemanager.dns.fluent.models.RecordSetInner;
import com.azure.resourcemanager.dns.models.RecordType;
import java.util.HashMap;
import java.util.Map;
/** Samples for RecordSets Update. */
public final class Main {
/*
* x-ms-original-file:
* specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchNSRecordset.json
*/
/**
* Sample code: Patch NS recordset.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void patchNSRecordset(com.azure.resourcemanager.AzureResourceManager azure) {
azure.dnsZones().manager().serviceClient().getRecordSets().updateWithResponse("rg1", "zone1", "record1",
RecordType.NS, new RecordSetInner().withMetadata(mapOf("key2", "fakeTokenPlaceholder")), null,
com.azure.core.util.Context.NONE);
}
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.dns import DnsManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-dns
# USAGE
python patch_ns_recordset.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = DnsManagementClient(
credential=DefaultAzureCredential(),
subscription_id="subid",
)
response = client.record_sets.update(
resource_group_name="rg1",
zone_name="zone1",
relative_record_set_name="record1",
record_type="NS",
parameters={"properties": {"metadata": {"key2": "value2"}}},
)
print(response)
# x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchNSRecordset.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armdns_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchNSRecordset.json
func ExampleRecordSetsClient_Update_patchNsRecordset() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdns.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewRecordSetsClient().Update(ctx, "rg1", "zone1", "record1", armdns.RecordTypeNS, armdns.RecordSet{
Properties: &armdns.RecordSetProperties{
Metadata: map[string]*string{
"key2": to.Ptr("value2"),
},
},
}, &armdns.RecordSetsClientUpdateOptions{IfMatch: nil})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.RecordSet = armdns.RecordSet{
// Name: to.Ptr("record1"),
// Type: to.Ptr("Microsoft.Network/dnsZones/NS"),
// Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/NS/record1"),
// Properties: &armdns.RecordSetProperties{
// NsRecords: []*armdns.NsRecord{
// {
// Nsdname: to.Ptr("ns1.contoso.com"),
// }},
// TTL: to.Ptr[int64](3600),
// Fqdn: to.Ptr("record1.zone1"),
// Metadata: map[string]*string{
// "key2": to.Ptr("value2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { DnsManagementClient } = require("@azure/arm-dns");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Updates a record set within a DNS zone.
*
* @summary Updates a record set within a DNS zone.
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchNSRecordset.json
*/
async function patchNsRecordset() {
const subscriptionId = "subid";
const resourceGroupName = "rg1";
const zoneName = "zone1";
const relativeRecordSetName = "record1";
const recordType = "NS";
const parameters = { metadata: { key2: "value2" } };
const credential = new DefaultAzureCredential();
const client = new DnsManagementClient(credential, subscriptionId);
const result = await client.recordSets.update(
resourceGroupName,
zoneName,
relativeRecordSetName,
recordType,
parameters
);
console.log(result);
}
patchNsRecordset().catch(console.error);
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/NS/record1",
"etag": "00000000-0000-0000-0000-000000000000",
"name": "record1",
"type": "Microsoft.Network/dnsZones/NS",
"properties": {
"metadata": {
"key2": "value2"
},
"TTL": 3600,
"fqdn": "record1.zone1",
"NSRecords": [
{
"nsdname": "ns1.contoso.com"
}
]
}
}
Patch PTR recordset
Sample Request
PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/0.0.127.in-addr.arpa/PTR/1?api-version=2018-05-01
{
"properties": {
"metadata": {
"key2": "value2"
}
}
}
import com.azure.resourcemanager.dns.fluent.models.RecordSetInner;
import com.azure.resourcemanager.dns.models.RecordType;
import java.util.HashMap;
import java.util.Map;
/** Samples for RecordSets Update. */
public final class Main {
/*
* x-ms-original-file:
* specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchPTRRecordset.json
*/
/**
* Sample code: Patch PTR recordset.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void patchPTRRecordset(com.azure.resourcemanager.AzureResourceManager azure) {
azure.dnsZones().manager().serviceClient().getRecordSets().updateWithResponse("rg1", "0.0.127.in-addr.arpa",
"1", RecordType.PTR, new RecordSetInner().withMetadata(mapOf("key2", "fakeTokenPlaceholder")), null,
com.azure.core.util.Context.NONE);
}
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.dns import DnsManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-dns
# USAGE
python patch_ptr_recordset.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = DnsManagementClient(
credential=DefaultAzureCredential(),
subscription_id="subid",
)
response = client.record_sets.update(
resource_group_name="rg1",
zone_name="0.0.127.in-addr.arpa",
relative_record_set_name="1",
record_type="PTR",
parameters={"properties": {"metadata": {"key2": "value2"}}},
)
print(response)
# x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchPTRRecordset.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armdns_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchPTRRecordset.json
func ExampleRecordSetsClient_Update_patchPtrRecordset() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdns.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewRecordSetsClient().Update(ctx, "rg1", "0.0.127.in-addr.arpa", "1", armdns.RecordTypePTR, armdns.RecordSet{
Properties: &armdns.RecordSetProperties{
Metadata: map[string]*string{
"key2": to.Ptr("value2"),
},
},
}, &armdns.RecordSetsClientUpdateOptions{IfMatch: nil})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.RecordSet = armdns.RecordSet{
// Name: to.Ptr("1"),
// Type: to.Ptr("Microsoft.Network/dnsZones/PTR"),
// Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/0.0.127.in-addr.arpa/PTR/1"),
// Properties: &armdns.RecordSetProperties{
// PtrRecords: []*armdns.PtrRecord{
// {
// Ptrdname: to.Ptr("localhost"),
// }},
// TTL: to.Ptr[int64](3600),
// Fqdn: to.Ptr("1.0.0.127.in-addr.arpa"),
// Metadata: map[string]*string{
// "key2": to.Ptr("value2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { DnsManagementClient } = require("@azure/arm-dns");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Updates a record set within a DNS zone.
*
* @summary Updates a record set within a DNS zone.
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchPTRRecordset.json
*/
async function patchPtrRecordset() {
const subscriptionId = "subid";
const resourceGroupName = "rg1";
const zoneName = "0.0.127.in-addr.arpa";
const relativeRecordSetName = "1";
const recordType = "PTR";
const parameters = { metadata: { key2: "value2" } };
const credential = new DefaultAzureCredential();
const client = new DnsManagementClient(credential, subscriptionId);
const result = await client.recordSets.update(
resourceGroupName,
zoneName,
relativeRecordSetName,
recordType,
parameters
);
console.log(result);
}
patchPtrRecordset().catch(console.error);
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/0.0.127.in-addr.arpa/PTR/1",
"etag": "00000000-0000-0000-0000-000000000000",
"name": "1",
"type": "Microsoft.Network/dnsZones/PTR",
"properties": {
"metadata": {
"key2": "value2"
},
"TTL": 3600,
"fqdn": "1.0.0.127.in-addr.arpa",
"PTRRecords": [
{
"ptrdname": "localhost"
}
]
}
}
Patch SOA recordset
Sample Request
PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SOA/@?api-version=2018-05-01
{
"properties": {
"metadata": {
"key2": "value2"
}
}
}
import com.azure.resourcemanager.dns.fluent.models.RecordSetInner;
import com.azure.resourcemanager.dns.models.RecordType;
import java.util.HashMap;
import java.util.Map;
/** Samples for RecordSets Update. */
public final class Main {
/*
* x-ms-original-file:
* specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchSOARecordset.json
*/
/**
* Sample code: Patch SOA recordset.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void patchSOARecordset(com.azure.resourcemanager.AzureResourceManager azure) {
azure.dnsZones().manager().serviceClient().getRecordSets().updateWithResponse("rg1", "zone1", "@",
RecordType.SOA, new RecordSetInner().withMetadata(mapOf("key2", "fakeTokenPlaceholder")), null,
com.azure.core.util.Context.NONE);
}
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.dns import DnsManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-dns
# USAGE
python patch_soa_recordset.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = DnsManagementClient(
credential=DefaultAzureCredential(),
subscription_id="subid",
)
response = client.record_sets.update(
resource_group_name="rg1",
zone_name="zone1",
relative_record_set_name="@",
record_type="SOA",
parameters={"properties": {"metadata": {"key2": "value2"}}},
)
print(response)
# x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchSOARecordset.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armdns_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchSOARecordset.json
func ExampleRecordSetsClient_Update_patchSoaRecordset() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdns.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewRecordSetsClient().Update(ctx, "rg1", "zone1", "@", armdns.RecordTypeSOA, armdns.RecordSet{
Properties: &armdns.RecordSetProperties{
Metadata: map[string]*string{
"key2": to.Ptr("value2"),
},
},
}, &armdns.RecordSetsClientUpdateOptions{IfMatch: nil})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.RecordSet = armdns.RecordSet{
// Name: to.Ptr("@"),
// Type: to.Ptr("Microsoft.Network/dnsZones/SOA"),
// Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SOA/@"),
// Properties: &armdns.RecordSetProperties{
// SoaRecord: &armdns.SoaRecord{
// Email: to.Ptr("hostmaster.contoso.com"),
// ExpireTime: to.Ptr[int64](2419200),
// Host: to.Ptr("ns1.contoso.com"),
// MinimumTTL: to.Ptr[int64](300),
// RefreshTime: to.Ptr[int64](3600),
// RetryTime: to.Ptr[int64](300),
// SerialNumber: to.Ptr[int64](1),
// },
// TTL: to.Ptr[int64](3600),
// Fqdn: to.Ptr("zone1"),
// Metadata: map[string]*string{
// "key2": to.Ptr("value2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { DnsManagementClient } = require("@azure/arm-dns");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Updates a record set within a DNS zone.
*
* @summary Updates a record set within a DNS zone.
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchSOARecordset.json
*/
async function patchSoaRecordset() {
const subscriptionId = "subid";
const resourceGroupName = "rg1";
const zoneName = "zone1";
const relativeRecordSetName = "@";
const recordType = "SOA";
const parameters = { metadata: { key2: "value2" } };
const credential = new DefaultAzureCredential();
const client = new DnsManagementClient(credential, subscriptionId);
const result = await client.recordSets.update(
resourceGroupName,
zoneName,
relativeRecordSetName,
recordType,
parameters
);
console.log(result);
}
patchSoaRecordset().catch(console.error);
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SOA/@",
"etag": "00000000-0000-0000-0000-000000000000",
"name": "@",
"type": "Microsoft.Network/dnsZones/SOA",
"properties": {
"metadata": {
"key2": "value2"
},
"TTL": 3600,
"fqdn": "zone1",
"SOARecord": {
"host": "ns1.contoso.com",
"email": "hostmaster.contoso.com",
"serialNumber": 1,
"refreshTime": 3600,
"retryTime": 300,
"expireTime": 2419200,
"minimumTTL": 300
}
}
}
Patch SRV recordset
Sample Request
PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SRV/record1?api-version=2018-05-01
{
"properties": {
"metadata": {
"key2": "value2"
}
}
}
import com.azure.resourcemanager.dns.fluent.models.RecordSetInner;
import com.azure.resourcemanager.dns.models.RecordType;
import java.util.HashMap;
import java.util.Map;
/** Samples for RecordSets Update. */
public final class Main {
/*
* x-ms-original-file:
* specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchSRVRecordset.json
*/
/**
* Sample code: Patch SRV recordset.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void patchSRVRecordset(com.azure.resourcemanager.AzureResourceManager azure) {
azure.dnsZones().manager().serviceClient().getRecordSets().updateWithResponse("rg1", "zone1", "record1",
RecordType.SRV, new RecordSetInner().withMetadata(mapOf("key2", "fakeTokenPlaceholder")), null,
com.azure.core.util.Context.NONE);
}
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.dns import DnsManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-dns
# USAGE
python patch_srv_recordset.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = DnsManagementClient(
credential=DefaultAzureCredential(),
subscription_id="subid",
)
response = client.record_sets.update(
resource_group_name="rg1",
zone_name="zone1",
relative_record_set_name="record1",
record_type="SRV",
parameters={"properties": {"metadata": {"key2": "value2"}}},
)
print(response)
# x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchSRVRecordset.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armdns_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchSRVRecordset.json
func ExampleRecordSetsClient_Update_patchSrvRecordset() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdns.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewRecordSetsClient().Update(ctx, "rg1", "zone1", "record1", armdns.RecordTypeSRV, armdns.RecordSet{
Properties: &armdns.RecordSetProperties{
Metadata: map[string]*string{
"key2": to.Ptr("value2"),
},
},
}, &armdns.RecordSetsClientUpdateOptions{IfMatch: nil})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.RecordSet = armdns.RecordSet{
// Name: to.Ptr("record1"),
// Type: to.Ptr("Microsoft.Network/dnsZones/SRV"),
// Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SRV/record1"),
// Properties: &armdns.RecordSetProperties{
// SrvRecords: []*armdns.SrvRecord{
// {
// Port: to.Ptr[int32](80),
// Priority: to.Ptr[int32](0),
// Target: to.Ptr("contoso.com"),
// Weight: to.Ptr[int32](10),
// }},
// TTL: to.Ptr[int64](3600),
// Fqdn: to.Ptr("record1.zone1"),
// Metadata: map[string]*string{
// "key2": to.Ptr("value2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { DnsManagementClient } = require("@azure/arm-dns");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Updates a record set within a DNS zone.
*
* @summary Updates a record set within a DNS zone.
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchSRVRecordset.json
*/
async function patchSrvRecordset() {
const subscriptionId = "subid";
const resourceGroupName = "rg1";
const zoneName = "zone1";
const relativeRecordSetName = "record1";
const recordType = "SRV";
const parameters = { metadata: { key2: "value2" } };
const credential = new DefaultAzureCredential();
const client = new DnsManagementClient(credential, subscriptionId);
const result = await client.recordSets.update(
resourceGroupName,
zoneName,
relativeRecordSetName,
recordType,
parameters
);
console.log(result);
}
patchSrvRecordset().catch(console.error);
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SRV/record1",
"etag": "00000000-0000-0000-0000-000000000000",
"name": "record1",
"type": "Microsoft.Network/dnsZones/SRV",
"properties": {
"metadata": {
"key2": "value2"
},
"TTL": 3600,
"fqdn": "record1.zone1",
"SRVRecords": [
{
"priority": 0,
"weight": 10,
"port": 80,
"target": "contoso.com"
}
]
}
}
Patch TXT recordset
Sample Request
PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/TXT/record1?api-version=2018-05-01
{
"properties": {
"metadata": {
"key2": "value2"
}
}
}
import com.azure.resourcemanager.dns.fluent.models.RecordSetInner;
import com.azure.resourcemanager.dns.models.RecordType;
import java.util.HashMap;
import java.util.Map;
/** Samples for RecordSets Update. */
public final class Main {
/*
* x-ms-original-file:
* specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchTXTRecordset.json
*/
/**
* Sample code: Patch TXT recordset.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void patchTXTRecordset(com.azure.resourcemanager.AzureResourceManager azure) {
azure.dnsZones().manager().serviceClient().getRecordSets().updateWithResponse("rg1", "zone1", "record1",
RecordType.TXT, new RecordSetInner().withMetadata(mapOf("key2", "fakeTokenPlaceholder")), null,
com.azure.core.util.Context.NONE);
}
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.dns import DnsManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-dns
# USAGE
python patch_txt_recordset.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = DnsManagementClient(
credential=DefaultAzureCredential(),
subscription_id="subid",
)
response = client.record_sets.update(
resource_group_name="rg1",
zone_name="zone1",
relative_record_set_name="record1",
record_type="TXT",
parameters={"properties": {"metadata": {"key2": "value2"}}},
)
print(response)
# x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchTXTRecordset.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armdns_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c767823fdfd9d5e96bad245e3ea4d14d94a716bb/specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchTXTRecordset.json
func ExampleRecordSetsClient_Update_patchTxtRecordset() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armdns.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewRecordSetsClient().Update(ctx, "rg1", "zone1", "record1", armdns.RecordTypeTXT, armdns.RecordSet{
Properties: &armdns.RecordSetProperties{
Metadata: map[string]*string{
"key2": to.Ptr("value2"),
},
},
}, &armdns.RecordSetsClientUpdateOptions{IfMatch: nil})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.RecordSet = armdns.RecordSet{
// Name: to.Ptr("record1"),
// Type: to.Ptr("Microsoft.Network/dnsZones/TXT"),
// Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/TXT/record1"),
// Properties: &armdns.RecordSetProperties{
// TTL: to.Ptr[int64](3600),
// TxtRecords: []*armdns.TxtRecord{
// {
// Value: []*string{
// to.Ptr("string1"),
// to.Ptr("string2")},
// }},
// Fqdn: to.Ptr("record1.zone1"),
// Metadata: map[string]*string{
// "key2": to.Ptr("value2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { DnsManagementClient } = require("@azure/arm-dns");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Updates a record set within a DNS zone.
*
* @summary Updates a record set within a DNS zone.
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/stable/2018-05-01/examples/PatchTXTRecordset.json
*/
async function patchTxtRecordset() {
const subscriptionId = "subid";
const resourceGroupName = "rg1";
const zoneName = "zone1";
const relativeRecordSetName = "record1";
const recordType = "TXT";
const parameters = { metadata: { key2: "value2" } };
const credential = new DefaultAzureCredential();
const client = new DnsManagementClient(credential, subscriptionId);
const result = await client.recordSets.update(
resourceGroupName,
zoneName,
relativeRecordSetName,
recordType,
parameters
);
console.log(result);
}
patchTxtRecordset().catch(console.error);
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/TXT/record1",
"etag": "00000000-0000-0000-0000-000000000000",
"name": "record1",
"type": "Microsoft.Network/dnsZones/TXT",
"properties": {
"metadata": {
"key2": "value2"
},
"TTL": 3600,
"fqdn": "record1.zone1",
"TXTRecords": [
{
"value": [
"string1",
"string2"
]
}
]
}
}
Определения
AaaaRecord
Запись AAAA.
Имя |
Тип |
Описание |
ipv6Address
|
string
|
IPv6-адрес этой записи AAAA.
|
ARecord
Запись A.
Имя |
Тип |
Описание |
ipv4Address
|
string
|
IPv4-адрес этой записи A.
|
CaaRecord
Запись CAA.
Имя |
Тип |
Описание |
flags
|
integer
|
Флаги для этой записи CAA в виде целого числа от 0 до 255.
|
tag
|
string
|
Тег для этой записи CAA.
|
value
|
string
|
Значение для этой записи CAA.
|
CloudError
Ответ об ошибке от службы.
CloudErrorBody
Ответ об ошибке от службы.
Имя |
Тип |
Описание |
code
|
string
|
Идентификатор ошибки. Коды инвариантны и предназначены для программного использования.
|
details
|
CloudErrorBody[]
|
Список дополнительных сведений об ошибке.
|
message
|
string
|
Сообщение с описанием ошибки, предназначенное для отображения в пользовательском интерфейсе.
|
target
|
string
|
Целевой объект конкретной ошибки. Например, имя свойства в ошибке.
|
CnameRecord
Запись CNAME.
Имя |
Тип |
Описание |
cname
|
string
|
Каноническое имя этой записи CNAME.
|
MxRecord
Запись MX.
Имя |
Тип |
Описание |
exchange
|
string
|
Доменное имя почтового узла для этой записи MX.
|
preference
|
integer
|
Значение предпочтения для этой записи MX.
|
NsRecord
Запись NS.
Имя |
Тип |
Описание |
nsdname
|
string
|
Имя сервера имен для этой записи NS.
|
PtrRecord
Запись PTR.
Имя |
Тип |
Описание |
ptrdname
|
string
|
Имя целевого домена PTR для этой записи PTR.
|
RecordSet
Описывает набор записей DNS (коллекция записей DNS с тем же именем и типом).
Имя |
Тип |
Описание |
etag
|
string
|
Etag набора записей.
|
id
|
string
|
Идентификатор набора записей.
|
name
|
string
|
Имя набора записей.
|
properties.AAAARecords
|
AaaaRecord[]
|
Список записей AAAA в наборе записей.
|
properties.ARecords
|
ARecord[]
|
Список записей A в наборе записей.
|
properties.CNAMERecord
|
CnameRecord
|
Запись CNAME в наборе записей.
|
properties.MXRecords
|
MxRecord[]
|
Список записей MX в наборе записей.
|
properties.NSRecords
|
NsRecord[]
|
Список записей NS в наборе записей.
|
properties.PTRRecords
|
PtrRecord[]
|
Список записей PTR в наборе записей.
|
properties.SOARecord
|
SoaRecord
|
Запись SOA в наборе записей.
|
properties.SRVRecords
|
SrvRecord[]
|
Список записей SRV в наборе записей.
|
properties.TTL
|
integer
|
Срок жизни (срок жизни) записей в наборе записей.
|
properties.TXTRecords
|
TxtRecord[]
|
Список записей ТИПА TXT в наборе записей.
|
properties.caaRecords
|
CaaRecord[]
|
Список записей CAA в наборе записей.
|
properties.fqdn
|
string
|
Полное доменное имя набора записей.
|
properties.metadata
|
object
|
Метаданные, присоединенные к набору записей.
|
properties.provisioningState
|
string
|
состояние подготовки набора записей.
|
properties.targetResource
|
SubResource
|
Ссылка на ресурс Azure, из которого берется значение ресурса DNS.
|
type
|
string
|
Тип набора записей.
|
RecordType
Тип записи DNS в этом наборе записей.
Имя |
Тип |
Описание |
A
|
string
|
|
AAAA
|
string
|
|
CAA
|
string
|
|
CNAME
|
string
|
|
MX
|
string
|
|
NS
|
string
|
|
PTR
|
string
|
|
SOA
|
string
|
|
SRV
|
string
|
|
TXT
|
string
|
|
SoaRecord
Запись SOA.
Имя |
Тип |
Описание |
email
|
string
|
Контактный адрес электронной почты для этой записи SOA.
|
expireTime
|
integer
|
Время истечения срока действия для этой записи SOA.
|
host
|
string
|
Доменное имя доверенного сервера имен для этой записи SOA.
|
minimumTTL
|
integer
|
Минимальное значение для этой записи SOA. По соглашению это используется для определения отрицательной длительности кэширования.
|
refreshTime
|
integer
|
Значение обновления для этой записи SOA.
|
retryTime
|
integer
|
Время повтора для этой записи SOA.
|
serialNumber
|
integer
|
Серийный номер для этой записи SOA.
|
SrvRecord
Запись SRV.
Имя |
Тип |
Описание |
port
|
integer
|
Значение порта для этой записи SRV.
|
priority
|
integer
|
Значение приоритета для этой записи SRV.
|
target
|
string
|
Целевое доменное имя для этой записи SRV.
|
weight
|
integer
|
Весовое значение для этой записи SRV.
|
SubResource
Ссылка на другой ресурс
Имя |
Тип |
Описание |
id
|
string
|
Идентификатор ресурса.
|
TxtRecord
Запись ТИПА TXT.
Имя |
Тип |
Описание |
value
|
string[]
|
Текстовое значение этой записи ТИПА TXT.
|