ZonesOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

DnsManagementClient's

<xref:zones> attribute.

Inheritance
builtins.object
ZonesOperations

Constructor

ZonesOperations(*args, **kwargs)

Methods

begin_delete

Deletes a DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone.

create_or_update

Creates or updates a DNS zone. Does not modify DNS records within the zone.

get

Gets a DNS zone. Retrieves the zone properties, but not the record sets within the zone.

list

Lists the DNS zones in all resource groups in a subscription.

list_by_resource_group

Lists the DNS zones within a resource group.

update

Updates a DNS zone. Does not modify DNS records within the zone.

begin_delete

Deletes a DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone.

begin_delete(resource_group_name: str, zone_name: str, if_match: str | None = None, **kwargs: Any) -> LROPoller[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.

if_match
Required
str

The etag of the DNS zone. Omit this value to always delete the current zone. 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

continuation_token
str

A continuation token to restart a poller from a saved state.

polling

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

Type Description

An instance of LROPoller that returns either None or the result of cls(response)

Exceptions

Type Description

create_or_update

Creates or updates a DNS zone. Does not modify DNS records within the zone.

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

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.

parameters
Required
Zone or IO

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

if_match
Required
str

The etag of the DNS zone. Omit this value to always overwrite the current zone. 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 DNS zone to be created, but to prevent updating an existing zone. 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

Zone or the result of cls(response)

Exceptions

Type Description

get

Gets a DNS zone. Retrieves the zone properties, but not the record sets within the zone.

get(resource_group_name: str, zone_name: str, **kwargs: Any) -> Zone

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.

Keyword-Only Parameters

Name Description
cls

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

Returns

Type Description

Zone or the result of cls(response)

Exceptions

Type Description

list

Lists the DNS zones in all resource groups in a subscription.

list(top: int | None = None, **kwargs: Any) -> Iterable[Zone]

Parameters

Name Description
top
Required
int

The maximum number of DNS zones to return. If not specified, returns up to 100 zones. 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 Zone or the result of cls(response)

Exceptions

Type Description

list_by_resource_group

Lists the DNS zones within a resource group.

list_by_resource_group(resource_group_name: str, top: int | None = None, **kwargs: Any) -> Iterable[Zone]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. 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.

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 Zone or the result of cls(response)

Exceptions

Type Description

update

Updates a DNS zone. Does not modify DNS records within the zone.

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

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.

parameters
Required

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

if_match
Required
str

The etag of the DNS zone. Omit this value to always overwrite the current zone. Specify the last-seen etag value to prevent accidentally overwriting any 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

Zone 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'>