All Products
Search
Document Center

Elastic Container Instance:Use and integrate the ECI Terminal

Last Updated:Feb 29, 2024

The ECI Terminal allows you to interact with containers and run commands in containers. You can open the terminal in a browser or integrate the terminal into your own system. This topic describes how to use the ECI Terminal and integrate the ECI Terminal into your own system.

Use the ECI Terminal

If you want to run commands in a container when you use an elastic container instance, you can call the ExecContainerCommand API operation to obtain the WebSocketUri value. The value indicates the WebSocket URL. The WebSocket URL cannot be directly accessed by using a browser. You can use the HTTP URL returned by the ExecContainerCommand API operation.

The HTTP URL is effective for 30 seconds. To use the HTTP URL to access a container, you must access this URL in your browser within 30 seconds after the ExecContainerCommand operation is called. ECI terminal

Important

This operation of accessing a container is audited. You can view the audit records on the Logs page in the Elastic Container Instance console. The audit information includes the request time, instance ID, and request IP address. Audit information can be retained for up to one month.

Integrate the ECI Terminal into your own system

After you obtain the HTTP URL by calling the ExecContainerCommand API operation, you can use one of the following methods to integrate the ECI Terminal into your own system:

  • Access the HTTP URL in a separate window.

    Use a frontend application to access the HTTP URL in a new window.

  • Embed the HTTP URL into the current page.

    Embed the HTTP URL into a page of your own system by using an iframe.