IBM Cloud Docs
Deleting a secondary zone

Deleting a secondary zone

Delete a secondary zone by using the UI, CLI, or API.

Deleting a secondary zone in the console

To delete a secondary zone using the UI, take the following steps:

  1. Navigate to the Custom resolver section of your DNS Services instance, and select the custom resolver from which you want to delete a secondary zone.
  2. In the Custom resolver details page, select the Secondary zone tab.
  3. Select the overflow menu icon overflow menu icon secondary zone that you want to delete, then select Delete.
  4. Click Delete in the confirmation dialog box, or click Cancel to stop the deletion.

Deleting a secondary zone from the CLI

To delete a secondary zone using the CLI, run the following command:

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

Where:

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

Deleting a secondary zone with the API

To delete a secondary zone using the API, follow these steps:

  1. Set up your API environment with the correct variables.
  2. Store the following values in variables to be used in the API command:
    • INSTANCE_ID, which is the unique identifier of a service instance.
    • RESOLVER_ID, which is the unique identifier of a custom resolver.
    • SECONDARY_ZONE_ID is the unique identifier of a secondary zone.
    • X-Correlation-ID (optional), which uniquely identifies a request.
  3. When all variables are initiated, delete a secondary zone:
curl -X DELETE   https://api.dns-svcs.cloud.ibm.com/v1/instances/2be5d4a7-78f0-4c62-a957-41dc15342777/custom_resolvers/ddbe7a53-7971-46dc-b021-420335c31562/secondary_zones/f97ef698-d5fa-4f91-bc5a-33f17d143b7d   -H 'Authorization: Bearer xxxxxx'