Skip to content

ParameterConstraints

Source code in docs_src/capo_service_catalog/types/parameter_constraints.py
class ParameterConstraints(TypedDict, closed=True):
    allowed_values: NotRequired[
        "capo_service_catalog.types.allowed_values.AllowedValues"
    ]
    """<p>The values that the administrator has allowed for the parameter.</p>"""
    allowed_pattern: NotRequired["capo_service_catalog.types.string.String"]
    """<p>A regular expression that represents the patterns that allow for <code>String</code> types. The pattern must match the entire parameter value provided.</p>"""
    constraint_description: NotRequired["capo_service_catalog.types.string.String"]
    """<p>A string that explains a constraint when the constraint is violated. For example, without a constraint description, a parameter that has an allowed pattern of <code>[A-Za-z0-9]+</code> displays the following error message when the user specifies an invalid value:</p> <p> <code>Malformed input-Parameter MyParameter must match pattern [A-Za-z0-9]+</code> </p> <p>By adding a constraint description, such as must only contain letters (uppercase and lowercase) and numbers, you can display the following customized error message:</p> <p> <code>Malformed input-Parameter MyParameter must only contain uppercase and lowercase letters and numbers.</code> </p>"""
    max_length: NotRequired["capo_service_catalog.types.string.String"]
    """<p>An integer value that determines the largest number of characters you want to allow for <code>String</code> types. </p>"""
    min_length: NotRequired["capo_service_catalog.types.string.String"]
    """<p>An integer value that determines the smallest number of characters you want to allow for <code>String</code> types.</p>"""
    max_value: NotRequired["capo_service_catalog.types.string.String"]
    """<p>A numeric value that determines the largest numeric value you want to allow for <code>Number</code> types.</p>"""
    min_value: NotRequired["capo_service_catalog.types.string.String"]
    """<p>A numeric value that determines the smallest numeric value you want to allow for <code>Number</code> types. </p>"""

allowed_pattern instance-attribute

allowed_pattern: NotRequired[String]

A regular expression that represents the patterns that allow for String types. The pattern must match the entire parameter value provided.

allowed_values instance-attribute

allowed_values: NotRequired[AllowedValues]

The values that the administrator has allowed for the parameter.

constraint_description instance-attribute

constraint_description: NotRequired[String]

A string that explains a constraint when the constraint is violated. For example, without a constraint description, a parameter that has an allowed pattern of [A-Za-z0-9]+ displays the following error message when the user specifies an invalid value:

Malformed input-Parameter MyParameter must match pattern [A-Za-z0-9]+

By adding a constraint description, such as must only contain letters (uppercase and lowercase) and numbers, you can display the following customized error message:

Malformed input-Parameter MyParameter must only contain uppercase and lowercase letters and numbers.

max_length instance-attribute

max_length: NotRequired[String]

An integer value that determines the largest number of characters you want to allow for String types.

max_value instance-attribute

max_value: NotRequired[String]

A numeric value that determines the largest numeric value you want to allow for Number types.

min_length instance-attribute

min_length: NotRequired[String]

An integer value that determines the smallest number of characters you want to allow for String types.

min_value instance-attribute

min_value: NotRequired[String]

A numeric value that determines the smallest numeric value you want to allow for Number types.