Custom endpoint aliases

edit

Custom aliases for your deployment endpoints on Elastic Cloud Enterprise allow you to have predictable, human-readable URLs that can be shared easily.

Before setting up your custom alias, your platform administrator must enable the feature. See Enable custom endpoint aliases for more information.

Create a custom endpoint alias for a deployment

edit

To add an alias to an existing deployment:

  1. Log into the Cloud UI.
  2. From the Deployments menu, select a deployment.
  3. Under Custom endpoint alias, click Edit.
  4. Define a new alias. Make sure you choose something meaningful to you.

Make the alias as unique as possible to avoid collisions. Aliases might have been already claimed by other users for deployments in the region.

+ . Click Update alias.

Remove a custom endpoint alias

edit

To remove an alias from your deployment, or if you want to re-assign an alias to another deployment, follow these steps:

  1. Log into the Cloud UI.
  2. From the Deployments menu, select a deployment.
  3. Under Custom endpoint alias, click Edit.
  4. Remove the text from the Custom endpoint alias text box.
  5. Click Update alias.

Using the custom endpoint URL

edit

To use your new custom endpoint URL to access your Elastic products, note that each has its own alias to use in place of the default application UUID. For example, if you configured the custom endpoint alias for your deployment to be test-alias, the corresponding alias for the Elasticsearch cluster in that deployment is test-alias.es.

You can get the application-specific custom endpoint alias by clicking Copy endpoint for that product. It should contain a subdomain for each application type, for example es, kb, apm, or ent.

With the REST Client
edit
  • As part of the host name:

    After configuring your custom endpoint alias, click Copy endpoint on the deployment overview page, which gives you the fully qualified custom endpoint URL for that product.

For more information on setting up a load balancer to ensure proper routing, see Load balancers.

With the TransportClient
edit

While the TransportClient is deprecated, your custom endpoint aliases still work with it. Similar to the REST Client, there are two ways to use your custom endpoint alias with the TransportClient:

  • As part of the host name:

    Similar to HTTP, you can find the fully qualified host on the deployment overview page by clicking Copy endpoint next to Elasticsearch. Make sure to remove the unnecessary https:// prefix as well as the trailing HTTP port.

  • As part of the Settings:

    Include the application-specific custom endpoint alias as the value for request.headers.X-Found-Cluster setting in place of the clusterId:

    // Build the settings for our client.
    String alias = "test-alias.es"; // Your application-specific custom endpoint alias here
    String region = "us-east-1"; // Your region here
    boolean enableSsl = true;
    
    Settings settings = Settings.settingsBuilder()
        .put("transport.ping_schedule", "5s")
        //.put("transport.sniff", false) // Disabled by default and *must* be disabled.
        .put("action.bulk.compress", false)
        .put("shield.transport.ssl", enableSsl)
        .put("request.headers.X-Found-Cluster", alias)
        .put("shield.user", "username:password") // your shield username and password
        .build();
    
    String hostname = alias + "." + region + ".aws.found.io";
    // Instantiate a TransportClient and add the cluster to the list of addresses to connect to.
    // Only port 9343 (SSL-encrypted) is currently supported.
    Client client = TransportClient.builder()
            .addPlugin(ShieldPlugin.class)
            .settings(settings)
            .build()
            .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(hostname), 9343));

For more information on configuring the TransportClient, see Configure the Java Transport Client.