PrivateZonesOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

PrivateDnsManagementClient's

<xref:private_zones> attribute.

Inheritance
builtins.object
PrivateZonesOperations

Constructor

PrivateZonesOperations(*args, **kwargs)

Methods

begin_create_or_update

Creates or updates a Private DNS zone. Does not modify Links to virtual networks or DNS records within the zone.

begin_delete

Deletes a Private DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone. Private DNS zone cannot be deleted unless all virtual network links to it are removed.

begin_update

Updates a Private DNS zone. Does not modify virtual network links or DNS records within the zone.

get

Gets a Private DNS zone. Retrieves the zone properties, but not the virtual networks links or the record sets within the zone.

list

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

list_by_resource_group

Lists the Private DNS zones within a resource group.

begin_create_or_update

Creates or updates a Private DNS zone. Does not modify Links to virtual networks or DNS records within the zone.

begin_create_or_update(resource_group_name: str, private_zone_name: str, parameters: _models.PrivateZone, if_match: str | None = None, if_none_match: str | None = None, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.PrivateZone]

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.

parameters
Required

Parameters supplied to the CreateOrUpdate operation. Is either a PrivateZone type or a IO[bytes] type. Required.

if_match
Required
str

The ETag of the Private 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 Private DNS zone to be created, but to prevent updating an existing zone. Other values will be ignored. Default value is None.

Returns

Type Description

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

Exceptions

Type Description

begin_delete

Deletes a Private DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone. Private DNS zone cannot be deleted unless all virtual network links to it are removed.

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

private_zone_name
Required
str

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

if_match
Required
str

The ETag of the Private 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.

Returns

Type Description

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

Exceptions

Type Description

begin_update

Updates a Private DNS zone. Does not modify virtual network links or DNS records within the zone.

begin_update(resource_group_name: str, private_zone_name: str, parameters: _models.PrivateZone, if_match: str | None = None, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.PrivateZone]

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.

parameters
Required

Parameters supplied to the Update operation. Is either a PrivateZone type or a IO[bytes] type. Required.

if_match
Required
str

The ETag of the Private 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.

Returns

Type Description

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

Exceptions

Type Description

get

Gets a Private DNS zone. Retrieves the zone properties, but not the virtual networks links or the record sets within the zone.

get(resource_group_name: str, private_zone_name: str, **kwargs: Any) -> PrivateZone

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.

Returns

Type Description

PrivateZone or the result of cls(response)

Exceptions

Type Description

list

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

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

Parameters

Name Description
top
Required
int

The maximum number of Private DNS zones to return. If not specified, returns up to 100 zones. Default value is None.

Returns

Type Description

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

Exceptions

Type Description

list_by_resource_group

Lists the Private DNS zones within a resource group.

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

Parameters

Name Description
resource_group_name
Required
str

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

Returns

Type Description

An iterator like instance of either PrivateZone 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'>