Class ParameterDefinition
- java.lang.Object
-
- software.amazon.awssdk.services.serverlessapplicationrepository.model.ParameterDefinition
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<ParameterDefinition.Builder,ParameterDefinition>
@Generated("software.amazon.awssdk:codegen") public final class ParameterDefinition extends Object implements SdkPojo, Serializable, ToCopyableBuilder<ParameterDefinition.Builder,ParameterDefinition>
Parameters supported by the application.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceParameterDefinition.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringallowedPattern()A regular expression that represents the patterns to allow for String types.List<String>allowedValues()An array containing the list of values allowed for the parameter.static ParameterDefinition.Builderbuilder()StringconstraintDescription()A string that explains a constraint when the constraint is violated.StringdefaultValue()A value of the appropriate type for the template to use if no value is specified when a stack is created.Stringdescription()A string of up to 4,000 characters that describes the parameter.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)booleanhasAllowedValues()For responses, this returns true if the service returned a value for the AllowedValues property.inthashCode()booleanhasReferencedByResources()For responses, this returns true if the service returned a value for the ReferencedByResources property.IntegermaxLength()An integer value that determines the largest number of characters that you want to allow for String types.IntegermaxValue()A numeric value that determines the largest numeric value that you want to allow for Number types.IntegerminLength()An integer value that determines the smallest number of characters that you want to allow for String types.IntegerminValue()A numeric value that determines the smallest numeric value that you want to allow for Number types.Stringname()The name of the parameter.BooleannoEcho()Whether to mask the parameter value whenever anyone makes a call that describes the stack.List<String>referencedByResources()A list of AWS SAM resources that use this parameter.List<SdkField<?>>sdkFields()static Class<? extends ParameterDefinition.Builder>serializableBuilderClass()ParameterDefinition.BuildertoBuilder()StringtoString()Returns a string representation of this object.Stringtype()The type of the parameter.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
allowedPattern
public final String 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
public final List<String> 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
public final String 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
public final String 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
public final String 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
public final Integer 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
public final Integer 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
public final Integer 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
public final Integer 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
public final String name()
The name of the parameter.
- Returns:
- The name of the parameter.
-
noEcho
public final Boolean 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
public final List<String> 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
public final String 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
public ParameterDefinition.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<ParameterDefinition.Builder,ParameterDefinition>
-
builder
public static ParameterDefinition.Builder builder()
-
serializableBuilderClass
public static Class<? extends ParameterDefinition.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String 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.
-
-