IBM Cloud Docs
DNS Services CLI reference

DNS Services CLI reference

Follow these instructions to use the IBM CloudĀ® DNS Services command-line interface (CLI).

Before you begin

Complete these steps to use the DNS Services CLI, which is implemented as an IBM Cloud CLI plug-in. This plug-in provides you with the means to manage your service instance and its associated resources through a command-line user interface.

  1. Install the IBM Cloud CLI.

  2. Install or update the cloud-dns-services plug-in to the IBM Cloud CLI.

    To install the plug-in, enter the following command.

    ibmcloud plugin install cloud-dns-services
    

    To update:

    ibmcloud plugin update cloud-dns-services
    

    To view installed plugins and versions

    ibmcloud plugin list
    

Instances

Manage DNS Services instances by using the following instance commands.

ibmcloud dns instances

List all DNS Services instances.

   ibmcloud dns instances [--output FORMAT]

Command option

--output
Specify output format. Currently, json is the only supported format.

ibmcloud dns instance-target

Set context service instance to operate.

   ibmcloud dns instance-target [INSTANCE] [--unset]

Command options

INSTANCE
The name or ID of a DNS Services instance. If it is present, set the context instance to operate; if not, show the current context instance.
--unset
Unset context instance.

ibmcloud dns instance-create

Create a DNS Services instance.

Use ibmcloud target -g RESOURCE_GROUP to set the target resource group before creating DNS Services instance. Use ibmcloud resource groups to view the list of available resource groups.

   ibmcloud dns instance-create INSTANCE_NAME PLAN [-g, --resource-group RESOURCE_GROUP] [--output FORMAT]

Command options

INSTANCE_NAME
The name of the DNS Services instance.
PLAN
The name or ID of a service plan.
-g, --resource-group
The name or ID of a resource group.
--output
Specify output format. Currently, json is the only supported format.

ibmcloud dns instance-update

Update a DNS Services instance.

   ibmcloud dns instance-update INSTANCE [--name NAME] [--plan PLAN] [--output FORMAT]

Command options

INSTANCE
The name or ID of a DNS Services instance.
--name
The DNS Services instance name.
--plan
The name or ID of a DNS Services plan. Use ibmcloud dns plans to get available plans.
--output
Specify output format. Currently, json is the only supported format.

ibmcloud dns instance-delete

Delete a DNS Services instance.

   ibmcloud dns instance-delete INSTANCE [--force]Ā 

Command options

INSTANCE
The name or ID of a DNS Services instance.
--force
Delete an instance without prompting for confirmation.

ibmcloud dns instance

Show details of a DNS Services instance.

   ibmcloud dns instance INSTANCE [--output FORMAT]

Command options

INSTANCE
The name or ID of a DNS Services instance.
--output
Specify output format, only JSON is supported.

ibmcloud dns plans

List all DNS Services instances.

   ibmcloud dns plans

Zones

Manage DNS zones by using the following zone commands.

ibmcloud dns zone-create

Create a DNS zone.

   ibmcloud dns zone-create ZONE_NAME [-d, --description DESC] [-l, --label LABEL] [-i, --instance INSTANCE] [--output FORMAT]

Command options

ZONE_NAME
The name of the DNS zone.
-d, --description
The text describing the purpose of a DNS zone.
-l, --label
The label of a DNS zone.
-i, --instance INSTANCE
Instance name or ID. If not set, the context instance specified by ibmcloud dns instance-target is used.
--output FORMAT
Specify output format. Currently, json is the only supported format.

ibmcloud dns zone

Get the DNS zone details.

   ibmcloud dns zone ZONE_ID [-i, --instance INSTANCE] [--output FORMAT]

Command options

ZONE_ID
The ID of the DNS zone.
-i, --instance INSTANCE
Instance name or ID. If not set, the context instance specified by ibmcloud dns instance-target is used.
--output FORMAT
Specify output format. Currently, json is the only supported format.

ibmcloud dns zone-update

Update a DNS zone's description and label.

   ibmcloud dns zone-update ZONE_ID [-d, --description DESC] [-l, --label LABEL] [--instance INSTANCE] [--output FORMAT]

Command options

ZONE_ID
The ID of the DNS zone.
-d, --description
The text describing the purpose of a DNS zone.
-l, --label
The label of a DNS zone.
-i, --instance INSTANCE
Instance name or ID. If not set, the context instance specified by ibmcloud dns instance-target is used.
--output FORMAT
Specify output format. Currently, json is the only supported format.

ibmcloud dns zone-delete

Delete a DNS zone.

   ibmcloud dns zone-delete ZONE_ID [-i, --instance INSTANCE] [-f,--force]

Command options

ZONE_ID
The ID of the DNS zone.
-i, --instance INSTANCE
Instance name or ID. If not set, the context instance specified by ibmcloud dns instance-target is used.
-f, --force
Delete a zone without prompting for confirmation.

ibmcloud dns zones

List all DNS zones for a service instance.

   ibmcloud dns zones [-i, --instance INSTANCE] [--output FORMAT]

Command options

-i, --instance INSTANCE
Instance name or ID. If not set, the context instance specified by ibmcloud dns instance-target is used.
--output FORMAT
Specify output format. Currently, json is the only supported format.

Permitted networks

Manage permitted networks by using the following permitted-network commands.

ibmcloud dns permitted-network-add

Add a permitted network for a DNS zone.

   ibmcloud dns permitted-network-add ZONE_ID --vpc-crn VPC_CRN [--type TYPE] [-i, --instance INSTANCE] [--output FORMAT]

Command options

ZONE_ID
The ID of the DNS zone.
--type
The permitted network type. Valid values: vpc.
--vpc-crn
The CRN of VPC instance
-i, --instance INSTANCE
Instance name or ID. If not set, the context instance specified by ibmcloud dns instance-target is used.
--output FORMAT
Specify output format. Currently, json is the only supported format.

ibmcloud dns permitted-network

Get the permitted network details.

   ibmcloud dns permitted-network ZONE_ID PERMITTED_NETWORK_ID [-i, --instance INSTANCE] [--output FORMAT]

Command options

ZONE_ID
The ID of the DNS zone.
PERMITTED_NETWORK_ID
The ID of the permitted network.
-i, --instance INSTANCE
Instance name or ID. If not set, the context instance specified by ibmcloud dns instance-target is used.
--output FORMAT
Specify output format. Currently, json is the only supported format.

ibmcloud dns permitted-network-remove

Remove a permitted network.

   ibmcloud dns permitted-network-remove ZONE_ID PERMITTED_NETWORK_ID [-i, --instance INSTANCE] [-f,--force]

Command options

ZONE_ID
The ID of the DNS zone.
PERMITTED_NETWORK_ID
The ID of the permitted network.
--instance INSTANCE
Instance name or ID. If not set, the context instance specified by ibmcloud dns instance-target is used.
-f, --force
Remove a permitted network without prompting for confirmation.

ibmcloud dns permitted-networks

List permitted networks for a zone.

   ibmcloud dns permitted-networks ZONE_ID [-i, --instance INSTANCE] [--output FORMAT]

Command options

ZONE_ID
The ID of the DNS zone.
-i, --instance INSTANCE
Instance name or ID. If not set, the context instance specified by ibmcloud dns instance-target is used.
--output FORMAT
Specify output format. Currently, json is the only supported format.

Resource records

Manage how the resource record performs using the following resource-record commands.

ibmcloud dns resource-record-create

Create a resource record for a DNS zone.

   ibmcloud dns resource-record-create DNS_ZONE_ID (-r, --record-content @JSON_FILE | JSON_STRING) [-i, --instance INSTANCE] [--output FORMAT]
   ibmcloud dns resource-record-create DNS_ZONE_ID --type A --name NAME --ipv4 IP_ADDRESS [--ttl TTL]
   ibmcloud dns resource-record-create DNS_ZONE_ID --type AAAA --name NAME --ipv6 IP_ADDRESS [--ttl TTL]
   ibmcloud dns resource-record-create DNS_ZONE_ID --type CNAME --name NAME --cname CNAME [--ttl TTL]
   ibmcloud dns resource-record-create DNS_ZONE_ID --type PTR --name NAME --ptrdname PTRDNAME [--ttl TTL]
   ibmcloud dns resource-record-create DNS_ZONE_ID --type TXT --name NAME --text TEXT [--ttl TTL]
   ibmcloud dns resource-record-create DNS_ZONE_ID --type MX --name NAME --exchange EXCHANGE --preference PREFERENCE [--ttl TTL]
   ibmcloud dns resource-record-create DNS_ZONE_ID --type SRV --name NAME --service SERVICE --protocol PROTOCOL --priority PRIORITY --weight WEIGHT --port PORT --target TARGET  [--ttl TTL]

Command options

ZONE_ID
The ID of the DNS zone.
--name
Resource record name.
--type
Resource record type.
--ipv4
IPv4 address.
--ipv6
IPv6 address.
--cname
Canonical name.
--ptrdname
Hostname of the relevant A or AAAA record.
--text
Human readable text.
--exchange
Hostname of Exchange server.
--preference
Preference of the MX record
--service
The symbolic name of the desired service, beginning with an underscore _.
--protocol
The symbolic name of the desired protocol.
--port
Port number of the target server.
--weight
Weight of distributing queries among multiple target servers.
--priority
Priority of the SRV record.
--target
Hostname of the target server.
--ttl
Time to live, in seconds. Default value is 900. Valid values: 60, 120, 300, 600, 900, 1800, 3600, 7200, 18000, 43200.
-r, --record-content
The JSON file or JSON string used to describe a DNS Resource Record. See Required fields for -r --record-content for more detail.
-i, --instance value

Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.

--output value
Specify output format. Currently, json is the only supported format.

Required fields for -r --record-content

The required field in JSON data is type.

Resource record type. Valid values: A, AAAA, CNAME, PTR, TXT, MX, SRV.

  • For type A, AAAA: Extra required fields are name, rdata.
    • name: Resource record name.
    • rdata: Content of the resource record.
      • ip: IPv4/IPv6 address
  • Extra optional fields are ttl.
    • ttl: Time to live in seconds. Default value is 900. Valid values: 60, 120, 300, 600, 900, 1800, 3600, 7200, 18000, 43200.

Sample JSON data:

        {
        Ā Ā Ā Ā Ā "name": "testA",
        Ā Ā Ā Ā Ā "type": "A",
        Ā Ā Ā Ā  "rdata": {
        Ā Ā Ā Ā Ā Ā Ā Ā  "ip": "1.2.3.4"
                }
        }
        {
        Ā Ā Ā  "name": "testAAAA",
        Ā Ā Ā  "type": "AAAA",
        Ā Ā Ā  "rdata": {
        Ā Ā Ā Ā Ā Ā Ā  "ip": "2001:0db8:0012:0001:3c5e:7354:0000:5db1"
        Ā Ā Ā  }
        }
  • For type CNAME: Extra required fields are name, rdata.
    • name: Resource record name.
    • rdata: The content of type-CNAME resource record.
      • cname: Canonical name.
  • Extra optional fields are ttl.
    • ttl: Time to live in second. Default value is 900. Valid values: 60, 120, 300, 600, 900, 1800, 3600, 7200, 18000, 43200.

Sample JSON data:

        {
        Ā Ā Ā Ā "name": "testCNAME",
        Ā Ā Ā Ā "type": "CNAME",
        Ā Ā Ā Ā "rdata": {
        Ā Ā Ā Ā Ā Ā Ā  "cname": "example.com"
            }
        }
  • For type PTR: Extra required fields are name, rdata.
    • name: Resource record name.
    • rdata: The content of type-PTR resource record.
      • ptrdname: Hostname of the relevant A or AAAA record.
  • Extra option fields are ttl.
    • ttl: Time to live in second. Default value is 900. Valid values: 60, 120, 300, 600, 900, 1800, 3600, 7200, 18000, 43200.

Sample JSON data:

        {
            "name": "1.2.3.4",
        Ā Ā Ā Ā "type": "PTR",
        Ā Ā Ā Ā "rdata": {
        Ā Ā Ā Ā Ā Ā Ā  "ptrdname": "testA.example.com"
        Ā Ā Ā Ā }
        }
  • For type TXT: Extra required fields are name, rdata.
    • name: Resource record name.
    • rdata: The content of type-TXT resource record.
      • text: Human readable text.
  • Extra optional fields are ttl.
    • ttl: Time to live in seconds. Default value is 900. Valid values: 60, 120, 300, 600, 900, 1800, 3600, 7200, 18000, 43200.

Sample JSON data:

        {
            "name": "testTXT",
            "type":"TXT",
            "rdata": {
            Ā Ā Ā  "text": "text information"
            }
        }
  • For type MX: Extra required fields are name, rdata.
    • name: Resource record name.
    • rdata: The content of type-MX resource record.
      • exchange: Hostname of Exchange server.
      • preference: Preference of the MX record
  • Extra optional fields are ttl.
    • ttl: Time to live in seconds. Default value is 900. Valid values: 60, 120, 300, 600, 900, 1800, 3600, 7200, 18000, 43200.

Sample JSON data:

        {
        Ā Ā  "name": "testMX",
        Ā Ā  "type": "MX",
        Ā Ā  "rdata": {
        Ā Ā Ā Ā Ā Ā Ā  "preference": 10,
        Ā Ā Ā Ā Ā Ā Ā  "exchange": "mailserver.example.com"
        Ā Ā Ā  }
        }
  • For type SRV: Extra required fields are name, rdata, service, protocol.
    • name: Resource record name.
    • rdata: The content of type-SRV resource record.
      • priority: Priority of the SRV record.
      • weight: Weight of distributing queries among multiple target servers.
      • port: Port number of the target server.
      • target: Hostname of the target server.
    • service: The symbolic name of the desired service, start with an underscore _.
    • protocol: The symbolic name of the desired protocol.
  • Extra option fields are ttl.
    • ttl: Time to live in seconds. Default value is 900. Valid values: 60, 120, 300, 600, 900, 1800, 3600, 7200, 18000, 43200.

Sample JSON data:

        {
            "type": "SRV",
        Ā Ā Ā Ā "name": "testSRV",
        Ā Ā Ā Ā "rdata": {
        Ā Ā Ā Ā Ā Ā Ā  "priority": 100,
        Ā Ā Ā Ā Ā Ā Ā  "weight": 100,
        Ā Ā Ā Ā Ā Ā Ā  "port": 8000,
        Ā Ā Ā Ā Ā Ā Ā  "target": "siphost.com"
        Ā Ā Ā Ā },
        Ā Ā Ā Ā "service": "_sip",
        Ā Ā Ā Ā "protocol": "udp"
        }

ibmcloud dns resource-record-update

Update a resource record for a DNS zone.

   dns resource-record-update DNS_ZONE_ID RESOURCE_RECORD_ID (-r, --record-content @JSON_FILE | JSON_STRING) [-i, --instance INSTANCE] [--output FORMAT]
   ibmcloud dns resource-record-update DNS_ZONE_ID RESOURCE_RECORD_ID --name NAME --ipv4 IP_ADDRESS [--ttl TTL]
   ibmcloud dns resource-record-update DNS_ZONE_ID RESOURCE_RECORD_ID --name NAME --ipv6 IP_ADDRESS [--ttl TTL]
   ibmcloud dns resource-record-update DNS_ZONE_ID RESOURCE_RECORD_ID --name NAME --cname CNAME [--ttl TTL]
   ibmcloud dns resource-record-update DNS_ZONE_ID RESOURCE_RECORD_ID [--ttl TTL]
   ibmcloud dns resource-record-update DNS_ZONE_ID RESOURCE_RECORD_ID --name NAME --text TEXT [--ttl TTL]
   ibmcloud dns resource-record-update DNS_ZONE_ID RESOURCE_RECORD_ID --name NAME --exchange EXCHANGE --preference PREFERENCE [--ttl TTL]
   ibmcloud dns resource-record-update DNS_ZONE_ID RESOURCE_RECORD_ID --name NAME --priority PRIORITY --weight WEIGHT --port PORT --target TARGET  [--service SERVICE] [--protocol PROTOCOL] [--ttl TTL]

Command options

ZONE_ID
The ID of the DNS zone.
RECORD_ID
The ID of the record.
--name
Resource record name.
--type
Resource record type.
--ipv4
IPv4 address.
--ipv6
IPv6 address.
--cname
Canonical name.
--ptrdname
Hostname of the relevant A or AAAA record.
--text
Human readable text.
--exchange
Hostname of Exchange server.
--preference
Preference of the MX record
--service
The symbolic name of the desired service, start with an underscore _.
--protocol
The symbolic name of the desired protocol.
--port
Port number of the target server.
--weight
Weight of distributing queries among multiple target servers.
--priority
Priority of the SRV record.
--target
Hostname of the target server.
--ttl
Time to live, in seconds. Default value is 900. Valid values: 60, 120, 300, 600, 900, 1800, 3600, 7200, 18000, 43200.
-r, --record-content
The JSON file or JSON string used to describe a DNS Resource Record. See Required fields for -r, --record-content for more detail.
-i, --instance INSTANCE
Instance name or ID. If the name is not set, the context instance specified by ibmcloud dns instance-target is used.
--output FORMAT
Specify output format, only JSON is supported.

Required fields for -r, --record-content

The required field in JSON data is name. Resource record name.

PTR records do not need this field.

  • For type A, AAAA: Extra required fields are rdata.
    • rdata: Content of the resource record.
      • ip: IPv4/IPv6 address
  • Extra option fields are ttl.
    • ttl: Time to live, in seconds. Default value is 900. Valid values: 60, 120, 300, 600, 900, 1800, 3600, 7200, 18000, 43200.

Sample JSON data:

        {
        Ā Ā Ā Ā Ā "name": "testA",
        Ā Ā Ā Ā  "rdata": {
        Ā Ā Ā Ā Ā Ā Ā Ā  "ip": "1.2.3.4"
            }
        }
        {
        Ā Ā Ā  "name": "testAAAA",
        Ā Ā Ā  "rdata": {
        Ā Ā Ā Ā Ā Ā Ā  "ip": "2001:0db8:0012:0001:3c5e:7354:0000:5db1"
        Ā Ā Ā  }
        }
  • For type CNAME: Extra required fields are rdata.
    • rdata: The content of type-PTR resource record.
    • cname: Canonical name
  • Extra option fields are ttl.
    • ttl: Time to live, in seconds. Default value is 900. Valid values: 60, 120, 300, 600, 900, 1800, 3600, 7200, 18000, 43200.

Sample JSON data:

        {
        Ā Ā Ā Ā "name": "testCNAME",
        Ā Ā Ā Ā "rdata": {
        Ā Ā Ā Ā Ā Ā Ā  "cname": "example.com"
            }
        }
  • For type PTR: Extra option fields are ttl.
    • ttl: Time to live, in seconds. Default value is 900. Valid values: 60, 120, 300, 600, 900, 1800, 3600, 7200, 18000, 43200.

Sample JSON data:

        {
            "ttl": 360,
        }
  • For type TXT: Extra required fields are rdata.
    • rdata: The content of type-TXT resource record.
    • text: Human readable text.
  • Extra optional fields are ttl.
    • ttl: Time to live, in seconds. Default value is 900. Valid values: 60, 120, 300, 600, 900, 1800, 3600, 7200, 18000, 43200.

Sample JSON data:

        {
            "name": "testTXT",
            "rdata": {
            Ā Ā Ā  "text": "text information"
            }
        }
  • For type MX: Extra required fields are rdata.
    • rdata: The content of type-MX resource record.
      • exchange: Hostname of Exchange server.
      • preference: Preference of the MX record
  • Extra optional fields are ttl.
    • ttl: Time to live, in seconds. Default value is 900. Valid values: 60, 120, 300, 600, 900, 1800, 3600, 7200, 18000, 43200.

Sample JSON data:

        {
            "name": "testMX",
            "content": "smtp.example.com",
            "priority": 10
        }
  • For type SRV: Extra required fields are rdata, service, protocol.
    • rdata: The content of type-SRV resource record.
      • priority: Priority of the SRV record
      • weight: Weight of distributing queries among multiple target servers.
      • port: Port number of the target server.
      • target: Hostname of the target server.
    • service: The symbolic name of the desired service, start with an underscore _.
    • protocol: The symbolic name of the desired protocol.
  • Extra option fields are ttl.
    • ttl: Time to live, in seconds. Default value is 900. Valid values: 60, 120, 300, 600, 900, 1800, 3600, 7200, 18000, 43200.

Sample JSON data:

        {
        Ā Ā Ā Ā "name": "testSRV"
        Ā Ā Ā Ā "rdata": {
        Ā Ā Ā Ā Ā Ā Ā  "priority": 100,
        Ā Ā Ā Ā Ā Ā Ā  "weight": 100,
        Ā Ā Ā Ā Ā Ā Ā  "port": 8000,
        Ā Ā Ā Ā Ā Ā Ā  "target": "siphost.com"
        Ā Ā Ā Ā },
        Ā Ā Ā Ā "service": "_sip",
        Ā Ā Ā Ā "protocol": "udp"
        }

ibmcloud dns resource-record

Get a resource record details for a DNS zone.

   ibmcloud dns resource-record ZONE_ID RECORD_ID [-i, --instance INSTANCE] [--output FORMAT]

Command options

ZONE_ID
The ID of the DNS zone.
RECORD_ID
The ID of resource record.
-i, --instance INSTANCE
Instance name or ID. If the name is not set, the context instance specified by ibmcloud dns instance-target is used.
--output FORMAT
Specify output format. Currently, json is the only supported format.

ibmcloud dns resource-record-delete

Delete a resource record for a DNS zone.

   ibmcloud dns resource-record-delete ZONE_ID RECORD_ID [-i, --instance INSTANCE] [-f,--force]

Command options

ZONE_ID : The ID of the DNS zone.

RECORD_ID
The ID of resource record.
-i, --instance INSTANCE
Instance name or ID. If the name is not set, the context instance specified by ibmcloud dns instance-target is used.
-f, --force
Delete resource record without prompting for confirmation.

ibmcloud dns resource-records

List all resource records for a DNS zone.

   ibmcloud dns resource-records ZONE_ID [-i, --instance INSTANCE] [--output FORMAT]

Command options

ZONE_ID
The ID of the DNS zone.
--page
Page number of paginated results. (default 1)
--per-page
Number of resource records per page. Min: 50. Max: 1000. (default 200)
-i, --instance
Instance name or ID. If not set, the context instance specified by ibmcloud instance-target INSTANCE is used.
--output
Specify output format. Currently, json is the only supported format.

Command example

List resource records with pagination:

ibmcloud dns resource-records ZONE_ID --per-page 1000 --page 1

Example command to list resource records with pagination

ibmcloud dns resource-records ZONE_ID --per-page 1000 --page 1

ibmcloud dns resource-records-import

Import resource records from BIND zone file.

ibmcloud dns resource-records-import DNS_ZONE_ID (--file FILE) [-i, --instance INSTANCE_NAME | INSTANCE_ID] [--output FORMAT]

Command options

DNS_ZONE_ID
The ID of DNS zone.
--file
BIND zone fileĀ to import. Support type: A, AAAA, CNAME, MX, PTR, SRV, TXT.
-i, --instance
Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.
--output
Specify output format. Currently, json is the only supported format.

Examples

Import resource records from BIND zone file dns_records.cfg in zone f1d596fc-7e86-4b99-b912-9508167e9e56 for instance dns-demo.

ibmcloud dns resource-records-import f1d596fc-7e86-4b99-b912-9508167e9e56 --file dns_records.cfg -i "dns-demo"

ibmcloud dns resource-records-export

Export resource records to BIND zone file.

ibmcloud dns resource-records-export DNS_ZONE_ID [--file FILE] [-i, --instance INSTANCE_NAME | INSTANCE_ID] [--output FORMAT]

Command options

DNS_ZONE_ID
The ID of DNS zone.
--file
The BIND zone file that saves the exported resource records.
-i, --instance
Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.
--output
Specify output format. Currently, json is the only supported format.

Examples

Export resource records in zone f1d596fc-7e86-4b99-b912-9508167e9e56 to zone file dns_records.cfg for instance dns-demo.

ibmcloud dns resource-records-export f1d596fc-7e86-4b99-b912-9508167e9e56 --file dns_records.cfg -i "dns-demo"

Global load balancer

Manage global load balancers by using the following glb commands.

ibmcloud dns glb-create

Create a global load balancer in a zone.

ibmcloud dns glb-create DNS_ZONE_ID --name NAME --default-pools POOL_LIST --fallback-pool POOL_ID [--description DESCRIPTION] [--enabled true|false] [--ttl TTL] [--az-pools AZPOOLS1 --az-pools AZPOOLS2] [-i, --instance INSTANCE] [--output FORMAT]

ibmcloud dns glb-create DNS_ZONE_ID (-j, --json @JSON_FILE | JSON_STRING) [-i, --instance INSTANCE] [--output FORMAT]

Command options

DNS_DOMAIN_ID

The ID of DNS zone. Required.

--json

The JSON file or JSON string used to describe a global load balancer. Required.

  • The required fields in JSON data are name, fallback_pool, default_pools:
    • name: The DNS hostname to associate with your load balancer.
    • fallback_pool: The pool ID to use when all other pools are detected as unhealthy.
    • default_pools: A list of pool IDs ordered by their failover priority.
  • The optional fields are description, ttl, az_pools, enabled:
    • description: The descriptive text of the load balancer.
    • ttl: Time to live (TTL) of the DNS entry for the IP address returned by this load balancer.
    • az_pools: A mapping of region and country codes to a list of pool IDs (ordered by their failover priority) for the region.
    • enabled: Whether the load balancer pool is enabled. Valid values: true, false. The values on, off will be deprecated.

Sample JSON data:

{
  "name": "glb01",
  "description": "Global load balancer 01",
  "enabled": false,
  "ttl": 300,
  "default_pools": ["cc1deb57-0eb4-45cb-94ce-a3c71c189d12"],
  "fallback_pool": "cc1deb57-0eb4-45cb-94ce-a3c71c189d12",
  "az_pools": [
    {
      "availability_zone": "us-south-1",
      "pools": [
        "0fc0bb7c-2fab-476e-8b9b-40fa14bf8e3d"
      ]
    },
    {
      "availability_zone": "us-south-2",
      "pools": [
        "f46eba57-f08e-4e38-a76c-f3370d457bd2"
      ]
    }
  ]
}
--name

The DNS hostname to associate with your load balancer.

--fallback-pool

The pool ID to use when all other pools are detected as unhealthy.

--default-pools

A list of pool IDs ordered by their failover priority.

--description

The descriptive text of the load balancer.

--ttl

Time to live (TTL) of the DNS entry for the IP address returned by this load balancer.

--az-pools

A mapping of region and country codes to a list of pool IDs (ordered by their failover priority) for the region.

--enabled

Whether the load balancer pool is enabled. Valid values: true, false.

-i, --instance

Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.

--output

Specify output format. Currently, json is the only supported format.

Examples

Create a global load balancer in zone demo.com:31984fea73a15b45779fa0df4ef62f9b.

ibmcloud dns glb-create demo.com:31984fea73a15b45779fa0df4ef62f9b --json @glb.json -i "dns-demo"

ibmcloud dns glb-update

Update a global load balancer in a zone.

ibmcloud dns glb-update DNS_ZONE_ID GLB_ID (-j, --json @JSON_FILE | JSON_STRING) [-i, --instance INSTANCE] [--output FORMAT]

ibmcloud dns glb-update DNS_ZONE_ID GLB_ID [--name NAME] [--default-pools POOL_LIST] [--fallback-pool POOL_ID] [--description DESCRIPTION] [--enabled true|false] [--ttl TTL] [--az-pools AZPOOLS1 --az-pools AZPOOLS2] [-i, --instance INSTANCE] [--output FORMAT]

Command options

DNS_DOMAIN_ID

The ID of DNS zone. Required.

GLB_ID

The ID of global load balancer. Required.

--json

The JSON file or JSON string used to describe a global load balancer. Required.

  • The optional fields are name, fallback_pool, default_pools, description, ttl, az_pools, enabled:
    • name: The DNS hostname to associate with your load balancer.
    • fallback_pool: The pool ID to use when all other pools are detected as unhealthy.
    • default_pools: A list of pool IDs ordered by their failover priority.
    • description: The descriptive text of the load balancer.
    • ttl: Time to live (TTL) of the DNS entry for the IP address returned by this load balancer.
    • az_pools: A mapping of region and country codes to a list of pool IDs (ordered by their failover priority) for the region.
    • enabled: Whether the load balancer pool is enabled. Valid values: true, false. The values on, off will be deprecated.

Sample JSON data:

{
  "name": "glb01",
  "description": "Global load balancer 01",
  "enabled": false,
  "ttl": 300,
  "default_pools": ["cc1deb57-0eb4-45cb-94ce-a3c71c189d12"],
  "fallback_pool": "cc1deb57-0eb4-45cb-94ce-a3c71c189d12",
  "az_pools": [
    {
      "availability_zone": "us-south-1",
      "pools": [
        "0fc0bb7c-2fab-476e-8b9b-40fa14bf8e3d"
      ]
    },
    {
      "availability_zone": "us-south-2",
      "pools": [
        "f46eba57-f08e-4e38-a76c-f3370d457bd2"
      ]
    }
  ]
}
--name

The DNS hostname to associate with your load balancer.

--fallback-pool

The pool ID to use when all other pools are detected as unhealthy.

--default-pools

A list of pool IDs ordered by their failover priority.

--description

The descriptive text of the load balancer.

--ttl

Time to live (TTL) of the DNS entry for the IP address returned by this load balancer.

--az-pools

A mapping of region and country codes to a list of pool IDs (ordered by their failover priority) for the region.

--enabled

Whether the load balancer pool is enabled. Valid values: true, false.

-i, --instance

Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.

--output

Specify output format. Currently, json is the only supported format.

Examples

Update global load balancer 699d98642c564d2e855e9661899b7252 in zone demo.com:31984fea73a15b45779fa0df4ef62f9b.

ibmcloud dns glb-update demo.com:31984fea73a15b45779fa0df4ef62f9b 699d98642c564d2e855e9661899b7252 --json @glb.json -i "dns-demo"

ibmcloud dns glb

Show a global load balancer in a zone.

ibmcloud dns glb DNS_DOMAIN_ID GLB_ID [-i, --instance INSTANCE] [--output FORMAT]

Command options

DNS_DOMAIN_ID
The ID of DNS zone. Required.
GLB_ID
The ID of global load balancer. Required.
-i, --instance
Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.
--output
Specify output format. Currently, json is the only supported format.

Examples

Show global load balancer 699d98642c564d2e855e9661899b7252 in zone demo.com:31984fea73a15b45779fa0df4ef62f9b.

ibmcloud dns glb demo.com:31984fea73a15b45779fa0df4ef62f9b 699d98642c564d2e855e9661899b7252 -i "dns-demo"

ibmcloud dns glb-delete

Delete a global load balancer in a DNS domain.

ibmcloud dns glb-delete DNS_DOMAIN_ID GLB_ID [-i, --instance INSTANCE] [-f,--force]

Command options

DNS_DOMAIN_ID
The ID of DNS zone. Required.
GLB_ID
The ID of global load balancer. Required.
-i, --instance
Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.
-f, --force
Delete load balancer without prompting for confirmation.

Examples

Delete global load balancer 699d98642c564d2e855e9661899b7252 in zone demo.com:31984fea73a15b45779fa0df4ef62f9b.

ibmcloud dns glb-delete demo.com:31984fea73a15b45779fa0df4ef62f9b 699d98642c564d2e855e9661899b7252 -f -i "dns-demo"

ibmcloud dns glbs

List all load balancers for the zone.

ibmcloud dns glbs DNS_ZONE_ID [-i, --instance INSTANCE] [--output FORMAT]

Command options

DNS_DOMAIN_ID
The ID of DNS zone. Required.
-i, --instance
Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.
--output
Specify output format. Currently, json is the only supported format.

Examples

List load balancers for zone demo.com:31984fea73a15b45779fa0df4ef62f9b.

ibmcloud dns glbs demo.com:31984fea73a15b45779fa0df4ef62f9b -i "dns-demo"

ibmcloud dns glb-pool-create

Create a GLB pool for a service instance.

ibmcloud dns glb-pool-create (-j, --json @JSON_FILE | JSON_STRING) [-i, --instance INSTANCE] [--output FORMAT]

ibmcloud dns glb-pool-create --name NAME --origins ORIGIN1 --origins ORIGIN2 [--description DESCRIPTION] [--enabled true|false] [--healthy-origins-threshold THRESHOLD] [--monitor MONITOR_ID] [--notification-channel CHANNEL] [--healthcheck-region REGION] [--healthcheck-subnets SUBNETS] [-i, --instance INSTANCE] [--output FORMAT]

Command options

--json

The JSON file or JSON string used to describe a global load balancer pool. Required.

  • The required fields in JSON data are name, origins:

    • name: The name of the load balancer pool.
    • origins: The list of origins within this pool.
  • The optional fields are description, healthy_origins_threshold, enabled, monitor, notification_channel, healthcheck_region, healthcheck_subnets:

    • description: The descriptive text of the load balancer pool.
    • healthy_origins_threshold: The minimum number of origins that must be healthy for this pool to serve traffic.
    • enabled: Whether the load balancer pool is enabled. Valid values: true, false.
    • monitor: The ID of the load balancer monitor to be associated to this pool.
    • notification_channel: The notification channel.
    • healthcheck_region: Health check region of VSIs. Valid values: us-south, us-east, eu-gb, eu-du, au-syd, jp-tok, br-sao, ca-tor.
    • healthcheck_subnets: A list of health check subnet IDs of VSIs.

    When you create a pool by attaching a monitor, DNS Services takes one address from the health check subnet. Ensure this health check subnet has sufficient IP addresses available.

Sample JSON data:

{
  "name": "us-pool",
  "description": "application server pool in US",
  "origins": [
    {
      "name": "us-app-dal10",
      "description": "dallas origin 10",
      "address": "1.1.1.1",
      "enabled": true
    },
    {
      "name": "us-app-dal12",
      "description": "dallas origin 12",
      "address": "2.2.2.2",
      "enabled": true
    }
  ],
  "healthy_origins_threshold": 1,
  "monitor": "f1aba936b94213e5b8dca0c0dbf1f9cc",
  "enabled": true,
  "notification_channel": "https://mywebsite.com/dns/webhook",
  "healthcheck_region": "us-south",
  "healthcheck_subnets": ["0716-a4c0c123-594c-4ef4-ace3-a08858540b5e"]
}
--name

The name of the load balancer pool.

--description

The descriptive text of the load balancer pool.

--healthy-origins-threshold

The minimum number of origins that must be healthy for this pool to serve traffic.

--enabled

Whether the load balancer pool is enabled. Valid values: true, false.

--monitor

The ID of the load balancer monitor to be associated to this pool.

--notification-channel

The notification channel.

healthcheck-region

Health check region of VSIs. Valid values: us-south, us-east, eu-gb, eu-du, au-syd, jp-tok.

healthcheck-subnets

A list of health check subnet IDs of VSIs.

-i, --instance

Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.

--output

Specify output format. Currently, json is the only supported format.

Examples

Create a GLB pool for instance dns-demo.

ibmcloud dns glb-pool-create --json @glb-pool.json -i "dns-demo"

ibmcloud dns glb-pool-update

Update the details of a GLB pool.

ibmcloud dns glb-pool-update GLB_POOL_ID [--name NAME] [--enable-origin ORIGIN_NAME --enable-origin ORIGIN_NAME ...] [--disable-origin ORIGIN_NAME --disable-origin ORIGIN_NAME ...] [--add-origin ORIGIN_PARAMETER --add-origin ORIGIN_PARAMETER ...] [--remove-origin ORIGIN_NAME --remove-origin ORIGIN_NAME ...]  [--description DESCRIPTION] [--enabled true|false] [--healthy-origins-threshold THRESHOLD] [-detach-monitor] [--attach-monitor MONITOR_ID] [--healthcheck-region REGION] [--healthcheck-subnets SUBNETS] [-i, --instance INSTANCE] [--output FORMAT]

ibmcloud dns glb-pool-update GLB_POOL_ID (-j, --json @JSON_FILE | JSON_STRING) [-i, --instance INSTANCE] [--output FORMAT]

Command options

GLB_POOL_ID

The ID of global load balancer pool. Required.

--json

The JSON file or JSON string used to describe a GLB pool. Required.

  • The optional fields are name, origins, description, healthy_origins_threshold, enabled, monitor, notification_channel, healthcheck_region, healthcheck_subnets:
    • name: The name of the load balancer pool.
    • origins: The list of origins within this pool.
    • description: The descriptive text of the load balancer pool.
    • healthy_origins_threshold: The minimum number of origins that must be healthy for this pool to serve traffic.
    • enabled: Whether the load balancer pool is enabled. Valid values: true, false.
    • monitor: The ID of the load balancer monitor to be associated to this pool.
    • notification_channel: The notification channel.
    • healthcheck_region: Health check region of VSIs. Valid values: us-south, us-east, eu-gb, eu-du, au-syd, jp-tok, br-sao, ca-tor.
    • healthcheck_subnets: A list of health check subnet IDs of VSIs.

Sample JSON data:

{
  "name": "us-pool",
  "description": "application server pool in US",
  "origins": [
    {
      "name": "us-app-dal10",
      "description": "dallas origin 10",
      "address": "1.1.1.1",
      "enabled": true
    },
    {
      "name": "us-app-dal12",
      "description": "dallas origin 12",
      "address": "2.2.2.2",
      "enabled": true
    }
  ],
  "healthy_origins_threshold": 1,
  "monitor": "f1aba936b94213e5b8dca0c0dbf1f9cc",
  "enabled": true,
  "notification_channel": "https://mywebsite.com/dns/webhook",
  "healthcheck_region": "us-south",
  "healthcheck_subnets": ["0716-a4c0c123-594c-4ef4-ace3-a08858540b5e"]
}
--name

The name of the load balancer pool.

--description

The descriptive text of the load balancer pool.

--enable-origin

Enable the origin within the pool. The value can be ORIGIN_NAME or ORIGIN_ADDRESS.

--disable-origin

Disable the origin within the pool. The value can be ORIGIN_NAME or ORIGIN_ADDRESS.

--add-origin

Add an origin into the pool. ORIGIN_NAME and ORIGIN_ADDRESS are required. For example: --add-origin name=example,address=1.2.3.4,enabled=true,description=origin_description

--remove-origin

Remove an origin from the Pool. The value can be ORIGIN_NAME or ORIGIN_ADDRESS.

--detach-monitor

Detach monitor from origin pool.

--attach-monitor

Attach monitor to origin pool.

--healthy-origins-threshold

The minimum number of origins that must be healthy for this pool to serve traffic.

--enabled

Whether the load balancer pool is enabled. Valid values: true, false.

healthcheck-region

Health check region of VSIs. Valid values: us-south, us-east, eu-gb, eu-du, au-syd, jp-tok, br-sao, ca-tor.

healthcheck-subnets

A list of health check subnet IDs of VSIs.

-i, --instance

Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.

--output

Specify output format. Currently, json is the only supported format.

Examples

Update a GLB pool 17b5962d775c646f3f9725cbc7a53df4 for instance dns-demo.

ibmcloud dns glb-pool-update 17b5962d775c646f3f9725cbc7a53df4 --json @glb-pool.json -i "dns-demo"

ibmcloud dns glb-pool

Show the details of a GLB pool.

ibmcloud dns glb-pool GLB_POOL_ID [-i, --instance INSTANCE] [--output FORMAT]

Command options

GLB_POOL_ID
The ID of global load balancer pool. Required.
-i, --instance
Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.
--output
Specify output format. Currently, json is the only supported format.

Examples

Show the details of GLB pool 17b5962d775c646f3f9725cbc7a53df4.

ibmcloud dns glb-pool 17b5962d775c646f3f9725cbc7a53df4 -i "dns-demo"

ibmcloud dns glb-pool-delete

Delete a GLB pool.

ibmcloud dns glb-pool-delete GLB_POOL_ID [-i, --instance INSTANCE] [-f,--force]

Command options

GLB_POOL_ID
The ID of global load balancer pool. Required.
-i, --instance
Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.
-f, --force
Delete load balancer pool without prompting for confirmation.

Examples

Delete GLB pool 17b5962d775c646f3f9725cbc7a53df4.

ibmcloud dns glb-pool-delete 17b5962d775c646f3f9725cbc7a53df4 -f -i "dns-demo"

ibmcloud dns glb-pools

List all GLB pools for a service instance.

ibmcloud dns glb-pools [-i, --instance INSTANCE] [--output FORMAT]

Command options

-i, --instance
Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.
--output
Specify output format. Currently, json is the only supported format.

Examples

List all GLB pools for instance dns-demo.

ibmcloud dns glb-pools -i "dns-demo"

ibmcloud dns glb-monitor-create

Create a GLB monitor for a service instance.

ibmcloud dns glb-monitor-create (-j, --json @JSON_FILE | JSON_STRING) [-i, --instance INSTANCE] [--output FORMAT]

ibmcloud dns glb-monitor-create --name NAME --type TCP [--port PORT] [--description DESCRIPTION] [--interval INTERVAL] [--retries RETRY] [--timeout TIMEOUT] [-i, --instance INSTANCE] [--output FORMAT]

ibmcloud dns glb-monitor-create --name NAME --type (HTTP|HTTPS) --path PATH [--port PORT] [--description DESCRIPTION] [--method GET|HEAD] [--headers HEADER1 --headers HEADER2...] [--interval INTERVAL] [--retries RETRY] [--timeout TIMEOUT] [--allow-insecure true|false] [--expected-body BODY] [--expected-codes CODE] [-i, --instance INSTANCE] [--output FORMAT]

Command options

--json

The JSON file or JSON string used to describe a GLB monitor. Required.

  • The required fields in JSON data are name, type.
    • name: The name of the load balancer monitor.
    • type: The protocol to use for the health check. Valid values: HTTP, HTTPS, TCP.
  • The optional fields are description, timeout, retries, interval.
    • description: The descriptive text of the load balancer monitor.
    • timeout: The timeout (in seconds) before marking the health check as failed. Valid values: 1-10.
    • retries: The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Valid values: 0-3.
    • interval: The interval between each health check. Valid values: 60-3600.
  • For TCP type health check. Extra required fields are port.
    • port: The TCP port to use for the health check.
  • For HTTP/HTTPS type health check. Extra required fields are expected_codes.
    • expected_codes: The expected HTTP response code or code range of the health check. Valid values: 200, 201, 202, 203, 204, 205, 206, 207, 208, 226, 2xx.
  • Extra option fields are port, expected_body, method, path, header, allow_insecure.
    • port: The port number the health check connects to.
    • expected_body: A case-insensitive sub-string to look for in the response body.
    • method: The method to use for the health check applicable to HTTP/HTTPS based checks. Valid values: GET, HEAD.
    • path: The endpoint path to health check against.
    • header: The HTTP request headers to send in the health check.
    • allow_insecure: Do not validate the certificate when monitor use HTTPS. Valid values: true, false.

Sample JSON data:

For HTTP/HTTPS:

{
  "name": "glbmonitor",
  "description": "Health monitor of web service",
  "type": "HTTPS",
  "method": "GET",
  "path": "/health",
  "headers": [
    {
      "name": "Host",
      "value": ["glb.example.com"]
    },
    {
      "name": "X-App-ID",
      "value":["abc123"]
    }
  ],
  "port": 443,
  "timeout": 5,
  "retries": 2,
  "interval": 90,
  "allow_insecure": false,
  "expected_codes": "2xx",
  "expected_body": "alive"
}

For TCP:

{
  "name": "glbmonitor",
  "description": "Health monitor of TCP",
  "type": "TCP",
  "port": 80,
  "timeout": 5,
  "retries": 2,
  "interval": 90
}
--name

The name of the load balancer monitor.

--type

The protocol to use for the health check. Valid values: HTTP, HTTPS, TCP.

--description

The descriptive text of the load balancer monitor.

--timeout

The timeout (in seconds) before marking the health check as failed. Valid values: 1-10.

--retries

The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Valid values: 0-3.

--interval

The interval between each health check. Valid values: 60-3600.

--port

The port number the health check connects to.

--expected-codes

The expected HTTP response code or code range of the health check. Valid values: 200, 201, 202, 203, 204, 205, 206, 207, 208, 226, 2xx

--expected-body

A case-insensitive sub-string to look for in the response body.

--method

The method to use for the health check applicable to HTTP/HTTPS based checks. Valid values: GET, HEAD.

--path

The endpoint path to health check against.

--headers

The HTTP request headers to send in the health check.

--allow-insecure

Do not validate the certificate when monitor uses HTTPS. Valid values: on, off.

-i, --instance

Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.

--output

Specify output format. Currently, json is the only supported format.

Examples

Create a GLB monitors in instance dns-demo.

ibmcloud dns glb-monitor-create --json @glb-monitor.json -i "dns-demo"

ibmcloud dns glb-monitor-update

Update a GLB monitor for a service instance.

ibmcloud dns glb-monitor-update GLB_MON_ID (-j, --json @JSON_FILE | JSON_STRING) [-i, --instance INSTANCE] [--output FORMAT]

ibmcloud dns glb-monitor-update GLB_MON_ID [--name NAME] [--type TCP] [--port PORT] [--description DESCRIPTION] [--interval INTERVAL] [--retries RETRY] [--timeout TIMEOUT] [-i, --instance INSTANCE] [--output FORMAT]

ibmcloud dns glb-monitor-update GLB_MON_ID [--name NAME] [--type HTTP|HTTPS] [--expected-codes CODE] [--path PATH] [--port PORT] [--description DESCRIPTION] [--method GET|HEAD] [--headers HEADER1 --headers HEADER2...] [--interval INTERVAL] [--retries RETRY] [--timeout TIMEOUT] [--allow-insecure true|false] [--expected-body BODY] [--expected-codes CODE] [-i, --instance INSTANCE] [--output FORMAT]

Command options

GLB_MON_ID

The ID of global load balancer monitor. Required. --json

The JSON file or JSON string used to describe a GLB monitor. Required.

  • The optional fields are name, type, description, timeout, retries, interval.
    • name: The name of the load balancer monitor.
    • type: The protocol to use for the health check. Valid values: HTTP, HTTPS, TCP.
    • description: The descriptive text of the load balancer monitor.
    • timeout: The timeout (in seconds) before marking the health check as failed. Valid values: 1-10.
    • retries: The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Valid values: 0-3.
    • interval: The interval between each health check. Valid values: 60-3600.
  • For TCP type health check. Extra option fields are port.
    • port: The TCP port to use for the health check.
  • For HTTP/HTTPS type health check. Extra option fields are expected_codes, port, expected_body, method, path, header, allow_insecure.
    • expected_codes: The expected HTTP response code or code range of the health check. Valid values: 200, 201, 202, 203, 204, 205, 206, 207, 208, 226, 2xx.
    • port: The port number the health check connects to.
    • expected_body: A case-insensitive sub-string to look for in the response body.
    • method: The method to use for the health check applicable to HTTP/HTTPS based checks. Valid values: GET, HEAD.
    • path: The endpoint path to health check against.
    • header: The HTTP request headers to send in the health check.
    • allow_insecure: Do not validate the certificate when monitor use HTTPS. Valid values: on, off.

Sample JSON data:

For HTTP/HTTPS:

{
  "name": "glbmonitor",
  "description": "Health monitor of web service",
  "type": "HTTPS",
  "method": "GET",
  "path": "/health",
  "headers": [
    {
      "name": "Host",
      "value": ["glb.example.com"]
    },
    {
      "name": "X-App-ID",
      "value":["abc123"]
    }
  ],
  "port": 443,
  "timeout": 5,
  "retries": 2,
  "interval": 90,
  "allow_insecure": false,
  "expected_codes": "2xx",
  "expected_body": "alive"
}

For TCP:

{
  "name": "glbmonitor",
  "description": "Health monitor of TCP",
  "type": "TCP",
  "port": 80,
  "timeout": 5,
  "retries": 2,
  "interval": 90
}
--name

The name of the load balancer monitor.

--type

The protocol to use for the health check. Valid values: HTTP, HTTPS, TCP.

--description

The descriptive text of the load balancer monitor.

--timeout

The timeout (in seconds) before marking the health check as failed. Valid values: 1-10.

--retries

The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Valid values: 0-3.

--interval

The interval between each health check. Valid values: 60-3600.

--port

The port number the health check connects to.

--expected-codes

The expected HTTP response code or code range of the health check. Valid values: 200, 201, 202, 203, 204, 205, 206, 207, 208, 226, 2xx

--expected-body

A case-insensitive sub-string to look for in the response body.

--method

The method to use for the health check applicable to HTTP/HTTPS based checks. Valid values: GET, HEAD.

--path

The endpoint path to health check against.

--headers

The HTTP request headers to send in the health check.

--allow-insecure

Do not validate the certificate when monitor uses HTTPS. Valid values: on, off.

-i, --instance

Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.

--output

Specify output format. Currently, json is the only supported format.

Examples

Update GLB monitors f1aba936b94213e5b8dca0c0dbf1f9cc in instance dns-demo.

ibmcloud dns glb-monitor-update f1aba936b94213e5b8dca0c0dbf1f9cc --json @glb-monitor.json -i "dns-demo"

ibmcloud dns glb-monitor

Show the details of a LB monitor.

ibmcloud dns glb-monitor GLB_MON_ID [-i, --instance INSTANCE] [--output FORMAT]

Command options

GLB_MON_ID
The ID of global load balancer monitor. Required.
-i, --instance
Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.
--output
Specify output format. Currently, json is the only supported format.

Examples

Show the details of GLB monitor f1aba936b94213e5b8dca0c0dbf1f9cc.

ibmcloud dns glb-monitor f1aba936b94213e5b8dca0c0dbf1f9cc -i "dns-demo"

ibmcloud dns glb-monitor-delete

Delete the GLB monitor for a service instance.

ibmcloud dns glb-monitor-delete GLB_MON_ID [-i, --instance INSTANCE] [-f,--force]

Command options

GLB_MON_ID
The ID of global load balancer monitor. Required.
-i, --instance
Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.
-f, --force
Delete load balancer monitor without prompting for confirmation.

Examples

Delete GLB monitor f1aba936b94213e5b8dca0c0dbf1f9cc.

ibmcloud dns glb-monitor-delete f1aba936b94213e5b8dca0c0dbf1f9cc -f -i "dns-demo"

ibmcloud dns glb-monitors

List GLB monitors for a service instance.

ibmcloud dns glb-monitors [-i, --instance INSTANCE] [--output FORMAT]

Command options

-i, --instance
Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.
--output
Specify output format. Currently, json is the only supported format.

Examples

List all GLB monitors for instance dns-demo.

ibmcloud dns glb-monitors -i "dns-demo"

Custom resolver

Manage custom resolvers by using the following custom resolver commands.

ibmcloud dns custom-resolver-create

Create a custom resolver for a service instance.

ibmcloud dns custom-resolver-create --name NAME [--location LOCATION1] [--location LOCATION2] [-description DESCRIPTION] [-f, --force] [-i, --instance INSTANCE] [--output FORMAT]

Command options

-n, --name
The name of the custom resolver.
-d, --description
The descriptive text of the custom resolver.
-f, --force
Allow creating custom resolver with fewer than 2 locations.
--location
The Locations on which the custom resolver will be running. The location subnet CRN is required. For example: --location subnet1,enableĀ  --location subnet2,disable
-i, --instance
Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.
--output
Specify output format. Currently, json is the only supported format.

Examples

Create a custom resolver for instance dns-demo.

ibmcloud dns custom-resolver-create --name "example" --location crn:v1:bluemix:public:is:us-south-1:a/01652b251c3ae2787110a995d8db0135::subnet:0716-b49ef064-0f89-4fb1-8212-135b12568f04,enable --description "demo" -i "dns-demo"

ibmcloud dns custom-resolver-update

Update a custom resolver for a service instance.

ibmcloud dns custom-resolver-update RESOLVER_ID [--name NAME] [--enabled true|false] [--description DESCRIPTION] [-i, --instance INSTANCE] [--output FORMAT]

Command options

RESOLVER_ID
The ID of custom resolver.
-n, --name
The name of the custom resolver.
-d, --description
The descriptive text of the custom resolver.
--enabled
Whether to enable the custom resolver.
-i, --instance
Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.
--output
Specify output format. Currently, json is the only supported format.

Examples

Update a custom resolver f1aba936b94213e5b8dca0c0dbf1f9cc for instance dns-demo.

ibmcloud dns custom-resolver-update f1aba936b94213e5b8dca0c0dbf1f9cc --name "example" --enabled true -description "demo" -i "dns-demo"

ibmcloud dns custom-resolver

Get a custom resolver details for a service instance.

ibmcloud dns custom-resolver RESOLVER_ID [-i, --instance INSTANCE] [--output FORMAT]

Command options

RESOLVER_ID
The ID of custom resolver.
-i, --instance
Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.
--output
Specify output format. Currently, json is the only supported format.

Examples

Get a custom resolver f1aba936b94213e5b8dca0c0dbf1f9cc for instance dns-demo.

ibmcloud dns custom-resolver f1aba936b94213e5b8dca0c0dbf1f9cc -i "dns-demo"

ibmcloud dns custom-resolvers

List custom resolvers for a service instance.

ibmcloud dns custom-resolvers [-i, --instance INSTANCE] [--output FORMAT]

Command options

-i, --instance
Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.
--output
Specify output format. Currently, json is the only supported format.

Examples

List custom resolvers for instance dns-demo.

ibmcloud dns custom-resolvers -i "dns-demo"

ibmcloud dns custom-resolver-delete

Delete a custom resolver for a service instance.

ibmcloud dns custom-resolver-delete RESOLVER_ID [-i, --instance INSTANCE] [-f, --force]

Command options

RESOLVER_ID
The ID of custom resolver.
-i, --instance
Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.
---f, --force
Delete custom resolver without prompting for confirmation.

Examples

Delete a custom resolver f1aba936b94213e5b8dca0c0dbf1f9cc for instance dns-demo.

ibmcloud dns custom-resolver-delete f1aba936b94213e5b8dca0c0dbf1f9cc -i "dns-demo"

ibmcloud dns custom-resolver-location-add

Add custom resolver location for a service instance.

ibmcloud dns custom-resolver-location-add RESOLVER_ID --subnet SUBNET_CRN [--enabled true|false] [-i, --instance INSTANCE] [--output FORMAT]

Command options

RESOLVER_ID
The ID of custom resolver.
--subnet
The CRN of the subnet.
--enabled
Whether to enable the custom resolver location.
-i, --instance
Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.
--output
Specify output format. Currently, json is the only supported format.

Examples

Add a location in custom resolver f1aba936b94213e5b8dca0c0dbf1f9cc for instance dns-demo.

ibmcloud dns custom-resolver-location-add f1aba936b94213e5b8dca0c0dbf1f9cc --subnet crn:v1:bluemix:public:is:us-south-1:a/01652b251c3ae2787110a995d8db0135::subnet:0716-b49ef064-0f89-4fb1-8212-135b12568f04 --enabled true -i "dns-demo"

ibmcloud dns custom-resolver-location-update

Update custom resolver location for a service instance.

ibmcloud dns custom-resolver-location-update RESOLVER_ID LOCATION_ID [--subnet SUBNET_CRN] [--enabled true|false] [-i, --instance INSTANCE] [--output FORMAT]

Command options

RESOLVER_ID
The ID of custom resolver.
LOCATION_ID
The ID of custom resolver location.
--subnet
The CRN of the subnet.
--enabled
Whether to enable the custom resolver location.
-i, --instance
Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.
--output
Specify output format. Currently, json is the only supported format.

Examples

Update location 9a234ede-c2b6-4c39-bc27-d39ec139ecdb in custom resolver f1aba936b94213e5b8dca0c0dbf1f9cc for instance dns-demo.

ibmcloud dns custom-resolver-location-update f1aba936b94213e5b8dca0c0dbf1f9cc 9a234ede-c2b6-4c39-bc27-d39ec139ecdb --subnet crn:v1:bluemix:public:is:us-south-1:a/01652b251c3ae2787110a995d8db0135::subnet:0716-b49ef064-0f89-4fb1-8212-135b12568f04 --enabled true -i "dns-demo"

ibmcloud dns custom-resolver-location-delete

Delete custom resolver location for a service instance.

ibmcloud dns custom-resolver-location-delete RESOLVER_ID LOCATION_ID [-i, --instance INSTANCE] [-f, --force]

Command options

RESOLVER_ID
The ID of custom resolver.
LOCATION_ID
The ID of custom resolver location.
-i, --instance
Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.
---f, --force
Delete custom resolver location without prompting for confirmation.

Examples

Delete location 9a234ede-c2b6-4c39-bc27-d39ec139ecdb in custom resolver f1aba936b94213e5b8dca0c0dbf1f9cc for instance dns-demo.

ibmcloud dns custom-resolver-location-delete f1aba936b94213e5b8dca0c0dbf1f9cc 9a234ede-c2b6-4c39-bc27-d39ec139ecdb -i "dns-demo"

ibmcloud dns custom-resolver-forwarding-rule-create

Create a custom resolver forwarding rule for a service instance.

ibmcloud dns custom-resolver-forwarding-rule-create RESOLVER_ID --type TYPE --match HOSTNAME --dns-svcs IPs [--description DESCRIPTION] [-i, --instance INSTANCE] [--output FORMAT]

Command options

RESOLVER_ID
The ID of custom resolver.
-t, --type
The type of the forwarding rule. Valid values: "zone".
-d, --description
The descriptive text of the custom resolver forwarding rule.
--match
The matching zone or hostname.
--dns-svcs
The upstream DNS servers will be forwarded to, for example: ip1,ip2
-i, --instance
Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.
--output
Specify output format. Currently, json is the only supported format.

Examples

Create a forwarding rule in custom resolver f1aba936b94213e5b8dca0c0dbf1f9cc for instance dns-demo.

ibmcloud dns custom-resolver-forwarding-rule-create f1aba936b94213e5b8dca0c0dbf1f9cc --type zone --match "example.com" --dns-svcs 192.168.0.1,192.168.0.2 --description "demo" -i "dns-demo"

ibmcloud dns custom-resolver-forwarding-rule-update

Update a custom resolver forwarding rule for a service instance.

ibmcloud dns custom-resolver-forwarding-rule-update RESOLVER_ID RULE_ID [--match HOSTNAME] [--dns-svcs IPs] [--description DESCRIPTION] [-i, --instance INSTANCE] [--output FORMAT]

Command options

RESOLVER_ID
The ID of custom resolver.
RULE_ID
The ID of custom resolver forwarding rule.
-d, --description
The descriptive text of the custom resolver forwarding rule.
--match
The matching zone or hostname.
--dns-svcs
The upstream DNS servers will be forwarded to, for example: ip1,ip2
-i, --instance
Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.
--output
Specify output format. Currently, json is the only supported format.

Examples

Update a forwarding rule 9a234ede-c2b6-4c39-bc27-d39ec139ecdb in custom resolver f1aba936b94213e5b8dca0c0dbf1f9cc for instance dns-demo.

ibmcloud dns custom-resolver-forwarding-rule-update f1aba936b94213e5b8dca0c0dbf1f9cc 9a234ede-c2b6-4c39-bc27-d39ec139ecdb --type zone --match "example.com" --dns-svcs 192.168.0.1,192.168.0.2 --description "demo" -i "dns-demo"

ibmcloud dns custom-resolver-forwarding-rule

Get a custom resolver forwarding rule details for a service instance.

ibmcloud dns custom-resolver-forwarding-rule RESOLVER_ID RULE_ID [-i, --instance INSTANCE] [--output FORMAT]

Command options

RESOLVER_ID
The ID of custom resolver.
RULE_ID
The ID of custom resolver forwarding rule.
-i, --instance
Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.
--output
Specify output format. Currently, json is the only supported format.

Examples

Get a forwarding rule 9a234ede-c2b6-4c39-bc27-d39ec139ecdb in custom resolver f1aba936b94213e5b8dca0c0dbf1f9cc for instance dns-demo.

ibmcloud dns custom-resolver-forwarding-rule f1aba936b94213e5b8dca0c0dbf1f9cc 9a234ede-c2b6-4c39-bc27-d39ec139ecdb -i "dns-demo"

ibmcloud dns custom-resolver-forwarding-rules

List custom resolver forwarding rules for a service instance.

ibmcloud dns custom-resolver-forwarding-rules RESOLVER_ID [-i, --instance INSTANCE] [--output FORMAT]

Command options

RESOLVER_ID
The ID of custom resolver.
-i, --instance
Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.
--output
Specify output format. Currently, json is the only supported format.

Examples

List forwarding rules in custom resolver f1aba936b94213e5b8dca0c0dbf1f9cc for instance dns-demo.

ibmcloud dns custom-resolver-forwarding-rules f1aba936b94213e5b8dca0c0dbf1f9cc -i "dns-demo"

ibmcloud dns custom-resolver-forwarding-rule-delete

Delete a custom resolver forwarding rule for a service instance.

ibmcloud dns custom-resolver-forwarding-rule-delete RESOLVER_ID RULE_ID [-i, --instance INSTANCE] [-f, --force]

Command options

RESOLVER_ID
The ID of custom resolver.
RULE_ID
The ID of custom resolver forwarding rule.
-i, --instance
Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.
-f, --force
Delete custom resolver forwarding rule without prompting for confirmation.

Examples

Delete a forwarding rule 9a234ede-c2b6-4c39-bc27-d39ec139ecdb in custom resolver f1aba936b94213e5b8dca0c0dbf1f9cc for instance dns-demo.

ibmcloud dns custom-resolver-forwarding-rule-delete f1aba936b94213e5b8dca0c0dbf1f9cc 9a234ede-c2b6-4c39-bc27-d39ec139ecdb -i "dns-demo"

Secondary zones

Manage secondary zones by using the following secondary zone commands.

ibmcloud dns secondary-zone-create

Create a secondary zone for given custom resolver.

ibmcloud dns secondary-zone-create RESOLVER_ID --name NAME --transfer-from ADDRESS1,ADDRESS2 [--description DESCRIPTION] [--enabled true|false] [-i, --instance INSTANCE] [--output FORMAT]

Command options

RESOLVER_ID
The ID of the custom resolver. Required.
--name value
The domain name of the secondary zone.
--transfer-from value
The source addresses of the secondary zone.
--description value
The description of the secondary zone.
--enabled value
Whether the secondary zone is enabled.
-i, --instance value
Instance name or ID. If not set, the context instance specified by ibmcloud dns instance-target INSTANCE is used.
--output value
Specify output format. Currently, json is the only supported format.

Examples

Create a secondary zone for custom resolver f1aba936b94213e5b8dca0c0dbf1f9cc.

ibmcloud dns secondary-zone-create f1aba936b94213e5b8dca0c0dbf1f9cc --name "test.com" --transfer-from 169.13.12.10 -i "dns-demo"

ibmcloud dns secondary-zone-update

Update a secondary zone.

ibmcloud dns secondary-zone-update RESOLVER_ID SECONDARY_ZONE_ID [--transfer-from ADDRESS1,ADDRESS2] [--description DESCRIPTION] [--enabled true|false] [-i, --instance INSTANCE] [--output FORMAT]

Command options

RESOLVER_ID
The ID of the custom resolver. Required.
SECONDARY_ZONE_ID
The ID of the secondary zone. Required.
--transfer-from value
The source addresses of the secondary zone.
--description value
The description of the secondary zone.
--enabled value
Whether the secondary zone is enabled.
-i, --instance value
Instance name or ID. If not set, the context instance specified by ibmcloud dns instance-target INSTANCE is used.
--output value
Specify output format. Currently, json is the only supported format.

Examples

Update a secondary zone e2aba136a93212e5a8dce0c2dbf6f2ee for custom resolver f1aba936b94213e5b8dca0c0dbf1f9cc.

ibmcloud dns secondary-zone-update f1aba936b94213e5b8dca0c0dbf1f9cc e2aba136a93212e5a8dce0c2dbf6f2ee --transfer-from 169.13.12.10:53 -i "dns-demo"

ibmcloud dns secondary-zone

Get the details of a secondary zone.

ibmcloud dns secondary-zone RESOLVER_ID SECONDARY_ZONE_ID [-i, --instance INSTANCE_NAME] [--output FORMAT]

Command options

RESOLVER_ID
The ID of the custom resolver. Required.
SECONDARY_ZONE_ID
The ID of the secondary zone. Required.
-i, --instance value
Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.
--output value
Specify output format. Currently, json is the only supported format.

Examples

Get a secondary zone e2aba136a93212e5a8dce0c2dbf6f2ee for custom resolver f1aba936b94213e5b8dca0c0dbf1f9cc.

ibmcloud dns secondary-zone f1aba936b94213e5b8dca0c0dbf1f9cc e2aba136a93212e5a8dce0c2dbf6f2ee -i "dns-demo"

ibmcloud dns secondary-zones

List all secondary zones.

ibmcloud dns secondary-zones RESOLVER_ID [-i, --instance INSTANCE_NAME] [--output FORMAT]

Command options

RESOLVER_ID
The ID of the custom resolver. Required.
-i, --instance value
Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.
--output value
Specify output format. Currently, json is the only supported format.

Examples

List all secondary zones for a custom resolver f1aba936b94213e5b8dca0c0dbf1f9cc.

ibmcloud dns secondary-zones f1aba936b94213e5b8dca0c0dbf1f9cc -i "dns-demo"

ibmcloud dns secondary-zone-delete

Delete a secondary zone.

ibmcloud dns secondary-zone-delete RESOLVER_ID SECONDARY_ZONE_ID [-i, --instance INSTANCE_NAME] [--output FORMAT]

Command options

RESOLVER_ID
The ID of the custom resolver. Required.
SECONDARY_ZONE_ID
The ID of the secondary zone. Required.
-i, --instance value
Instance name or ID. If not set, the context instance specified by dns instance-target INSTANCE is used.
--output value
Specify output format. Currently, json is the only supported format.

Examples

Delete a secondary zone e2aba136a93212e5a8dce0c2dbf6f2ee for a custom resolver f1aba936b94213e5b8dca0c0dbf1f9cc.

ibmcloud dns secondary-zone-delete f1aba936b94213e5b8dca0c0dbf1f9cc e2aba136a93212e5a8dce0c2dbf6f2ee -i "dns-demo"

Cross-account access

Manage cross accounts by using the following cross-account access commands.

ibmcloud dns cross-account linked-zone-create

Create a linked zone.

ibmcloud dns cross-account linked-zone-create --owner-instance-id OWNER_INSTANCE_ID --owner-zone-id OWNER_ZONE_ID [--label LABEL] [--description DESCRIPTION] [-i, --instance INSTANCE] [--output FORMAT]

Command options

--owner-instance-id value
The ID of the owner's instance.
--owner-zone-id value
The ID of the owner's zone.
--label value
The label of the linked zone.
--description value
The description of the linked zone.
-i, --instance value
Instance name or ID. If not set, the context instance specified by ibmcloud dns instance-target INSTANCE is used.
--output value
Specify output format. Currently, json is the only supported format.

Examples

ibmcloud dns cross-account linked-zone-create --owner-instance-id abe30019-1c08-42dc-9ad9-a0682af70054 --owner-zone-id 05855abe-3908-4cdc-bf0d-063e0b1c296d --description "linked zone example" --label "dev" -i "dns-demo"

ibmcloud dns cross-account linked-zone-update

Update a linked zone.

ibmcloud dns cross-account linked-zone-update LINKED_ZONE_ID [--label LABEL] [--description DESCRIPTION] [-i, --instance INSTANCE] [--output FORMAT]

Command options

LINKED_ZONE_ID
The ID of the linked zone.
--label value
The label of the linked zone.
--description value
The description of the linked zone.
-i, --instance value
Instance name or ID. If not set, the context instance specified by ibmcloud dns instance-target INSTANCE is used.
--output value
Specify output format. Currently, json is the only supported format.

Examples

ibmcloud dns cross-account linked-zone-update 5365b73c-ce6f-4d6f-ad9f-d9c131b26370 --description "linked zone example" --label "dev" -i "dns-demo"

ibmcloud dns cross-account linked-zones

List all linked zones.

ibmcloud dns cross-account linked-zones [-i, --instance INSTANCE] [--output FORMAT]

Command options

-i, --instance value
Instance name or ID. If not set, the context instance specified by ibmcloud dns instance-target INSTANCE is used.
--output value
Specify output format. Currently, json is the only supported format.

Examples

ibmcloud dns cross-account linked-zones -i "dns-demo"

ibmcloud dns cross-account linked-zone

Get details of the linked zone.

ibmcloud dns cross-account linked-zone LINKED_ZONE_ID [-i, --instance INSTANCE] [--output FORMAT]

Command options

LINKED_ZONE_ID
The ID of the linked zone.
-i, --instance value
Instance name or ID. If not set, the context instance specified by ibmcloud dns instance-target INSTANCE is used.
--output value
Specify output format. Currently, json is the only supported format.

Examples

ibmcloud dns cross-account linked-zone 5365b73c-ce6f-4d6f-ad9f-d9c131b26370 -i "dns-demo"

ibmcloud dns cross-account linked-zone-delete

Delete a linked zone.

ibmcloud dns cross-account linked-zone-delete LINKED_ZONE_ID [-i, --instance INSTANCE] [--output FORMAT]

Command options

LINKED_ZONE_ID
The ID of the linked zone.
-i, --instance value
Instance name or ID. If not set, the context instance specified by ibmcloud dns instance-target INSTANCE is used.
--output value
Specify output format. Currently, json is the only supported format.

Examples

ibmcloud dns cross-account linked-zone-delete 5365b73c-ce6f-4d6f-ad9f-d9c131b26370 -i "dns-demo"

ibmcloud dns cross-account linked-zone-permitted-network-add

Create a permitted network for a linked zone

   ibmcloud dns cross-account linked-zone-permitted-network-add LINKED_ZONE_ID --vpc-crn VPC_CRN [--type TYPE] [-i, --instance INSTANCE] [--output FORMAT]

Command options

LINKED_ZONE_ID
The ID of the linked zone.
--type value
The permitted network type. Valid values: vpc.
--vpc-crn value
The CRN of VPC instance.
-i, --instance value
Instance name or ID. If not set, the context instance specified by ibmcloud dns instance-target is used.
--output value
Specify output format. Currently, json is the only supported format.

Examples

ibmcloud dns cross-account linked-zone-permitted-network-add 5365b73c-ce6f-4d6f-ad9f-d9c131b26370 --vpc-crn  "crn:v1:bluemix:public:is:eu-de:a/bcf1865e99742d38d2d5fc3fb80a5496::vpc:6e6cc326-04d1-4c99-a289-efb3ae4193d6" --i "dns-demo"

ibmcloud dns cross-account linked-zone-permitted-network

Get a permitted network for a linked zone

   ibmcloud dns cross-account linked-zone-permitted-network LINKED_ZONE_ID PERMITTED_NETWORK_ID [-i, --instance INSTANCE] [--output FORMAT]

Command options

LINKED_ZONE_ID
The ID of the linked zone.
PERMITTED_NETWORK_ID
The ID of the permitted network.
-i, --instance value
Instance name or ID. If not set, the context instance specified by ibmcloud dns instance-target is used.
--output value
Specify output format. Currently, json is the only supported format.

Examples

ibmcloud dns cross-account linked-zone-permitted-network 5365b73c-ce6f-4d6f-ad9f-d9c131b26370 6e6cc326-04d1-4c99-a289-efb3ae4193d6  --i "dns-demo"

ibmcloud dns cross-account linked-zone-permitted-network-remove

Remove a permitted network for a linked zone

   ibmcloud dns cross-account linked-zone-permitted-network-remove LINKED_ZONE_ID PERMITTED_NETWORK_ID [-i, --instance INSTANCE] [--output FORMAT]

Command options

LINKED_ZONE_ID
The ID of the linked zone.
PERMITTED_NETWORK_ID
The ID of the permitted network.
-i, --instance value
Instance name or ID. If not set, the context instance specified by ibmcloud dns instance-target is used.
--output value
Specify output format. Currently, json is the only supported format.

Examples

ibmcloud dns cross-account linked-zone-permitted-network-remove 5365b73c-ce6f-4d6f-ad9f-d9c131b26370 6e6cc326-04d1-4c99-a289-efb3ae4193d6  --i "dns-demo"

ibmcloud dns cross-account linked-zone-permitted-networks

List the permitted networks for a linked zone

   ibmcloud dns cross-account linked-zone-permitted-networks LINKED_ZONE_ID [-i, --instance INSTANCE] [--output FORMAT]

Command options

LINKED_ZONE_ID
The ID of the linked zone.
-i, --instance value
Instance name or ID. If not set, the context instance specified by ibmcloud dns instance-target is used.
--output value
Specify output format. Currently, json is the only supported format.

Examples

ibmcloud dns cross-account linked-zone-permitted-networks 5365b73c-ce6f-4d6f-ad9f-d9c131b26370 --i "dns-demo"

ibmcloud dns cross-account access-request-update

Update the state of an access request.

   ibmcloud dns cross-account access-request-update ZONE_ID REQUEST_ID --action ACTION [-i, --instance INSTANCE] [--output FORMAT]

Command options

ZONE_ID
The ID of the owner's zone.
REQUEST_ID
The ID of the access request.
--action value
The action applies to the access request. Valid values: "APPROVE", "REJECT", "REVOKE".
-i, --instance value
Instance name or ID. If not set, the context instance specified by ibmcloud dns instance-target is used.
--output value
Specify output format. Currently, json is the only supported format.

Examples

ibmcloud dns cross-account access-request-update 05855abe-3908-4cdc-bf0d-063e0b1c296d 9a234ede-c2b6-4c39-bc27-d39ec139ecdb --action "APPROVE" --i "dns-demo"

ibmcloud dns cross-account access-request

Get details of an access request.

   ibmcloud dns cross-account access-request ZONE_ID REQUEST_ID [-i, --instance INSTANCE] [--output FORMAT]

Command options

ZONE_ID
The ID of the owner's zone.
REQUEST_ID
The ID of the access request.
-i, --instance value
Instance name or ID. If not set, the context instance specified by ibmcloud dns instance-target is used.
--output value
Specify output format. Currently, json is the only supported format.

Examples

ibmcloud dns cross-account access-request 05855abe-3908-4cdc-bf0d-063e0b1c296d 9a234ede-c2b6-4c39-bc27-d39ec139ecdb --i "dns-demo"

ibmcloud dns cross-account access-requests

List access requests in the owner's instance.

   ibmcloud dns cross-account access-requests ZONE_ID [-i, --instance INSTANCE] [--output FORMAT]

Command options

ZONE_ID
The ID of the owner's zone.
-i, --instance value
Instance name or ID. If not set, the context instance specified by ibmcloud dns instance-target is used.
--output value
Specify output format. Currently, json is the only supported format.

Examples

ibmcloud dns cross-account access-requests 05855abe-3908-4cdc-bf0d-063e0b1c296d --i "dns-demo"