Skip to main content

Create or update application deployment configuration

POST 

/applications/:applicationId/deployment-configs

Create new application deployment configuration or update an existing one.

Request

Path Parameters

    applicationId stringrequired

Header Parameters

    X-Codenow-Api-Key anyrequired

    CodeNOW API Key

Body

required

    applicationVersion stringrequired

    Possible values: non-empty


    The application package version this configuration will be based on.

    environmentId stringrequired

    Possible values: non-empty


    The unique identifier of the environment this configuration will belong to.
    To obtain this identifier, use the GET /applications/:applicationId/related-environments operation to retrieve a list of available related environments.

    deploymentConfig

    object

    required

    Possible values: >= 1, <= 100


    A map of configuration requests for individual application components contained in the application version, mapped by component ID.

    property name*

    ApplicationComponentConfigStoreRequest

    configFiles

    object[]

    nullable


    A list of configuration files affecting the component.

  • Array [

  • key stringrequired


    The name of the configuration file.

    content stringrequired


    The content of the file. Must be base64-url encoded.

  • ]

  • connections

    object[]

    nullable


    A list of all needed connected services, denoted by connection name, service type and a specific instance.

  • Array [

  • name stringrequired

    Possible values: non-empty


    The user-friendly name or label for the connection. Must be unique per component, upper-case and contain no spaces (underscores are allowed).

    type stringrequired

    Possible values: non-empty


    An internal identifier for the service scaffold, determined by the service type or brand in the case of managed services, or by the template ID for external services.

    instanceId string


    The unique identifier of the specific service instance that should be connected to the component. The type of this service instance must match the type attribute.

  • ]

  • runtime

    object

    nullable


    An object containing the runtime configuration specifications for the component.

    replicas int32required

    Possible values: >= 1 and <= 40


    The number of instances (containers) of this application component run in parallel. Minimum value is 1, maximum value is 40.

    resources

    object

    required


    An object specifying the minimum required and maximum allowed resources (CPU and memory) needed by the containers running this application component.

    limits

    object


    The maximum allowed resource allocation (CPU and memory) to the containers running this application component.
    If some of the values are omitted, it means they are not set.

    cpu stringnullable

    Possible values: non-empty


    The maximum allowed CPU allocation for the containers running this application component.
    It accepts two possible units: cpu (cpu core), represented by a simple number (decimals allowed), and m (thousandth of a core), denoted by the 'm' suffix. For example, '1000m' is equivalent to '1'.
    The value must not be less than 1m (0.001).

    memory stringnullable

    Possible values: non-empty


    The maximum allowed memory allocation for the container running this application component in bytes.
    You can express the value as a plain integer, a number in exponential format or as a fixed-point number using one of these quantity suffixes: E, P, T, G, M, k. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki. For example, the following represent roughly the same value: 128974848, 129e6, 129M, 128974848000m, 123Mi.
    The value must not be less than 1k (1000 bytes).

    requests

    object


    The required resources (CPU and memory) needed by the containers running this application component.
    If some of the values are omitted, it means they are not set.

    cpu stringnullable

    Possible values: non-empty


    The required CPU allocation for the containers running this application component.
    It accepts two possible units: cpu (cpu core), represented by a simple number (decimals allowed), and m (thousandth of a core), denoted by the 'm' suffix. For example, '1000m' is equivalent to '1'.
    The value must not be less than 1m (0.001).
    The value must be less than or equal to the CPU limit value.

    memory stringnullable

    Possible values: non-empty


    The required memory allocation for the containers running this application component in bytes.
    You can express the value as a plain integer, a number in exponential format or as a fixed-point number using one of these quantity suffixes: E, P, T, G, M, k. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki. For example, the following represent roughly the same value: 128974848, 129e6, 129M, 128974848000m, 123Mi.
    The value must not be less than 1k (1000 bytes).
    The value must be less than or equal to the memory limit value.

Responses

application-deployment-config-store 200 response

Schema

    status stringrequired

    Possible values: non-empty

Loading...