Using Dual-Stack Endpoints for the Search API

Use a dual-stack endpoint to access the Search API over IPv6 or IPv4.

The Search API supports IPv4-only and dual-stack endpoints. A dual-stack endpoint can resolve to either an IPv6 or IPv4 address, so you can connect over IPv6 while retaining IPv4 compatibility.

To use a dual-stack endpoint, configure the client with an endpoint in the following format:

query.{region}.ds.{oci_public_domain}

For example, the dual-stack endpoint for the US East (Ashburn) region is query.us-ashburn-1.ds.oci.oraclecloud.com.

  1. Create an authentication provider by using the user credentials.
    AuthenticationDetailsProvider provider = SimpleAuthenticationDetailsProvider.builder()
            .tenantId(credentials.getTenantId())
            .userId(credentials.getUserId())
            .fingerprint(credentials.getFingerprint())
            .privateKeySupplier(new StringPrivateKeySupplier(credentials.getPrivateKey()))
            .region(Region.valueOf(credentials.getRegion()))
            .build();
  2. Create a ResourceSearchClient and specify the dual-stack endpoint.

    For example, set the endpoint when you create the client:

    ResourceSearchClient searchClient = ResourceSearchClient.builder()
            .endpoint(dualStackEndpoint)
            .build(provider);

    Or, set the endpoint after you create the client:

    ResourceSearchClient searchClient = ResourceSearchClient.builder()
            .build(provider);
    
    
    searchClient.setEndpoint(dualStackEndpoint)

For a complete list of endpoints for supported regions, see the Search API. For general information about IPv6 in OCI, see Overview of IPv6 Addresses.