salt.modules.azurearm_dns

Azure (ARM) DNS Execution Module

New in version 3000.

maintainer

<devops@eitr.tech>

maturity

new

depends
platform

linux

configuration

This module requires Azure Resource Manager credentials to be passed as keyword arguments to every function in order to work properly.

Required provider parameters:

if using username and password:

  • subscription_id

  • username

  • password

if using a service principal:

  • subscription_id

  • tenant

  • client_id

  • secret

Optional provider parameters:

cloud_environment: Used to point the cloud driver to different API endpoints, such as Azure GovCloud.

Possible values:

  • AZURE_PUBLIC_CLOUD (default)

  • AZURE_CHINA_CLOUD

  • AZURE_US_GOV_CLOUD

  • AZURE_GERMAN_CLOUD

salt.modules.azurearm_dns.record_set_create_or_update(name, zone_name, resource_group, record_type, **kwargs)

New in version 3000.

Creates or updates a record set within a DNS zone.

Parameters
  • name -- The name of the record set, relative to the name of the zone.

  • zone_name -- The name of the DNS zone (without a terminating dot).

  • resource_group -- The name of the resource group.

  • record_type -- 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 DNS zone is created). Possible values include: 'A', 'AAAA', 'CAA', 'CNAME', 'MX', 'NS', 'PTR', 'SOA', 'SRV', 'TXT'

CLI Example:

salt-call azurearm_dns.record_set_create_or_update myhost myzone testgroup A
    arecords='[{ipv4_address: 10.0.0.1}]' ttl=300

salt.modules.azurearm_dns.record_set_delete(name, zone_name, resource_group, record_type, **kwargs)

New in version 3000.

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

Parameters
  • name -- The name of the record set, relative to the name of the zone.

  • zone_name -- The name of the DNS zone (without a terminating dot).

  • resource_group -- The name of the resource group.

  • record_type -- The type of DNS record in this record set. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted). Possible values include: 'A', 'AAAA', 'CAA', 'CNAME', 'MX', 'NS', 'PTR', 'SOA', 'SRV', 'TXT'

CLI Example:

salt-call azurearm_dns.record_set_delete myhost myzone testgroup A

salt.modules.azurearm_dns.record_set_get(name, zone_name, resource_group, record_type, **kwargs)

New in version 3000.

Get a dictionary representing a record set's properties.

Parameters
  • name -- The name of the record set, relative to the name of the zone.

  • zone_name -- The name of the DNS zone (without a terminating dot).

  • resource_group -- The name of the resource group.

  • record_type -- The type of DNS record in this record set. Possible values include: 'A', 'AAAA', 'CAA', 'CNAME', 'MX', 'NS', 'PTR', 'SOA', 'SRV', 'TXT'

CLI Example:

salt-call azurearm_dns.record_set_get '@' myzone testgroup SOA

salt.modules.azurearm_dns.record_sets_list_by_dns_zone(zone_name, resource_group, top=None, recordsetnamesuffix=None, **kwargs)

New in version 3000.

Lists all record sets in a DNS zone.

Parameters
  • zone_name -- The name of the DNS zone (without a terminating dot).

  • resource_group -- The name of the resource group.

  • top -- The maximum number of record sets to return. If not specified, returns up to 100 record sets.

  • recordsetnamesuffix -- The suffix label of the record set name that has to be used to filter the record set enumerations.

CLI Example:

salt-call azurearm_dns.record_sets_list_by_dns_zone myzone testgroup

salt.modules.azurearm_dns.record_sets_list_by_type(zone_name, resource_group, record_type, top=None, recordsetnamesuffix=None, **kwargs)

New in version 3000.

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

Parameters
  • zone_name -- The name of the DNS zone (without a terminating dot).

  • resource_group -- The name of the resource group.

  • record_type -- The type of record sets to enumerate. Possible values include: 'A', 'AAAA', 'CAA', 'CNAME', 'MX', 'NS', 'PTR', 'SOA', 'SRV', 'TXT'

  • top -- The maximum number of record sets to return. If not specified, returns up to 100 record sets.

  • recordsetnamesuffix -- The suffix label of the record set name that has to be used to filter the record set enumerations.

CLI Example:

salt-call azurearm_dns.record_sets_list_by_type myzone testgroup SOA

salt.modules.azurearm_dns.zone_create_or_update(name, resource_group, **kwargs)

New in version 3000.

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

Parameters
  • name -- The name of the DNS zone to create (without a terminating dot).

  • resource_group -- The name of the resource group.

CLI Example:

salt-call azurearm_dns.zone_create_or_update myzone testgroup

salt.modules.azurearm_dns.zone_delete(name, resource_group, **kwargs)

New in version 3000.

Delete a DNS zone within a resource group.

Parameters
  • name -- The name of the DNS zone to delete.

  • resource_group -- The name of the resource group.

CLI Example:

salt-call azurearm_dns.zone_delete myzone testgroup

salt.modules.azurearm_dns.zone_get(name, resource_group, **kwargs)

New in version 3000.

Get a dictionary representing a DNS zone's properties, but not the record sets within the zone.

Parameters
  • name -- The DNS zone to get.

  • resource_group -- The name of the resource group.

CLI Example:

salt-call azurearm_dns.zone_get myzone testgroup

salt.modules.azurearm_dns.zones_list(top=None, **kwargs)

New in version 3000.

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

Parameters

top -- The maximum number of DNS zones to return. If not specified, eturns up to 100 zones.

CLI Example:

salt-call azurearm_dns.zones_list

salt.modules.azurearm_dns.zones_list_by_resource_group(resource_group, top=None, **kwargs)

New in version 3000.

Lists the DNS zones in a resource group.

Parameters
  • resource_group -- The name of the resource group.

  • top -- The maximum number of DNS zones to return. If not specified, returns up to 100 zones.

CLI Example:

salt-call azurearm_dns.zones_list_by_resource_group testgroup

© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/modules/all/salt.modules.azurearm_dns.html