RosParameter
A ROS parameter.
Parameters enable you to input custom values to your template each time you create or update a stack.
Initializers
import com.aliyun.ros.cdk.core.RosParameter;
RosParameter.Builder.create(Construct scope, java.lang.String id)
// .allowedPattern(java.lang.String)
// .allowedValues(java.util.List<java.lang.Object>)
// .associationProperty(java.lang.String)
// .associationPropertyMetadata(java.util.Map<java.lang.String, java.lang.Object>)
// .confirm(java.lang.Boolean)
// .constraintDescription(java.lang.String)
// .constraintDescription(java.util.Map<java.lang.String, java.lang.String>)
// .defaultValue(java.lang.Object)
// .description(java.lang.String)
// .description(java.util.Map<java.lang.String, java.lang.String>)
// .label(java.lang.String)
// .maxLength(java.lang.Number)
// .maxValue(java.lang.Number)
// .minLength(java.lang.Number)
// .minValue(java.lang.Number)
// .noEcho(java.lang.Boolean)
// .placeholder(java.lang.String)
// .placeholder(java.util.Map<java.lang.String, java.lang.String>)
// .required(java.lang.Boolean)
// .textArea(java.lang.Boolean)
// .type(RosParameterType)
.build();
Name | Type | Description |
---|---|---|
scope |
Construct |
No description. |
id |
java.lang.String |
No description. |
allowedPattern |
java.lang.String |
No description. |
allowedValues |
java.util.List |
No description. |
associationProperty |
java.lang.String |
No description. |
associationPropertyMetadata |
java.util.Map |
No description. |
confirm |
java.lang.Boolean |
No description. |
constraintDescription |
java.lang.String OR java.util.Map |
No description. |
defaultValue |
java.lang.Object |
No description. |
description |
java.lang.String OR java.util.Map |
No description. |
label |
java.lang.String |
No description. |
maxLength |
java.lang.Number |
No description. |
maxValue |
java.lang.Number |
No description. |
minLength |
java.lang.Number |
No description. |
minValue |
java.lang.Number |
No description. |
noEcho |
java.lang.Boolean |
No description. |
placeholder |
java.lang.String OR java.util.Map |
No description. |
required |
java.lang.Boolean |
No description. |
textArea |
java.lang.Boolean |
No description. |
type |
RosParameterType |
No description. |
scope
Required
- Type: Construct
id
Required
- Type: java.lang.String
allowedPattern
Optional
- Type: java.lang.String
allowedValues
Optional
- Type: java.util.List
associationProperty
Optional
- Type: java.lang.String
associationPropertyMetadata
Optional
- Type: java.util.Map
confirm
Optional
- Type: java.lang.Boolean
constraintDescription
Optional
- Type: java.lang.String OR java.util.Map
defaultValue
Optional
- Type: java.lang.Object
description
Optional
- Type: java.lang.String OR java.util.Map
label
Optional
- Type: java.lang.String
maxLength
Optional
- Type: java.lang.Number
maxValue
Optional
- Type: java.lang.Number
minLength
Optional
- Type: java.lang.Number
minValue
Optional
- Type: java.lang.Number
noEcho
Optional
- Type: java.lang.Boolean
placeholder
Optional
- Type: java.lang.String OR java.util.Map
required
Optional
- Type: java.lang.Boolean
textArea
Optional
- Type: java.lang.Boolean
type
Optional
- Type: RosParameterType
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
synthesize |
Allows this construct to emit artifacts into the cloud assembly during synthesis. |
overrideLogicalId |
Overrides the auto-generated logical ID with a specific ID. |
resolve |
No description. |
validateProperties |
No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
synthesize
public void synthesize(ISynthesisSession session)
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack
and Asset
as they participate in synthesizing the cloud assembly.
- Type: ISynthesisSession
The synthesis session.
overrideLogicalId
public void overrideLogicalId(java.lang.String newLogicalId)
Overrides the auto-generated logical ID with a specific ID.
- Type: java.lang.String
The new logical ID to use for this stack element.
resolve
public java.lang.Object resolve(IResolveContext _context)
- Type: IResolveContext
validateProperties
public void validateProperties()
public void validateProperties(RosParameterProps props)
- Type: RosParameterProps
Static Functions
Name | Description |
---|---|
isConstruct |
Return whether the given object is a Construct. |
isRosElement |
Returns true if a construct is a stack element (i.e. part of the synthesized template). |
isConstruct
import com.aliyun.ros.cdk.core.RosParameter;
RosParameter.isConstruct(java.lang.Object x)
Return whether the given object is a Construct.
- Type: java.lang.Object
isRosElement
import com.aliyun.ros.cdk.core.RosParameter;
RosParameter.isRosElement(java.lang.Object x)
Returns true
if a construct is a stack element (i.e. part of the synthesized template).
Uses duck-typing instead of instanceof
to allow stack elements from different
versions of this library to be included in the same stack.
- Type: java.lang.Object
Properties
Name | Type | Description |
---|---|---|
node |
ConstructNode |
The construct tree node associated with this construct. |
creationStack |
java.util.List |
No description. |
logicalId |
java.lang.String |
The logical ID for this stack element. |
stack |
Stack |
The stack in which this element is defined. |
noEcho |
java.lang.Boolean |
Indicates if this parameter is configured with "NoEcho" enabled. |
value |
IResolvable |
The parameter value as a Token. |
valueAsAny |
java.lang.Object |
The parameter value, if it represents a string. |
valueAsBoolean |
java.lang.Object |
The parameter value, if it represents a string. |
valueAsList |
java.util.List |
The parameter value, if it represents a string list. |
valueAsNumber |
java.lang.Number |
The parameter value, if it represents a number. |
valueAsString |
java.lang.String |
The parameter value, if it represents a string. |
node
Required
public ConstructNode getNode();
- Type: ConstructNode
The construct tree node associated with this construct.
creationStack
Required
public java.util.List<java.lang.String> getCreationStack();
- Type: java.util.List
logicalId
Required
public java.lang.String getLogicalId();
- Type: java.lang.String
The logical ID for this stack element.
The logical ID of the element is calculated from the path of the resource node in the construct tree.
To override this value, use overrideLogicalId(newLogicalId)
.
stack
Required
public Stack getStack();
- Type: Stack
The stack in which this element is defined.
RosElements must be defined within a stack scope (directly or indirectly).
noEcho
Required
public java.lang.Boolean getNoEcho();
- Type: java.lang.Boolean
Indicates if this parameter is configured with "NoEcho" enabled.
value
Required
public IResolvable getValue();
- Type: IResolvable
The parameter value as a Token.
valueAsAny
Required
public java.lang.Object getValueAsAny();
- Type: java.lang.Object
The parameter value, if it represents a string.
valueAsBoolean
Required
public java.lang.Object getValueAsBoolean();
- Type: java.lang.Object
The parameter value, if it represents a string.
valueAsList
Required
public java.util.List<java.lang.String> getValueAsList();
- Type: java.util.List
The parameter value, if it represents a string list.
valueAsNumber
Required
public java.lang.Number getValueAsNumber();
- Type: java.lang.Number
The parameter value, if it represents a number.
valueAsString
Required
public java.lang.String getValueAsString();
- Type: java.lang.String
The parameter value, if it represents a string.
Constants
Name | Type | Description |
---|---|---|
TYPE_ALLOWED_VALUES |
java.util.List |
No description. |
TYPE_ALLOWED_VALUES
Required
public java.util.List<java.lang.String> getTypeAllowedValues();
- Type: java.util.List