ZonesOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:zones> attribute.
- Inheritance
-
builtins.objectZonesOperations
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
|
The name of the resource group. Required. |
zone_name
Required
|
The name of the DNS zone (without a terminating dot). Required. |
if_match
Required
|
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. |
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
|
The name of the resource group. Required. |
zone_name
Required
|
The name of the DNS zone (without a terminating dot). Required. |
parameters
Required
|
Parameters supplied to the CreateOrUpdate operation. Is either a Zone type or a IO[bytes] type. Required. |
if_match
Required
|
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
|
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. |
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
|
The name of the resource group. Required. |
zone_name
Required
|
The name of the DNS zone (without a terminating dot). Required. |
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
|
The maximum number of 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 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
|
The name of the resource group. Required. |
top
Required
|
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 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
|
The name of the resource group. Required. |
zone_name
Required
|
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[bytes] type. Required. |
if_match
Required
|
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. |
Returns
Type | Description |
---|---|
Zone or the result of cls(response) |
Exceptions
Type | Description |
---|---|
Attributes
models
models = <module 'azure.mgmt.dns.v2018_05_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\dns\\v2018_05_01\\models\\__init__.py'>
Azure SDK for Python