ParameterDefinitions description

Structure and syntax

The ParameterDefinitions is a Python dictionary that contains one or more parameters. Each parameter is defined by a Python dictionary containing information specific to the parameter. At the time the agent is created, the default value is assigned to the parameter unless the user specifies a different value.

This part of the script is omitted if the script does not include user-defined parameters.

ParameterDefinitions = {
    '<param_name>': {
        'Name': '<descriptive_parameter_name>',
        'Description': '<description>'
        'Type': '<datatype>',
        'Default': <default_value>,
        'Encrypted': '<True_or_False>'
        'Required': '<True_or_False>'
    }
}

Components

Each parameter definition must contain the following:

The parameter declaration

Specifies a unique name for parameter. This name must be unique within the script. The name is a text string that can contain alphanumeric characters, - (hyphen), and _ (underscore). Example: threshold

Name

The name of the parameter. This name is displayed in the user interfaces.

Description

Describes the parameter. This description is displayed to users in the Create Agent screen of the Web UI.

Type

Specifies the datatype of parameter. Parameter type is one of the following values:

  • integer

  • string

Default

Specifies the default value of the parameter. At the time the agent is created, the default value is assigned to the parameter unless the user specifies a different value. You must specify a default if the parameter is part of a monitor or a condition. Otherwise, providing a default value is optional.

Encrypted

Specifies whether the user-supplied text is to be encrypted when the text is stored.

When Encrypted is True, the parameter is stored in a secure way. The parameter value will be available in plain text only when the Network Analytics Engine script is executed.

Default: False

Required

Specifies whether the user is required to supply a value. Use this attribute to force the user to provide a value for this parameter.

When Required is True, the parameter is required. If the user does not provide a value for this parameter, an error is returned and the agent is not created.

When Required is False, the parameter is optional. If the user does not provide a value for this parameter, the default value of the parameter is used.

Default: False