ReadonlyattrAn IResolvable that resolves to the CRN (Cloud Resource Name) of this resource.
Returns a { ref, attr } token that the engine resolves at deploy time to the
actual CRN string constructed by the handler.
ReadonlyattrThe volumeId attribute of this resource.
Resolves to { ref: logicalId, attr: 'volumeId' } at synthesis time.
OptionalformatOptionallabelsOptionallocationReadonlylogicalStable logical ID for this resource, derived from its construct node path. Combines a human-readable prefix with an 8-character SHA-256 hash suffix, guaranteeing uniqueness across renames/refactors.
Format: <PathSegments><HASH8> — e.g. MyStackWebServer3A1B2C3D
Used as the key in the synthesized stack JSON and as the target of
cross-resource { ref, attr } references.
ReadonlynodeThe tree node.
Protected Optional ReadonlypropertiesThe raw (pre-resolution) properties for this resource. Used by the base renderProperties() implementation.
ReadonlyresourceOptions for this resource, such as condition, deletion policy, etc.
ReadonlytypeThe resource type identifier.
Static ReadonlyRESOURCE_The CloudFormation-style type name for this resource.
Returns an IResolvable that resolves to { ref: logicalId } — a
whole-object reference token used by file-rendering synthesizers
(e.g. YamlFileSynthesizer) to compose this resource's full output
into a parent resource's array field.
Unlike getAtt(), no attr is included. The synthesizer resolves
the token to the complete resolved data of the referenced resource.
Adds an explicit dependency on another ProviderResource.
This ensures the dependent resource is synthesized after this one.
Applies a removal policy to this resource.
Maps the high-level RemovalPolicy enum to provider-level deletion/replace policies.
Optionaloptions: RemovalPolicyOptionsReturns an IResolvable that resolves to a { ref, attr } token
referencing an output attribute of this resource.
Used by L1 constructs to expose cross-resource reference attributes
(e.g. attrNetworkId, attrServerId) that the engine resolves at
deploy time by reading the named output from the created resource.
The attribute name to reference (e.g. 'networkId').
ProtectedrenderReturns the properties object used during synthesis.
The base implementation returns this.properties (the value passed to the
constructor). L1 subclasses generated by spec-to-cdkx override this
method to build the properties object from their own public mutable members,
following the same pattern as AWS CDK's cfnProperties getter.
Override this in custom L1s to expose mutable properties that can be mutated post-construction and still be correctly reflected at synthesis time.
Synthesizes this resource to a plain JSON-serializable object.
Uses the resolver pipeline from the root App to resolve all Lazy values and
IResolvable tokens within the properties tree. The resolved properties are then
sanitized (null/undefined removed, unresolved tokens detected and thrown).
The dependsOn field is always computed and emitted when non-empty. It is
the deduplicated union of:
addDependency() calls.{ ref, attr } tokens found anywhere in the
resolved (sanitized) properties tree.Output shape — a single-key object keyed by the resource's logicalId:
{
"MyStackWebServer3A1B2C3D": {
"type": "hetzner::Server",
"properties": { ... resolved properties ... },
"metadata": { "cdkx:path": "MyStack/WebServer/Resource" },
"dependsOn": ["MyStackNetwork1A2B3C4D"]
}
}
The dependsOn key is omitted when there are no dependencies.
Returns the raw (pre-resolution) output data for this resource.
Used by file-rendering synthesizers (e.g. YamlFileSynthesizer) as the
output shape instead of toJson(). Unlike toJson(), no resolution or
sanitization is applied — { ref, attr } tokens remain as-is so that
the synthesizer can inspect them for composition.
Delegates to renderProperties(), so L1 subclasses that override
renderProperties() automatically get the correct output here too.
Returns a string representation of this construct.
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple with() calls if subsequent mixins should apply to added
constructs.
The mixins to apply
This construct for chaining
StaticisChecks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
Any object
true if x is an object created from a class which extends Construct.
StaticisReturns true if the given object is a ProviderResource instance.
L1 construct for a Hetzner Volume resource.
Manages a Hetzner Cloud Volume.