Class ParameterDefinition
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<ParameterDefinition.Builder,
ParameterDefinition>
Parameters supported by the application.
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal String
A regular expression that represents the patterns to allow for String types.An array containing the list of values allowed for the parameter.static ParameterDefinition.Builder
builder()
final String
A string that explains a constraint when the constraint is violated.final String
A value of the appropriate type for the template to use if no value is specified when a stack is created.final String
A string of up to 4,000 characters that describes the parameter.final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final boolean
For responses, this returns true if the service returned a value for the AllowedValues property.final int
hashCode()
final boolean
For responses, this returns true if the service returned a value for the ReferencedByResources property.final Integer
An integer value that determines the largest number of characters that you want to allow for String types.final Integer
maxValue()
A numeric value that determines the largest numeric value that you want to allow for Number types.final Integer
An integer value that determines the smallest number of characters that you want to allow for String types.final Integer
minValue()
A numeric value that determines the smallest numeric value that you want to allow for Number types.final String
name()
The name of the parameter.final Boolean
noEcho()
Whether to mask the parameter value whenever anyone makes a call that describes the stack.A list of AWS SAM resources that use this parameter.static Class
<? extends ParameterDefinition.Builder> Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.final String
type()
The type of the parameter.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
allowedPattern
A regular expression that represents the patterns to allow for String types.
- Returns:
- A regular expression that represents the patterns to allow for String types.
-
hasAllowedValues
public final boolean hasAllowedValues()For responses, this returns true if the service returned a value for the AllowedValues property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
allowedValues
An array containing the list of values allowed for the parameter.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasAllowedValues()
method.- Returns:
- An array containing the list of values allowed for the parameter.
-
constraintDescription
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 contain only uppercase and lowercase letters and numbers," you can display the following customized error message:
Malformed input-Parameter MyParameter must contain only uppercase and lowercase letters and numbers.
- Returns:
- 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 contain only uppercase and lowercase letters and numbers," you can display the following customized error message:
Malformed input-Parameter MyParameter must contain only uppercase and lowercase letters and numbers.
-
defaultValue
A value of the appropriate type for the template to use if no value is specified when a stack is created. If you define constraints for the parameter, you must specify a value that adheres to those constraints.
- Returns:
- A value of the appropriate type for the template to use if no value is specified when a stack is created. If you define constraints for the parameter, you must specify a value that adheres to those constraints.
-
description
A string of up to 4,000 characters that describes the parameter.
- Returns:
- A string of up to 4,000 characters that describes the parameter.
-
maxLength
An integer value that determines the largest number of characters that you want to allow for String types.
- Returns:
- An integer value that determines the largest number of characters that you want to allow for String types.
-
maxValue
A numeric value that determines the largest numeric value that you want to allow for Number types.
- Returns:
- A numeric value that determines the largest numeric value that you want to allow for Number types.
-
minLength
An integer value that determines the smallest number of characters that you want to allow for String types.
- Returns:
- An integer value that determines the smallest number of characters that you want to allow for String types.
-
minValue
A numeric value that determines the smallest numeric value that you want to allow for Number types.
- Returns:
- A numeric value that determines the smallest numeric value that you want to allow for Number types.
-
name
The name of the parameter.
- Returns:
- The name of the parameter.
-
noEcho
Whether to mask the parameter value whenever anyone makes a call that describes the stack. If you set the value to true, the parameter value is masked with asterisks (*****).
- Returns:
- Whether to mask the parameter value whenever anyone makes a call that describes the stack. If you set the value to true, the parameter value is masked with asterisks (*****).
-
hasReferencedByResources
public final boolean hasReferencedByResources()For responses, this returns true if the service returned a value for the ReferencedByResources property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
referencedByResources
A list of AWS SAM resources that use this parameter.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasReferencedByResources()
method.- Returns:
- A list of AWS SAM resources that use this parameter.
-
type
The type of the parameter.
Valid values: String | Number | List<Number> | CommaDelimitedList
String: A literal string.
For example, users can specify "MyUserName".
Number: An integer or float. AWS CloudFormation validates the parameter value as a number. However, when you use the parameter elsewhere in your template (for example, by using the Ref intrinsic function), the parameter value becomes a string.
For example, users might specify "8888".
List<Number>: An array of integers or floats that are separated by commas. AWS CloudFormation validates the parameter value as numbers. However, when you use the parameter elsewhere in your template (for example, by using the Ref intrinsic function), the parameter value becomes a list of strings.
For example, users might specify "80,20", and then Ref results in ["80","20"].
CommaDelimitedList: An array of literal strings that are separated by commas. The total number of strings should be one more than the total number of commas. Also, each member string is space-trimmed.
For example, users might specify "test,dev,prod", and then Ref results in ["test","dev","prod"].
- Returns:
- The type of the parameter.
Valid values: String | Number | List<Number> | CommaDelimitedList
String: A literal string.
For example, users can specify "MyUserName".
Number: An integer or float. AWS CloudFormation validates the parameter value as a number. However, when you use the parameter elsewhere in your template (for example, by using the Ref intrinsic function), the parameter value becomes a string.
For example, users might specify "8888".
List<Number>: An array of integers or floats that are separated by commas. AWS CloudFormation validates the parameter value as numbers. However, when you use the parameter elsewhere in your template (for example, by using the Ref intrinsic function), the parameter value becomes a list of strings.
For example, users might specify "80,20", and then Ref results in ["80","20"].
CommaDelimitedList: An array of literal strings that are separated by commas. The total number of strings should be one more than the total number of commas. Also, each member string is space-trimmed.
For example, users might specify "test,dev,prod", and then Ref results in ["test","dev","prod"].
-
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<ParameterDefinition.Builder,
ParameterDefinition> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode() -
equals
-
equalsBySdkFields
Description copied from interface:SdkPojo
Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in interfaceSdkPojo
- Parameters:
obj
- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value. -
getValueForField
-
sdkFields
-