string

The string input type allows you to define input edit boxes that will appear on the Launch Blueprint page where input from the Dell Cloud Manager console user can be requested.

Typical uses for string input controls are to request these items:

  • name for the server(s) to be launched in the stack
  • parameters to be passed to configuration management (Chef and Puppet)

A string input is defined with a section name, a type, description (optional), required attribute (optional), constraints (optional) and properties (optional).

section name

Example: server_name:

type

type: string

description

When defining string inputs in your templates you can define a description which will be displayable next to the string input field on the Dell Cloud Manager console.

description - Description of the string input field.

Example: description: "This is the name of the web server"

required

When defining string inputs in your templates you can specify whether or not the string input field is required. Allowable values are true or false. true is the default.

If the string input field is required, Dell Cloud Manager will require the user to enter a value in the string input field.

Example required: false

constraints

When defining string inputs in your templates you can define constraints which the Dell Cloud Manager console will enforce when requesting the input from the user.

  • length - Size of the input edit box in characters. Note: This is not defining a limitation on the maximum number of characters that can be input.
Example: - length: 50
  • min_length - Minimum string length.
Example: - min_length: 5
  • max_length - Maximum string length.
Example: - max_length: 10
  • equal
Example: - equal: 20
  • greater_than
Example: - greater_than: 10
  • greater_than_or_equal
Example: - greater_than_or_equal: 5
  • less_than
Example: - less_than: 6
  • less_than_or_equal
Example: - less_than_or_equal: 10
  • in_range - Allows you to specify a range of allowable numeric values.
Example: - in_range[10, 100]    # Input must be a number between 10 and 100 inclusive
  • valid_values - Allows you to specify an array of allowable values.
Example: - valid_values: [Small, Medium, Large]
  • pattern - Allows you to specify a regular expression pattern to enforce on the inputted value.
Example: - pattern: ^[a-z0-9_\-]+$

Example

string example with constraints:

inputs:

###########################################################################################################################################
# An input edit box for the server name will be created on the Launch Blueprint page.
# The description specified will be added above the input edit box
###########################################################################################################################################
  server_name:
    type: string
    description: "Name for the WordPress Server"
    required: true
    constraints:
      - length: 150
      - min_length: 5
      - max_length: 250
      - pattern: ^[a-z0-9_\-]+$
    properties:
      displayName: Server Name
      displayGroup: app_tier

String input field on the DCM console

../../../_images/template_input_string.png