RecordSetsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

PrivateDnsManagementClient'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 Private DNS zone.

delete

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

get

Gets a record set.

list

Lists all record sets in a Private DNS zone.

list_by_type

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

update

Updates a record set within a Private DNS zone.

create_or_update

Creates or updates a record set within a Private DNS zone.

create_or_update(resource_group_name: str, private_zone_name: str, record_type: str | _models.RecordType, relative_record_set_name: str, 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. Required.

private_zone_name
Required
str

The name of the Private DNS zone (without a terminating dot). 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 Private DNS zone is created). Known values are: "A", "AAAA", "CNAME", "MX", "PTR", "SOA", "SRV", and "TXT". Required.

relative_record_set_name
Required
str

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

parameters
Required

Parameters supplied to the CreateOrUpdate operation. Is either a RecordSet type or a IO[bytes] 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.

Returns

Type Description

RecordSet or the result of cls(response)

Exceptions

Type Description

delete

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

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

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

private_zone_name
Required
str

The name of the Private DNS zone (without a terminating dot). 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 Private DNS zone is deleted). Known values are: "A", "AAAA", "CNAME", "MX", "PTR", "SOA", "SRV", and "TXT". Required.

relative_record_set_name
Required
str

The name of the record set, relative to the name of the zone. 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.

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description

get

Gets a record set.

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

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

private_zone_name
Required
str

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

record_type
Required

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

relative_record_set_name
Required
str

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

Returns

Type Description

RecordSet or the result of cls(response)

Exceptions

Type Description

list

Lists all record sets in a Private DNS zone.

list(resource_group_name: str, private_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. Required.

private_zone_name
Required
str

The name of the Private 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 to be used to filter the record set enumeration. If this parameter is specified, the returned enumeration will only contain records that end with ".:code:". Default value is None.

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 Private DNS zone.

list_by_type(resource_group_name: str, private_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. Required.

private_zone_name
Required
str

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

record_type
Required

The type of record sets to enumerate. Known values are: "A", "AAAA", "CNAME", "MX", "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 to be used to filter the record set enumeration. If this parameter is specified, the returned enumeration will only contain records that end with ".:code:". Default value is None.

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 Private DNS zone.

update(resource_group_name: str, private_zone_name: str, record_type: str | _models.RecordType, relative_record_set_name: str, 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. Required.

private_zone_name
Required
str

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

record_type
Required

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

relative_record_set_name
Required
str

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

parameters
Required

Parameters supplied to the Update operation. Is either a RecordSet type or a IO[bytes] 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.

Returns

Type Description

RecordSet or the result of cls(response)

Exceptions

Type Description

Attributes

models

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