RecordSetsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

DnsManagementClient's

<xref:record_sets> attribute.

Inheritance
builtins.object
RecordSetsOperations

Constructor

RecordSetsOperations(*args, **kwargs)

Methods

create_or_update

Creates or updates a record set within a DNS zone.

delete

Deletes a record set from a DNS zone. This operation cannot be undone.

get

Gets a record set.

list_all_by_dns_zone

Lists all record sets in a DNS zone.

list_by_dns_zone

Lists all record sets in a DNS zone.

list_by_type

Lists the record sets of a specified type in a DNS zone.

update

Updates a record set within a DNS zone.

create_or_update

Creates or updates a record set within a DNS zone.

create_or_update(resource_group_name: str, zone_name: str, relative_record_set_name: str, record_type: str | _models.RecordType, parameters: _models.RecordSet, if_match: str | None = None, if_none_match: str | None = None, *, content_type: str = 'application/json', **kwargs: Any) -> _models.RecordSet

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

zone_name
Required
str

The name of the DNS zone (without a terminating dot). Required.

relative_record_set_name
Required
str

The name of the record set, relative to the name of the zone. Required.

record_type
Required

The type of DNS record in this record set. Record sets of type SOA can be updated but not created (they are created when the DNS zone is created). Known values are: "A", "AAAA", "CAA", "CNAME", "MX", "NS", "PTR", "SOA", "SRV", and "TXT". Required.

parameters
Required

Parameters supplied to the CreateOrUpdate operation. Is either a RecordSet type or a IO type. Required.

if_match
Required
str

The etag of the record set. Omit this value to always overwrite the current record set. Specify the last-seen etag value to prevent accidentally overwriting any concurrent changes. Default value is None.

if_none_match
Required
str

Set to '*' to allow a new record set to be created, but to prevent updating an existing record set. Other values will be ignored. Default value is None.

Keyword-Only Parameters

Name Description
content_type
str

Body Parameter content-type. Known values are: 'application/json'. Default value is None.

cls

A custom type or function that will be passed the direct response

Returns

Type Description

RecordSet or the result of cls(response)

Exceptions

Type Description

delete

Deletes a record set from a DNS zone. This operation cannot be undone.

delete(resource_group_name: str, zone_name: str, relative_record_set_name: str, record_type: str | RecordType, if_match: str | None = None, **kwargs: Any) -> None

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

zone_name
Required
str

The name of the DNS zone (without a terminating dot). Required.

relative_record_set_name
Required
str

The name of the record set, relative to the name of the zone. Required.

record_type
Required

The type of DNS record in this record set. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted). Known values are: "A", "AAAA", "CAA", "CNAME", "MX", "NS", "PTR", "SOA", "SRV", and "TXT". Required.

if_match
Required
str

The etag of the record set. Omit this value to always delete the current record set. Specify the last-seen etag value to prevent accidentally deleting any concurrent changes. Default value is None.

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description

get

Gets a record set.

get(resource_group_name: str, zone_name: str, relative_record_set_name: str, record_type: str | RecordType, **kwargs: Any) -> RecordSet

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

zone_name
Required
str

The name of the DNS zone (without a terminating dot). Required.

relative_record_set_name
Required
str

The name of the record set, relative to the name of the zone. Required.

record_type
Required

The type of DNS record in this record set. Known values are: "A", "AAAA", "CAA", "CNAME", "MX", "NS", "PTR", "SOA", "SRV", and "TXT". Required.

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

RecordSet or the result of cls(response)

Exceptions

Type Description

list_all_by_dns_zone

Lists all record sets in a DNS zone.

list_all_by_dns_zone(resource_group_name: str, zone_name: str, top: int | None = None, record_set_name_suffix: str | None = None, **kwargs: Any) -> Iterable[RecordSet]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

zone_name
Required
str

The name of the DNS zone (without a terminating dot). Required.

top
Required
int

The maximum number of record sets to return. If not specified, returns up to 100 record sets. Default value is None.

record_set_name_suffix
Required
str

The suffix label of the record set name that has to be used to filter the record set enumerations. If this parameter is specified, Enumeration will return only records that end with .:code:. Default value is None.

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

An iterator like instance of either RecordSet or the result of cls(response)

Exceptions

Type Description

list_by_dns_zone

Lists all record sets in a DNS zone.

list_by_dns_zone(resource_group_name: str, zone_name: str, top: int | None = None, recordsetnamesuffix: str | None = None, **kwargs: Any) -> Iterable[RecordSet]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

zone_name
Required
str

The name of the DNS zone (without a terminating dot). Required.

top
Required
int

The maximum number of record sets to return. If not specified, returns up to 100 record sets. Default value is None.

recordsetnamesuffix
Required
str

The suffix label of the record set name that has to be used to filter the record set enumerations. If this parameter is specified, Enumeration will return only records that end with .:code:. Default value is None.

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

An iterator like instance of either RecordSet or the result of cls(response)

Exceptions

Type Description

list_by_type

Lists the record sets of a specified type in a DNS zone.

list_by_type(resource_group_name: str, zone_name: str, record_type: str | RecordType, top: int | None = None, recordsetnamesuffix: str | None = None, **kwargs: Any) -> Iterable[RecordSet]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

zone_name
Required
str

The name of the DNS zone (without a terminating dot). Required.

record_type
Required

The type of record sets to enumerate. Known values are: "A", "AAAA", "CAA", "CNAME", "MX", "NS", "PTR", "SOA", "SRV", and "TXT". Required.

top
Required
int

The maximum number of record sets to return. If not specified, returns up to 100 record sets. Default value is None.

recordsetnamesuffix
Required
str

The suffix label of the record set name that has to be used to filter the record set enumerations. If this parameter is specified, Enumeration will return only records that end with .:code:. Default value is None.

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

An iterator like instance of either RecordSet or the result of cls(response)

Exceptions

Type Description

update

Updates a record set within a DNS zone.

update(resource_group_name: str, zone_name: str, relative_record_set_name: str, record_type: str | _models.RecordType, parameters: _models.RecordSet, if_match: str | None = None, *, content_type: str = 'application/json', **kwargs: Any) -> _models.RecordSet

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

zone_name
Required
str

The name of the DNS zone (without a terminating dot). Required.

relative_record_set_name
Required
str

The name of the record set, relative to the name of the zone. Required.

record_type
Required

The type of DNS record in this record set. Known values are: "A", "AAAA", "CAA", "CNAME", "MX", "NS", "PTR", "SOA", "SRV", and "TXT". Required.

parameters
Required

Parameters supplied to the Update operation. Is either a RecordSet type or a IO type. Required.

if_match
Required
str

The etag of the record set. Omit this value to always overwrite the current record set. Specify the last-seen etag value to prevent accidentally overwriting concurrent changes. Default value is None.

Keyword-Only Parameters

Name Description
content_type
str

Body Parameter content-type. Known values are: 'application/json'. Default value is None.

cls

A custom type or function that will be passed the direct response

Returns

Type Description

RecordSet or the result of cls(response)

Exceptions

Type Description

Attributes

models

models = <module 'azure.mgmt.dns.v2018_03_01_preview.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\dns\\v2018_03_01_preview\\models\\__init__.py'>