RecordSetsOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:record_sets> attribute.
- Inheritance
-
builtins.objectRecordSetsOperations
Constructor
RecordSetsOperations(*args, **kwargs)
Methods
create_or_update |
Creates or updates a record set within a DNS zone. Record sets of type SOA can be updated but not created (they are created when the DNS zone is created). |
delete |
Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted). |
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. Record sets of type SOA can be updated but not created (they are created when the DNS zone is created).
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
|
The name of the resource group. The name is case insensitive. Required. |
zone_name
Required
|
The name of the DNS zone (without a terminating dot). Required. |
relative_record_set_name
Required
|
The name of the record set, relative to the name of the zone. Required. |
record_type
Required
|
str or
RecordType
The type of DNS record in this record set. Known values are: "A", "AAAA", "CAA", "CNAME", "MX", "NS", "PTR", "SOA", "SRV", "TXT", "TLSA", "DS", and "NAPTR". Required. |
parameters
Required
|
Parameters supplied to the CreateOrUpdate operation. Is either a RecordSet type or a IO[bytes] type. Required. |
if_match
Required
|
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
|
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 DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).
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
|
The name of the resource group. The name is case insensitive. Required. |
zone_name
Required
|
The name of the DNS zone (without a terminating dot). Required. |
relative_record_set_name
Required
|
The name of the record set, relative to the name of the zone. Required. |
record_type
Required
|
str or
RecordType
The type of DNS record in this record set. Known values are: "A", "AAAA", "CAA", "CNAME", "MX", "NS", "PTR", "SOA", "SRV", "TXT", "TLSA", "DS", and "NAPTR". Required. |
if_match
Required
|
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, zone_name: str, relative_record_set_name: str, record_type: str | RecordType, **kwargs: Any) -> RecordSet
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
zone_name
Required
|
The name of the DNS zone (without a terminating dot). Required. |
relative_record_set_name
Required
|
The name of the record set, relative to the name of the zone. Required. |
record_type
Required
|
str or
RecordType
The type of DNS record in this record set. Known values are: "A", "AAAA", "CAA", "CNAME", "MX", "NS", "PTR", "SOA", "SRV", "TXT", "TLSA", "DS", and "NAPTR". Required. |
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
|
The name of the resource group. The name is case insensitive. Required. |
zone_name
Required
|
The name of the DNS zone (without a terminating dot). Required. |
top
Required
|
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
|
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. |
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
|
The name of the resource group. The name is case insensitive. Required. |
zone_name
Required
|
The name of the DNS zone (without a terminating dot). Required. |
top
Required
|
The maximum number of record sets to return. If not specified, returns up to 100 record sets. Default value is None. |
recordsetnamesuffix
Required
|
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. |
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
|
The name of the resource group. The name is case insensitive. Required. |
zone_name
Required
|
The name of the DNS zone (without a terminating dot). Required. |
record_type
Required
|
str or
RecordType
The type of DNS record in this record set. Known values are: "A", "AAAA", "CAA", "CNAME", "MX", "NS", "PTR", "SOA", "SRV", "TXT", "TLSA", "DS", and "NAPTR". Required. |
top
Required
|
The maximum number of record sets to return. If not specified, returns up to 100 record sets. Default value is None. |
recordsetnamesuffix
Required
|
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. |
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
|
The name of the resource group. The name is case insensitive. Required. |
zone_name
Required
|
The name of the DNS zone (without a terminating dot). Required. |
relative_record_set_name
Required
|
The name of the record set, relative to the name of the zone. Required. |
record_type
Required
|
str or
RecordType
The type of DNS record in this record set. Known values are: "A", "AAAA", "CAA", "CNAME", "MX", "NS", "PTR", "SOA", "SRV", "TXT", "TLSA", "DS", and "NAPTR". Required. |
parameters
Required
|
Parameters supplied to the Update operation. Is either a RecordSet type or a IO[bytes] type. Required. |
if_match
Required
|
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.dns.v2023_07_01_preview.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\dns\\v2023_07_01_preview\\models\\__init__.py'>
Azure SDK for Python