Application template parameters

The IBM® Spectrum Conductor application template includes keys, parameters, and attributes that are used to instantiate the application template.

Each parameter under the parameters key is specified in a separate nested block that contains the parameter name and any additional attributes. For example:
parameters:
    serviceA_rg:
        type: string
        label: Resource Group for Service A
        description: Describe how this parameter is used for Service A
        required: true
        constraints:
               - custom_constraint: asc.getresourcegroup

A parameter can consist of the following required and optional attributes:

parameter name

Description: The parameter name.

Required or optional: Required

Example: serviceA_rg

type

Description: The parameter type.

Required or optional: Required

Valid values: string, number, or boolean.

Example: string

label

Description: Parameter name that appears in the Application Instance wizard.

Required or optional: Optional

Example: Describe how this parameter is used for Service A

description

Description: Parameter description that appears in the Application Instance wizard.

Required or optional: Optional

Example: Resource Group for Service A

required

Restriction: This required attribute is supported only for IBM Spectrum Conductor applications, and not for application instances, also referred to as ASC application instances.
Description: Indicates whether the parameter is required or optional. The value can be set to true or false. The default value is true. Set the value to false, when the parameter is optional.
Warning: Registration fails when a parameter has the required attribute set to true (required: true) and no value is provided or the parameter definition is incomplete. For example, if the template has the following definition:
my_rg_param:
   required: true
   type: string
   
And the parameter is registered with the following instance group:
parameters: {
   your_rg_param: "value_1"
}
The registration fails because the parameter does not include the my_rg_param which the template defines as a required attribute. To correct this registration failure, include the my_rg_param definition:
parameters: {
   your_rg_param: "value_1"
   my_rg_param: "value_2"
}

Required or optional: Optional

Valid values: true, false

default

Description: Default value of the parameter.

Required or optional: Optional

constraints

Description: Defines a list of constraints that must all be fulfilled by user input to validate the parameter.

Required or optional: Optional

A parameter can consist of the following parameter constraints:

constraints > length

Description: Applies to string parameters to define a lower and upper limit for the length of the string value.

Required or optional: Optional

Valid values: { min: <lower limit>, max: <upper limit> }

Example: { min: 5, max: 8}

constraints > range

Description: Applies to number parameters to define a lower and upper limit for the length of the number value.

Required or optional: Optional

Valid values: { min: <lower limit>, max: <upper limit> }

Example: { min: 1000, max: 1100}

constraints > allowed_values

Description: Applies to string or number parameters to define a set of valid values.

Required or optional: Optional

Valid values: [ <value>, <value>, ... ]

Example: [50, 60, 70]

constraints > allowed_pattern

Description: Applies to string parameters to specify a regular expression for the parameter.

Required or optional: Optional

Valid values: <regular expression>

Example: "[A-Z]+[a-zA-Z0-9]*"

constraints > custom_constraint

Description: Triggers the cluster management console to allow the user to select an object in the Application Instance wizard.

Required or optional: Optional

Valid values: asc.getresourcegroup, asc.getpackage, consumer_exclusive, consumer_antiaffinity

Examples for setting the custom constraint for parameters to exclusive:
- custom_constraint:
    consumer_exclusive
or
- custom_constraint: consumer_exclusive
Example of listing the parameter names of the other consumers that you want to create the anti-affinity:
- custom_constraint:
    consumer_antiaffinity:
        - other_parameter_name_1
        - other_parameter_name_2
Warning: If a parameter is used for a consumer and is given the exclusive constraint, then registration fails if another parameter tries to use the same value. Similarly, if a consumer parameter has an anti-affinity of other parameters, then registration fails if those parameters try to use the same value. In summary, anti-affinity causes registration fail if those other consumer parameters try to use the same value, and exclusive fails registration if any other consumer parameter tries to use the same value.

constraints > description

Description: Defines the previous constraint.

Required or optional: Optional

Example: Port range must be 1000 - 1100