Class Construct

  • All Implemented Interfaces:
    software.amazon.jsii.JsiiSerializable, IConstruct

    @Generated(value="jsii-pacmak/1.71.0 (build f1f58ae)",
               date="2022-11-26T00:17:33.859Z")
    @Stability(Stable)
    public class Construct
    extends software.amazon.jsii.JsiiObject
    implements IConstruct
    Represents the building block of the construct graph.

    All constructs besides the root construct must be created within the scope of another construct.

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Construct​(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)  
      protected Construct​(software.amazon.jsii.JsiiObjectRef objRef)  
        Construct​(Construct scope, String id)
      Creates a new construct node.
        Construct​(Construct scope, String id, ConstructOptions options)
      Creates a new construct node.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      protected void onPrepare()
      Perform final modifications before synthesis.
      protected void onSynthesize​(ISynthesisSession session)
      Allows this construct to emit artifacts into the cloud assembly during synthesis.
      protected List<String> onValidate()
      Deprecated.
      use `Node.addValidation()` to subscribe validation functions on this construct instead of overriding this method.
      String toString()
      Returns a string representation of this construct.
      • Methods inherited from class software.amazon.jsii.JsiiObject

        jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
      • Methods inherited from interface software.amazon.jsii.JsiiSerializable

        $jsii$toJson
    • Constructor Detail

      • Construct

        protected Construct​(software.amazon.jsii.JsiiObjectRef objRef)
      • Construct

        protected Construct​(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
      • Construct

        @Stability(Stable)
        public Construct​(@NotNull
                         Construct scope,
                         @NotNull
                         String id,
                         @Nullable
                         ConstructOptions options)
        Creates a new construct node.

        Parameters:
        scope - The scope in which to define this construct. This parameter is required.
        id - The scoped construct ID. This parameter is required.
        options - Options.
      • Construct

        @Stability(Stable)
        public Construct​(@NotNull
                         Construct scope,
                         @NotNull
                         String id)
        Creates a new construct node.

        Parameters:
        scope - The scope in which to define this construct. This parameter is required.
        id - The scoped construct ID. This parameter is required.
    • Method Detail

      • onPrepare

        @Stability(Stable)
        protected void onPrepare()
        Perform final modifications before synthesis.

        This method can be implemented by derived constructs in order to perform final changes before synthesis. prepare() will be called after child constructs have been prepared.

        This is an advanced framework feature. Only use this if you understand the implications.

      • onSynthesize

        @Stability(Stable)
        protected void onSynthesize​(@NotNull
                                    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.

        Parameters:
        session - The synthesis session. This parameter is required.
      • onValidate

        @Stability(Deprecated)
        @Deprecated
        @NotNull
        protected List<String> onValidate()
        Deprecated.
        use `Node.addValidation()` to subscribe validation functions on this construct instead of overriding this method.
        (deprecated) Validate the current construct.

        This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.

        Returns:
        An array of validation error messages, or an empty array if there the construct is valid.
      • toString

        @Stability(Stable)
        @NotNull
        public String toString()
        Returns a string representation of this construct.
        Overrides:
        toString in class Object