RosCondition
- Implements: IRosConditionExpression, IResolvable
Represents a RosTemplate condition, for resources which must be conditionally created and the determination must be made at deploy time.
Initializers
import { RosCondition } from '@alicloud/ros-cdk-core'
new RosCondition(scope: Construct, id: string, props?: RosConditionProps)
Name | Type | Description |
---|---|---|
scope |
Construct |
No description. |
id |
string |
No description. |
props |
RosConditionProps |
No description. |
scope
Required
- Type: Construct
id
Required
- Type: string
props
Optional
- Type: RosConditionProps
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 |
Synthesizes the condition. |
toString
public toString(): string
Returns a string representation of this construct.
synthesize
public synthesize(session: ISynthesisSession): void
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 overrideLogicalId(newLogicalId: string): void
Overrides the auto-generated logical ID with a specific ID.
- Type: string
The new logical ID to use for this stack element.
resolve
public resolve(_context: IResolveContext): any
Synthesizes the condition.
- Type: IResolveContext
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 { RosCondition } from '@alicloud/ros-cdk-core'
RosCondition.isConstruct(x: any)
Return whether the given object is a Construct.
- Type: any
isRosElement
import { RosCondition } from '@alicloud/ros-cdk-core'
RosCondition.isRosElement(x: any)
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: any
Properties
Name | Type | Description |
---|---|---|
node |
ConstructNode |
The construct tree node associated with this construct. |
creationStack |
string[] |
No description. |
logicalId |
string |
The logical ID for this stack element. |
stack |
Stack |
The stack in which this element is defined. |
expression |
IRosConditionExpression |
The condition statement. |
node
Required
public readonly node: ConstructNode;
- Type: ConstructNode
The construct tree node associated with this construct.
creationStack
Required
public readonly creationStack: string[];
- Type: string[]
logicalId
Required
public readonly logicalId: string;
- Type: 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 readonly stack: Stack;
- Type: Stack
The stack in which this element is defined.
RosElements must be defined within a stack scope (directly or indirectly).
expression
Optional
public readonly expression: IRosConditionExpression;
- Type: IRosConditionExpression
The condition statement.