Some variables and parameters can be extracted from code to be managed in a configuration file. The configuration can be retrieved from the configuration file when the code is executed. By doing so, you can change parameters quickly and reduce the code maintenance costs. This topic explains how to create a configuration.

Procedure

  1. Log on to the EDAS console.
  2. In the left-side navigation pane, choose Application Management > Microservice Configurations.
    By default, the Configurations page appears.
  3. In the top navigation bar, select a region. On the Configurations page, select a microservices namespace from the Microservice Namespace drop-down list. Then, click Create Configuration.
  4. In the Create Configuration panel, set the parameters and click Create.
    Create Configuration panel
    ParameterDescription
    RegionThe region in which you want to create the configuration. The region is selected in the top navigation bar. You cannot change the value of this parameter in this panel.
    Microservice NamespaceThe microservices namespace to which the configuration belongs. The microservices namespace is selected on the Configurations page. You cannot change the value in this panel.
    Data IDThe ID of the configuration. We recommend that you enter an ID in the package.class format. class represents an informative name of the configuration, such as com.foo.bar.log.level.
    Note A data ID must be unique within a group.
    GroupThe group of the configuration. We recommend that you enter a service name or a module name. A group name must be globally unique.
    Data encryptionThe data encryption method. Valid values:
    • Key Management Service (KMS) encryption: calls the KMS service to directly encrypt and decrypt the configuration. The size of the configuration content to be encrypted or decrypted cannot exceed 6 KB. We recommend that you do not use special characters such as ampersands (&) in the configuration content, which may cause decryption errors.
    • KMS AES-128 encryption: uses the envelope encryption method of KMS. The size of the configuration content to be encrypted or decrypted can exceed 6 KB but cannot exceed 100 KB. The configuration content in plaintext is not transmitted to KMS. We recommend that you use KMS AES-128 encryption, which is more secure.

    For more information about data encryption, see Create and use encrypted configuration.

    Configuration FormatThe format of the configuration content.
    Configuration ContentThe content of the configuration. Example:
    threadPoolSize=5
    logLevel=WARN
    Configuration DescriptionThe description of the configuration.
    More Configuration
    • Application: Enter the name of the application to which the configuration that you want to create belongs.
    • Label: Enter a label keyword in the field and select a label from the drop-down list.
    After the configuration is created, the configuration appears on the Configurations page.