# ibmcloud_python_sdk.dns package

## Submodules

## ibmcloud_python_sdk.dns.private module

class ibmcloud_python_sdk.dns.private.Dns

  Bases: `object`

  add_permitted_network(**kwargs)

    Add permitted network to DNS zone

    Parameters

      - dns_zone (str) – DNS zone name

      - resource_instance (str) – Name or GUID of the resource instance

      - vpc (str) – The allowed VPC name or ID

  create_resource_record(**kwargs)

    Add record in a specified zone

    Parameters

      - dns_zone (str) – DNS zone name

      - resource_instance (str) – Name or GUID of the resource instance

      - record (dict) – The record to add in the zone, example: ‘{“name”: “testB”, “type”: “A”, “rdata”: {“ip”: “4.5.6.7”}}’

  create_zone(**kwargs)

    Create a zone in a specified resource instance

    Parameters

      - dns_zone (str) – The user-defined name to create

      - description (str, optional) – A description for the domain

      - label (str, optional) – A label for the domain

      - resource_instance (str) – Name or GUID of the resource instance

  delete_permitted_network(**kwargs)

    Delete permitted network to dns zone

    Parameters

      - dns_zone (str) – DNS zone name

      - resource_instance (str) – Name or GUID of the resource instance

      - vpc (str) – The allowed VPC name or ID

  delete_resource_record(**kwargs)

    Delete record in a specified zone

    Parameters

      - dns_zone (str) – DNS zone name

      - record (str) – Record name to delete

      - resource_instance (str) – Name or GUID of the resource instance

  delete_zone(**kwargs)

    Delete a zone in from a specified resource instance

    Parameters

      - dns_zone (str) – DNS zone name to delete

      - resource_instance (str) – Name or GUID of the resource instance

  get_dns_zone(**kwargs)

    Get a specific DNS zone hosted by a resource instance

    Parameters

      - dns_zone (str) – DNS zone name or ID to query

      - resource_instance (str) – Name or GUID of the resource instance

    Returns

      DNS zone information

    Return type

      dict

  get_dns_zone_by_id(**kwargs)

    Get DNS zone by id

    Parameters

      - dns_zone (str) – DNS zone ID to query

      - resource_instance (str) – Name or GUID of the resource instance

    Returns

      DNS zone information

    Return type

      dict

  get_dns_zone_by_name(**kwargs)

    Get DNS zone by name

    Parameters

      - dns_zone (str) – DNS zone name to query

      - resource_instance (str) – Name or GUID of the resource instance

    Returns

      DNS zone information

    Return type

      dict

  get_dns_zones(**kwargs)

    Get all DNS zones hosted by a resource instance

    Parameters

      resource_instance (str) – Name or GUID of the resource instance

    Returns

      DNS zones

    Return type

      list

  get_resource_record(**kwargs)

    Get specific resource record from a DNS zone

    Parameters

      - dns_zone (str) – DNS zone name

      - record (str) – Record name

      - resource_instance (str) – Name or GUID of the resource instance

    Returns

      Record information

    Return type

      dict

  get_resource_record_by_id(**kwargs)

    Get record by ID

    Parameters

      - dns_zone (str) – DNS zone name

      - record_id – Record ID

      - resource_instance (str) – Name or GUID of the resource instance

    Returns

      Record information

    Return type

      dict

  get_resource_record_by_name(**kwargs)

    Get record by name

    Parameters

      - dns_zone (str) – DNS zone name

      - record_name (str) – Record name

      - resource_instance (str) – Name or GUID of the resource instance

    Returns

      Record information

    Return type

      dict

  get_resource_records(**kwargs)

    Get record list for a specified DNS zone

    Parameters

      - dns_zone (str) – DNS zone name

      - resource_instance (str) – Name or GUID of the resource instance

    Returns

      Record list

    Return type

      list

## ibmcloud_python_sdk.dns.public module

class ibmcloud_python_sdk.dns.public.Dns

  Bases: `object`

  Public dns class

  check_availability(**kwargs)

    Check zone availability

  create_record(**kwargs)

    Create a resource record on a domain

    Parameters

      - zone (str) – Zone name

      - record (str) – Record name

      - record_type (str) – Type of record (A, AAAA, CNAME, TXT, etc…)

      - data (str) – Record’s value

      - ttl (int) – Time-To-Live, defaults to 60

  create_zone(zone, serial=None)

    Create a zone for the specified zone

    Parameters

      - zone (str) – Zone name

      - serial (str) – serial value on the zone, defaults to strftime(%Y%m%d01)

  delete_record(**kwargs)

    Delete a record

    Parameters

      - record (str) – Record name

      - zone (str) – Zone name

  delete_zone(name)

    Delete a zone

  get_record(**kwargs)

    Find a record by name or value

  get_record_by_name(**kwargs)

    Get record by name

    Parameters

      - record (str) – Record name

      - zone (str) – Zone name

  get_record_by_value(**kwargs)

    Get record by value

    Parameters

      - record (str) – Record value

      - zone (str) – Zone name

  get_records(**kwargs)

    Get record list for a specified zone

    Parameters

      zone (str) – Zone name

  get_zone_id(name)

    Get zone id :param name: zone name

  list_zones(**kwargs)

    Get all zones

## Module contents