IBM Cloud API Docs

Introduction to DNS Services API

IBM Cloud DNS Services allow you to:

  • Create zones that are collections for holding domain names
  • Create DNS resource records under these zones
  • Specify access controls used for the DNS resolution of resource records on a zone-wide level
  • Create global load balancers to resolve hostnames to different IP addresses based on location policies.

IBM Cloud DNS Services also maintains its own world-wide set of DNS resolvers. Computer machines provisioned under IBM Cloud on an IBM Cloud network can use resource records configured through IBM Cloud DNS Services by querying IBM Cloud DNS Services' resolvers.

Public endpoints are protected by Cloudflare. TLS termination occurs on the Cloudflare edges.

https://api.dns-svcs.cloud.ibm.com

The code examples on this tab use the DNS Services Go SDK.

Installation

go get -u github.com/IBM/networking-go-sdk

Endpoint URL

https://api.dns-svcs.cloud.ibm.com

GitHub

The code examples on this tab use the DNS Services Python SDK.

Installation

pip install --upgrade "ibm-cloud-networking-services"

Endpoint URL

https://api.dns-svcs.cloud.ibm.com/v1/

GitHub

The code examples on this tab use the DNS Services Java SDK.

Maven

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>dns-svcs</artifactId>
            <version>${project.version}</version>
        </dependency>

Gradle:

compile 'com.ibm.cloud:dns-svcs:X.X.X'

Endpoint URL

https://api.dns-svcs.cloud.ibm.com

GitHub

Error handling

This API uses standard HTTP response codes to indicate whether a method completed successfully. A 200 response always indicates success. A 400 type response is some sort of failure, and a 500 type response usually indicates an internal system error.

HTTP error code Description Recovery
200 Success The request was successful.
204 Success The resource was deleted successfully.
400 Bad Request The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all required parameters in your request.
401 Unauthorized You are not authorized to make this request.
404 Not Found The requested resource could not be found or the API route doesn't exist.
405 Method Not Allowed The HTTP method is not allowed on the API route.
500 Internal Server Error An internal error occurred, your request could not be processed at the moment. Wait a few minutes and try again.

Authentication

IBM Cloud Identity and Access Management (IAM) is the primary method to authenticate to the API.

Access to DNS Services instances for users in your account is controlled by IBM Cloud Identity and Access Management (IAM). Every user that accesses the DNS Services in your account must be assigned an access policy with an IAM role defined. Pass a bearer token in an authorization header. Tokens support authenticated requests without embedding service credentials in every call. For more information, see Managing access with IAM for DNS Services.

You can also access the service credentials from the Watson Assistant user interface (UI): If you cannot view the API details or the service credentials, you probably do not have Manager access to the service instance. Instead, you can create a personal API key using the IBM Cloud API keys page. For more information, see Managing user API keys.

To get the IAM access token, replace {apikey} with your service credentials.

curl -k -X POST   --header "Content-Type: application/x-www-form-urlencoded"   --header "Accept: application/json"   --data-urlencode "grant_type=urn:ibm:params:oauth:grant-type:apikey"   --data-urlencode "apikey={apikey}"   "https://iam.cloud.ibm.com/identity/token"

Use the obtained access token to make HTTP requests to DNS Services API.

SDK managing the IAM token. Replace {apikey} and {url}.

import (
  "github.com/IBM/go-sdk-core/v5/core"
  "github.com/IBM/networking-go-sdk/dnssvcsv1"
)

func main() {
  authenticator := &core.IamAuthenticator{
    ApiKey: "{apikey}",
  }

  options := &dnssvcsv1.DnsSvcsV1Options{
    Authenticator: authenticator,
  }

  service, err := dnssvcsv1.NewDnsSvcsV1(options)

  if err != nil {
    panic(err)
  }

  service.SetServiceURL("{url}")
}

SDK managing the IAM token. Replace {apikey} and {url}.

from ibm_cloud_networking_services import DnsSvcsV1
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator

authenticator = IAMAuthenticator('{apikey}')
dnssvc = DnsSvcsV1(
    authenticator=authenticator
)
dnssvc.set_service_url('{url}')

SDK managing the IAM token. Replace {apikey}, {version}, {serviceName} and {url}.

package com.ibm.cloud.networking.dns_svcs.v1;

import com.ibm.cloud.networking.dns_svcs.v1;

IamAuthenticator authenticator = new IamAuthenticator("{apikey}");
DnsSvcs dnsServiceProvider = new DnsSvcs("{version}", "{serviceName}",authenticator);

Methods

List DNS zones

List the DNS zones for a given service instance

List the DNS zones for a given service instance.

List the DNS zones for a given service instance.

List the DNS zones for a given service instance.

List the DNS zones for a given service instance.

GET /instances/{instance_id}/dnszones
list_dnszones(self,
        instance_id: str,
        *,
        x_correlation_id: str = None,
        offset: int = None,
        limit: int = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) ListDnszones(listDnszonesOptions *ListDnszonesOptions) (result *ListDnszones, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) ListDnszonesWithContext(ctx context.Context, listDnszonesOptions *ListDnszonesOptions) (result *ListDnszones, response *core.DetailedResponse, err error)
ServiceCall<ListDnszones> listDnszones(ListDnszonesOptions listDnszonesOptions)
listDnszones(params)

Request

Instantiate the ListDnszonesOptions struct and set the fields to provide parameter values for the ListDnszones method.

Use the ListDnszonesOptions.Builder to create a ListDnszonesOptions object that contains the parameter values for the listDnszones method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

Query Parameters

  • Specify how many resources to skip over, the default value is 0.

  • Specify maximum resources might be returned.

    Possible values: 1 ≤ value ≤ 1000

    Default: 200

    Example: 200

  • Specify the VPC ID

parameters

  • The unique identifier of a service instance.

  • Uniquely identifying a request.

  • Specify how many resource records to skip over, the default value is 0.

  • Specify how many resource records are returned, the default value is 200.

    Possible values: 1 ≤ value ≤ 1000

    Examples:
    value
    _source
    _lines
    _html

WithContext method only

The ListDnszones options.

The listDnszones options.

parameters

  • The unique identifier of a service instance.

  • Uniquely identifying a request.

  • Specify how many resource records to skip over, the default value is 0.

  • Specify how many resource records are returned, the default value is 200.

    Possible values: 1 ≤ value ≤ 1000

    Examples:
    value
    _source
    _lines
    _html
  • curl -X GET   https://api.dns-svcs.cloud.ibm.com/v1/instances/1407a753-a93f-4bb0-9784-bcfc269ee1b3/dnszones   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'
    
  • listDnszoneOptions := service.NewListDnszonesOptions(
    	"d5d53a57-212e-48f8-86d0-9082140de0ac")
    result, response, reqErr := service.ListDnszones(listDnszoneOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Println("DNS Zones count: ", *result.TotalCount)
    fmt.Println("Response: ", response)
  • response = dnssvc.list_dnszones(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85")
    print(response)
  •     try {
          ListDnszonesOptions listDnszonesOptions = new ListDnszonesOptions.Builder()
          .instanceId("d633130b-fed5-469c-b67f-aefe4045fde6")
          .xCorrelationId("testString")
          .offset(Long.valueOf("26"))
          .limit(Long.valueOf("200"))
          .build();
    
          // Invoke operation
          Response<ListDnszones> response = service.listDnszones(listDnszonesOptions).execute();
    
          ListDnszones listDnszonesResult = response.getResult();
    
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    
  • const DNSSvcsApisV1 = require('ibm-networking-services/dns-svcs/v1');
    const { IamAuthenticator } = require('ibm-cloud-sdk-core');
    
    const options = {
        authenticator: new IamAuthenticator({
            apikey: ${DNS_SVCS_APIKEY},
            url: ${DNS_SVCS_AUTH_URL},
        }),
        crn: ${DNS_SVCS_CUSTOMER_LOCATION_SUBNET_CRN},
        serviceUrl: ${DNS_SVCS_URL},
        version: ${DNS_SERVICES_API_VERSION},
    };
    
    const dnsSvcsApisV1  = new DNSSvcsApisV1(options);
    
    const params = {
         instanceId: ${DNS_SVCS_INSTANCE_ID},
    };
    dnsSvcsApisV1.listDnszones(params)
      .then(response => {
        const dnsZones = response.result;
        console.log(dnsZones);
      })
      .catch(err => {
        console.log('error:', err);
      });

Response

List DNS zones response

List DNS zones response.

List DNS zones response.

List DNS zones response.

List DNS zones response.

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Create DNS zone

Create a DNS zone for a given service instance

Create a DNS zone for a given service instance.

Create a DNS zone for a given service instance.

Create a DNS zone for a given service instance.

Create a DNS zone for a given service instance.

POST /instances/{instance_id}/dnszones
create_dnszone(self,
        instance_id: str,
        *,
        name: str = None,
        description: str = None,
        label: str = None,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) CreateDnszone(createDnszoneOptions *CreateDnszoneOptions) (result *Dnszone, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) CreateDnszoneWithContext(ctx context.Context, createDnszoneOptions *CreateDnszoneOptions) (result *Dnszone, response *core.DetailedResponse, err error)
ServiceCall<Dnszone> createDnszone(CreateDnszoneOptions createDnszoneOptions)
createDnszone(params)

Request

Instantiate the CreateDnszoneOptions struct and set the fields to provide parameter values for the CreateDnszone method.

Use the CreateDnszoneOptions.Builder to create a CreateDnszoneOptions object that contains the parameter values for the createDnszone method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

Create a DNS zone.

parameters

  • The unique identifier of a service instance.

  • Name of DNS zone.

    Possible values: 1 ≤ length ≤ 255

    Examples:
    value
    _source
    _lines
    _html
  • The text describing the purpose of a DNS zone.

    Possible values: 1 ≤ length ≤ 255

    Examples:
    value
    _source
    _lines
    _html
  • The label of a DNS zone.

    Possible values: 1 ≤ length ≤ 64

    Examples:
    value
    _source
    _lines
    _html
  • Uniquely identifying a request.

WithContext method only

The CreateDnszone options.

The createDnszone options.

parameters

  • The unique identifier of a service instance.

  • Name of DNS zone.

    Possible values: 1 ≤ length ≤ 255

    Examples:
    value
    _source
    _lines
    _html
  • The text describing the purpose of a DNS zone.

    Possible values: 1 ≤ length ≤ 255

    Examples:
    value
    _source
    _lines
    _html
  • The label of a DNS zone.

    Possible values: 1 ≤ length ≤ 64

    Examples:
    value
    _source
    _lines
    _html
  • Uniquely identifying a request.

  • curl -X POST   https://api.dns-svcs.cloud.ibm.com/v1/instances/1407a753-a93f-4bb0-9784-bcfc269ee1b3/dnszones   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'   -d '{
    	  "name": "example.com",
    	  "description": "The DNS zone is used for VPCs in us-east region",
    	  "label": "us-east"
    }'
    
  • createDnszoneOptions := service.NewCreateDnszoneOptions("d5d53a57-212e-48f8-86d0-9082140de0ac")
    createDnszoneOptions.SetName("example.com")
    createDnszoneOptions.SetDescription("description")
    createDnszoneOptions.SetLabel("DNS-Zones")
    result, response, reqErr := service.CreateDnszone(createDnszoneOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("ID : %s", *result.ID)
    fmt.Printf("Response: %s", response)
  • response = dnssvc.create_dnszone(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
        name="example.com", label="DNS-Zones")
    print(response)
  •     try {
          CreateDnszoneOptions createDnszoneOptions = new CreateDnszoneOptions.Builder()
          .instanceId(instance_id)
          .name("test-java-dns.com")
          .description("Java SDK testing")
          .label("us-east")
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<Dnszone> response = service.createDnszone(createDnszoneOptions).execute();
    
          Dnszone dnszoneResult = response.getResult();
          zone_id = dnszoneResult.getId();
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
  • . . .
    
    const params = {
        name: "example.com",
        instanceId: ${DNS_SVCS_INSTANCE_ID},
    };
    
    dnsSvcsApisV1.createDnszone(params)
      .then(response => {
        const dnsZone = response.result;
        console.log(dnsZone);
      })
      .catch(err => {
        console.log('error:', err);
      });

Response

DNS zone details

DNS zone details.

DNS zone details.

DNS zone details.

DNS zone details.

Status Code

  • DNS zone created successfully.

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Delete DNS zone

Delete a DNS zone

Delete a DNS zone.

Delete a DNS zone.

Delete a DNS zone.

Delete a DNS zone.

DELETE /instances/{instance_id}/dnszones/{dnszone_id}
delete_dnszone(self,
        instance_id: str,
        dnszone_id: str,
        *,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) DeleteDnszone(deleteDnszoneOptions *DeleteDnszoneOptions) (response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) DeleteDnszoneWithContext(ctx context.Context, deleteDnszoneOptions *DeleteDnszoneOptions) (response *core.DetailedResponse, err error)
ServiceCall<Void> deleteDnszone(DeleteDnszoneOptions deleteDnszoneOptions)
deleteDnszone(params)

Request

Instantiate the DeleteDnszoneOptions struct and set the fields to provide parameter values for the DeleteDnszone method.

Use the DeleteDnszoneOptions.Builder to create a DeleteDnszoneOptions object that contains the parameter values for the deleteDnszone method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a DNS zone

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • Uniquely identifying a request.

WithContext method only

The DeleteDnszone options.

The deleteDnszone options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • Uniquely identifying a request.

  • curl -X DELETE   https://api.dns-svcs.cloud.ibm.com/v1/instances/2be5d4a7-78f0-4c62-a957-41dc15342777/dnszones/c775e22a-5db5-4614-9c7e-27db0c8dbc13   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'
    
  • deleteDnszoneOptions := service.NewDeleteDnszoneOptions(
    	"5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    	"c775e22a-5db5-4614-9c7e-27db0c8dbc13")
    response, reqErr := service.DeleteDnszone(deleteDnszoneOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("Response: %s", response)
  • response = dnssvc.delete_dnszone(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
        dnszone_id="c775e22a-5db5-4614-9c7e-27db0c8dbc13")
    print(response)
  •     try {
          DeleteDnszoneOptions deleteDnszoneOptions = new DeleteDnszoneOptions.Builder()
          .instanceId(instance_id)
          .dnszoneId(zone_id)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<Void> response = service.deleteDnszone(deleteDnszoneOptions).execute();
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
  • . . .
    
    const params = {
        dnszoneId: ${DnsZoneId},
        instanceId: ${DNS_SVCS_INSTANCE_ID},
    };
    
    dnsSvcsApisV1.deleteDnszone(params)
      .then(response => {
        const deletedDnsZone = response.result;
        console.log(deletedDnsZone);
      })
      .catch(err => {
        console.log('error:', err);
      });

Response

Status Code

  • The DNS zone was deleted successfully

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Get DNS zone

Get details of a DNS zone

Get details of a DNS zone.

Get details of a DNS zone.

Get details of a DNS zone.

Get details of a DNS zone.

GET /instances/{instance_id}/dnszones/{dnszone_id}
get_dnszone(self,
        instance_id: str,
        dnszone_id: str,
        *,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) GetDnszone(getDnszoneOptions *GetDnszoneOptions) (result *Dnszone, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) GetDnszoneWithContext(ctx context.Context, getDnszoneOptions *GetDnszoneOptions) (result *Dnszone, response *core.DetailedResponse, err error)
ServiceCall<Dnszone> getDnszone(GetDnszoneOptions getDnszoneOptions)
getDnszone(params)

Request

Instantiate the GetDnszoneOptions struct and set the fields to provide parameter values for the GetDnszone method.

Use the GetDnszoneOptions.Builder to create a GetDnszoneOptions object that contains the parameter values for the getDnszone method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a DNS zone

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • Uniquely identifying a request.

WithContext method only

The GetDnszone options.

The getDnszone options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • Uniquely identifying a request.

  • curl -X GET   https://api.dns-svcs.cloud.ibm.com/v1/instances/1407a753-a93f-4bb0-9784-bcfc269ee1b3/dnszones/2d0f862b-67cc-41f3-b6a2-59860d0aa90e   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'
    
  • getDnszoneOptions := service.NewGetDnszoneOptions(
    	"5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    	"c775e22a-5db5-4614-9c7e-27db0c8dbc13")
    result, response, reqErr := service.GetDnszone(getDnszoneOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("ID: %s", *result.ID)
    fmt.Printf("Response: %s", response)
  • response = dnssvc.get_dnszone(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
        dnszone_id="c775e22a-5db5-4614-9c7e-27db0c8dbc13")
    print(response)
  •     try {
          GetDnszoneOptions getDnszoneOptions = new GetDnszoneOptions.Builder()
          .instanceId(instance_id)
          .dnszoneId(zone_id)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<Dnszone> response = service.getDnszone(getDnszoneOptions).execute();
    
          Dnszone dnszoneResult = response.getResult();
    
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    
  • . . .
    
    const params = {
        dnszoneId: ${DnsZoneId},
        instanceId: ${DNS_SVCS_INSTANCE_ID},
    };
    
    dnsSvcsApisV1.getDnszone(params)
      .then(response => {
        const dnsZone = response.result;
        console.log(dnsZone);
      })
      .catch(err => {
        console.log('error:', err);
      });

Response

DNS zone details

DNS zone details.

DNS zone details.

DNS zone details.

DNS zone details.

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Update DNS zone

Update the properties of a DNS zone.

Update the properties of a DNS zone.

Update the properties of a DNS zone.

Update the properties of a DNS zone.

Update the properties of a DNS zone.

PATCH /instances/{instance_id}/dnszones/{dnszone_id}
update_dnszone(self,
        instance_id: str,
        dnszone_id: str,
        *,
        description: str = None,
        label: str = None,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) UpdateDnszone(updateDnszoneOptions *UpdateDnszoneOptions) (result *Dnszone, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) UpdateDnszoneWithContext(ctx context.Context, updateDnszoneOptions *UpdateDnszoneOptions) (result *Dnszone, response *core.DetailedResponse, err error)
ServiceCall<Dnszone> updateDnszone(UpdateDnszoneOptions updateDnszoneOptions)
updateDnszone(params)

Request

Instantiate the UpdateDnszoneOptions struct and set the fields to provide parameter values for the UpdateDnszone method.

Use the UpdateDnszoneOptions.Builder to create a UpdateDnszoneOptions object that contains the parameter values for the updateDnszone method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a DNS zone

Update a dnszone's properties.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • The text describing the purpose of a DNS zone.

    Possible values: 1 ≤ length ≤ 255

    Examples:
    value
    _source
    _lines
    _html
  • The label of a DNS zone.

    Possible values: 1 ≤ length ≤ 64

    Examples:
    value
    _source
    _lines
    _html
  • Uniquely identifying a request.

WithContext method only

The UpdateDnszone options.

The updateDnszone options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • The text describing the purpose of a DNS zone.

    Possible values: 1 ≤ length ≤ 255

    Examples:
    value
    _source
    _lines
    _html
  • The label of a DNS zone.

    Possible values: 1 ≤ length ≤ 64

    Examples:
    value
    _source
    _lines
    _html
  • Uniquely identifying a request.

  • curl -X PATCH   https://api.dns-svcs.cloud.ibm.com/v1/instances/1407a753-a93f-4bb0-9784-bcfc269ee1b3/dnszones/2d0f862b-67cc-41f3-b6a2-59860d0aa90e   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'   -d '{
    	  "description": "The DNS zone is used for VPCs in us-east region",
    	  "label": "us-east"
    }'
    
  • updateDnszoneOptions := service.NewUpdateDnszoneOptions(
    	"5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    	"c775e22a-5db5-4614-9c7e-27db0c8dbc13")
    updateDnszoneOptions.SetDescription("description update")
    updateDnszoneOptions.SetLabel("DNS-Zones")
    result, response, reqErr := service.UpdateDnszone(updateDnszoneOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("ID : %s", *result.ID)
    fmt.Printf("Response: %s", response)
    
  • response = dnssvc.get_dnszone(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
        dnszone_id="c775e22a-5db5-4614-9c7e-27db0c8dbc13",
        description="description update", label="DNS-Zones")
    print(response)
  •     try {
          UpdateDnszoneOptions updateDnszoneOptions = new UpdateDnszoneOptions.Builder()
          .instanceId(instance_id)
          .dnszoneId(zone_id)
          .description("us-east update check")
          .label("us-east")
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<Dnszone> response = service.updateDnszone(updateDnszoneOptions).execute();
    
          Dnszone dnszoneResult = response.getResult();
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    
  • . . .
    
    const params = {
        description: 'The DNS zone is used for VPCs in us-east region',
        dnszoneId: ${DnsZoneId},
        instanceId: ${DNS_SVCS_INSTANCE_ID},
    };
    
    dnsSvcsApisV1.updateDnszone(params)
      .then(response => {
        const updatedDnsZone = response.result;
        console.log(updatedDnsZone);
      })
      .catch(err => {
        console.log('error:', err);
      });

Response

DNS zone details

DNS zone details.

DNS zone details.

DNS zone details.

DNS zone details.

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

List resource records

List the Resource Records for a given DNS zone

List the Resource Records for a given DNS zone.

List the Resource Records for a given DNS zone.

List the Resource Records for a given DNS zone.

List the Resource Records for a given DNS zone.

GET /instances/{instance_id}/dnszones/{dnszone_id}/resource_records
list_resource_records(self,
        instance_id: str,
        dnszone_id: str,
        *,
        x_correlation_id: str = None,
        offset: int = None,
        limit: int = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) ListResourceRecords(listResourceRecordsOptions *ListResourceRecordsOptions) (result *ListResourceRecords, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) ListResourceRecordsWithContext(ctx context.Context, listResourceRecordsOptions *ListResourceRecordsOptions) (result *ListResourceRecords, response *core.DetailedResponse, err error)
ServiceCall<ListResourceRecords> listResourceRecords(ListResourceRecordsOptions listResourceRecordsOptions)
listResourceRecords(params)

Request

Instantiate the ListResourceRecordsOptions struct and set the fields to provide parameter values for the ListResourceRecords method.

Use the ListResourceRecordsOptions.Builder to create a ListResourceRecordsOptions object that contains the parameter values for the listResourceRecords method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a DNS zone

Query Parameters

  • Specify how many resources to skip over, the default value is 0.

  • Specify maximum resources might be returned.

    Possible values: 1 ≤ value ≤ 1000

    Default: 200

    Example: 200

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • Uniquely identifying a request.

  • Specify how many resource records to skip over, the default value is 0.

  • Specify how many resource records are returned, the default value is 200.

    Possible values: 1 ≤ value ≤ 1000

    Examples:
    value
    _source
    _lines
    _html

WithContext method only

The ListResourceRecords options.

The listResourceRecords options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • Uniquely identifying a request.

  • Specify how many resource records to skip over, the default value is 0.

  • Specify how many resource records are returned, the default value is 200.

    Possible values: 1 ≤ value ≤ 1000

    Examples:
    value
    _source
    _lines
    _html
  • curl -X GET   https://api.dns-svcs.cloud.ibm.com/v1/instances/5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85/dnszones/3f84b5dc-8c00-463f-a088-9b4e005ebb84/resource_records?offset=0&limit=200   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'
    
  • listRecordsOptions := service.NewListResourceRecordsOptions(
    	"5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    	"c775e22a-5db5-4614-9c7e-27db0c8dbc13")
    result, response, reqErr := service.ListResourceRecords(listRecordsOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("DNS Records count: %d", *result.TotalCount)
    fmt.Printf("Response: %s", response)
  • response = dnssvc.list_resource_records(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
        dnszone_id="c775e22a-5db5-4614-9c7e-27db0c8dbc13")
    print(response)
  •     try {
          ListResourceRecordsOptions listResourceRecordsOptions = new ListResourceRecordsOptions.Builder()
          .instanceId(instance_id)
          .dnszoneId(zone_id)
          .xCorrelationId("testString")
          .offset(Long.valueOf("26"))
          .limit(Long.valueOf("200"))
          .build();
    
          // Invoke operation
          Response<ListResourceRecords> response = service.listResourceRecords(listResourceRecordsOptions).execute();
    
          ListResourceRecords listResourceRecordsResult = response.getResult();
    
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    
  • . . .
    
    const params = {
        dnszoneId: ${DnsZoneId},
        instanceId: ${DNS_SVCS_INSTANCE_ID},
    };
    
    dnsSvcsApisV1.listResourceRecords(params)
      .then(response => {
        const resourceRecords = response.result.resource_records;
        console.log(resourceRecords);
      })
      .catch(err => {
        console.log('error:', err);
      });

Response

List Resource Records response

List Resource Records response.

List Resource Records response.

List Resource Records response.

List Resource Records response.

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Create resource record

Create a resource record for a given DNS zone

Create a resource record for a given DNS zone.

Create a resource record for a given DNS zone.

Create a resource record for a given DNS zone.

Create a resource record for a given DNS zone.

POST /instances/{instance_id}/dnszones/{dnszone_id}/resource_records
create_resource_record(self,
        instance_id: str,
        dnszone_id: str,
        *,
        type: str = None,
        name: str = None,
        rdata: 'ResourceRecordInputRdata' = None,
        ttl: int = None,
        service: str = None,
        protocol: str = None,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) CreateResourceRecord(createResourceRecordOptions *CreateResourceRecordOptions) (result *ResourceRecord, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) CreateResourceRecordWithContext(ctx context.Context, createResourceRecordOptions *CreateResourceRecordOptions) (result *ResourceRecord, response *core.DetailedResponse, err error)
ServiceCall<ResourceRecord> createResourceRecord(CreateResourceRecordOptions createResourceRecordOptions)
createResourceRecord(params)

Request

Instantiate the CreateResourceRecordOptions struct and set the fields to provide parameter values for the CreateResourceRecord method.

Use the CreateResourceRecordOptions.Builder to create a CreateResourceRecordOptions object that contains the parameter values for the createResourceRecord method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a DNS zone

Create a resource record.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • Type of the resource record.

    Allowable values: [A,AAAA,CNAME,MX,SRV,TXT,PTR]

    Examples:
    value
    _source
    _lines
    _html
  • Name of the resource record.

    Examples:
    value
    _source
    _lines
    _html
  • The content of type-A resource record.

  • Time to live in second.

    Examples:
    value
    _source
    _lines
    _html
  • Only used for SRV record.

    Examples:
    value
    _source
    _lines
    _html
  • Only used for SRV record.

    Examples:
    value
    _source
    _lines
    _html
  • Uniquely identifying a request.

WithContext method only

The CreateResourceRecord options.

The createResourceRecord options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • Type of the resource record.

    Allowable values: [A,AAAA,CNAME,MX,SRV,TXT,PTR]

    Examples:
    value
    _source
    _lines
    _html
  • Name of the resource record.

    Examples:
    value
    _source
    _lines
    _html
  • The content of type-A resource record.

  • Time to live in second.

    Examples:
    value
    _source
    _lines
    _html
  • Only used for SRV record.

    Examples:
    value
    _source
    _lines
    _html
  • Only used for SRV record.

    Examples:
    value
    _source
    _lines
    _html
  • Uniquely identifying a request.

  • curl -X POST   https://api.dns-svcs.cloud.ibm.com/v1/instances/5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85/dnszones/3f84b5dc-8c00-463f-a088-9b4e005ebb84/resource_records   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'   -d '{
    	  "rdata": {
          "priority": 100,
          "weight": 100,
          "port": 8000,
          "target": "siphost.com"
        },
        "type": "SRV",
        "name": "test.example.com",
        "ttl": 120,
        "service": "_sip",
        "protocol": "udp"
    }'
    
  • createRecordOptions := service.NewCreateResourceRecordOptions(
    	"5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    	"c775e22a-5db5-4614-9c7e-27db0c8dbc13")
    rdataSrvRecord, err := service.NewResourceRecordInputRdataRdataSrvRecord(
    	1, 1, "siphost.com", 1)
    if err != nil {
    	panic(err)
    }
    createRecordOptions.SetRdata(rdataSrvRecord)
    createRecordOptions.SetTTL(120)
    createRecordOptions.SetName("test.example.com")
    createRecordOptions.SetType("SRV")
    createRecordOptions.SetProtocol("udp")
    createRecordOptions.SetService("_sip")
    result, response, reqErr := service.CreateResourceRecord(createRecordOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("ID: %s", *result.ID)
    fmt.Printf("Response: %s", response)
  • response = dnssvc.create_resource_record(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
        dnszone_id="c775e22a-5db5-4614-9c7e-27db0c8dbc13",
        type="AAAA",
        ttl=60,
        name="test.example.com",
        rdata={
            'ip': '2002::1'
        })
    print(response)
  •     try {
          ResourceRecordInputRdataRdataARecord resourceRecordInputRdataModel = new ResourceRecordInputRdataRdataARecord.Builder()
          .ip("10.110.201.214")
          .build();
    
          CreateResourceRecordOptions createResourceRecordOptions = new CreateResourceRecordOptions.Builder()
          .instanceId(instance_id)
          .dnszoneId(zone_id)
          .name("test.test.com")
          .type("A")
          .rdata(resourceRecordInputRdataModel)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<ResourceRecord> response = service.createResourceRecord(createResourceRecordOptions).execute();
    
          ResourceRecord resourceRecordResult = response.getResult();
    
          record_id = resourceRecordResult.getId();
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    
  • . . .
    
    const params = {
        dnszoneId: ${DnsZoneId},
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        'name': 'test.example.com',
        'type': 'SRV',
        'rdata': {
            'priority': 100,
            'weight': 100,
            'port': 8000,
            'target': 'siphost.com',
        },
        'ttl': 120,
        'service': '_sip',
        'protocol': 'udp',
    };
    
    dnsSvcsApisV1.createResourceRecord(params)
      .then(response => {
        const resourceRecord = response.result;
        console.log(resourceRecord);
      })
      .catch(err => {
        console.log('error:', err);
      });
    

Response

Resource record details

Resource record details.

Resource record details.

Resource record details.

Resource record details.

Status Code

  • Resource record created successfully.

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Delete resource record

Delete a resource record

Delete a resource record.

Delete a resource record.

Delete a resource record.

Delete a resource record.

DELETE /instances/{instance_id}/dnszones/{dnszone_id}/resource_records/{record_id}
delete_resource_record(self,
        instance_id: str,
        dnszone_id: str,
        record_id: str,
        *,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) DeleteResourceRecord(deleteResourceRecordOptions *DeleteResourceRecordOptions) (response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) DeleteResourceRecordWithContext(ctx context.Context, deleteResourceRecordOptions *DeleteResourceRecordOptions) (response *core.DetailedResponse, err error)
ServiceCall<Void> deleteResourceRecord(DeleteResourceRecordOptions deleteResourceRecordOptions)
deleteResourceRecord(params)

Request

Instantiate the DeleteResourceRecordOptions struct and set the fields to provide parameter values for the DeleteResourceRecord method.

Use the DeleteResourceRecordOptions.Builder to create a DeleteResourceRecordOptions object that contains the parameter values for the deleteResourceRecord method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a DNS zone

  • The unique identifier of a resource record

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • The unique identifier of a resource record.

  • Uniquely identifying a request.

WithContext method only

The DeleteResourceRecord options.

The deleteResourceRecord options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • The unique identifier of a resource record.

  • Uniquely identifying a request.

  • curl -X DELETE   https://api.dns-svcs.cloud.ibm.com/v1/instances/5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85/dnszones/3f84b5dc-8c00-463f-a088-9b4e005ebb84/resource_records/SRV:5365b73c-ce6f-4d6f-ad9f-d9c131b26370   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'
    
  • deleteRecordOptions := service.NewDeleteResourceRecordOptions(
    	"5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    	"c775e22a-5db5-4614-9c7e-27db0c8dbc13",
    	"5365b73c-ce6f-4d6f-ad9f-d9c131b26370")
    response, reqErr := service.DeleteResourceRecord(deleteRecordOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("Response: %s", response)
  • response = dnssvc.delete_resource_record(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
        dnszone_id="c775e22a-5db5-4614-9c7e-27db0c8dbc13",
        record_id="5365b73c-ce6f-4d6f-ad9f-d9c131b26370")
    print(response)
  •     try {
          DeleteResourceRecordOptions deleteResourceRecordOptions = new DeleteResourceRecordOptions.Builder()
          .instanceId(instance_id)
          .dnszoneId(zone_id)
          .recordId(record_id)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<Void> response = service.deleteResourceRecord(deleteResourceRecordOptions).execute();
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
  • . . .
    
    const params = {
        dnszoneId: ${DnsZoneId},
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        recordId: ${DnsResourceRecordId},
    };
    
    dnsSvcsApisV1.deleteResourceRecord(params)
      .then(response => {
        const deletedResourceRecord = response.result;
        console.log(deletedResourceRecord);
      })
      .catch(err => {
        console.log('error:', err);
      });
    

Response

Status Code

  • The resource record was deleted successfully

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Get resource record

Get details of a resource record

Get details of a resource record.

Get details of a resource record.

Get details of a resource record.

Get details of a resource record.

GET /instances/{instance_id}/dnszones/{dnszone_id}/resource_records/{record_id}
get_resource_record(self,
        instance_id: str,
        dnszone_id: str,
        record_id: str,
        *,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) GetResourceRecord(getResourceRecordOptions *GetResourceRecordOptions) (result *ResourceRecord, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) GetResourceRecordWithContext(ctx context.Context, getResourceRecordOptions *GetResourceRecordOptions) (result *ResourceRecord, response *core.DetailedResponse, err error)
ServiceCall<ResourceRecord> getResourceRecord(GetResourceRecordOptions getResourceRecordOptions)
getResourceRecord(params)

Request

Instantiate the GetResourceRecordOptions struct and set the fields to provide parameter values for the GetResourceRecord method.

Use the GetResourceRecordOptions.Builder to create a GetResourceRecordOptions object that contains the parameter values for the getResourceRecord method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a DNS zone

  • The unique identifier of a resource record

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • The unique identifier of a resource record.

  • Uniquely identifying a request.

WithContext method only

The GetResourceRecord options.

The getResourceRecord options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • The unique identifier of a resource record.

  • Uniquely identifying a request.

  • curl -X GET   https://api.dns-svcs.cloud.ibm.com/v1/instances/5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85/dnszones/3f84b5dc-8c00-463f-a088-9b4e005ebb84/resource_records/SRV:5365b73c-ce6f-4d6f-ad9f-d9c131b26370   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'
    
  • getRecordOptions := service.NewGetResourceRecordOptions(
    	"5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    	"c775e22a-5db5-4614-9c7e-27db0c8dbc13",
    	"SRV:5365b73c-ce6f-4d6f-ad9f-d9c131b26370")
    result, response, reqErr := service.GetResourceRecord(getRecordOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("ID: %s", *result.ID)
    fmt.Printf("Response: %s", response)
  • response = dnssvc.get_resource_record(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
        dnszone_id="c775e22a-5db5-4614-9c7e-27db0c8dbc13",
        record_id="5365b73c-ce6f-4d6f-ad9f-d9c131b26370")
    print(response)
  •    try {
          GetResourceRecordOptions getResourceRecordOptions = new GetResourceRecordOptions.Builder()
          .instanceId(instance_id)
          .dnszoneId(zone_id)
          .recordId(record_id)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<ResourceRecord> response = service.getResourceRecord(getResourceRecordOptions).execute();
    
          ResourceRecord resourceRecordResult = response.getResult();
    
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    
  • . . .
    
    const params = {
        dnszoneId: ${DnsZoneId},
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        recordId: ${DnsResourceRecordId},
    };
    
    dnsSvcsApisV1.getResourceRecord(params)
      .then(response => {
        const resourceRecord = response.result;
        console.log(resourceRecord);
      })
      .catch(err => {
        console.log('error:', err);
      });
    

Response

Resource record details

Resource record details.

Resource record details.

Resource record details.

Resource record details.

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Update resource record

Update the properties of a resource record.

Update the properties of a resource record.

Update the properties of a resource record.

Update the properties of a resource record.

Update the properties of a resource record.

PUT /instances/{instance_id}/dnszones/{dnszone_id}/resource_records/{record_id}
update_resource_record(self,
        instance_id: str,
        dnszone_id: str,
        record_id: str,
        *,
        name: str = None,
        rdata: 'ResourceRecordUpdateInputRdata' = None,
        ttl: int = None,
        service: str = None,
        protocol: str = None,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) UpdateResourceRecord(updateResourceRecordOptions *UpdateResourceRecordOptions) (result *ResourceRecord, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) UpdateResourceRecordWithContext(ctx context.Context, updateResourceRecordOptions *UpdateResourceRecordOptions) (result *ResourceRecord, response *core.DetailedResponse, err error)
ServiceCall<ResourceRecord> updateResourceRecord(UpdateResourceRecordOptions updateResourceRecordOptions)
updateResourceRecord(params)

Request

Instantiate the UpdateResourceRecordOptions struct and set the fields to provide parameter values for the UpdateResourceRecord method.

Use the UpdateResourceRecordOptions.Builder to create a UpdateResourceRecordOptions object that contains the parameter values for the updateResourceRecord method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a DNS zone

  • The unique identifier of a resource record

Update a resource record's properties.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • The unique identifier of a resource record.

  • Name of the resource record.

    Examples:
    value
    _source
    _lines
    _html
  • The content of type-A resource record.

  • Time to live in second.

    Examples:
    value
    _source
    _lines
    _html
  • Only used for SRV record.

    Examples:
    value
    _source
    _lines
    _html
  • Only used for SRV record.

    Examples:
    value
    _source
    _lines
    _html
  • Uniquely identifying a request.

WithContext method only

The UpdateResourceRecord options.

The updateResourceRecord options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • The unique identifier of a resource record.

  • Name of the resource record.

    Examples:
    value
    _source
    _lines
    _html
  • The content of type-A resource record.

  • Time to live in second.

    Examples:
    value
    _source
    _lines
    _html
  • Only used for SRV record.

    Examples:
    value
    _source
    _lines
    _html
  • Only used for SRV record.

    Examples:
    value
    _source
    _lines
    _html
  • Uniquely identifying a request.

  • curl -X PUT   https://api.dns-svcs.cloud.ibm.com/v1/instances/5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85/dnszones/3f84b5dc-8c00-463f-a088-9b4e005ebb84/resource_records/SRV:5365b73c-ce6f-4d6f-ad9f-d9c131b26370   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'   -d '{
    	  "rdata": {
          "priority": 100,
          "weight": 100,
          "port": 8000,
          "target": "siphost.com"
        },
        "name": "test.example.com",
    }'
    
  • updateRecordOptions := service.NewUpdateResourceRecordOptions(
    	"5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    	"c775e22a-5db5-4614-9c7e-27db0c8dbc13",
    	"SRV:5365b73c-ce6f-4d6f-ad9f-d9c131b26370")
    updateRecordOptions.SetName("update")
    updateRecordOptions.SetTTL(300)
    result, response, reqErr := service.UpdateResourceRecord(updateRecordOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("ID: %s", *result.ID)
    fmt.Printf("Response: %s", response)
  • response = dnssvc.update_resource_record(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
        dnszone_id="c775e22a-5db5-4614-9c7e-27db0c8dbc13",
        record_id="5365b73c-ce6f-4d6f-ad9f-d9c131b26370",
        type="AAAA",
        ttl=120,
        name="test.example43.com",
        rdata={'ip': '2002::2'})
    print(response)
  •     try {
          ResourceRecordUpdateInputRdataRdataARecord resourceRecordUpdateInputRdataModel = new ResourceRecordUpdateInputRdataRdataARecord.Builder()
          .ip("10.110.201.214")
          .build();
    
          UpdateResourceRecordOptions updateResourceRecordOptions = new UpdateResourceRecordOptions.Builder()
          .instanceId(instance_id)
          .dnszoneId(zone_id)
          .recordId(record_id)
          .name("test1.test.com")
          .rdata(resourceRecordUpdateInputRdataModel)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<ResourceRecord> response = service.updateResourceRecord(updateResourceRecordOptions).execute();
    
          ResourceRecord resourceRecordResult = response.getResult();
    
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    
  • . . .
    
    const params = {
        dnszoneId: ${DnsZoneId},
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        recordId: ${DnsResourceRecordId},
        'name': 'test.example.com-testing',
        'type': 'SRV',
        'rdata': {
            'priority': 110,
            'weight': 110,
            'port': 8010,
            'target': 'siphost.com',
        },
        'ttl': 3600,
        'service': '_sip',
        'protocol': 'udp',
    };
    
    dnsSvcsApisV1.updateResourceRecord(params)
      .then(response => {
        const updatedResourceRecord = response.result;
        console.log(updatedResourceRecord);
      })
      .catch(err => {
        console.log('error:', err);
      });
    

Response

Resource record details

Resource record details.

Resource record details.

Resource record details.

Resource record details.

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Export resource records to a zone file

Export resource records to a zone file

Export resource records to a zone file.

Export resource records to a zone file.

Export resource records to a zone file.

Export resource records to a zone file.

GET /instances/{instance_id}/dnszones/{dnszone_id}/export_resource_records
export_resource_records(self,
        instance_id: str,
        dnszone_id: str,
        *,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) ExportResourceRecords(exportResourceRecordsOptions *ExportResourceRecordsOptions) (result io.ReadCloser, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) ExportResourceRecordsWithContext(ctx context.Context, exportResourceRecordsOptions *ExportResourceRecordsOptions) (result io.ReadCloser, response *core.DetailedResponse, err error)
ServiceCall<InputStream> exportResourceRecords(ExportResourceRecordsOptions exportResourceRecordsOptions)
exportResourceRecords(params)

Request

Instantiate the ExportResourceRecordsOptions struct and set the fields to provide parameter values for the ExportResourceRecords method.

Use the ExportResourceRecordsOptions.Builder to create a ExportResourceRecordsOptions object that contains the parameter values for the exportResourceRecords method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a DNS zone

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • Uniquely identifying a request.

WithContext method only

The ExportResourceRecords options.

The exportResourceRecords options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • Uniquely identifying a request.

  • curl -X GET   https://api.dns-svcs.cloud.ibm.com/v1/instances/5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85/dnszones/3f84b5dc-8c00-463f-a088-9b4e005ebb84/export_resource_records   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'
  • exportResourceRecordsOptions := service.NewExportResourceRecordsOptions(instanceID, *zoneInfo.ID)
    exportResourceRecordsOptions.SetXCorrelationID("abc123")
    result, response, reqErr := service.ExportResourceRecords(exportResourceRecordsOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    b,_ := ioutil.ReadAll(result)
    fmt.Printf("Content: %s", string(b))
    fmt.Printf("Response: %s", response)
    
  •     const params = {
           dnszoneId: ${DnsZoneId},
           instanceId: ${DNS_SVCS_INSTANCE_ID},
         };
         dnsSvcsApisV1.exportResourceRecords(params)
        .then(response => {
           const exportResourceRecord = response.result;
           console.log(exportResourceRecord);
       })
      .catch(err => {
        console.log('error:', err);
      });
    
  • response = dnssvc.export_resource_records(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
        dnszone_id="c775e22a-5db5-4614-9c7e-27db0c8dbc13")
    print(response)
  •  try {
          ResourceRecordInputRdataRdataARecord resourceRecordInputRdataModel = new ResourceRecordInputRdataRdataARecord.Builder()
          .ip("10.110.201.214")
          .build();
    
          CreateResourceRecordOptions createResourceRecordOptions = new CreateResourceRecordOptions.Builder()
          .instanceId(instance_id)
          .dnszoneId(zone_id)
          .name("test.test.com")
          .type("A")
          .rdata(resourceRecordInputRdataModel)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<ResourceRecord> response = service.createResourceRecord(createResourceRecordOptions).execute();
    
          ResourceRecord resourceRecordResult = response.getResult();
    
          record_id = resourceRecordResult.getId();
    ExportResourceRecordsOptions exportResourceRecordsOptionsModel = new ExportResourceRecordsOptions.Builder()
          .instanceId(instance_id)
          .dnszoneId(zone_id)
          .xCorrelationId("testString")
          .build();
          Response<InputStream> responseRec = service.exportResourceRecords(exportResourceRecordsOptionsModel).execute();
          InputStream responseObj = responseRec.getResult();
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }

Response

Response type: BinaryIO

Response type: io.ReadCloser

Response type: InputStream

Response type: NodeJS.ReadableStream|Buffer

Response of exporting resource records

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

Example responses

Import resource records from a zone file

Import resource records from a zone file. The maximum size of a zone file is 8MB.

Import resource records from a zone file.

Import resource records from a zone file.

Import resource records from a zone file.

Import resource records from a zone file.

POST /instances/{instance_id}/dnszones/{dnszone_id}/import_resource_records
import_resource_records(self,
        instance_id: str,
        dnszone_id: str,
        *,
        file: BinaryIO = None,
        file_content_type: str = None,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) ImportResourceRecords(importResourceRecordsOptions *ImportResourceRecordsOptions) (result *ImportResourceRecordsResp, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) ImportResourceRecordsWithContext(ctx context.Context, importResourceRecordsOptions *ImportResourceRecordsOptions) (result *ImportResourceRecordsResp, response *core.DetailedResponse, err error)
ServiceCall<ImportResourceRecordsResp> importResourceRecords(ImportResourceRecordsOptions importResourceRecordsOptions)
importResourceRecords(params)

Request

Instantiate the ImportResourceRecordsOptions struct and set the fields to provide parameter values for the ImportResourceRecords method.

Use the ImportResourceRecordsOptions.Builder to create a ImportResourceRecordsOptions object that contains the parameter values for the importResourceRecords method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a DNS zone

Form Parameters

  • file to upload

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • file to upload.

  • The content type of file.

  • Uniquely identifying a request.

WithContext method only

The ImportResourceRecords options.

The importResourceRecords options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • file to upload.

  • The content type of file.

  • Uniquely identifying a request.

  • curl -X POST   https://api.dns-svcs.cloud.ibm.com/v1/instances/5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85/dnszones/3f84b5dc-8c00-463f-a088-9b4e005ebb84/import_resource_records   -H 'Content-Type: multipart/form-data'   -H 'Authorization: Bearer xxxxxx'
      -F 'file=@zonefile'
  • importResourceRecordsOptions := service.NewImportResourceRecordsOptions(instanceID, *zoneInfo.ID)
    zoneName := fmt.Sprintf("test-example%s.com", uuid.New().String())
    f := strings.NewReader(zoneName + ` 1 IN AAAA 2001::888`)
    importResourceRecordsOptions.SetFile(ioutil.NopCloser(f))
    importResourceRecordsOptions.SetXCorrelationID("abc123")
    importResourceRecordsOptions.SetFileContentType("application/json")
    result, response, reqErr := service.ImportResourceRecords(importResourceRecordsOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("TotalRecordsParsed: %d",*result.TotalRecordsParsed )
    fmt.Printf("Response: %s", response)
    		
  • const params = {
          dnszoneId: ${DnsZoneId},
          instanceId: ${DNS_SVCS_INSTANCE_ID},
          file: ${ZonFile},
     };
    dnsSvcsApisV1.importResourceRecords(params)
     .then(response => {
        const importedResourceRecords = response.result;
        console.log(importedResourceRecords);
    }).catch(err => {
        console.log('error:', err);
    });
  • response = dnssvc.import_resource_records(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
        dnszone_id="c775e22a-5db5-4614-9c7e-27db0c8dbc13",
        file=@Zone_file, file_content_type="application/octet-stream")
    print(response)
  • try {
          FileWriter myWriter = new FileWriter("records.txt");
          myWriter.write("example.sdk.cistest-load.com. 1 IN A 1.1.1.1");
          myWriter.close();
          FileInputStream  fileInputStream =new FileInputStream("records.txt");
          // Construct an instance of the ImportResourceRecordsOptions model
          ImportResourceRecordsOptions importResourceRecordsOptionsModel = new ImportResourceRecordsOptions.Builder()
          .instanceId(instance_id)
          .dnszoneId(zone_id)
          .file(fileInputStream)
          .fileContentType("testString")
          .xCorrelationId("testString")
          .build();
          Response<ImportResourceRecordsResp> response = service.importResourceRecords(importResourceRecordsOptionsModel).execute();
          ImportResourceRecordsResp responseObj = response.getResult();
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        } catch (IOException e) {
          System.out.println("An error occurred.");
        }

Response

Import DNS records response

Import DNS records response.

Import DNS records response.

Import DNS records response.

Import DNS records response.

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

List permitted networks

List the permitted networks for a given DNS zone

List the permitted networks for a given DNS zone.

List the permitted networks for a given DNS zone.

List the permitted networks for a given DNS zone.

List the permitted networks for a given DNS zone.

GET /instances/{instance_id}/dnszones/{dnszone_id}/permitted_networks
list_permitted_networks(self,
        instance_id: str,
        dnszone_id: str,
        *,
        x_correlation_id: str = None,
        offset: int = None,
        limit: int = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) ListPermittedNetworks(listPermittedNetworksOptions *ListPermittedNetworksOptions) (result *ListPermittedNetworks, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) ListPermittedNetworksWithContext(ctx context.Context, listPermittedNetworksOptions *ListPermittedNetworksOptions) (result *ListPermittedNetworks, response *core.DetailedResponse, err error)
ServiceCall<ListPermittedNetworks> listPermittedNetworks(ListPermittedNetworksOptions listPermittedNetworksOptions)
listPermittedNetworks(params)

Request

Instantiate the ListPermittedNetworksOptions struct and set the fields to provide parameter values for the ListPermittedNetworks method.

Use the ListPermittedNetworksOptions.Builder to create a ListPermittedNetworksOptions object that contains the parameter values for the listPermittedNetworks method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a DNS zone

Query Parameters

  • The account identifiers of the owner zone and linked zones in the format of "?account=account1,account2,account3". Maximum 5 accounts are allowed.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • Uniquely identifying a request.

  • Specify how many resource records to skip over, the default value is 0.

  • Specify how many resource records are returned, the default value is 200.

    Possible values: 1 ≤ value ≤ 1000

    Examples:
    value
    _source
    _lines
    _html

WithContext method only

The ListPermittedNetworks options.

The listPermittedNetworks options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • Uniquely identifying a request.

  • Specify how many resource records to skip over, the default value is 0.

  • Specify how many resource records are returned, the default value is 200.

    Possible values: 1 ≤ value ≤ 1000

    Examples:
    value
    _source
    _lines
    _html
  • curl -X GET   https://api.dns-svcs.cloud.ibm.com/v1/instances/5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85/dnszones/3f84b5dc-8c00-463f-a088-9b4e005ebb84/permitted_networks   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'
    
  • listPermittedNetworksOptions := service.NewListPermittedNetworksOptions(
    	"5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    	"c775e22a-5db5-4614-9c7e-27db0c8dbc13")
    result, response, reqErr := service.ListPermittedNetworks(listPermittedNetworksOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("Total Count: %d", *result.TotalCount)
    fmt.Printf("Response: %s", response)
  • response = dnssvc.list_permitted_networks(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
        dnszone_id="c775e22a-5db5-4614-9c7e-27db0c8dbc13")
    print(response)
  •     try {
          ListPermittedNetworksOptions listPermittedNetworksOptions = new ListPermittedNetworksOptions.Builder()
          .instanceId(instance_id)
          .dnszoneId(zone_id)
          .xCorrelationId("testString")
          .offset(Long.valueOf("26"))
          .limit(Long.valueOf("200"))
          .build();
    
          // Invoke operation
          Response<ListPermittedNetworks> response = service.listPermittedNetworks(listPermittedNetworksOptions).execute();
    
          ListPermittedNetworks listPermittedNetworksResult = response.getResult();
    
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    
  • . . .
    
    const params = {
        dnszoneId: ${DnsZoneId},
        instanceId: ${DNS_SVCS_INSTANCE_ID},
    };
    
    dnsSvcsApisV1.listPermittedNetworks(params)
      .then(response => {
        const permittedNetworks = response.result;
        console.log(permittedNetworks);
      })
      .catch(err => {
        console.log('error:', err);
      });

Response

List permitted networks response

List permitted networks response.

List permitted networks response.

List permitted networks response.

List permitted networks response.

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Create permitted network

Create a permitted network for a given DNS zone

Create a permitted network for a given DNS zone.

Create a permitted network for a given DNS zone.

Create a permitted network for a given DNS zone.

Create a permitted network for a given DNS zone.

POST /instances/{instance_id}/dnszones/{dnszone_id}/permitted_networks
create_permitted_network(self,
        instance_id: str,
        dnszone_id: str,
        *,
        type: str = None,
        permitted_network: 'PermittedNetworkVpc' = None,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) CreatePermittedNetwork(createPermittedNetworkOptions *CreatePermittedNetworkOptions) (result *PermittedNetwork, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) CreatePermittedNetworkWithContext(ctx context.Context, createPermittedNetworkOptions *CreatePermittedNetworkOptions) (result *PermittedNetwork, response *core.DetailedResponse, err error)
ServiceCall<PermittedNetwork> createPermittedNetwork(CreatePermittedNetworkOptions createPermittedNetworkOptions)
createPermittedNetwork(params)

Request

Instantiate the CreatePermittedNetworkOptions struct and set the fields to provide parameter values for the CreatePermittedNetwork method.

Use the CreatePermittedNetworkOptions.Builder to create a CreatePermittedNetworkOptions object that contains the parameter values for the createPermittedNetwork method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a DNS zone

Query Parameters

  • The account identifiers of the owner zone and linked zones in the format of "?account=account1,account2,account3". Maximum 5 accounts are allowed.

Create a permitted network.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • The type of a permitted network.

    Allowable values: [vpc]

    Examples:
    value
    _source
    _lines
    _html
  • Permitted network data for VPC.

  • Uniquely identifying a request.

WithContext method only

The CreatePermittedNetwork options.

The createPermittedNetwork options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • The type of a permitted network.

    Allowable values: [vpc]

    Examples:
    value
    _source
    _lines
    _html
  • Permitted network data for VPC.

  • Uniquely identifying a request.

  • curl -X POST   https://api.dns-svcs.cloud.ibm.com/v1/instances/5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85/dnszones/3f84b5dc-8c00-463f-a088-9b4e005ebb84/permitted_networks   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'   -d '{
    	  "permitted_network": {
    		    "vpc_crn": "crn:v1:bluemix:public:is:eu-de:a/bcf1865e99742d38d2d5fc3fb80a5496::vpc:6e6cc326-04d1-4c99-a289-efb3ae4193d6"
    		
    	  }, 
    	  "type": "vpc"
    }'
    
  • createPermittedNetworkOptions := service.NewCreatePermittedNetworkOptions(
    	"5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    	"c775e22a-5db5-4614-9c7e-27db0c8dbc13")
    permittedNetworkCrn := &dnssvcsv1.PermittedNetworkVpc{
    	VpcCrn: core.StringPtr("{vpc crn}"),
    }
    createPermittedNetworkOptions.SetPermittedNetwork(permittedNetworkCrn)
    createPermittedNetworkOptions.SetType(dnssvcsv1.CreatePermittedNetworkOptions_Type_Vpc)
    result, response, reqErr := service.CreatePermittedNetwork(createPermittedNetworkOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("ID: %s", *result.ID)
    fmt.Printf("Response: %s", response)
  • pnw = {
        'vpc_crn': 'crn:v1:bluemix:public:is:us-south:a/6991a6797b7b4754947b081d8dedc6e7::vpc:r006-5784a352-2d12-4c93-8d08-d790e5940e28'
    }
    response = dnssvc.create_permitted_network(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
        dnszone_id="c775e22a-5db5-4614-9c7e-27db0c8dbc13",
        type='vpc',
        permitted_network=pnw)
    print(response)
  •     try {
          PermittedNetworkVpc permittedNetworkVpcModel = new PermittedNetworkVpc.Builder()
          .vpcCrn(vpc_crn)
          .build();
    
          CreatePermittedNetworkOptions createPermittedNetworkOptions = new CreatePermittedNetworkOptions.Builder()
          .instanceId(instance_id)
          .dnszoneId(zone_id)
          .type("vpc")
          .permittedNetwork(permittedNetworkVpcModel)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<PermittedNetwork> response = service.createPermittedNetwork(createPermittedNetworkOptions).execute();
    
          PermittedNetwork permittedNetworkResult = response.getResult();
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    
  • . . .
    
    const params = {
        dnszoneId: ${DnsZoneId},
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        type: 'vpc',
        permittedNetwork: {
            'vpc_crn': ${DNS_SVCS_VPC_CRN},
        },
    };
    
    dnsSvcsApisV1.createPermittedNetwork(params)
      .then(response => {
        const permittedNW = response.result;
        console.log(permittedNW);
      })
      .catch(err => {
        console.log('error:', err);
      });
    

Response

Permitted network details

Permitted network details.

Permitted network details.

Permitted network details.

Permitted network details.

Status Code

  • Permitted network created successfully.

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Remove permitted network

Remove a permitted network

Remove a permitted network.

Remove a permitted network.

Remove a permitted network.

Remove a permitted network.

DELETE /instances/{instance_id}/dnszones/{dnszone_id}/permitted_networks/{permitted_network_id}
delete_permitted_network(self,
        instance_id: str,
        dnszone_id: str,
        permitted_network_id: str,
        *,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) DeletePermittedNetwork(deletePermittedNetworkOptions *DeletePermittedNetworkOptions) (result *PermittedNetwork, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) DeletePermittedNetworkWithContext(ctx context.Context, deletePermittedNetworkOptions *DeletePermittedNetworkOptions) (result *PermittedNetwork, response *core.DetailedResponse, err error)
ServiceCall<PermittedNetwork> deletePermittedNetwork(DeletePermittedNetworkOptions deletePermittedNetworkOptions)
deletePermittedNetwork(params)

Request

Instantiate the DeletePermittedNetworkOptions struct and set the fields to provide parameter values for the DeletePermittedNetwork method.

Use the DeletePermittedNetworkOptions.Builder to create a DeletePermittedNetworkOptions object that contains the parameter values for the deletePermittedNetwork method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a DNS zone

  • The unique identifier of a permitted network

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • The unique identifier of a permitted network.

  • Uniquely identifying a request.

WithContext method only

The DeletePermittedNetwork options.

The deletePermittedNetwork options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • The unique identifier of a permitted network.

  • Uniquely identifying a request.

  • curl -X DELETE   https://api.dns-svcs.cloud.ibm.com/v1/instances/5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85/dnszones/3f84b5dc-8c00-463f-a088-9b4e005ebb84/permitted_networks/fecd0173-3919-456b-b202-3029dfa1b0f7   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'
    
  • deletePermittedNetworkOptions := service.NewDeletePermittedNetworkOptions(
    	"5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    	"c775e22a-5db5-4614-9c7e-27db0c8dbc13",
    	"fecd0173-3919-456b-b202-3029dfa1b0f7")
    result, response, reqErr := service.DeletePermittedNetwork(deletePermittedNetworkOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("ID: %s", *result.ID)
    fmt.Printf("Response: %s", response)
  • response = dnssvc.delete_permitted_network(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
        dnszone_id="c775e22a-5db5-4614-9c7e-27db0c8dbc13",
        permitted_network_id="fecd0173-3919-456b-b202-3029dfa1b0f7")
    print(response)
  •     try {
          DeletePermittedNetworkOptions deletePermittedNetworkOptions = new DeletePermittedNetworkOptions.Builder()
          .instanceId(instance_id)
          .dnszoneId(zone_id)
          .permittedNetworkId(vpc_id)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<PermittedNetwork> response = service.deletePermittedNetwork(deletePermittedNetworkOptions).execute();
    
          PermittedNetwork permittedNetworkResult = response.getResult();
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    
  • . . .
    
    const params = {
        dnszoneId: ${DnsZoneId},
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        permittedNetworkId: ${PermittedNWId},
    };
    
    dnsSvcsApisV1.deletePermittedNetwork(params)
      .then(response => {
        const permittedNW = response.result;
        console.log(permittedNW);
      })
      .catch(err => {
        console.log('error:', err);
      });

Response

Permitted network details

Permitted network details.

Permitted network details.

Permitted network details.

Permitted network details.

Status Code

  • The permitted network removal is in progress.

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Get permitted network

Get details of a permitted network

Get details of a permitted network.

Get details of a permitted network.

Get details of a permitted network.

Get details of a permitted network.

GET /instances/{instance_id}/dnszones/{dnszone_id}/permitted_networks/{permitted_network_id}
get_permitted_network(self,
        instance_id: str,
        dnszone_id: str,
        permitted_network_id: str,
        *,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) GetPermittedNetwork(getPermittedNetworkOptions *GetPermittedNetworkOptions) (result *PermittedNetwork, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) GetPermittedNetworkWithContext(ctx context.Context, getPermittedNetworkOptions *GetPermittedNetworkOptions) (result *PermittedNetwork, response *core.DetailedResponse, err error)
ServiceCall<PermittedNetwork> getPermittedNetwork(GetPermittedNetworkOptions getPermittedNetworkOptions)
getPermittedNetwork(params)

Request

Instantiate the GetPermittedNetworkOptions struct and set the fields to provide parameter values for the GetPermittedNetwork method.

Use the GetPermittedNetworkOptions.Builder to create a GetPermittedNetworkOptions object that contains the parameter values for the getPermittedNetwork method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a DNS zone

  • The unique identifier of a permitted network

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • The unique identifier of a permitted network.

  • Uniquely identifying a request.

WithContext method only

The GetPermittedNetwork options.

The getPermittedNetwork options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • The unique identifier of a permitted network.

  • Uniquely identifying a request.

  • curl -X GET   https://api.dns-svcs.cloud.ibm.com/v1/instances/5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85/dnszones/3f84b5dc-8c00-463f-a088-9b4e005ebb84/permitted_networks/fecd0173-3919-456b-b202-3029dfa1b0f7   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'
    
  • getPermittedNetworkOptions := service.NewGetPermittedNetworkOptions(
    	"5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    	"c775e22a-5db5-4614-9c7e-27db0c8dbc13",
    	"fecd0173-3919-456b-b202-3029dfa1b0f7")
    result, response, reqErr := service.GetPermittedNetwork(getPermittedNetworkOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("ID: %s", *result.ID)
    fmt.Printf("Response: %s", response)
  • response = dnssvc.get_permitted_network(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
        dnszone_id="c775e22a-5db5-4614-9c7e-27db0c8dbc13",
        permitted_network_id="fecd0173-3919-456b-b202-3029dfa1b0f7")
    print(response)
  •     try {
          GetPermittedNetworkOptions getPermittedNetworkOptions = new GetPermittedNetworkOptions.Builder()
          .instanceId(instance_id)
          .dnszoneId(zone_id)
          .permittedNetworkId(vpc_id)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<PermittedNetwork> response = service.getPermittedNetwork(getPermittedNetworkOptions).execute();
    
          PermittedNetwork permittedNetworkResult = response.getResult();
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    
  • . . .
    
    const params = {
        dnszoneId: ${DnsZoneId},
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        permittedNetworkId: ${PermittedNWId},
    };
    
    dnsSvcsApisV1.getPermittedNetwork(params)
      .then(response => {
        const permittedNW = response.result;
        console.log(permittedNW);
      })
      .catch(err => {
        console.log('error:', err);
      });
    

Response

Permitted network details

Permitted network details.

Permitted network details.

Permitted network details.

Permitted network details.

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

List load balancers

List the Global Load Balancers for a given DNS zone

List the Global Load Balancers for a given DNS zone.

List the Global Load Balancers for a given DNS zone.

List the Global Load Balancers for a given DNS zone.

List the Global Load Balancers for a given DNS zone.

GET /instances/{instance_id}/dnszones/{dnszone_id}/load_balancers
list_load_balancers(self,
        instance_id: str,
        dnszone_id: str,
        *,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) ListLoadBalancers(listLoadBalancersOptions *ListLoadBalancersOptions) (result *ListLoadBalancers, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) ListLoadBalancersWithContext(ctx context.Context, listLoadBalancersOptions *ListLoadBalancersOptions) (result *ListLoadBalancers, response *core.DetailedResponse, err error)
ServiceCall<ListLoadBalancers> listLoadBalancers(ListLoadBalancersOptions listLoadBalancersOptions)
listLoadBalancers(params)

Request

Instantiate the ListLoadBalancersOptions struct and set the fields to provide parameter values for the ListLoadBalancers method.

Use the ListLoadBalancersOptions.Builder to create a ListLoadBalancersOptions object that contains the parameter values for the listLoadBalancers method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a DNS zone

Query Parameters

  • Specify how many resources to skip over, the default value is 0.

  • Specify maximum resources might be returned.

    Possible values: 1 ≤ value ≤ 1000

    Default: 200

    Example: 200

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • Uniquely identifying a request.

WithContext method only

The ListLoadBalancers options.

The listLoadBalancers options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • Uniquely identifying a request.

  • listLoadBalancersOptions := service.NewListLoadBalancersOptions(
    	"5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    	"c775e22a-5db5-4614-9c7e-27db0c8dbc13")
    result, response, reqErr := service.ListLoadBalancers(listLoadBalancersOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("Total Count: %d", *result.TotalCount)
    fmt.Printf("Response: %s", response)
  • curl -X GET 'https://api.dns-svcs.cloud.ibm.com/v1/instances/d5d53a57-212e-48f8-86d0-9082140de0ac/dnszones/b6b2cbd9-109d-41f5-a4ec-b906d9040f08/load_balancers' -H 'Authorization: Bearer xxxxx'
  • response = dnssvc.list_load_balancers(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
        dnszone_id="c775e22a-5db5-4614-9c7e-27db0c8dbc13")
    print(response)
  •     try {
          ListLoadBalancersOptions listLoadBalancersOptions = new ListLoadBalancersOptions.Builder()
          .instanceId(instance_id)
          .dnszoneId(zone_id)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<ListLoadBalancers> response = service.listLoadBalancers(listLoadBalancersOptions).execute();
    
          ListLoadBalancers listLoadBalancersResult = response.getResult();
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
  • . . .
    
    const params = {
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        dnszoneId: dnsZone.id,
        xCorrelationId: 'abc123',
    };
    
    dnsSvcsApisV1.listLoadBalancers(params)
      .then(response => {
        const loadBalancers = response.result;
        console.log(loadBalancers);
      })
      .catch(err => {
        console.log('error:', err);
      });
    

Response

List Global Load Balancers response

List Global Load Balancers response.

List Global Load Balancers response.

List Global Load Balancers response.

List Global Load Balancers response.

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Create load balancer

Create a load balancer for a given DNS zone

Create a load balancer for a given DNS zone.

Create a load balancer for a given DNS zone.

Create a load balancer for a given DNS zone.

Create a load balancer for a given DNS zone.

POST /instances/{instance_id}/dnszones/{dnszone_id}/load_balancers
create_load_balancer(self,
        instance_id: str,
        dnszone_id: str,
        *,
        name: str = None,
        fallback_pool: str = None,
        default_pools: List[str] = None,
        description: str = None,
        enabled: bool = None,
        ttl: int = None,
        az_pools: List['LoadBalancerAzPoolsItem'] = None,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) CreateLoadBalancer(createLoadBalancerOptions *CreateLoadBalancerOptions) (result *LoadBalancer, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) CreateLoadBalancerWithContext(ctx context.Context, createLoadBalancerOptions *CreateLoadBalancerOptions) (result *LoadBalancer, response *core.DetailedResponse, err error)
ServiceCall<LoadBalancer> createLoadBalancer(CreateLoadBalancerOptions createLoadBalancerOptions)
createLoadBalancer(params)

Request

Instantiate the CreateLoadBalancerOptions struct and set the fields to provide parameter values for the CreateLoadBalancer method.

Use the CreateLoadBalancerOptions.Builder to create a CreateLoadBalancerOptions object that contains the parameter values for the createLoadBalancer method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a DNS zone

Create a load balancer.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • Name of the load balancer.

    Examples:
    value
    _source
    _lines
    _html
  • The pool ID to use when all other pools are detected as unhealthy.

    Examples:
    value
    _source
    _lines
    _html
  • A list of pool IDs ordered by their failover priority. Pools defined here are used by default, or when region_pools are not configured for a given region.

    Examples:
    value
    _source
    _lines
    _html
  • Descriptive text of the load balancer.

    Examples:
    value
    _source
    _lines
    _html
  • Whether the load balancer is enabled.

    Examples:
    value
    _source
    _lines
    _html
  • Time to live in second.

    Examples:
    value
    _source
    _lines
    _html
  • Map availability zones to pool IDs.

  • Uniquely identifying a request.

WithContext method only

The CreateLoadBalancer options.

The createLoadBalancer options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • Name of the load balancer.

    Examples:
    value
    _source
    _lines
    _html
  • The pool ID to use when all other pools are detected as unhealthy.

    Examples:
    value
    _source
    _lines
    _html
  • A list of pool IDs ordered by their failover priority. Pools defined here are used by default, or when region_pools are not configured for a given region.

    Examples:
    value
    _source
    _lines
    _html
  • Descriptive text of the load balancer.

    Examples:
    value
    _source
    _lines
    _html
  • Whether the load balancer is enabled.

    Examples:
    value
    _source
    _lines
    _html
  • Time to live in second.

    Examples:
    value
    _source
    _lines
    _html
  • Map availability zones to pool IDs.

  • Uniquely identifying a request.

  • createLoadBalancerOptions := service.NewCreateLoadBalancerOptions(
    	"5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    	"c775e22a-5db5-4614-9c7e-27db0c8dbc13")
    createLoadBalancerOptions.SetName("testloadbalancer")
    createLoadBalancerOptions.SetDescription("PDNS Load balancer")
    createLoadBalancerOptions.SetEnabled(true)
    createLoadBalancerOptions.SetTTL(120)
    createLoadBalancerOptions.SetFallbackPool("567ea43ab9583a67a")
    createLoadBalancerOptions.SetDefaultPools([]string{"567ea43ab9583a67a"})
    result, response, reqErr := service.CreateLoadBalancer(createLoadBalancerOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("ID: %s", *result.ID)
    fmt.Printf("Response: %s", response)
  • curl -X POST 'https://api.dns-svcs.cloud.ibm.com/v1/instances/d5d53a57-212e-48f8-86d0-9082140de0ac/dnszones/b6b2cbd9-109d-41f5-a4ec-b906d9040f08/load_balancers' -H 'Authorization: Bearer xxxxx' -H 'Content-Type: application/json' -d '{
      "name": "glb.example.com",
      "description": "Load balancer for glb.example.com.",
      "enabled": true,
      "ttl": 120,
      "fallback_pool": "7bab5eeb-59d2-4abe-a487-ab513df70ba4",
      "default_pools": [
        "7bab5eeb-59d2-4abe-a487-ab513df70ba4"
      ],
      "az_pools": [
        {
          "availability_zone": "us-south-1",
          "pools": [
            "7bab5eeb-59d2-4abe-a487-ab513df70ba4"
          ]
        }
      ]
    }'
  • response = dnssvc.create_load_balancer(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
        dnszone_id="c775e22a-5db5-4614-9c7e-27db0c8dbc13",
        name="testloadbalancer",
        fallback_pool="78ab5689eda7659ca765a7d8f6",
        default_pools=["78ab5689eda7659ca765a7d8f6"],
        description="Creating testloadbalancer",
        enabled=True,
        ttl=60)
    print(response)
  •     try {
          LoadBalancerAzPoolsItem loadBalancerAzPoolsItemModel = new LoadBalancerAzPoolsItem.Builder()
          .availabilityZone("us-east-1")
          .pools(new java.util.ArrayList<String>(java.util.Arrays.asList(pool_id)))
          .build();
    
          CreateLoadBalancerOptions createLoadBalancerOptions = new CreateLoadBalancerOptions.Builder()
          .instanceId(instance_id)
          .dnszoneId(zone_id)
          .name("glb.example.com")
          .description("Load balancer for glb.example.com.")
          .enabled(true)
          .ttl(Long.valueOf("120"))
          .fallbackPool(pool_id)
          .defaultPools(new java.util.ArrayList<String>(java.util.Arrays.asList(pool_id)))
          .azPools(new java.util.ArrayList<LoadBalancerAzPoolsItem>(java.util.Arrays.asList(loadBalancerAzPoolsItemModel)))
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<LoadBalancer> response = service.createLoadBalancer(createLoadBalancerOptions).execute();
    
          LoadBalancer loadBalancerResult = response.getResult();
    
          lb_id = loadBalancerResult.getId();
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    
  • . . .
    
    const params = {
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        dnszoneId: ${DnsZoneId},
        name: 'testloadbalancer-testing',
        fallbackPool: ${GlbPoolId},
        defaultPools: ${GlbPoolId},
        description: 'PDNS Load balancer',
        enabled: true,
        ttl: 120,
        xCorrelationId: 'abc123',
    };
    
    dnsSvcsApisV1.createLoadBalancer(params)
      .then(response => {
        const loadBalancer = response.result;
        console.log(loadBalancer);
      })
      .catch(err => {
        console.log('error:', err);
      });
    

Response

Load balancer details

Load balancer details.

Load balancer details.

Load balancer details.

Load balancer details.

Status Code

  • Load balancer created successfully.

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Delete load balancer

Delete a load balancer

Delete a load balancer.

Delete a load balancer.

Delete a load balancer.

Delete a load balancer.

DELETE /instances/{instance_id}/dnszones/{dnszone_id}/load_balancers/{lb_id}
delete_load_balancer(self,
        instance_id: str,
        dnszone_id: str,
        lb_id: str,
        *,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) DeleteLoadBalancer(deleteLoadBalancerOptions *DeleteLoadBalancerOptions) (response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) DeleteLoadBalancerWithContext(ctx context.Context, deleteLoadBalancerOptions *DeleteLoadBalancerOptions) (response *core.DetailedResponse, err error)
ServiceCall<Void> deleteLoadBalancer(DeleteLoadBalancerOptions deleteLoadBalancerOptions)
deleteLoadBalancer(params)

Request

Instantiate the DeleteLoadBalancerOptions struct and set the fields to provide parameter values for the DeleteLoadBalancer method.

Use the DeleteLoadBalancerOptions.Builder to create a DeleteLoadBalancerOptions object that contains the parameter values for the deleteLoadBalancer method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a DNS zone

  • The unique identifier of a load balancer

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • The unique identifier of a load balancer.

  • Uniquely identifying a request.

WithContext method only

The DeleteLoadBalancer options.

The deleteLoadBalancer options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • The unique identifier of a load balancer.

  • Uniquely identifying a request.

  • deleteLoadBalancerOptions := service.NewDeleteLoadBalancerOptions(
    	"5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    	"c775e22a-5db5-4614-9c7e-27db0c8dbc13",
    	"fecd0173-3919-456b-b202-3029dfa1b0f7")
    response, reqErr := service.DeleteLoadBalancer(deleteLoadBalancerOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("Response: %s", response)
  • curl -X DELETE 'https://api.dns-svcs.cloud.ibm.com/v1/instances/d5d53a57-212e-48f8-86d0-9082140de0ac/dnszones/b6b2cbd9-109d-41f5-a4ec-b906d9040f08/load_balancers/100f81cf-984b-44a9-a44d-5ea5c412d29b' -H 'Authorization: Bearer xxxxx'
  • response = dnssvc.delete_load_balancer(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
        dnszone_id="c775e22a-5db5-4614-9c7e-27db0c8dbc13",
        lb_id="fecd0173-3919-456b-b202-3029dfa1b0f7")
    print(response)
  •     try {
          DeleteLoadBalancerOptions deleteLoadBalancerOptions = new DeleteLoadBalancerOptions.Builder()
          .instanceId(instance_id)
          .dnszoneId(zone_id)
          .lbId(lb_id)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<Void> response = service.deleteLoadBalancer(deleteLoadBalancerOptions).execute();
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    
  • . . .
    
    const params = {
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        dnszoneId: ${DnsZoneId},
        lbId: ${GlbId},
        xCorrelationId: 'abc123',
    };
    dnsSvcsApisV1.deleteLoadBalancer(params)
      .then(response => {
        const deletedLoadBalancer = response.result;
        console.log(deletedLoadBalancer);
      })
      .catch(err => {
        console.log('error:', err);
      });
    

Response

Status Code

  • The load balancer was deleted successfully

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Get load balancer

Get details of a load balancer

Get details of a load balancer.

Get details of a load balancer.

Get details of a load balancer.

Get details of a load balancer.

GET /instances/{instance_id}/dnszones/{dnszone_id}/load_balancers/{lb_id}
get_load_balancer(self,
        instance_id: str,
        dnszone_id: str,
        lb_id: str,
        *,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) GetLoadBalancer(getLoadBalancerOptions *GetLoadBalancerOptions) (result *LoadBalancer, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) GetLoadBalancerWithContext(ctx context.Context, getLoadBalancerOptions *GetLoadBalancerOptions) (result *LoadBalancer, response *core.DetailedResponse, err error)
ServiceCall<LoadBalancer> getLoadBalancer(GetLoadBalancerOptions getLoadBalancerOptions)
getLoadBalancer(params)

Request

Instantiate the GetLoadBalancerOptions struct and set the fields to provide parameter values for the GetLoadBalancer method.

Use the GetLoadBalancerOptions.Builder to create a GetLoadBalancerOptions object that contains the parameter values for the getLoadBalancer method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a DNS zone

  • The unique identifier of a load balancer

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • The unique identifier of a load balancer.

  • Uniquely identifying a request.

WithContext method only

The GetLoadBalancer options.

The getLoadBalancer options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • The unique identifier of a load balancer.

  • Uniquely identifying a request.

  • getLoadBalancerOptions := service.NewGetLoadBalancerOptions(
    	"5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    	"c775e22a-5db5-4614-9c7e-27db0c8dbc13",
    	"fecd0173-3919-456b-b202-3029dfa1b0f7")
    result, response, reqErr := service.GetLoadBalancer(getLoadBalancerOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("ID: %s", *result.ID)
    fmt.Printf("Response: %s", response)
  • curl -X GET 'https://api.dns-svcs.cloud.ibm.com/v1/instances/d5d53a57-212e-48f8-86d0-9082140de0ac/dnszones/b6b2cbd9-109d-41f5-a4ec-b906d9040f08/load_balancers/100f81cf-984b-44a9-a44d-5ea5c412d29b' -H 'Authorization: Bearer xxxxx'
  • response = dnssvc.get_load_balancer(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
        dnszone_id="c775e22a-5db5-4614-9c7e-27db0c8dbc13",
        lb_id="fecd0173-3919-456b-b202-3029dfa1b0f7")
    print(response)
  •     try {
          GetLoadBalancerOptions getLoadBalancerOptions = new GetLoadBalancerOptions.Builder()
          .instanceId(instance_id)
          .dnszoneId(zone_id)
          .lbId(lb_id)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<LoadBalancer> response = service.getLoadBalancer(getLoadBalancerOptions).execute();
    
          LoadBalancer loadBalancerResult = response.getResult();
    
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    
  • . . .
    
    const params = {
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        dnszoneId: ${DnsZoneId},
        lbId: glb.id,
        xCorrelationId: 'abc123',
    };
    
    dnsSvcsApisV1.getLoadBalancer(params)
      .then(response => {
        const loadBalancer = response.result;
        console.log(loadBalancer);
      })
      .catch(err => {
        console.log('error:', err);
      });
    

Response

Load balancer details

Load balancer details.

Load balancer details.

Load balancer details.

Load balancer details.

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Update load balancer

Update the properties of a load balancer.

Update the properties of a load balancer.

Update the properties of a load balancer.

Update the properties of a load balancer.

Update the properties of a load balancer.

PUT /instances/{instance_id}/dnszones/{dnszone_id}/load_balancers/{lb_id}
update_load_balancer(self,
        instance_id: str,
        dnszone_id: str,
        lb_id: str,
        *,
        name: str = None,
        description: str = None,
        enabled: bool = None,
        ttl: int = None,
        fallback_pool: str = None,
        default_pools: List[str] = None,
        az_pools: List['LoadBalancerAzPoolsItem'] = None,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) UpdateLoadBalancer(updateLoadBalancerOptions *UpdateLoadBalancerOptions) (result *LoadBalancer, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) UpdateLoadBalancerWithContext(ctx context.Context, updateLoadBalancerOptions *UpdateLoadBalancerOptions) (result *LoadBalancer, response *core.DetailedResponse, err error)
ServiceCall<LoadBalancer> updateLoadBalancer(UpdateLoadBalancerOptions updateLoadBalancerOptions)
updateLoadBalancer(params)

Request

Instantiate the UpdateLoadBalancerOptions struct and set the fields to provide parameter values for the UpdateLoadBalancer method.

Use the UpdateLoadBalancerOptions.Builder to create a UpdateLoadBalancerOptions object that contains the parameter values for the updateLoadBalancer method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a DNS zone

  • The unique identifier of a load balancer

Update the properties of a load balancer.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • The unique identifier of a load balancer.

  • Name of the load balancer.

    Examples:
    value
    _source
    _lines
    _html
  • Descriptive text of the load balancer.

    Examples:
    value
    _source
    _lines
    _html
  • Whether the load balancer is enabled.

    Examples:
    value
    _source
    _lines
    _html
  • Time to live in second.

    Examples:
    value
    _source
    _lines
    _html
  • The pool ID to use when all other pools are detected as unhealthy.

    Examples:
    value
    _source
    _lines
    _html
  • A list of pool IDs ordered by their failover priority. Pools defined here are used by default, or when region_pools are not configured for a given region.

    Examples:
    value
    _source
    _lines
    _html
  • Map availability zones to pool IDs.

  • Uniquely identifying a request.

WithContext method only

The UpdateLoadBalancer options.

The updateLoadBalancer options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a DNS zone.

  • The unique identifier of a load balancer.

  • Name of the load balancer.

    Examples:
    value
    _source
    _lines
    _html
  • Descriptive text of the load balancer.

    Examples:
    value
    _source
    _lines
    _html
  • Whether the load balancer is enabled.

    Examples:
    value
    _source
    _lines
    _html
  • Time to live in second.

    Examples:
    value
    _source
    _lines
    _html
  • The pool ID to use when all other pools are detected as unhealthy.

    Examples:
    value
    _source
    _lines
    _html
  • A list of pool IDs ordered by their failover priority. Pools defined here are used by default, or when region_pools are not configured for a given region.

    Examples:
    value
    _source
    _lines
    _html
  • Map availability zones to pool IDs.

  • Uniquely identifying a request.

  • updateLoadBalancerOptions := service.NewUpdateLoadBalancerOptions(
    	"5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    	"c775e22a-5db5-4614-9c7e-27db0c8dbc13",
    	"fecd0173-3919-456b-b202-3029dfa1b0f7")
    updateLoadBalancerOptions.SetName("update-testloadbalancer")
    updateLoadBalancerOptions.SetDescription("Update PDNS Load balancer")
    updateLoadBalancerOptions.SetEnabled(true)
    updateLoadBalancerOptions.SetTTL(120)
    updateLoadBalancerOptions.SetFallbackPool("567ea43ab9583a67a")
    updateLoadBalancerOptions.SetDefaultPools([]string{"567ea43ab9583a67a"})
    result, response, reqErr := service.UpdateLoadBalancer(updateLoadBalancerOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("ID: %s", *result.ID)
    fmt.Printf("Response: %s", response)
  • curl -X PUT 'https://api.dns-svcs.cloud.ibm.com/v1/instances/d5d53a57-212e-48f8-86d0-9082140de0ac/dnszones/b6b2cbd9-109d-41f5-a4ec-b906d9040f08/load_balancers/100f81cf-984b-44a9-a44d-5ea5c412d29b' -H 'Authorization: Bearer xxxxx' -H 'Content-Type: application/json' -d '{
      "name": "glb.example.com",
      "description": "Load balancer for glb.example.com.",
      "enabled": true,
      "ttl": 120,
      "fallback_pool": "7bab5eeb-59d2-4abe-a487-ab513df70ba4",
      "default_pools": [
        "7bab5eeb-59d2-4abe-a487-ab513df70ba4"
      ],
      "az_pools": [
        {
          "availability_zone": "us-south-1",
          "pools": [
            "7bab5eeb-59d2-4abe-a487-ab513df70ba4"
          ]
        }
      ]
    }'
  • response = dnssvc.update_load_balancer(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
        dnszone_id="c775e22a-5db5-4614-9c7e-27db0c8dbc13",
        lb_id="fecd0173-3919-456b-b202-3029dfa1b0f7",
        name="testloadbalancerupdate",
        fallback_pool="78ab5689eda7659ca765a7d8f6",
        default_pools=["78ab5689eda7659ca765a7d8f6"],
        description="Updating testloadbalancer",
        enabled=False,
        ttl=120)
    print(response)
  •     try {
          LoadBalancerAzPoolsItem loadBalancerAzPoolsItemModel = new LoadBalancerAzPoolsItem.Builder()
          .availabilityZone("us-east-1")
          .pools(new java.util.ArrayList<String>(java.util.Arrays.asList(pool_id)))
          .build();
    
          UpdateLoadBalancerOptions updateLoadBalancerOptions = new UpdateLoadBalancerOptions.Builder()
          .instanceId(instance_id)
          .dnszoneId(zone_id)
          .lbId(lb_id)
          .name("glb.example.com")
          .description("Load balancer for glb.example.com.")
          .enabled(true)
          .ttl(Long.valueOf("120"))
          .fallbackPool(pool_id)
          .defaultPools(new java.util.ArrayList<String>(java.util.Arrays.asList(pool_id)))
          .azPools(new java.util.ArrayList<LoadBalancerAzPoolsItem>(java.util.Arrays.asList(loadBalancerAzPoolsItemModel)))
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<LoadBalancer> response = service.updateLoadBalancer(updateLoadBalancerOptions).execute();
    
          LoadBalancer loadBalancerResult = response.getResult();
    
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    
  • . . .
    
    const params = {
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        dnszoneId: ${DnsZoneId},
        lbId: ${GlbId},
        name: 'updateLoadBalancer',
        description: 'updating Load Balancer',
        ttl: 300,
        fallbackPool: ${GlbPoolId},
        defaultPools: [${GlbPoolId}],
        xCorrelationId: 'abc123',
    };
    dnsSvcsApisV1.updateLoadBalancer(params)
      .then(response => {
        const updatedLoadBalancer = response.result;
        console.log(updatedLoadBalancer);
      })
      .catch(err => {
        console.log('error:', err);
      });
    

Response

Load balancer details

Load balancer details.

Load balancer details.

Load balancer details.

Load balancer details.

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

List load balancer pools

List the load balancer pools

List the load balancer pools.

List the load balancer pools.

List the load balancer pools.

List the load balancer pools.

GET /instances/{instance_id}/pools
list_pools(self,
        instance_id: str,
        *,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) ListPools(listPoolsOptions *ListPoolsOptions) (result *ListPools, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) ListPoolsWithContext(ctx context.Context, listPoolsOptions *ListPoolsOptions) (result *ListPools, response *core.DetailedResponse, err error)
ServiceCall<ListPools> listPools(ListPoolsOptions listPoolsOptions)
listPools(params)

Request

Instantiate the ListPoolsOptions struct and set the fields to provide parameter values for the ListPools method.

Use the ListPoolsOptions.Builder to create a ListPoolsOptions object that contains the parameter values for the listPools method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

Query Parameters

  • Specify how many resources to skip over, the default value is 0.

  • Specify maximum resources might be returned.

    Possible values: 1 ≤ value ≤ 1000

    Default: 200

    Example: 200

parameters

  • The unique identifier of a service instance.

  • Uniquely identifying a request.

WithContext method only

The ListPools options.

The listPools options.

parameters

  • The unique identifier of a service instance.

  • Uniquely identifying a request.

  • listPoolsOptions := service.NewListPoolsOptions(
    	"5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85")
    result, response, reqErr := service.ListPools(listPoolsOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("Total Count : %d", *result.TotalCount)
    fmt.Printf("Response: %s", response)
  • curl -X GET 'https://api.dns-svcs.cloud.ibm.com/v1/instances/d5d53a57-212e-48f8-86d0-9082140de0ac/pools' -H 'Authorization: Bearer xxxxx'
  • response = dnssvc.list_pools(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85")
    print(response)
  •     try {
          ListPoolsOptions listPoolsOptions = new ListPoolsOptions.Builder()
          .instanceId(instance_id)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<ListPools> response = service.listPools(listPoolsOptions).execute();
    
          ListPools listPoolsResult = response.getResult();
    
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
  • . . .
    
    const params = {
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        xCorrelationId: 'abc123',
    };
    dnsSvcsApisV1.listPools(params)
      .then(response => {
        const pools = response.result;
        console.log(pools);
      })
      .catch(err => {
        console.log('error:', err);
      });

Response

List load balancer pools response

List load balancer pools response.

List load balancer pools response.

List load balancer pools response.

List load balancer pools response.

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Create load balancer pool

Create a load balancer pool

Create a load balancer pool.

Create a load balancer pool.

Create a load balancer pool.

Create a load balancer pool.

POST /instances/{instance_id}/pools
create_pool(self,
        instance_id: str,
        *,
        name: str = None,
        origins: List['OriginInput'] = None,
        description: str = None,
        enabled: bool = None,
        healthy_origins_threshold: int = None,
        monitor: str = None,
        notification_channel: str = None,
        healthcheck_region: str = None,
        healthcheck_subnets: List[str] = None,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) CreatePool(createPoolOptions *CreatePoolOptions) (result *Pool, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) CreatePoolWithContext(ctx context.Context, createPoolOptions *CreatePoolOptions) (result *Pool, response *core.DetailedResponse, err error)
ServiceCall<Pool> createPool(CreatePoolOptions createPoolOptions)
createPool(params)

Request

Instantiate the CreatePoolOptions struct and set the fields to provide parameter values for the CreatePool method.

Use the CreatePoolOptions.Builder to create a CreatePoolOptions object that contains the parameter values for the createPool method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

Create a load balancer pool.

parameters

  • The unique identifier of a service instance.

  • Name of the load balancer pool.

    Examples:
    value
    _source
    _lines
    _html
  • The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy.

  • Descriptive text of the load balancer pool.

    Examples:
    value
    _source
    _lines
    _html
  • Whether the load balancer pool is enabled.

    Examples:
    value
    _source
    _lines
    _html
  • The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and we will failover to the next available pool.

    Examples:
    value
    _source
    _lines
    _html
  • The ID of the load balancer monitor to be associated to this pool.

    Examples:
    value
    _source
    _lines
    _html
  • The notification channel.

    Examples:
    value
    _source
    _lines
    _html
  • Health check region of VSIs.

    Allowable values: [,us-south,us-east,eu-gb,eu-du,au-syd,jp-tok]

    Examples:
    value
    _source
    _lines
    _html
  • Health check subnet CRN.

  • Uniquely identifying a request.

WithContext method only

The CreatePool options.

The createPool options.

parameters

  • The unique identifier of a service instance.

  • Name of the load balancer pool.

    Examples:
    value
    _source
    _lines
    _html
  • The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy.

  • Descriptive text of the load balancer pool.

    Examples:
    value
    _source
    _lines
    _html
  • Whether the load balancer pool is enabled.

    Examples:
    value
    _source
    _lines
    _html
  • The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and we will failover to the next available pool.

    Examples:
    value
    _source
    _lines
    _html
  • The ID of the load balancer monitor to be associated to this pool.

    Examples:
    value
    _source
    _lines
    _html
  • The notification channel.

    Examples:
    value
    _source
    _lines
    _html
  • Health check region of VSIs.

    Allowable values: [,us-south,us-east,eu-gb,eu-du,au-syd,jp-tok]

    Examples:
    value
    _source
    _lines
    _html
  • Health check subnet CRN.

  • Uniquely identifying a request.

  • createPoolOptions := service.NewCreatePoolOptions(
    	"5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85")
    createPoolOptions.SetName("testPool")
    createPoolOptions.SetDescription("creating pool")
    createPoolOptions.SetEnabled(true)
    createPoolOptions.SetHealthyOriginsThreshold(1)
    createPoolOptions.SetMonitor("78546a78db87432fea56422")
    result, response, reqErr := service.CreatePool(createPoolOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("ID: %s", *result.ID)
    fmt.Printf("Response: %s", response)
  • curl -X POST 'https://api.dns-svcs.cloud.ibm.com/v1/instances/d5d53a57-212e-48f8-86d0-9082140de0ac/pools' -H 'Authorization: Bearer xxxxx' -H 'Content-Type: application/json' -d '{
      "name": "dal10-az-pool",
      "description": "Load balancer pool for dal10 availability zone.",
      "enabled": true,
      "healthy_origins_threshold": 1,
      "origins": [
        {
          "name": "app-server-1",
          "description": "description of the origin server",
          "address": "10.10.16.8",
          "enabled": true
        }
      ],
      "monitor": "74547437-1ae1-4428-9281-83b5c7f84324",
      "notification_channel": "https://mywebsite.com/dns/webhook",
      "healthcheck_subnets": [
        "crn:v1:staging:public:is:us-south-1:a/01652b251c3ae2787110a995d8db0135::subnet:0716-b49ef064-0f89-4fb1-8212-135b12568f04"
      ]
    }'
  • response = dnssvc.create_pool(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
        name="testpool",
        origins=[
            {
                "name": "app-server-1",
                    "address": "10.10.10.8",
                    "enabled": True
            }
        ],
        description="create testpool",
        enabled=True,
        healthy_origins_threshold=1)
    print(response)
  •     try {
          OriginInput originInputModel = new OriginInput.Builder()
          .name("app-server-1")
          .description("description of the origin server")
          .address("10.10.16.8")
          .enabled(true)
          .build();
    
          CreatePoolOptions createPoolOptions = new CreatePoolOptions.Builder()
          .instanceId(instance_id)
          .name("dal10-az-pool")
          .description("Load balancer pool for dal10 availability zone.")
          .enabled(true)
          .healthyOriginsThreshold(Long.valueOf("1"))
          .origins(new java.util.ArrayList<OriginInput>(java.util.Arrays.asList(originInputModel)))
          .monitor(monitor_id)
          .notificationChannel("https://mywebsite.com/dns/webhook")
          .healthcheckRegion("us-east")
          .healthcheckSubnets(new java.util.ArrayList<String>(java.util.Arrays.asList(subnet_id)))
          .xCorrelationId("testString")
          .build();
    
    // .healthcheckSubnets(new java.util.ArrayList<String>(java.util.Arrays.asList("crn:v1:staging:public:is:us-south-1:a/01652b251c3ae2787110a995d8db0135::subnet:0716-b49ef064-0f89-4fb1-8212-135b12568f04")))
    
          // Invoke operation
          Response<Pool> response = service.createPool(createPoolOptions).execute();
    
          Pool poolResult = response.getResult();
    
          pool_id = poolResult.getId();
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    
  • . . .
    
    const params = {
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        name: "dal10-az-pool",
        origins: [
            {
              name: "app-server-1",
              description: "description of the origin server",
              address: "10.10.16.8",
              enabled: true
            }
          ],
        description: "Load balancer pool for dal10 availability zone.",
        enabled: true,
        healthyOriginsThreshold: 1,
        monitor: "7dd6841c-264e-11ea-88df-062967242a6a",
        healthcheckRegion: "us-south",
        healthcheckSubnets: [
            "crn:v1:staging:public:is:us-south-1:a/01652b251c3ae2787110a995d8db0135::subnet:0716-b49ef064-0f89-4fb1-8212-135b12568f04"
        ],
        xCorrelationId: "abc123",
    }
    
    dnsSvcsApisV1.createPool(params)
      .then(response => {
        const pool = response.result;
        console.log(pool);
      })
      .catch(err => {
        console.log('error:', err);
      });
    
    

Response

Load balancer pool details

Load balancer pool details.

Load balancer pool details.

Load balancer pool details.

Load balancer pool details.

Status Code

  • Load balancer pool created successfully.

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Delete load balancer pool

Delete a load balancer pool

Delete a load balancer pool.

Delete a load balancer pool.

Delete a load balancer pool.

Delete a load balancer pool.

DELETE /instances/{instance_id}/pools/{pool_id}
delete_pool(self,
        instance_id: str,
        pool_id: str,
        *,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) DeletePool(deletePoolOptions *DeletePoolOptions) (response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) DeletePoolWithContext(ctx context.Context, deletePoolOptions *DeletePoolOptions) (response *core.DetailedResponse, err error)
ServiceCall<Void> deletePool(DeletePoolOptions deletePoolOptions)
deletePool(params)

Request

Instantiate the DeletePoolOptions struct and set the fields to provide parameter values for the DeletePool method.

Use the DeletePoolOptions.Builder to create a DeletePoolOptions object that contains the parameter values for the deletePool method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a load balancer pool

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a load balancer pool.

  • Uniquely identifying a request.

WithContext method only

The DeletePool options.

The deletePool options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a load balancer pool.

  • Uniquely identifying a request.

  • deletePoolOptions := service.NewDeletePoolOptions(
    	"5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    	"775e22a-5db5-4614-9c7e-27db0c8dbc13")
    response, reqErr := service.DeletePool(deletePoolOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("Response: %s", response)
  • curl -X DELETE 'https://api.dns-svcs.cloud.ibm.com/v1/instances/d5d53a57-212e-48f8-86d0-9082140de0ac/pools/1a696046-ebf5-408a-a9e5-8ee021f30ee8' -H 'Authorization: Bearer xxxxx'
  • response = dnssvc.delete_pool(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
        pool_id="775e22a-5db5-4614-9c7e-27db0c8dbc13")
    print(response)
  •     try {
          DeletePoolOptions deletePoolOptions = new DeletePoolOptions.Builder()
          .instanceId(instance_id)
          .poolId(pool_id)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<Void> response = service.deletePool(deletePoolOptions).execute();
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
  • . . .
    
    const params = {
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        poolId: ${GlbPoolId},
        xCorrelationId: 'abc123',
    };
    dnsSvcsApisV1.deletePool(params)
      .then(response => {
        const deletedPool = response.result;
        console.log(pool);
      })
      .catch(err => {
        console.log('error:', err);
      });
    

Response

Status Code

  • The load balancer pool was deleted successfully

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Get load balancer pool

Get details of a load balancer pool

Get details of a load balancer pool.

Get details of a load balancer pool.

Get details of a load balancer pool.

Get details of a load balancer pool.

GET /instances/{instance_id}/pools/{pool_id}
get_pool(self,
        instance_id: str,
        pool_id: str,
        *,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) GetPool(getPoolOptions *GetPoolOptions) (result *Pool, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) GetPoolWithContext(ctx context.Context, getPoolOptions *GetPoolOptions) (result *Pool, response *core.DetailedResponse, err error)
ServiceCall<Pool> getPool(GetPoolOptions getPoolOptions)
getPool(params)

Request

Instantiate the GetPoolOptions struct and set the fields to provide parameter values for the GetPool method.

Use the GetPoolOptions.Builder to create a GetPoolOptions object that contains the parameter values for the getPool method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a load balancer pool

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a load balancer pool.

  • Uniquely identifying a request.

WithContext method only

The GetPool options.

The getPool options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a load balancer pool.

  • Uniquely identifying a request.

  • getPoolOptions := service.NewGetPoolOptions(
    	"5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    	"775e22a-5db5-4614-9c7e-27db0c8dbc13")
    result, response, reqErr := service.GetPool(getPoolOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("ID: %s", *result.ID)
    fmt.Printf("Response: %s", response)
  • curl -X GET 'https://api.dns-svcs.cloud.ibm.com/v1/instances/d5d53a57-212e-48f8-86d0-9082140de0ac/pools/1a696046-ebf5-408a-a9e5-8ee021f30ee8' -H 'Authorization: Bearer xxxxx'
  • response = dnssvc.get_pool(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
        pool_id="775e22a-5db5-4614-9c7e-27db0c8dbc13")
    print(response)
  •    try {
          GetPoolOptions getPoolOptions = new GetPoolOptions.Builder()
          .instanceId(instance_id)
          .poolId(pool_id)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<Pool> response = service.getPool(getPoolOptions).execute();
    
          Pool poolResult = response.getResult();
    
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    
  • . . .
    
    const params = {
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        poolId: ${GlbPoolId},
        xCorrelationId: 'abc123',
    };
    dnsSvcsApisV1.getPool(params)
      .then(response => {
        const pool = response.result;
        console.log(pool);
      })
      .catch(err => {
        console.log('error:', err);
      });

Response

Load balancer pool details

Load balancer pool details.

Load balancer pool details.

Load balancer pool details.

Load balancer pool details.

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Update load balancer pool

Update the properties of a load balancer pool.

Update the properties of a load balancer pool.

Update the properties of a load balancer pool.

Update the properties of a load balancer pool.

Update the properties of a load balancer pool.

PUT /instances/{instance_id}/pools/{pool_id}
update_pool(self,
        instance_id: str,
        pool_id: str,
        *,
        name: str = None,
        description: str = None,
        enabled: bool = None,
        healthy_origins_threshold: int = None,
        origins: List['OriginInput'] = None,
        monitor: str = None,
        notification_channel: str = None,
        healthcheck_region: str = None,
        healthcheck_subnets: List[str] = None,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) UpdatePool(updatePoolOptions *UpdatePoolOptions) (result *Pool, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) UpdatePoolWithContext(ctx context.Context, updatePoolOptions *UpdatePoolOptions) (result *Pool, response *core.DetailedResponse, err error)
ServiceCall<Pool> updatePool(UpdatePoolOptions updatePoolOptions)
updatePool(params)

Request

Instantiate the UpdatePoolOptions struct and set the fields to provide parameter values for the UpdatePool method.

Use the UpdatePoolOptions.Builder to create a UpdatePoolOptions object that contains the parameter values for the updatePool method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a load balancer pool

Update the properties of a load balancer pool.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a load balancer pool.

  • Name of the load balancer pool.

    Examples:
    value
    _source
    _lines
    _html
  • Descriptive text of the load balancer pool.

    Examples:
    value
    _source
    _lines
    _html
  • Whether the load balancer pool is enabled.

    Examples:
    value
    _source
    _lines
    _html
  • The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and we will failover to the next available pool.

    Examples:
    value
    _source
    _lines
    _html
  • The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy.

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

    Examples:
    value
    _source
    _lines
    _html
  • The notification channel.

    Examples:
    value
    _source
    _lines
    _html
  • Health check region of VSIs.

    Allowable values: [,us-south,us-east,eu-gb,eu-du,au-syd,jp-tok]

    Examples:
    value
    _source
    _lines
    _html
  • Health check subnet CRNs.

  • Uniquely identifying a request.

WithContext method only

The UpdatePool options.

The updatePool options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a load balancer pool.

  • Name of the load balancer pool.

    Examples:
    value
    _source
    _lines
    _html
  • Descriptive text of the load balancer pool.

    Examples:
    value
    _source
    _lines
    _html
  • Whether the load balancer pool is enabled.

    Examples:
    value
    _source
    _lines
    _html
  • The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and we will failover to the next available pool.

    Examples:
    value
    _source
    _lines
    _html
  • The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy.

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

    Examples:
    value
    _source
    _lines
    _html
  • The notification channel.

    Examples:
    value
    _source
    _lines
    _html
  • Health check region of VSIs.

    Allowable values: [,us-south,us-east,eu-gb,eu-du,au-syd,jp-tok]

    Examples:
    value
    _source
    _lines
    _html
  • Health check subnet CRNs.

  • Uniquely identifying a request.

  • updatePoolOptions := service.NewUpdatePoolOptions(
    	"5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    	"775e22a-5db5-4614-9c7e-27db0c8dbc13")
    updatePoolOptions.SetName("testPool")
    updatePoolOptions.SetDescription("updating pool")
    updatePoolOptions.SetEnabled(true)
    updatePoolOptions.SetHealthyOriginsThreshold(1)
    updatePoolOptions.SetMonitor("78546a78db87432fea56422")
    result, response, reqErr := service.UpdatePool(updatePoolOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("ID: %s", *result.ID)
    fmt.Printf("Response: %s", response)
  • curl -X PUT 'https://api.dns-svcs.cloud.ibm.com/v1/instances/d5d53a57-212e-48f8-86d0-9082140de0ac/pools/1a696046-ebf5-408a-a9e5-8ee021f30ee8' -H 'Authorization: Bearer xxxxx' -H 'Content-Type: application/json' -d '{
      "name": "dal11-bz-pool",
      "description": "Load balancer pool for dal11 availability zone.",
      "enabled": true,
      "healthy_origins_threshold": 1,
      "origins": [
        {
          "name": "app-server-1",
          "description": "description of the origin server",
          "address": "10.10.16.9",
          "enabled": true
        }
      ],
      "monitor": "74547437-1ae1-4428-9281-83b5c7f84324",
      "notification_channel": "https://mywebsite.com/dns/webhook",
      "healthcheck_subnets": [
        "crn:v1:staging:public:is:us-south-1:a/01652b251c3ae2787110a995d8db0135::subnet:0716-b49ef064-0f89-4fb1-8212-135b12568f04"
      ]
    }'
  • response = dnssvc.update_pool(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
        pool_id="775e22a-5db5-4614-9c7e-27db0c8dbc13",
        name="testpool-update",
        origins=[
            {
                "name": "app-server-1",
                    "address": "10.10.10.10",
                    "enabled": False
            }
        ],
        description="update testpool",
        enabled=False,
        healthy_origins_threshold=5)
    print(response)
  •     try {
          OriginInput originInputModel = new OriginInput.Builder()
          .name("app-server-1")
          .description("description of the origin server")
          .address("10.10.16.8")
          .enabled(true)
          .build();
    
          UpdatePoolOptions updatePoolOptions = new UpdatePoolOptions.Builder()
          .instanceId(instance_id)
          .poolId(pool_id)
          .name("dal10-az-pool")
          .description("Load balancer pool for dal10 availability zone.")
          .enabled(true)
          .healthyOriginsThreshold(Long.valueOf("1"))
          .origins(new java.util.ArrayList<OriginInput>(java.util.Arrays.asList(originInputModel)))
          .monitor(monitor_id)
          .notificationChannel("https://mywebsite.com/dns/webhook")
          .healthcheckRegion("us-east")
          .healthcheckSubnets(new java.util.ArrayList<String>(java.util.Arrays.asList(subnet_id)))
          //.healthcheckSubnets(new java.util.ArrayList<String>(java.util.Arrays.asList("crn:v1:staging:public:is:us-south-1:a/01652b251c3ae2787110a995d8db0135::subnet:0716-b49ef064-0f89-4fb1-8212-135b12568f04")))
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<Pool> response = service.updatePool(updatePoolOptions).execute();
    
          Pool poolResult = response.getResult();
    
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    
  • . . .
    
    const params = {
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        poolId: ${GlbPoolId},
        name: "dal10-az-pool",
        origins: [
            {
              name: "app-server-1",
              description: "description of the origin server",
              address: "10.10.16.8",
              enabled: true
            }
          ],
        description: "Load balancer pool for dal10 availability zone.",
        enabled: true,
        monitor: "7dd6841c-264e-11ea-88df-062967242a6a",
        healthcheckRegion: "us-south",
        healthcheckSubnets: [
            "crn:v1:staging:public:is:us-south-1:a/01652b251c3ae2787110a995d8db0135::subnet:0716-b49ef064-0f89-4fb1-8212-135b12568f04"
        ],
        xCorrelationId: "abc123",
    }
    
    dnsSvcsApisV1.updatePool(params)
      .then(response => {
        const updatedPool = response.result;
        console.log(updatedPool);
      })
      .catch(err => {
        console.log('error:', err);
      });
    
    

Response

Load balancer pool details

Load balancer pool details.

Load balancer pool details.

Load balancer pool details.

Load balancer pool details.

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

List load balancer monitors

List the load balancer monitors

List the load balancer monitors.

List the load balancer monitors.

List the load balancer monitors.

List the load balancer monitors.

GET /instances/{instance_id}/monitors
list_monitors(self,
        instance_id: str,
        *,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) ListMonitors(listMonitorsOptions *ListMonitorsOptions) (result *ListMonitors, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) ListMonitorsWithContext(ctx context.Context, listMonitorsOptions *ListMonitorsOptions) (result *ListMonitors, response *core.DetailedResponse, err error)
ServiceCall<ListMonitors> listMonitors(ListMonitorsOptions listMonitorsOptions)
listMonitors(params)

Request

Instantiate the ListMonitorsOptions struct and set the fields to provide parameter values for the ListMonitors method.

Use the ListMonitorsOptions.Builder to create a ListMonitorsOptions object that contains the parameter values for the listMonitors method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

Query Parameters

  • Specify how many resources to skip over, the default value is 0.

  • Specify maximum resources might be returned.

    Possible values: 1 ≤ value ≤ 1000

    Default: 200

    Example: 200

parameters

  • The unique identifier of a service instance.

  • Uniquely identifying a request.

WithContext method only

The ListMonitors options.

The listMonitors options.

parameters

  • The unique identifier of a service instance.

  • Uniquely identifying a request.

  • listMonitorsOptions := service.NewListMonitorsOptions(
    	"5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85")
    result, response, reqErr := service.ListMonitors(listMonitorsOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("Total Count : %d", *result.TotalCount)
    fmt.Printf("Response: %s", response)
  • curl -X GET 'https://api.dns-svcs.cloud.ibm.com/v1/instances/d5d53a57-212e-48f8-86d0-9082140de0ac/monitors' -H 'Authorization: Bearer xxxxx'
  • response = dnssvc.list_monitors(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85")
    print(response)
  •     try {
          ListMonitorsOptions listMonitorsOptions = new ListMonitorsOptions.Builder()
          .instanceId(instance_id)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<ListMonitors> response = service.listMonitors(listMonitorsOptions).execute();
    
          ListMonitors listMonitorsResult = response.getResult();
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    
  • . . .
    
    const params = {
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        xCorrelationId: 'abc123',
    };
    
    dnsSvcsApisV1.listMonitors(params)
      .then(response => {
        const monitors = response.result;
        console.log(monitors);
      })
      .catch(err => {
        console.log('error:', err);
      });
    

Response

List load balancer monitors response

List load balancer monitors response.

List load balancer monitors response.

List load balancer monitors response.

List load balancer monitors response.

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Create load balancer monitor

Create a load balancer monitor

Create a load balancer monitor.

Create a load balancer monitor.

Create a load balancer monitor.

Create a load balancer monitor.

POST /instances/{instance_id}/monitors
create_monitor(self,
        instance_id: str,
        *,
        name: str = None,
        type: str = None,
        description: str = None,
        port: int = None,
        interval: int = None,
        retries: int = None,
        timeout: int = None,
        method: str = None,
        path: str = None,
        headers_: List['HealthcheckHeader'] = None,
        allow_insecure: bool = None,
        expected_codes: str = None,
        expected_body: str = None,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) CreateMonitor(createMonitorOptions *CreateMonitorOptions) (result *Monitor, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) CreateMonitorWithContext(ctx context.Context, createMonitorOptions *CreateMonitorOptions) (result *Monitor, response *core.DetailedResponse, err error)
ServiceCall<Monitor> createMonitor(CreateMonitorOptions createMonitorOptions)
createMonitor(params)

Request

Instantiate the CreateMonitorOptions struct and set the fields to provide parameter values for the CreateMonitor method.

Use the CreateMonitorOptions.Builder to create a CreateMonitorOptions object that contains the parameter values for the createMonitor method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

Create a load balancer monitor.

parameters

  • The unique identifier of a service instance.

  • The name of the load balancer monitor.

    Examples:
    value
    _source
    _lines
    _html
  • The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS' and 'TCP'.

    Allowable values: [HTTP,HTTPS,TCP]

    Examples:
    value
    _source
    _lines
    _html
  • Descriptive text of the load balancer monitor.

    Examples:
    value
    _source
    _lines
    _html
  • Port number to connect to for the health check. Required for TCP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).

    Possible values: 1 ≤ value ≤ 65535

    Examples:
    value
    _source
    _lines
    _html
  • The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.

    Possible values: 5 ≤ value ≤ 3600

    Examples:
    value
    _source
    _lines
    _html
  • The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.

    Possible values: 0 ≤ value ≤ 3

    Examples:
    value
    _source
    _lines
    _html
  • The timeout (in seconds) before marking the health check as failed.

    Possible values: 1 ≤ value ≤ 10

    Examples:
    value
    _source
    _lines
    _html
  • The method to use for the health check applicable to HTTP/HTTPS based checks, the default value is 'GET'.

    Allowable values: [GET,HEAD]

    Examples:
    value
    _source
    _lines
    _html
  • The endpoint path to health check against. This parameter is only valid for HTTP and HTTPS monitors.

    Examples:
    value
    _source
    _lines
    _html
  • The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. This parameter is only valid for HTTP and HTTPS monitors.

  • Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTPS monitors.

    Examples:
    value
    _source
    _lines
    _html
  • The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.

    Allowable values: [200,201,202,203,204,205,206,207,208,226,2xx]

    Examples:
    value
    _source
    _lines
    _html
  • A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors.

    Possible values: length ≤ 1024

    Examples:
    value
    _source
    _lines
    _html
  • Uniquely identifying a request.

WithContext method only

The CreateMonitor options.

The createMonitor options.

parameters

  • The unique identifier of a service instance.

  • The name of the load balancer monitor.

    Examples:
    value
    _source
    _lines
    _html
  • The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS' and 'TCP'.

    Allowable values: [HTTP,HTTPS,TCP]

    Examples:
    value
    _source
    _lines
    _html
  • Descriptive text of the load balancer monitor.

    Examples:
    value
    _source
    _lines
    _html
  • Port number to connect to for the health check. Required for TCP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).

    Possible values: 1 ≤ value ≤ 65535

    Examples:
    value
    _source
    _lines
    _html
  • The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.

    Possible values: 5 ≤ value ≤ 3600

    Examples:
    value
    _source
    _lines
    _html
  • The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.

    Possible values: 0 ≤ value ≤ 3

    Examples:
    value
    _source
    _lines
    _html
  • The timeout (in seconds) before marking the health check as failed.

    Possible values: 1 ≤ value ≤ 10

    Examples:
    value
    _source
    _lines
    _html
  • The method to use for the health check applicable to HTTP/HTTPS based checks, the default value is 'GET'.

    Allowable values: [GET,HEAD]

    Examples:
    value
    _source
    _lines
    _html
  • The endpoint path to health check against. This parameter is only valid for HTTP and HTTPS monitors.

    Examples:
    value
    _source
    _lines
    _html
  • The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. This parameter is only valid for HTTP and HTTPS monitors.

  • Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTPS monitors.

    Examples:
    value
    _source
    _lines
    _html
  • The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.

    Allowable values: [200,201,202,203,204,205,206,207,208,226,2xx]

    Examples:
    value
    _source
    _lines
    _html
  • A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors.

    Possible values: length ≤ 1024

    Examples:
    value
    _source
    _lines
    _html
  • Uniquely identifying a request.

  • createMonitorOptions := service.NewCreateMonitorOptions("5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85")
    createMonitorOptions.SetName("test")
    createMonitorOptions.SetExpectedCodes("200")
    createMonitorOptions.SetType(dnssvcsv1.CreateMonitorOptions_Type_Http)
    createMonitorOptions.SetDescription("PDNS Load balancer monitor.")
    createMonitorOptions.SetPort(8080)
    createMonitorOptions.SetInterval(60)
    createMonitorOptions.SetRetries(2)
    createMonitorOptions.SetTimeout(5)
    createMonitorOptions.SetMethod(dnssvcsv1.CreateMonitorOptions_Method_Get)
    createMonitorOptions.SetPath("health")
    createMonitorOptions.SetAllowInsecure(false)
    createMonitorOptions.SetExpectedBody("alive")
    result, response, reqErr := service.CreateMonitor(createMonitorOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("Result ID : %s", *result.ID)
    fmt.Printf("Response: %s", response)
  • curl -X POST 'https://api.dns-svcs.cloud.ibm.com/v1/instances/d5d53a57-212e-48f8-86d0-9082140de0ac/monitors' -H 'Authorization: Bearer xxxxxx' -H 'Content-Type: application/json' -d '{
      "name": "healthcheck-monitor",
      "description": "Load balancer monitor for glb.example.com.",
      "type": "HTTPS",
      "port": 8080,
      "interval": 60,
      "retries": 2,
      "timeout": 5,
      "method": "GET",
      "path": "/health",
      "headers": [
        {
          "name": "Host",
          "value": [
            "origin.example.com"
          ]
        }
      ],
      "allow_insecure": false,
      "expected_codes": "200",
      "expected_body": "alive"
    }'
  • response = dnssvc.create_monitor(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
        name='testmonitor1',
        lbtype='HTTP',
        description='Creating testmonitor1',
        port=8080,
        interval=60,
        retries=0,
        timeout=5,
        method='GET',
        path="/health",
        header={"Host": ["example.com"], "X-App-ID": ["abc123"]},
        allow_insecure=True,
        expected_body="alive")
    print(response)
  •     try {
          HealthcheckHeader healthcheckHeaderModel = new HealthcheckHeader.Builder()
          .name("Host")
          .value(new java.util.ArrayList<String>(java.util.Arrays.asList("origin.example.com")))
          .build();
    
          CreateMonitorOptions createMonitorOptions = new CreateMonitorOptions.Builder()
          .instanceId(instance_id)
          .name("test-healthcheck-monitor")
          .description("Load balancer monitor for glb.example.com.")
          .type("HTTPS")
          .port(Long.valueOf("8080"))
          .interval(Long.valueOf("60"))
          .retries(Long.valueOf("2"))
          .timeout(Long.valueOf("5"))
          .method("GET")
          .path("/health")
          .headers(new java.util.ArrayList<HealthcheckHeader>(java.util.Arrays.asList(healthcheckHeaderModel)))
          .allowInsecure(false)
          .expectedCodes("200")
          .expectedBody("alive")
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<Monitor> response = service.createMonitor(createMonitorOptions).execute();
    
          Monitor monitorResult = response.getResult();
          monitor_id = monitorResult.getId();
    
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    
  • . . .
    
    const params = {
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        name: 'sdkMonitor-example',
        type: 'HTTP',
        description: 'PDNS Load balancer monitor.',
        port: 8080,
        interval: 60,
        retries: 2,
        timeout: 5,
        method: 'GET',
        path: 'health',
        allowInsecure: false,
        expectedCodes: '200',
        expectedBody: 'alive',
        xCorrelationId: 'abc123',
    };
    
    dnsSvcsApisV1.createMonitor(params)
      .then(response => {
        const monitor = response.result;
        console.log(monitor);
      })
      .catch(err => {
        console.log('error:', err);
      });
    
    
    

Response

Load balancer monitor details

Load balancer monitor details.

Load balancer monitor details.

Load balancer monitor details.

Load balancer monitor details.

Status Code

  • Load balancer monitor created successfully.

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Delete load balancer monitor

Delete a load balancer monitor

Delete a load balancer monitor.

Delete a load balancer monitor.

Delete a load balancer monitor.

Delete a load balancer monitor.

DELETE /instances/{instance_id}/monitors/{monitor_id}
delete_monitor(self,
        instance_id: str,
        monitor_id: str,
        *,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) DeleteMonitor(deleteMonitorOptions *DeleteMonitorOptions) (response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) DeleteMonitorWithContext(ctx context.Context, deleteMonitorOptions *DeleteMonitorOptions) (response *core.DetailedResponse, err error)
ServiceCall<Void> deleteMonitor(DeleteMonitorOptions deleteMonitorOptions)
deleteMonitor(params)

Request

Instantiate the DeleteMonitorOptions struct and set the fields to provide parameter values for the DeleteMonitor method.

Use the DeleteMonitorOptions.Builder to create a DeleteMonitorOptions object that contains the parameter values for the deleteMonitor method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a load balancer monitor

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a load balancer monitor.

  • Uniquely identifying a request.

WithContext method only

The DeleteMonitor options.

The deleteMonitor options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a load balancer monitor.

  • Uniquely identifying a request.

  • deleteMonitorOptions := service.NewDeleteMonitorOptions(
    	"5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    	"775e22a-5db5-4614-9c7e-27db0cbc13")
    response, reqErr := service.DeleteMonitor(deleteMonitorOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("Response: %s", response)
  • curl -X DELETE 'https://api.dns-svcs.cloud.ibm.com/v1/instances/d5d53a57-212e-48f8-86d0-9082140de0ac/monitors/245f3493-78d3-432c-9bf5-933a2543ebad' -H 'Authorization: Bearer xxxxx'
  • response = dnssvc.delete_monitor(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
        monitor_id="775e22a-5db5-4614-9c7e-27db0cbc13")
    print(response)
  •     try {
          DeleteMonitorOptions deleteMonitorOptions = new DeleteMonitorOptions.Builder()
          .instanceId(instance_id)
          .monitorId(monitor_id)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<Void> response = service.deleteMonitor(deleteMonitorOptions).execute();
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    
  • . . .
    
    const params = {
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        monitorId: ${GlbMonitorId},
        xCorrelationId: 'abc123',
    };
    
    dnsSvcsApisV1.deleteMonitor(params)
      .then(response => {
        const deletedMonitor = response.result;
        console.log(deletedMonitor);
      })
      .catch(err => {
        console.log('error:', err);
      });
    

Response

Status Code

  • The load balancer monitor was deleted successfully

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Get load balancer monitor

Get details of a load balancer monitor

Get details of a load balancer monitor.

Get details of a load balancer monitor.

Get details of a load balancer monitor.

Get details of a load balancer monitor.

GET /instances/{instance_id}/monitors/{monitor_id}
get_monitor(self,
        instance_id: str,
        monitor_id: str,
        *,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) GetMonitor(getMonitorOptions *GetMonitorOptions) (result *Monitor, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) GetMonitorWithContext(ctx context.Context, getMonitorOptions *GetMonitorOptions) (result *Monitor, response *core.DetailedResponse, err error)
ServiceCall<Monitor> getMonitor(GetMonitorOptions getMonitorOptions)
getMonitor(params)

Request

Instantiate the GetMonitorOptions struct and set the fields to provide parameter values for the GetMonitor method.

Use the GetMonitorOptions.Builder to create a GetMonitorOptions object that contains the parameter values for the getMonitor method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a load balancer monitor

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a load balancer monitor.

  • Uniquely identifying a request.

WithContext method only

The GetMonitor options.

The getMonitor options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a load balancer monitor.

  • Uniquely identifying a request.

  • getMonitorOptions := service.NewGetMonitorOptions(
    	"5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    	"775e22a-5db5-4614-9c7e-27db0cbc13")
    result, response, reqErr := service.GetMonitor(getMonitorOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("ID : %s", *result.ID)
    fmt.Printf("Response: %s", response)
  • curl -X GET 'https://api.dns-svcs.cloud.ibm.com/v1/instances/d5d53a57-212e-48f8-86d0-9082140de0ac/monitors/245f3493-78d3-432c-9bf5-933a2543ebad' -H 'Authorization: Bearer xxxxx'
  • response = dnssvc.get_monitor(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
        monitor_id="775e22a-5db5-4614-9c7e-27db0cbc13")
    print(response)
  •     try {
          GetMonitorOptions getMonitorOptions = new GetMonitorOptions.Builder()
          .instanceId(instance_id)
          .monitorId(monitor_id)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<Monitor> response = service.getMonitor(getMonitorOptions).execute();
    
          Monitor monitorResult = response.getResult();
    
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    
  • . . .
    
    const params = {
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        monitorId: ${GlbMonitorId},
        xCorrelationId: 'abc123',
    };
    
    dnsSvcsApisV1.getMonitor(params)
      .then(response => {
        const deletedMonitor = response.result;
        console.log(deletedMonitor);
      })
      .catch(err => {
        console.log('error:', err);
      });
    

Response

Load balancer monitor details

Load balancer monitor details.

Load balancer monitor details.

Load balancer monitor details.

Load balancer monitor details.

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Update load balancer monitor

Update the properties of a load balancer monitor.

Update the properties of a load balancer monitor.

Update the properties of a load balancer monitor.

Update the properties of a load balancer monitor.

Update the properties of a load balancer monitor.

PUT /instances/{instance_id}/monitors/{monitor_id}
update_monitor(self,
        instance_id: str,
        monitor_id: str,
        *,
        name: str = None,
        description: str = None,
        type: str = None,
        port: int = None,
        interval: int = None,
        retries: int = None,
        timeout: int = None,
        method: str = None,
        path: str = None,
        headers_: List['HealthcheckHeader'] = None,
        allow_insecure: bool = None,
        expected_codes: str = None,
        expected_body: str = None,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) UpdateMonitor(updateMonitorOptions *UpdateMonitorOptions) (result *Monitor, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) UpdateMonitorWithContext(ctx context.Context, updateMonitorOptions *UpdateMonitorOptions) (result *Monitor, response *core.DetailedResponse, err error)
ServiceCall<Monitor> updateMonitor(UpdateMonitorOptions updateMonitorOptions)
updateMonitor(params)

Request

Instantiate the UpdateMonitorOptions struct and set the fields to provide parameter values for the UpdateMonitor method.

Use the UpdateMonitorOptions.Builder to create a UpdateMonitorOptions object that contains the parameter values for the updateMonitor method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a load balancer monitor

Update the properties of a load balancer monitor.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a load balancer monitor.

  • The name of the load balancer monitor.

    Examples:
    value
    _source
    _lines
    _html
  • Descriptive text of the load balancer monitor.

    Examples:
    value
    _source
    _lines
    _html
  • The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS' and 'TCP'.

    Allowable values: [HTTP,HTTPS,TCP]

    Examples:
    value
    _source
    _lines
    _html
  • Port number to connect to for the health check. Required for TCP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).

    Possible values: 1 ≤ value ≤ 65535

    Examples:
    value
    _source
    _lines
    _html
  • The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.

    Possible values: 5 ≤ value ≤ 3600

    Examples:
    value
    _source
    _lines
    _html
  • The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.

    Possible values: 0 ≤ value ≤ 3

    Examples:
    value
    _source
    _lines
    _html
  • The timeout (in seconds) before marking the health check as failed.

    Possible values: 1 ≤ value ≤ 10

    Examples:
    value
    _source
    _lines
    _html
  • The method to use for the health check applicable to HTTP/HTTPS based checks, the default value is 'GET'.

    Allowable values: [GET,HEAD]

    Examples:
    value
    _source
    _lines
    _html
  • The endpoint path to health check against. This parameter is only valid for HTTP and HTTPS monitors.

    Examples:
    value
    _source
    _lines
    _html
  • The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. This parameter is only valid for HTTP and HTTPS monitors.

  • Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.

    Examples:
    value
    _source
    _lines
    _html
  • The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.

    Allowable values: [200,201,202,203,204,205,206,207,208,226,2xx]

    Examples:
    value
    _source
    _lines
    _html
  • A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors.

    Possible values: length ≤ 1024

    Examples:
    value
    _source
    _lines
    _html
  • Uniquely identifying a request.

WithContext method only

The UpdateMonitor options.

The updateMonitor options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a load balancer monitor.

  • The name of the load balancer monitor.

    Examples:
    value
    _source
    _lines
    _html
  • Descriptive text of the load balancer monitor.

    Examples:
    value
    _source
    _lines
    _html
  • The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS' and 'TCP'.

    Allowable values: [HTTP,HTTPS,TCP]

    Examples:
    value
    _source
    _lines
    _html
  • Port number to connect to for the health check. Required for TCP checks. HTTP and HTTPS checks should only define the port when using a non-standard port (HTTP: default 80, HTTPS: default 443).

    Possible values: 1 ≤ value ≤ 65535

    Examples:
    value
    _source
    _lines
    _html
  • The interval between each health check. Shorter intervals may improve failover time, but will increase load on the origins as we check from multiple locations.

    Possible values: 5 ≤ value ≤ 3600

    Examples:
    value
    _source
    _lines
    _html
  • The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.

    Possible values: 0 ≤ value ≤ 3

    Examples:
    value
    _source
    _lines
    _html
  • The timeout (in seconds) before marking the health check as failed.

    Possible values: 1 ≤ value ≤ 10

    Examples:
    value
    _source
    _lines
    _html
  • The method to use for the health check applicable to HTTP/HTTPS based checks, the default value is 'GET'.

    Allowable values: [GET,HEAD]

    Examples:
    value
    _source
    _lines
    _html
  • The endpoint path to health check against. This parameter is only valid for HTTP and HTTPS monitors.

    Examples:
    value
    _source
    _lines
    _html
  • The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. This parameter is only valid for HTTP and HTTPS monitors.

  • Do not validate the certificate when monitor use HTTPS. This parameter is currently only valid for HTTP and HTTPS monitors.

    Examples:
    value
    _source
    _lines
    _html
  • The expected HTTP response code or code range of the health check. This parameter is only valid for HTTP and HTTPS monitors.

    Allowable values: [200,201,202,203,204,205,206,207,208,226,2xx]

    Examples:
    value
    _source
    _lines
    _html
  • A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy. This parameter is only valid for HTTP and HTTPS monitors.

    Possible values: length ≤ 1024

    Examples:
    value
    _source
    _lines
    _html
  • Uniquely identifying a request.

  • updateMonitorOptions := service.NewUpdateMonitorOptions(
    	"5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    	"775e22a-5db5-4614-9c7e-27db0cbc13")
    updateMonitorOptions.SetName("update monitor")
    updateMonitorOptions.SetType(dnssvcsv1.UpdateMonitorOptions_Type_Https)
    result, response, reqErr := service.UpdateMonitor(updateMonitorOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("Result ID : %s", *result.ID)
    fmt.Printf("Response: %s", response)
  • curl -X PUT 'https://api.dns-svcs.cloud.ibm.com/v1/instances/d5d53a57-212e-48f8-86d0-9082140de0ac/monitors/245f3493-78d3-432c-9bf5-933a2543ebad' -H 'Authorization: Bearer xxxxxx' -H 'Content-Type: application/json' -d '{
      "name": "healthcheck-monitor",
      "description": "Load balancer monitor for glb.example.com.",
      "type": "HTTPS",
      "port": 8080,
      "interval": 60,
      "retries": 2,
      "timeout": 5,
      "method": "GET",
      "path": "/health",
      "headers": [
        {
          "name": "Host",
          "value": [
            "origin-update.example.com"
          ]
        }
      ],
      "allow_insecure": false,
      "expected_codes": "200",
      "expected_body": "alive"
    }'
  • response = dnssvc.update_monitor(
        instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
        monitor_id="775e22a-5db5-4614-9c7e-27db0cbc13",
        name='testmonitor1-update',
        lbtype='HTTP',
        description='updating testmonitor1',
        port=80,
        interval=120,
        retries=3,
        timeout=5,
        method='GET',
        path="/health",
        header={
            "Host": [
                "example.com"
            ],
            "X-App-ID": [
                "abc123"
            ]
        },
        allow_insecure=True,
        expected_body="alive")
    print(response)
  •     try {
          HealthcheckHeader healthcheckHeaderModel = new HealthcheckHeader.Builder()
          .name("Host")
          .value(new java.util.ArrayList<String>(java.util.Arrays.asList("origin.example.com")))
          .build();
    
          UpdateMonitorOptions updateMonitorOptions = new UpdateMonitorOptions.Builder()
          .instanceId(instance_id)
          .monitorId(monitor_id)
          .name("healthcheck-monitor")
          .description("Load balancer monitor for glb.example.com.")
          .type("HTTPS")
          .port(Long.valueOf("8080"))
          .interval(Long.valueOf("60"))
          .retries(Long.valueOf("2"))
          .timeout(Long.valueOf("5"))
          .method("GET")
          .path("/health")
          .headers(new java.util.ArrayList<HealthcheckHeader>(java.util.Arrays.asList(healthcheckHeaderModel)))
          .allowInsecure(false)
          .expectedCodes("200")
          .expectedBody("alive")
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<Monitor> response = service.updateMonitor(updateMonitorOptions).execute();
    
          Monitor monitorResult = response.getResult();
    
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    
  • . . .
    
    const params = {
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        monitorId: ${GlbMonitorId},
        description: 'Update Description - SDK Test',
        name: 'UpdatedSDK-Test',
        xCorrelationId: 'abc123',
    };
    
    dnsSvcsApisV1.updateMonitor(params)
      .then(response => {
        const updatedMonitor = response.result;
        console.log(updatedMonitor);
      })
      .catch(err => {
        console.log('error:', err);
      });
    
    

Response

Load balancer monitor details

Load balancer monitor details.

Load balancer monitor details.

Load balancer monitor details.

Load balancer monitor details.

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

List custom resolvers

List the custom resolvers

List the custom resolvers.

List the custom resolvers.

List the custom resolvers.

List the custom resolvers.

GET /instances/{instance_id}/custom_resolvers
list_custom_resolvers(self,
        instance_id: str,
        *,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) ListCustomResolvers(listCustomResolversOptions *ListCustomResolversOptions) (result *CustomResolverList, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) ListCustomResolversWithContext(ctx context.Context, listCustomResolversOptions *ListCustomResolversOptions) (result *CustomResolverList, response *core.DetailedResponse, err error)
ServiceCall<CustomResolverList> listCustomResolvers(ListCustomResolversOptions listCustomResolversOptions)
listCustomResolvers(params)

Request

Instantiate the ListCustomResolversOptions struct and set the fields to provide parameter values for the ListCustomResolvers method.

Use the ListCustomResolversOptions.Builder to create a ListCustomResolversOptions object that contains the parameter values for the listCustomResolvers method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

parameters

  • The unique identifier of a service instance.

  • Uniquely identifying a request.

WithContext method only

The ListCustomResolvers options.

The listCustomResolvers options.

parameters

  • The unique identifier of a service instance.

  • Uniquely identifying a request.

  • curl -X GET   https://api.dns-svcs.cloud.ibm.com/v1/instances/2be5d4a7-78f0-4c62-a957-41dc15342777/custom_resolvers   -H 'Authorization: Bearer xxxxxx'
    
  • listCustomResolverOptions := service.NewListCustomResolversOptions(instanceID)
    listCustomResolverOptions.SetXCorrelationID("abc123")
    result, response, reqErr := service.ListCustomResolvers(listCustomResolverOptions)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("Result ID : %s", *result.CustomResolvers[0].ID)
    fmt.Printf("Response: %s", response)
  • response = dnssvc.list_custom_resolvers(
    instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85")
    print(response)
  • . . .
    
    const params = {
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        xCorrelationId: 'abc123',
    };
    
    dnsSvcsApisV1.listCustomResolvers(params)
      .then(response => {
        const customResolvers = response.result;
        console.log(customResolvers);
      })
      .catch(err => {
        console.log('error:', err);
      });
  •     try {
          ListCustomResolversOptions listCustomResolversOptions = new ListCustomResolversOptions.Builder()
          .instanceId(instance_id)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<CustomResolverList> response = service.listCustomResolvers(listCustomResolversOptions).execute();
    
          CustomResolverList listCustomResolverResult = response.getResult();
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    

Response

List custom resolvers response.

List custom resolvers response.

List custom resolvers response.

List custom resolvers response.

List custom resolvers response.

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Create a custom resolver

Create a custom resolver

Create a custom resolver.

Create a custom resolver.

Create a custom resolver.

Create a custom resolver.

POST /instances/{instance_id}/custom_resolvers
create_custom_resolver(self,
        instance_id: str,
        *,
        name: str = None,
        locations: List['LocationInput'] = None,
        description: str = None,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) CreateCustomResolver(createCustomResolverOptions *CreateCustomResolverOptions) (result *CustomResolver, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) CreateCustomResolverWithContext(ctx context.Context, createCustomResolverOptions *CreateCustomResolverOptions) (result *CustomResolver, response *core.DetailedResponse, err error)
ServiceCall<CustomResolver> createCustomResolver(CreateCustomResolverOptions createCustomResolverOptions)
createCustomResolver(params)

Request

Instantiate the CreateCustomResolverOptions struct and set the fields to provide parameter values for the CreateCustomResolver method.

Use the CreateCustomResolverOptions.Builder to create a CreateCustomResolverOptions object that contains the parameter values for the createCustomResolver method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

Create a custom resolver.

parameters

  • The unique identifier of a service instance.

  • Name of the custom resolver.

    Examples:
    value
    _source
    _lines
    _html
  • Locations on which the custom resolver will be running.

  • Descriptive text of the custom resolver.

    Examples:
    value
    _source
    _lines
    _html
  • Uniquely identifying a request.

WithContext method only

The CreateCustomResolver options.

The createCustomResolver options.

parameters

  • The unique identifier of a service instance.

  • Name of the custom resolver.

    Examples:
    value
    _source
    _lines
    _html
  • Locations on which the custom resolver will be running.

  • Descriptive text of the custom resolver.

    Examples:
    value
    _source
    _lines
    _html
  • Uniquely identifying a request.

  • curl -X POST   https://api.dns-svcs.cloud.ibm.com/v1/instances/2be5d4a7-78f0-4c62-a957-41dc15342777/custom_resolvers   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'   -d '{
        "name": "custom-resolver-01",
        "description": "test custom resolver",
        "locations": [
            {
                "subnet_crn": "crn:v1:staging:public:is:us-south-1:a/01652b251c3ae2787110a995d8db0135::subnet:0716-03d54d71-b438-4d20-b943-76d3d2a1a590",
                "enabled": true
            }
        ]
    }'
    
  • locationInputModel := new(dnssvcsv1.LocationInput)
    locationInputModel.SubnetCrn = core.StringPtr("0716-b49ef064-0f89-4fb1-8212-135b12568f04")
    locationInputModel.Enabled = core.BoolPtr(false)
    
    // Construct an instance of the CreateCustomResolverOptions model
    createCustomResolverOptions := service.NewCreateCustomResolverOptions("5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85")
    createCustomResolverOptions.SetName("custom-resolver")
    createCustomResolverOptions.SetDescription("custom-resolver")
    createCustomResolverOptions.SetXCorrelationID("testString")				createCustomResolverOptions.SetLocations([]dnssvcsv1.LocationInput{*locationInputModel})
    result, response, reqErr := service.CreateCustomResolver(createCustomResolverOptionsModel)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("Result ID : %s", *result.ID)
    fmt.Printf("Response: %s", response)
  • response  = dnssvc.create_custom_resolver(
    instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    name='testcustomeresolver1',
    locations={"subnet_crn": "crn:v1:bluemix:public:is:us-south-1:a/01652b251c3ae2787110a995d8db0135::subnet:0716-b49ef064-0f89-4fb1-8212-135b12568f04", "enabled": true },
    description="Creating Custom Resolver),
    print(response)
  • 
    const locationInputModel = {
              subnet_crn: ${SUBNET_CRN},
              enabled: false,
    };
    const params = {
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        name: 'sdkMonitor-example',
        locations: [locationInputModel],
        description: 'SDK test custom resolver',
        xCorrelationId: 'abc123',
    };
    
    dnsSvcsApisV1.createCustomResolver(params)
      .then(response => {
        const customResolver = response.result;
        console.log(customResolver);
      })
      .catch(err => {
        console.log('error:', err);
      });
    
    
  •     try {
          LocationInput locationInputModel = new LocationInput.Builder()
          .subnetCrn("crn:v1:bluemix:public:is:us-south-1:a/01652b251c3ae2787110a995d8db0135::subnet:0716-b49ef064-0f89-4fb1-8212-135b12568f04")
          .enabled(false)
          .build();
          
          CreateCustomResolverOptions createCustomResolverOptions = new CreateCustomResolverOptions.Builder()
          .instanceId(instance_id)
          .name("my-resolver")
          .description("custom resolver")
          .locations(new java.util.ArrayList<LocationInput>(java.util.Arrays.asList(locationInputModel)))
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<CustomResolver> response = dnsSvcsService.createCustomResolver(createCustomResolverOptions).execute();
    
          CustomResolver customresolverResult = response.getResult();
          resolver_id = customresolverResult.getId();
    
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    

Response

custom resolver details

custom resolver details.

custom resolver details.

custom resolver details.

custom resolver details.

Status Code

  • custom resolver created successfully.

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Delete a custom resolver

Delete a custom resolver

Delete a custom resolver.

Delete a custom resolver.

Delete a custom resolver.

Delete a custom resolver.

DELETE /instances/{instance_id}/custom_resolvers/{resolver_id}
delete_custom_resolver(self,
        instance_id: str,
        resolver_id: str,
        *,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) DeleteCustomResolver(deleteCustomResolverOptions *DeleteCustomResolverOptions) (response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) DeleteCustomResolverWithContext(ctx context.Context, deleteCustomResolverOptions *DeleteCustomResolverOptions) (response *core.DetailedResponse, err error)
ServiceCall<Void> deleteCustomResolver(DeleteCustomResolverOptions deleteCustomResolverOptions)
deleteCustomResolver(params)

Request

Instantiate the DeleteCustomResolverOptions struct and set the fields to provide parameter values for the DeleteCustomResolver method.

Use the DeleteCustomResolverOptions.Builder to create a DeleteCustomResolverOptions object that contains the parameter values for the deleteCustomResolver method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a custom resolver

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a custom resolver.

  • Uniquely identifying a request.

WithContext method only

The DeleteCustomResolver options.

The deleteCustomResolver options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a custom resolver.

  • Uniquely identifying a request.

  • curl -X DELETE   https://api.dns-svcs.cloud.ibm.com/v1/instances/2be5d4a7-78f0-4c62-a957-41dc15342777/custom_resolvers/ddbe7a53-7971-46dc-b021-420335c31562   -H 'Authorization: Bearer xxxxxx'
    
  • deleteCustomResolverOptionsModel := service.NewDeleteCustomResolverOptions(
                      "5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85", 
                      "775e22a-5db5-4614-9c7e-27db0cbc13")
    deleteCustomResolverOptionsModel.SetXCorrelationID("testString")
    response, reqErr := service.DeleteCustomResolver(deleteCustomResolverOptionsModel)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("Response: %s", response)
  • response = dnssvc.delete_custom_resolver(
    instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    resolver_id="022b91ce-2c1d-4702-8129-b71c77e5da65",)
    print(response)
  • . . .
    
    const params = {
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        resolverId: ${CustomResolveId},
        xCorrelationId: 'abc123',
    };
    dnsSvcsApisV1.deleteCustomResolver(params)
      .then(response => {
        const deletedCustomResolver = response.result;
        console.log(deletedCustomResolver);
      })
      .catch(err => {
        console.log('error:', err);
      });
    
  •     try {
          DeleteCustomResolverOptions deleteCustomResolverOptions = new DeleteCustomResolverOptions.Builder()
          .instanceId(instance_id)
          .resolverId(resolver_id)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<Void> response = service.deleteCustomResolver(deleteCustomResolverOptions).execute();
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    

Response

Status Code

  • The custom resolver was deleted successfully

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Get a custom resolver

Get details of a custom resolver

Get details of a custom resolver.

Get details of a custom resolver.

Get details of a custom resolver.

Get details of a custom resolver.

GET /instances/{instance_id}/custom_resolvers/{resolver_id}
get_custom_resolver(self,
        instance_id: str,
        resolver_id: str,
        *,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) GetCustomResolver(getCustomResolverOptions *GetCustomResolverOptions) (result *CustomResolver, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) GetCustomResolverWithContext(ctx context.Context, getCustomResolverOptions *GetCustomResolverOptions) (result *CustomResolver, response *core.DetailedResponse, err error)
ServiceCall<CustomResolver> getCustomResolver(GetCustomResolverOptions getCustomResolverOptions)
getCustomResolver(params)

Request

Instantiate the GetCustomResolverOptions struct and set the fields to provide parameter values for the GetCustomResolver method.

Use the GetCustomResolverOptions.Builder to create a GetCustomResolverOptions object that contains the parameter values for the getCustomResolver method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a custom resolver

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a custom resolver.

  • Uniquely identifying a request.

WithContext method only

The GetCustomResolver options.

The getCustomResolver options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a custom resolver.

  • Uniquely identifying a request.

  • curl -X GET   https://api.dns-svcs.cloud.ibm.com/v1/instances/2be5d4a7-78f0-4c62-a957-41dc15342777/custom_resolvers/ddbe7a53-7971-46dc-b021-420335c31562   -H 'Authorization: Bearer xxxxxx'
    
  • getCustomResolverOptionsModel := service.NewGetCustomResolverOptions(
                     "5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85", 
                     "775e22a-5db5-4614-9c7e-27db0cbc13")
    getCustomResolverOptionsModel.SetXCorrelationID("testString")
    result, response, reqErr := service.GetCustomResolver(getCustomResolverOptionsModel)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("Result ID : %s", *result.ID)
    fmt.Printf("Response: %s", response)
  • response = dnssvc.get_custom_resolver(
    instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    resolver_id="022b91ce-2c1d-4702-8129-b71c77e5da65",)
    print(response)
  • . . .
    
    const params = {
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        resolverId: ${CustomResolverId},
        xCorrelationId: 'abc123',
    };
    
    dnsSvcsApisV1.getCustomResolver(params)
      .then(response => {
        const customResolver = response.result;
        console.log(customResolver);
      })
      .catch(err => {
        console.log('error:', err);
      });
    
  •     try {
          GetCustomResolverOptions getCustomResolverOptions = new GetCustomResolverOptions.Builder()
          .instanceId(instance_id)
          .resolverId(resolver_id)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<CustomResolver> response = service.getCustomResolver(getCustomResolverOptions).execute();
    
          CustomResolver customresolverResult = response.getResult();
    
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    

Response

custom resolver details

custom resolver details.

custom resolver details.

custom resolver details.

custom resolver details.

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Update a custom resolver

Update the properties of a custom resolver.

Update the properties of a custom resolver.

Update the properties of a custom resolver.

Update the properties of a custom resolver.

Update the properties of a custom resolver.

PATCH /instances/{instance_id}/custom_resolvers/{resolver_id}
update_custom_resolver(self,
        instance_id: str,
        resolver_id: str,
        *,
        name: str = None,
        description: str = None,
        enabled: bool = None,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) UpdateCustomResolver(updateCustomResolverOptions *UpdateCustomResolverOptions) (result *CustomResolver, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) UpdateCustomResolverWithContext(ctx context.Context, updateCustomResolverOptions *UpdateCustomResolverOptions) (result *CustomResolver, response *core.DetailedResponse, err error)
ServiceCall<CustomResolver> updateCustomResolver(UpdateCustomResolverOptions updateCustomResolverOptions)
updateCustomResolver(params)

Request

Instantiate the UpdateCustomResolverOptions struct and set the fields to provide parameter values for the UpdateCustomResolver method.

Use the UpdateCustomResolverOptions.Builder to create a UpdateCustomResolverOptions object that contains the parameter values for the updateCustomResolver method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a custom resolver

Update the properties of a custom resolver.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a custom resolver.

  • Name of the custom resolver.

    Examples:
    value
    _source
    _lines
    _html
  • Descriptive text of the custom resolver.

    Examples:
    value
    _source
    _lines
    _html
  • Whether the custom resolver is enabled.

    Examples:
    value
    _source
    _lines
    _html
  • Uniquely identifying a request.

WithContext method only

The UpdateCustomResolver options.

The updateCustomResolver options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a custom resolver.

  • Name of the custom resolver.

    Examples:
    value
    _source
    _lines
    _html
  • Descriptive text of the custom resolver.

    Examples:
    value
    _source
    _lines
    _html
  • Whether the custom resolver is enabled.

    Examples:
    value
    _source
    _lines
    _html
  • Uniquely identifying a request.

  • curl -X PATCH   https://api.dns-svcs.cloud.ibm.com/v1/instances/2be5d4a7-78f0-4c62-a957-41dc15342777/custom_resolvers/ddbe7a53-7971-46dc-b021-420335c31562   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'   -d '{
        "name": "custom-resolver-01",
        "description": "test custom resolver",
        "enabled": true
    }'
    
  • updateCustomResolverOptionsModel := service.NewUpdateCustomResolverOptions(
                      "5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85", 
                      "775e22a-5db5-4614-9c7e-27db0cbc13")
    updateCustomResolverOptionsModel.SetName("my-resolver")
    updateCustomResolverOptionsModel.SetDescription("custom resolver")
    updateCustomResolverOptionsModel.SetEnabled(false)
    updateCustomResolverOptionsModel.SetXCorrelationID("testString")
    result, response, reqErr := service.UpdateCustomResolver(updateCustomResolverOptionsModel)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("Result ID : %s", *result.ID)
    fmt.Printf("Response: %s", response)
  • response = dnssvc.update_custom_resolver(
    instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    resolver_id="022b91ce-2c1d-4702-8129-b71c77e5da65", 
    name = "updatecustomresolvers"
    description = "Updating Custom Resolvers")
    print(response)
  • . . .
    
    const params = {
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        resolverId: ${CustomResolverId},
        description: 'Update Description',
        name: 'Updated-Test',
        enabled: false,
        xCorrelationId: 'abc123',
    };
    
    dnsSvcsApisV1.updateCustomResolver(params)
      .then(response => {
        const updatedCustomResolver = response.result;
        console.log(updatedCustomResolver);
      })
      .catch(err => {
        console.log('error:', err);
      });
    
  •     try {
          UpdateCustomResolverOptions updateCustomResolverOptions = new UpdateCustomResolverOptions.Builder()
          .instanceId(instance_id)
          .resolverId(resolver_id)
          .name("my-resolver")
          .description("custom resolver")
          .enabled(false)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<CustomResolver> response = service.updateCustomResolver(updateCustomResolverOptions).execute();
    
          CustomResolver customresolverResult = response.getResult();
    
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }

Response

custom resolver details

custom resolver details.

custom resolver details.

custom resolver details.

custom resolver details.

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Update the locations order of a custom resolver

Update the locations order of a custom resolver

PUT /instances/{instance_id}/custom_resolvers/{resolver_id}/locations_order

Request

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a custom resolver

Update the properties of a custom resolver.

  • curl -X PUT   https://api.dns-svcs.cloud.ibm.com/v1/instances/2be5d4a7-78f0-4c62-a957-41dc15342777/custom_resolvers/ddbe7a53-7971-46dc-b021-420335c31562/locations_order   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'   -d '{
        "locations": ["6850cbff-e330-402d-91a7-d65d63c95728", "3adf42c3-48c2-4c79-86f8-eb7ac4806cb2"]
    }'
    

Response

custom resolver details

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Add custom resolver location

Add custom resolver location

Add custom resolver location.

Add custom resolver location.

Add custom resolver location.

Add custom resolver location.

POST /instances/{instance_id}/custom_resolvers/{resolver_id}/locations
add_custom_resolver_location(self,
        instance_id: str,
        resolver_id: str,
        *,
        subnet_crn: str = None,
        enabled: bool = None,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) AddCustomResolverLocation(addCustomResolverLocationOptions *AddCustomResolverLocationOptions) (result *Location, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) AddCustomResolverLocationWithContext(ctx context.Context, addCustomResolverLocationOptions *AddCustomResolverLocationOptions) (result *Location, response *core.DetailedResponse, err error)
ServiceCall<Location> addCustomResolverLocation(AddCustomResolverLocationOptions addCustomResolverLocationOptions)
addCustomResolverLocation(params)

Request

Instantiate the AddCustomResolverLocationOptions struct and set the fields to provide parameter values for the AddCustomResolverLocation method.

Use the AddCustomResolverLocationOptions.Builder to create a AddCustomResolverLocationOptions object that contains the parameter values for the addCustomResolverLocation method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a custom resolver

Add custom resolver location

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a custom resolver.

  • Custom resolver location, subnet CRN.

    Examples:
    value
    _source
    _lines
    _html
  • Enable/Disable custom resolver location.

    Examples:
    value
    _source
    _lines
    _html
  • Uniquely identifying a request.

WithContext method only

The AddCustomResolverLocation options.

The addCustomResolverLocation options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a custom resolver.

  • Custom resolver location, subnet CRN.

    Examples:
    value
    _source
    _lines
    _html
  • Enable/Disable custom resolver location.

    Examples:
    value
    _source
    _lines
    _html
  • Uniquely identifying a request.

  • curl -X POST   https://api.dns-svcs.cloud.ibm.com/v1/instances/2be5d4a7-78f0-4c62-a957-41dc15342777/custom_resolvers/ddbe7a53-7971-46dc-b021-420335c31562/locations   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'   -d '{
        "subnet_crn": "crn:v1:staging:public:is:us-south-1:a/01652b251c3ae2787110a995d8db0135::subnet:0716-84dcb64e-3ada-45fd-b0f7-94de1ac0d16b",
        "enabled": false
    }'
    
  • addCustomResolverLocationOptionsModel := service.NewAddCustomResolverLocationOptions(
                    "5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85", 
                    "775e22a-5db5-4614-9c7e-27db0cbc13")
    addCustomResolverLocationOptionsModel.SetSubnetCrn("subnetCrn")
    addCustomResolverLocationOptionsModel.SetEnabled(false)
    addCustomResolverLocationOptionsModel.SetXCorrelationID("testString")
    result, response, reqErr := service.AddCustomResolverLocation(addCustomResolverLocationOptionsModel)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("Result ID : %s", *result.ID)
    fmt.Printf("Response: %s", response)
  • response = dnssvc.add_custom_resolver_location(
    instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    resolver_id="022b91ce-2c1d-4702-8129-b71c77e5da65",
    subnet_crn="crn:v1:bluemix:public:is:us-south-1:a/01652b251c3ae2787110a995d8db0135::subnet:0716-b49ef064-0f89-4fb1-8212-135b12568f04",
    enable=True)
    print(response)
  • ...
    
    const params = {
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        resolverId: ${CustomResolverId},
        subnetCrn: ${SubnetCrn},
        enabled: false,
        xCorrelationId: 'abc123',
    };
    
    dnsSvcsApisV1.addCustomResolverLocation(params)
      .then(response => {
        const customResolverLoc = response.result;
        console.log(customResolverLoc);
      })
      .catch(err => {
        console.log('error:', err);
      });
  •     try {
          AddCustomResolverLocationOptions addCustomResolverLocationOptions = new AddCustomResolverLocationOptions.Builder()
          .instanceId(instance_id)
          .resolverId(resolver_id)
          .subnetCrn(subnet_id_location)
          .enabled(false)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<Location> response = service.addCustomResolverLocation(addCustomResolverLocationOptions).execute();
    
          Location customresolverlocationResult = response.getResult();
          location_id = customresolverlocationResult.getId();
    
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    

Response

Custom resolver location.

Custom resolver location.

Custom resolver location.

Custom resolver location.

Custom resolver location.

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Update custom resolver location

Update custom resolver location

Update custom resolver location.

Update custom resolver location.

Update custom resolver location.

Update custom resolver location.

PATCH /instances/{instance_id}/custom_resolvers/{resolver_id}/locations/{location_id}
update_custom_resolver_location(self,
        instance_id: str,
        resolver_id: str,
        location_id: str,
        *,
        enabled: bool = None,
        subnet_crn: str = None,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) UpdateCustomResolverLocation(updateCustomResolverLocationOptions *UpdateCustomResolverLocationOptions) (result *Location, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) UpdateCustomResolverLocationWithContext(ctx context.Context, updateCustomResolverLocationOptions *UpdateCustomResolverLocationOptions) (result *Location, response *core.DetailedResponse, err error)
ServiceCall<Location> updateCustomResolverLocation(UpdateCustomResolverLocationOptions updateCustomResolverLocationOptions)
updateCustomResolverLocation(params)

Request

Instantiate the UpdateCustomResolverLocationOptions struct and set the fields to provide parameter values for the UpdateCustomResolverLocation method.

Use the UpdateCustomResolverLocationOptions.Builder to create a UpdateCustomResolverLocationOptions object that contains the parameter values for the updateCustomResolverLocation method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a custom resolver

  • Custom resolver location ID.

Update custom resolver location

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a custom resolver.

  • Custom resolver location ID.

  • Enable/Disable custom resolver location.

    Examples:
    value
    _source
    _lines
    _html
  • Subnet CRN.

    Examples:
    value
    _source
    _lines
    _html
  • Uniquely identifying a request.

WithContext method only

The UpdateCustomResolverLocation options.

The updateCustomResolverLocation options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a custom resolver.

  • Custom resolver location ID.

  • Enable/Disable custom resolver location.

    Examples:
    value
    _source
    _lines
    _html
  • Subnet CRN.

    Examples:
    value
    _source
    _lines
    _html
  • Uniquely identifying a request.

  • curl -X PATCH   https://api.dns-svcs.cloud.ibm.com/v1/instances/2be5d4a7-78f0-4c62-a957-41dc15342777/custom_resolvers/ddbe7a53-7971-46dc-b021-420335c31562/locations/bf6b4f83-bf0b-47c2-8bdf-e7fbd92db2c6   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'   -d '{
        "subnet_crn": "crn:v1:staging:public:is:us-south-1:a/01652b251c3ae2787110a995d8db0135::subnet:0716-84dcb64e-3ada-45fd-b0f7-94de1ac0d16b",
        "enabled": true
    }'
    
  • updateCustomResolverLocationOptionsModel := service.NewUpdateCustomResolverLocationOptions(
                    "5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85", 
                    "775e22a-5db5-4614-9c7e-27db0cbc13",
                    "8151b5f6-9deb-4c33-b571-91520fab2ba2")
    updateCustomResolverLocationOptionsModel.SetEnabled(true)
    updateCustomResolverLocationOptionsModel.SetSubnetCrn("subnetCrn")
    updateCustomResolverLocationOptionsModel.SetXCorrelationID("testString")
    result, response, reqErr := service.UpdateCustomResolverLocation(updateCustomResolverLocationOptionsModel)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("Result ID : %s", *result.ID)
    fmt.Printf("Response: %s", response)
  • response = dnssvc.update_custom_resolver_location(
    instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    resolver_id="022b91ce-2c1d-4702-8129-b71c77e5da65",
    location_id="89c90ac7-8332-41e4-855f-6417b754fc46", 
    enable=True)
    print(response)
  • . . .
    
    const params = {
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        resolverId: ${CustomResolverId},
        locationId: '${CustomResolverLocationId}',
        subnetCrn: '${SUBNET_CRN}',
        enabled: false,
        xCorrelationId: 'abc123',
    };
    
    dnsSvcsApisV1.updateCustomResolverLocation(params)
      .then(response => {
        const updatedCustomResolverLoc = response.result;
        console.log(updatedCustomResolverLoc);
      })
      .catch(err => {
        console.log('error:', err);
      });
    
  •     try {
          UpdateCustomResolverLocationOptions updateCustomResolverLocationOptions = new UpdateCustomResolverLocationOptions.Builder()
          .instanceId(instance_id)
          .resolverId(resolver_id)
          .locationId(location_id)
          .enabled(false)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<Location> response = service.updateCustomResolverLocation(updateCustomResolverLocationOptions).execute();
    
          Location customresolverlocationResult = response.getResult();
    
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    

Response

Custom resolver location.

Custom resolver location.

Custom resolver location.

Custom resolver location.

Custom resolver location.

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Delete custom resolver location

Delete custom resolver location

Delete custom resolver location.

Delete custom resolver location.

Delete custom resolver location.

Delete custom resolver location.

DELETE /instances/{instance_id}/custom_resolvers/{resolver_id}/locations/{location_id}
delete_custom_resolver_location(self,
        instance_id: str,
        resolver_id: str,
        location_id: str,
        *,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) DeleteCustomResolverLocation(deleteCustomResolverLocationOptions *DeleteCustomResolverLocationOptions) (response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) DeleteCustomResolverLocationWithContext(ctx context.Context, deleteCustomResolverLocationOptions *DeleteCustomResolverLocationOptions) (response *core.DetailedResponse, err error)
ServiceCall<Void> deleteCustomResolverLocation(DeleteCustomResolverLocationOptions deleteCustomResolverLocationOptions)
deleteCustomResolverLocation(params)

Request

Instantiate the DeleteCustomResolverLocationOptions struct and set the fields to provide parameter values for the DeleteCustomResolverLocation method.

Use the DeleteCustomResolverLocationOptions.Builder to create a DeleteCustomResolverLocationOptions object that contains the parameter values for the deleteCustomResolverLocation method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a custom resolver

  • Custom resolver location ID.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a custom resolver.

  • Custom resolver location ID.

  • Uniquely identifying a request.

WithContext method only

The DeleteCustomResolverLocation options.

The deleteCustomResolverLocation options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a custom resolver.

  • Custom resolver location ID.

  • Uniquely identifying a request.

  • curl -X DELETE   https://api.dns-svcs.cloud.ibm.com/v1/instances/2be5d4a7-78f0-4c62-a957-41dc15342777/custom_resolvers/ddbe7a53-7971-46dc-b021-420335c31562/locations/bf6b4f83-bf0b-47c2-8bdf-e7fbd92db2c6   -H 'Authorization: Bearer xxxxxx'
    
  • deleteCustomResolverLocationOptionsModel := service.NewDeleteCustomResolverLocationOptions(
                    "5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85", 
                    "775e22a-5db5-4614-9c7e-27db0cbc13",
                    "8151b5f6-9deb-4c33-b571-91520fab2ba2")
    deleteCustomResolverLocationOptionsModel.SetXCorrelationID("abc123")
    response, reqErr := service.DeleteCustomResolverLocation(deleteCustomResolverLocationOptionsModel)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("Response: %s", response)
  • response = dnssvc.delete_custom_resolver_location(
    instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    resolver_id="022b91ce-2c1d-4702-8129-b71c77e5da65",
    location_id="89c90ac7-8332-41e4-855f-6417b754fc46",)
    print(response)
  • . . .
    
    const params = {
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        resolverId: ${CustomResolverId},
        locationId: ${CustomResolverLocationId},
        xCorrelationId: 'abc123',
    };
    dnsSvcsApisV1.deleteCustomResolverLocation(params)
      .then(response => {
        const deletedCustomResolverLocation = response.result;
        console.log(deletedCustomResolverLocation);
      })
      .catch(err => {
        console.log('error:', err);
      });
    
  •     try {
          DeleteCustomResolverLocationOptions deleteCustomResolverLocationOptions = new DeleteCustomResolverLocationOptions.Builder()
          .instanceId(instance_id)
          .resolverId(resolver_id)
          .locationId(location_id)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<Void> response = service.deleteCustomResolverLocation(deleteCustomResolverLocationOptions).execute();
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    

Response

Status Code

  • The custom resolver location was deleted successfully

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Internal server error

No Sample Response

This method does not specify any sample responses.

List forwarding rules

List the forwarding rules of the given custom resolver

List the forwarding rules of the given custom resolver.

List the forwarding rules of the given custom resolver.

List the forwarding rules of the given custom resolver.

List the forwarding rules of the given custom resolver.

GET /instances/{instance_id}/custom_resolvers/{resolver_id}/forwarding_rules
list_forwarding_rules(self,
        instance_id: str,
        resolver_id: str,
        *,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) ListForwardingRules(listForwardingRulesOptions *ListForwardingRulesOptions) (result *ForwardingRuleList, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) ListForwardingRulesWithContext(ctx context.Context, listForwardingRulesOptions *ListForwardingRulesOptions) (result *ForwardingRuleList, response *core.DetailedResponse, err error)
ServiceCall<ForwardingRuleList> listForwardingRules(ListForwardingRulesOptions listForwardingRulesOptions)
listForwardingRules(params)

Request

Instantiate the ListForwardingRulesOptions struct and set the fields to provide parameter values for the ListForwardingRules method.

Use the ListForwardingRulesOptions.Builder to create a ListForwardingRulesOptions object that contains the parameter values for the listForwardingRules method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a custom resolver

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a custom resolver.

  • Uniquely identifying a request.

WithContext method only

The ListForwardingRules options.

The listForwardingRules options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a custom resolver.

  • Uniquely identifying a request.

  • curl -X GET   https://api.dns-svcs.cloud.ibm.com/v1/instances/2be5d4a7-78f0-4c62-a957-41dc15342777/custom_resolvers/ddbe7a53-7971-46dc-b021-420335c31562/forwarding_rules   -H 'Authorization: Bearer xxxxxx'
    
  • listForwardingRulesOptionsModel := service.NewListForwardingRulesOptions(
                     "5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85", 
                    "775e22a-5db5-4614-9c7e-27db0cbc13")
    listForwardingRulesOptionsModel.SetXCorrelationID("abc123")
    result, response, reqErr := service.ListForwardingRules(listForwardingRulesOptionsModel)
    
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("Result ID : %s", *result.ForwardingRules[0].ID)
    fmt.Printf("Response: %s", response)
  • response = dnssvc.list_forwarding_rules(
    instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    resolver_id="022b91ce-2c1d-4702-8129-b71c77e5da65")
    print(response)
  • . . .
    
    const params = {
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        resolverId: ${CustomResolverId},
        xCorrelationId: 'abc123',
    };
    
    dnsSvcsApisV1.listForwardingRules(params)
      .then(response => {
        const forwardingRules = response.result;
        console.log(forwardingRules);
      })
      .catch(err => {
        console.log('error:', err);
      });
    
  •     try {
          ListForwardingRulesOptions listForwardingRulesOptions = new ListForwardingRulesOptions.Builder()
          .instanceId(instance_id)
          .resolverId(resolver_id)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<ForwardingRuleList> response = service.listForwardingRules(listForwardingRulesOptions).execute();
    
          ForwardingRuleList listForwardingRulesResult = response.getResult();
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }

Response

List of forwarding rules

An array of forwarding rules.

An array of forwarding rules.

An array of forwarding rules.

An array of forwarding rules.

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Create a forwarding rule

Create a forwarding rule for the given custom resolver

Create a forwarding rule for the given custom resolver.

Create a forwarding rule for the given custom resolver.

Create a forwarding rule for the given custom resolver.

Create a forwarding rule for the given custom resolver.

POST /instances/{instance_id}/custom_resolvers/{resolver_id}/forwarding_rules
create_forwarding_rule(self,
        instance_id: str,
        resolver_id: str,
        *,
        type: str = None,
        match: str = None,
        forward_to: List[str] = None,
        description: str = None,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) CreateForwardingRule(createForwardingRuleOptions *CreateForwardingRuleOptions) (result *ForwardingRule, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) CreateForwardingRuleWithContext(ctx context.Context, createForwardingRuleOptions *CreateForwardingRuleOptions) (result *ForwardingRule, response *core.DetailedResponse, err error)
ServiceCall<ForwardingRule> createForwardingRule(CreateForwardingRuleOptions createForwardingRuleOptions)
createForwardingRule(params)

Request

Instantiate the CreateForwardingRuleOptions struct and set the fields to provide parameter values for the CreateForwardingRule method.

Use the CreateForwardingRuleOptions.Builder to create a CreateForwardingRuleOptions object that contains the parameter values for the createForwardingRule method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a custom resolver

Create a forwarding rule.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a custom resolver.

  • Type of the forwarding rule.

    Allowable values: [zone]

    Examples:
    value
    _source
    _lines
    _html
  • The matching zone or hostname.

    Examples:
    value
    _source
    _lines
    _html
  • The upstream DNS servers will be forwarded to.

  • Descriptive text of the forwarding rule.

    Examples:
    value
    _source
    _lines
    _html
  • Uniquely identifying a request.

WithContext method only

The CreateForwardingRule options.

The createForwardingRule options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a custom resolver.

  • Type of the forwarding rule.

    Allowable values: [zone]

    Examples:
    value
    _source
    _lines
    _html
  • The matching zone or hostname.

    Examples:
    value
    _source
    _lines
    _html
  • The upstream DNS servers will be forwarded to.

  • Descriptive text of the forwarding rule.

    Examples:
    value
    _source
    _lines
    _html
  • Uniquely identifying a request.

  • curl -X POST   https://api.dns-svcs.cloud.ibm.com/v1/instances/2be5d4a7-78f0-4c62-a957-41dc15342777/custom_resolvers/ddbe7a53-7971-46dc-b021-420335c31562/forwarding_rules   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'   -d '{
        "description": "forwarding rule for a hostname",
        "type": "hostname",
        "match": "a.example.com",
        "forward_to": [
            "161.26.0.9"
        ]
    }'
    
  • createForwardingRuleOptionsModel := service.NewCreateForwardingRuleOptions(
                    "5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85", 
                    "775e22a-5db5-4614-9c7e-27db0cbc13"))
    createForwardingRuleOptionsModel.SetDescription("test forwarding rule")				createForwardingRuleOptionsModel.SetType("zone")
    createForwardingRuleOptionsModel.SetMatch("example.com")
    createForwardingRuleOptionsModel.SetForwardTo([]string{"161.26.0.7"})
    createForwardingRuleOptionsModel.SetXCorrelationID("abc123")
    result, response, reqErr := service.CreateForwardingRule(createForwardingRuleOptionsModel)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("Result ID : %s", *result.ID)
    fmt.Printf("Response: %s", response)
  • response = dnssvc.create_forwarding_rule(
    instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    resolver_id="022b91ce-2c1d-4702-8129-b71c77e5da65",
    type='zone'
    match="test.example.com"
    forward_to= ["168.20.22.122"])
    print(response)
  • const params = {
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        resolverId: ${CustomResolverId},
        type: 'zone',
        match: 'example.com',
        forwardTo: ['161.26.0.7'],
        description: 'forwarding rule',
        xCorrelationId: 'abc123',
    };
    
    dnsSvcsApisV1.createForwardingRule(params)
      .then(response => {
        const forwardingRule = response.result;
        console.log(forwardingRule);
      })
      .catch(err => {
        console.log('error:', err);
      });
    
  •     try {
          CreateForwardingRuleOptions createForwardingRuleOptions = new CreateForwardingRuleOptions.Builder()
          .instanceId(instance_id)
          .resolverId(resolver_id)
          .description("forwarding rule")
          .type("zone")
          .match("example.com")
          .forwardTo(new java.util.ArrayList<String>(java.util.Arrays.asList("161.26.0.7")))
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<ForwardingRule> response = service.createForwardingRule(createForwardingRuleOptions).execute();
    
          ForwardingRule forwardingruleResult = response.getResult();
          rule_id = forwardingruleResult.getId();
    
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }

Response

forwarding rule details

forwarding rule details.

forwarding rule details.

forwarding rule details.

forwarding rule details.

Status Code

  • forwarding rule created successfully.

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Delete a forwarding rule

Delete a forwarding rule on the given custom resolver

Delete a forwarding rule on the given custom resolver.

Delete a forwarding rule on the given custom resolver.

Delete a forwarding rule on the given custom resolver.

Delete a forwarding rule on the given custom resolver.

DELETE /instances/{instance_id}/custom_resolvers/{resolver_id}/forwarding_rules/{rule_id}
delete_forwarding_rule(self,
        instance_id: str,
        resolver_id: str,
        rule_id: str,
        *,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) DeleteForwardingRule(deleteForwardingRuleOptions *DeleteForwardingRuleOptions) (response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) DeleteForwardingRuleWithContext(ctx context.Context, deleteForwardingRuleOptions *DeleteForwardingRuleOptions) (response *core.DetailedResponse, err error)
ServiceCall<Void> deleteForwardingRule(DeleteForwardingRuleOptions deleteForwardingRuleOptions)
deleteForwardingRule(params)

Request

Instantiate the DeleteForwardingRuleOptions struct and set the fields to provide parameter values for the DeleteForwardingRule method.

Use the DeleteForwardingRuleOptions.Builder to create a DeleteForwardingRuleOptions object that contains the parameter values for the deleteForwardingRule method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a custom resolver

  • The unique identifier of a rule

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a custom resolver.

  • The unique identifier of a forwarding rule.

  • Uniquely identifying a request.

WithContext method only

The DeleteForwardingRule options.

The deleteForwardingRule options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a custom resolver.

  • The unique identifier of a forwarding rule.

  • Uniquely identifying a request.

  • curl -X DELETE   https://api.dns-svcs.cloud.ibm.com/v1/instances/2be5d4a7-78f0-4c62-a957-41dc15342777/custom_resolvers/ddbe7a53-7971-46dc-b021-420335c31562/forwarding_rules/80b7d905-b2fd-416f-9e0c-b2e554125a4c   -H 'Authorization: Bearer xxxxxx'
    
  • deleteForwardingRuleOptionsModel := service.NewDeleteForwardingRuleOptions(
                     "5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85", 
                    "775e22a-5db5-4614-9c7e-27db0cbc13",
                    "8151b5f6-9deb-4c33-b571-91520fab2ba2")
    deleteForwardingRuleOptionsModel.SetXCorrelationID("testString")
    response, reqErr := service.DeleteForwardingRule(deleteForwardingRuleOptionsModel)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("Response: %s", response)
  • response = dnssvc.delete_forwarding_rule(
    instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    resolver_id="022b91ce-2c1d-4702-8129-b71c77e5da65",
    rule_id="45e90f0c-55bb-4075-8faf-febee15d0ab3",)
    print(response)
  • . . .
    
    const params = {
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        resolverId: ${CustomResolverId},
        ruleId: ${ForwardingRuleId},
        xCorrelationId: 'abc123',
    };
    dnsSvcsApisV1.deleteForwardingRule(params)
      .then(response => {
        const deletedForwardingRule = response.result;
        console.log(deletedForwardingRule);
      })
      .catch(err => {
        console.log('error:', err);
      });
  •     try {
          DeleteForwardingRuleOptions deleteForwardingRuleOptions = new DeleteForwardingRuleOptions.Builder()
          .instanceId(instance_id)
          .resolverId(resolver_id)
          .ruleId(rule_id)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<Void> response = service.deleteForwardingRule(deleteForwardingRuleOptions).execute();
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }

Response

Status Code

  • The forwarding rule was deleted successfully

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Get a forwarding rule

Get details of a forwarding rule on the given custom resolver

Get details of a forwarding rule on the given custom resolver.

Get details of a forwarding rule on the given custom resolver.

Get details of a forwarding rule on the given custom resolver.

Get details of a forwarding rule on the given custom resolver.

GET /instances/{instance_id}/custom_resolvers/{resolver_id}/forwarding_rules/{rule_id}
get_forwarding_rule(self,
        instance_id: str,
        resolver_id: str,
        rule_id: str,
        *,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) GetForwardingRule(getForwardingRuleOptions *GetForwardingRuleOptions) (result *ForwardingRule, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) GetForwardingRuleWithContext(ctx context.Context, getForwardingRuleOptions *GetForwardingRuleOptions) (result *ForwardingRule, response *core.DetailedResponse, err error)
ServiceCall<ForwardingRule> getForwardingRule(GetForwardingRuleOptions getForwardingRuleOptions)
getForwardingRule(params)

Request

Instantiate the GetForwardingRuleOptions struct and set the fields to provide parameter values for the GetForwardingRule method.

Use the GetForwardingRuleOptions.Builder to create a GetForwardingRuleOptions object that contains the parameter values for the getForwardingRule method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a custom resolver

  • The unique identifier of a rule

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a custom resolver.

  • The unique identifier of a forwarding rule.

  • Uniquely identifying a request.

WithContext method only

The GetForwardingRule options.

The getForwardingRule options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a custom resolver.

  • The unique identifier of a forwarding rule.

  • Uniquely identifying a request.

  • curl -X GET   https://api.dns-svcs.cloud.ibm.com/v1/instances/2be5d4a7-78f0-4c62-a957-41dc15342777/custom_resolvers/ddbe7a53-7971-46dc-b021-420335c31562/forwarding_rules/80b7d905-b2fd-416f-9e0c-b2e554125a4c   -H 'Authorization: Bearer xxxxxx'
    
  • getForwardingRuleOptionsModel := service.NewGetForwardingRuleOptions(
                    "5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85", 
                    "775e22a-5db5-4614-9c7e-27db0cbc13",
                    "8151b5f6-9deb-4c33-b571-91520fab2ba2")
    getForwardingRuleOptionsModel.SetXCorrelationID("testString")
    
    result, response, reqErr := service.GetForwardingRule(getForwardingRuleOptionsModel)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("Result ID : %s", *result.ID)
    fmt.Printf("Response: %s", response)
  • response = dnssvc.get_forwarding_rule(
    instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    resolver_id="022b91ce-2c1d-4702-8129-b71c77e5da65",
    rule_id="45e90f0c-55bb-4075-8faf-febee15d0ab3",)
    print(response)
  • . . .
    
    const params = {
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        resolverId: ${CustomResolverId},
        ruleId: ${ForwardingRuleId},
        xCorrelationId: 'abc123',
    };
    
    dnsSvcsApisV1.getForwardingRule(params)
      .then(response => {
        const customResolver = response.result;
        console.log(customResolver);
      })
      .catch(err => {
        console.log('error:', err);
      });
    
  •     try {
          GetForwardingRuleOptions getForwardingRuleOptions = new GetForwardingRuleOptions.Builder()
          .instanceId(instance_id)
          .resolverId(resolver_id)
          .ruleId(rule_id)
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<ForwardingRule> response = service.getForwardingRule(getForwardingRuleOptions).execute();
    
          ForwardingRule forwardingruleResult = response.getResult();
    
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }

Response

forwarding rule details

forwarding rule details.

forwarding rule details.

forwarding rule details.

forwarding rule details.

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Update a forwarding rule

Update the properties of a forwarding rule on the given custom resolver.

Update the properties of a forwarding rule on the given custom resolver.

Update the properties of a forwarding rule on the given custom resolver.

Update the properties of a forwarding rule on the given custom resolver.

Update the properties of a forwarding rule on the given custom resolver.

PATCH /instances/{instance_id}/custom_resolvers/{resolver_id}/forwarding_rules/{rule_id}
update_forwarding_rule(self,
        instance_id: str,
        resolver_id: str,
        rule_id: str,
        *,
        description: str = None,
        match: str = None,
        forward_to: List[str] = None,
        x_correlation_id: str = None,
        **kwargs
    ) -> DetailedResponse
(dnsSvcs *DnsSvcsV1) UpdateForwardingRule(updateForwardingRuleOptions *UpdateForwardingRuleOptions) (result *ForwardingRule, response *core.DetailedResponse, err error)
(dnsSvcs *DnsSvcsV1) UpdateForwardingRuleWithContext(ctx context.Context, updateForwardingRuleOptions *UpdateForwardingRuleOptions) (result *ForwardingRule, response *core.DetailedResponse, err error)
ServiceCall<ForwardingRule> updateForwardingRule(UpdateForwardingRuleOptions updateForwardingRuleOptions)
updateForwardingRule(params)

Request

Instantiate the UpdateForwardingRuleOptions struct and set the fields to provide parameter values for the UpdateForwardingRule method.

Use the UpdateForwardingRuleOptions.Builder to create a UpdateForwardingRuleOptions object that contains the parameter values for the updateForwardingRule method.

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a custom resolver

  • The unique identifier of a rule

Update the properties of a forwarding rule.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a custom resolver.

  • The unique identifier of a forwarding rule.

  • Descriptive text of the forwarding rule.

    Examples:
    value
    _source
    _lines
    _html
  • The matching zone or hostname.

    Examples:
    value
    _source
    _lines
    _html
  • The upstream DNS servers will be forwarded to.

  • Uniquely identifying a request.

WithContext method only

The UpdateForwardingRule options.

The updateForwardingRule options.

parameters

  • The unique identifier of a service instance.

  • The unique identifier of a custom resolver.

  • The unique identifier of a forwarding rule.

  • Descriptive text of the forwarding rule.

    Examples:
    value
    _source
    _lines
    _html
  • The matching zone or hostname.

    Examples:
    value
    _source
    _lines
    _html
  • The upstream DNS servers will be forwarded to.

  • Uniquely identifying a request.

  • curl -X PATCH   https://api.dns-svcs.cloud.ibm.com/v1/instances/2be5d4a7-78f0-4c62-a957-41dc15342777/custom_resolvers/ddbe7a53-7971-46dc-b021-420335c31562/forwarding_rules/80b7d905-b2fd-416f-9e0c-b2e554125a4c   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'   -d '{
        "description": "forwarding rule for a hostname",
        "match": "b.example.com",
        "forward_to": [
            "161.26.0.10"
        ]
    }'
    
  • updateForwardingRuleOptionsModel := service.NewUpdateForwardingRuleOptions(
                    "5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85", 
                    "775e22a-5db5-4614-9c7e-27db0cbc13",
                    "8151b5f6-9deb-4c33-b571-91520fab2ba2")
    
    updateForwardingRuleOptionsModel.SetDescription("cli test forwarding rule")
    updateForwardingRuleOptionsModel.SetMatch("example.com")
    updateForwardingRuleOptionsModel.SetForwardTo([]string{"161.26.0.7"})
    updateForwardingRuleOptionsModel.SetXCorrelationID("testString")
    result, response, reqErr := service.UpdateForwardingRule(updateForwardingRuleOptionsModel)
    if reqErr != nil {
    	panic(reqErr)
    }
    fmt.Printf("Result ID : %s", *result.ID)
    fmt.Printf("Response: %s", response)
  • response = dnssvcupdate_forwarding_rule(
    instance_id="5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85",
    resolver_id="022b91ce-2c1d-4702-8129-b71c77e5da65",
    rule_id="45e90f0c-55bb-4075-8faf-febee15d0ab3",
    description="Updating Forwarding rules", 
    match="test.updateexample.com", 
    forward_to=["168.20.22.122", "190.20.22.134"])
    print(response)
  • . . .
    
    const params = {
        instanceId: ${DNS_SVCS_INSTANCE_ID},
        resolverId: ${CustomResolverId},
        ruleId: '${ForwardingRuleId}',
        description: 'update forwarding rule',
        match: 'example.com',
        forwardTo: ['161.26.0.8'],
        xCorrelationId: 'abc123',
    };
    
    dnsSvcsApisV1.updateForwardingRule(params)
      .then(response => {
        const updatedForwardingRule = response.result;
        console.log(updatedForwardingRule);
      })
      .catch(err => {
        console.log('error:', err);
      });
  •     try {
          UpdateForwardingRuleOptions updateForwardingRuleOptions = new UpdateForwardingRuleOptions.Builder()
          .instanceId(instance_id)
          .resolverId(resolver_id)
          .ruleId(rule_id)
          .description("forwarding rule")
          .match("example.com")
          .forwardTo(new java.util.ArrayList<String>(java.util.Arrays.asList("161.26.0.8")))
          .xCorrelationId("testString")
          .build();
    
          // Invoke operation
          Response<ForwardingRule> response = service.updateForwardingRule(updateForwardingRuleOptions).execute();
    
          ForwardingRule forwardingruleResult = response.getResult();
    
        } catch (ServiceResponseException e) {
            fail(String.format("Service returned status code %d: %s\nError details: %s",
              e.getStatusCode(), e.getMessage(), e.getDebuggingInfo()));
        }
    

Response

forwarding rule details

forwarding rule details.

forwarding rule details.

forwarding rule details.

forwarding rule details.

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Create a secondary zone

Create a secondary zone for the custom resolver

POST /instances/{instance_id}/custom_resolvers/{resolver_id}/secondary_zones

Request

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a custom resolver

Request data of creating secondary zone

  • curl -X POST   https://api.dns-svcs.cloud.ibm.com/v1/instances/2be5d4a7-78f0-4c62-a957-41dc15342777/custom_resolvers/ddbe7a53-7971-46dc-b021-420335c31562/secondary_zones   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'   -d '{
      "description": "secondary zone",
      "zone": "example.com",
      "enabled": false,
      "transfer_from": [
        "10.0.0.7"
      ]
    }'
    

Response

Secondary zone details

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

List secondary zones

List secondary zones for the custom resolver

GET /instances/{instance_id}/custom_resolvers/{resolver_id}/secondary_zones

Request

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a custom resolver

Query Parameters

  • Specify how many resources to skip over, the default value is 0.

  • Specify maximum resources might be returned.

    Possible values: 1 ≤ value ≤ 1000

    Default: 200

    Example: 200

  • curl -X GET   https://api.dns-svcs.cloud.ibm.com/v1/instances/2be5d4a7-78f0-4c62-a957-41dc15342777/custom_resolvers/ddbe7a53-7971-46dc-b021-420335c31562/secondary_zones?offset=0&limit=200   -H 'Authorization: Bearer xxxxxx'
    

Response

List of secondary zones

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Get a secondary zone

Get details of a secondary zone for the custom resolver

GET /instances/{instance_id}/custom_resolvers/{resolver_id}/secondary_zones/{secondary_zone_id}

Request

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a custom resolver

  • The unique identifier of a secondary zone

  • curl -X GET   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'
    

Response

Secondary zone details

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Update a secondary zone

Update a secondary zone for the custom resolver

PATCH /instances/{instance_id}/custom_resolvers/{resolver_id}/secondary_zones/{secondary_zone_id}

Request

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a custom resolver

  • The unique identifier of a secondary zone

Request data of updating secondary zone

  • curl -X PATCH   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 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'   -d '{
        "description": "secondary zone",
        "enabled": false,
        "transfer_from": [
          "10.0.0.7"
        ]
    }'
    

Response

Secondary zone details

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Delete a secondary zone

Delete a secondary zone for the custom resolver

DELETE /instances/{instance_id}/custom_resolvers/{resolver_id}/secondary_zones/{secondary_zone_id}

Request

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a custom resolver

  • The unique identifier of 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'
    

Response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

List linked zones

List linked zones in requestor's instance

GET /instances/{instance_id}/linked_dnszones

Request

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

Query Parameters

  • Specify how many resources to skip over, the default value is 0.

  • Specify maximum resources might be returned.

    Possible values: 1 ≤ value ≤ 1000

    Default: 200

    Example: 200

  • curl -X GET   https://api.dns-svcs.cloud.ibm.com/v1/instances/5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85/linked_dnszones   -H 'Authorization: Bearer xxxxxx'
    

Response

The list of linked zones

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Create a linked zone

Create a linked zone

POST /instances/{instance_id}/linked_dnszones

Request

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

Create a linked zone

  • curl -X POST   https://api.dns-svcs.cloud.ibm.com/v1/instances/5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85/linked_dnszones   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'   -d '{
        "owner_instance_id": "abe30019-1c08-42dc-9ad9-a0682af70054",
        "owner_zone_id": "05855abe-3908-4cdc-bf0d-063e0b1c296d",
        "description": "linked zone example",
        "label": "dev"
    }'
    

Response

linked zone details

Status Code

  • Linked zone created successfully

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Get a linked zone

Get details of a linked zone

GET /instances/{instance_id}/linked_dnszones/{linked_dnszone_id}

Request

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a linked zone

  • curl -X GET   https://api.dns-svcs.cloud.ibm.com/v1/instances/5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85/linked_dnszones/5365b73c-ce6f-4d6f-ad9f-d9c131b26370   -H 'Authorization: Bearer xxxxxx'
    

Response

linked zone details

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Update the properties of a linked zone

Update the properties of a linked zone

PATCH /instances/{instance_id}/linked_dnszones/{linked_dnszone_id}

Request

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a linked zone

Update the properties of a linked zone

  • curl -X PATCH   https://api.dns-svcs.cloud.ibm.com/v1/instances/5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85/linked_dnszones/5365b73c-ce6f-4d6f-ad9f-d9c131b26370   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'   -d '{
        "description": "custom resolver example",
        "label": "dev"
    }'
    

Response

linked zone details

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Delete a linked zone

Delete a linked zone

DELETE /instances/{instance_id}/linked_dnszones/{linked_dnszone_id}

Request

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a linked zone

  • curl -X DELETE   https://api.dns-svcs.cloud.ibm.com/v1/instances/5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85/linked_dnszones/5365b73c-ce6f-4d6f-ad9f-d9c131b26370   -H 'Authorization: Bearer xxxxxx'
    

Response

Status Code

  • The linked zone was deleted successfully

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

List Access Requests

List access requests in owner's instance

GET /instances/{instance_id}/dnszones/{dnszone_id}/access_requests

Request

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a DNS zone

Query Parameters

  • Specify how many resources to skip over, the default value is 0.

  • Specify maximum resources might be returned.

    Possible values: 1 ≤ value ≤ 1000

    Default: 200

    Example: 200

  • curl -X GET   https://api.dns-svcs.cloud.ibm.com/v1/instances/abe30019-1c08-42dc-9ad9-a0682af70054/dnszones/05855abe-3908-4cdc-bf0d-063e0b1c296d/access_requests   -H 'Authorization: Bearer xxxxxx'
    

Response

The list of access requests

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Get an access request

Get details of an access request

GET /instances/{instance_id}/dnszones/{dnszone_id}/access_requests/{request_id}

Request

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a DNS zone

  • The unique identifier of an access request

  • curl -X GET   https://api.dns-svcs.cloud.ibm.com/v1/instances/abe30019-1c08-42dc-9ad9-a0682af70054/dnszones/05855abe-3908-4cdc-bf0d-063e0b1c296d/access_requests/9a234ede-c2b6-4c39-bc27-d39ec139ecdb   -H 'Authorization: Bearer xxxxxx'
    

Response

Access request

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Update an access request

Update the state of an access request

PATCH /instances/{instance_id}/dnszones/{dnszone_id}/access_requests/{request_id}

Request

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a DNS zone

  • The unique identifier of an access request

Update the state of an access request

  • curl -X PATCH   https://api.dns-svcs.cloud.ibm.com/v1/instances/abe30019-1c08-42dc-9ad9-a0682af70054/dnszones/05855abe-3908-4cdc-bf0d-063e0b1c296d/access_requests/9a234ede-c2b6-4c39-bc27-d39ec139ecdb   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'   -d '{
        "action": "APPROVE"
    }'
    

Response

Access request

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

List permitted networks

List the permitted networks for a linked zone

GET /instances/{instance_id}/linked_dnszones/{linked_dnszone_id}/permitted_networks

Request

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a linked zone

  • curl -X GET   https://api.dns-svcs.cloud.ibm.com/v1/instances/5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85/linked_dnszones/5365b73c-ce6f-4d6f-ad9f-d9c131b26370/permitted_networks   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'
    

Response

List permitted networks response

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Create a permitted network

Create a permitted network for a linked zone

POST /instances/{instance_id}/linked_dnszones/{linked_dnszone_id}/permitted_networks

Request

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a linked zone

Create a permitted network

  • curl -X POST   https://api.dns-svcs.cloud.ibm.com/v1/instances/5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85/linked_dnszones/5365b73c-ce6f-4d6f-ad9f-d9c131b26370/permitted_networks   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'   -d '{
    	  "permitted_network": {
    		    "vpc_crn": "crn:v1:bluemix:public:is:eu-de:a/bcf1865e99742d38d2d5fc3fb80a5496::vpc:6e6cc326-04d1-4c99-a289-efb3ae4193d6"
    		
    	  }, 
    	  "type": "vpc"
    }'
    

Response

Permitted network details

Status Code

  • Permitted network created successfully.

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Remove a permitted network

Remove a permitted network from a linked zone

DELETE /instances/{instance_id}/linked_dnszones/{linked_dnszone_id}/permitted_networks/{permitted_network_id}

Request

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a linked zone

  • The unique identifier of a permitted network

  • curl -X DELETE   https://api.dns-svcs.cloud.ibm.com/v1/instances/5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85/linked_dnszones/5365b73c-ce6f-4d6f-ad9f-d9c131b26370/permitted_networks/6e6cc326-04d1-4c99-a289-efb3ae4193d6   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'
    

Response

Permitted network details

Status Code

  • The permitted network removal is in progress

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.

Get a permitted network

Get a permitted network of a linked zone

GET /instances/{instance_id}/linked_dnszones/{linked_dnszone_id}/permitted_networks/{permitted_network_id}

Request

Custom Headers

  • Uniquely identifying a request

Path Parameters

  • The unique identifier of a service instance

  • The unique identifier of a linked zone

  • The unique identifier of a permitted network

  • curl -X GET   https://api.dns-svcs.cloud.ibm.com/v1/instances/5cbc3c1b-021c-4ad7-b9e4-a5dfefdecf85/linked_dnszones/5365b73c-ce6f-4d6f-ad9f-d9c131b26370/permitted_networks/6e6cc326-04d1-4c99-a289-efb3ae4193d6   -H 'Content-Type: application/json'   -H 'Authorization: Bearer xxxxxx'
    

Response

Permitted network details

Status Code

  • Success

  • Bad Request

  • Unauthorized

  • Forbidden! User has no privilege

  • Resource not found

  • Internal server error

No Sample Response

This method does not specify any sample responses.