Class Construct

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
All Implemented Interfaces:
IConstruct, IDependable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct
Direct Known Subclasses:
AlbController, AllowListReceiptFilter, ApplicationListenerCertificate, ApplicationListenerRule, ApplicationLoadBalancedServiceBase, ApplicationMultipleTargetGroupsServiceBase, AsgCapacityProvider, AssertionsProvider, Asset, AssetStaging, AwsApiCall, AwsAuth, AwsAuth, AwsCustomResource, BaseDataSource, BaseJenkinsProvider, BaseScalableAttribute, BucketDeployment, CdkPipeline, CdkStage, CfnElement, CfnJson, ContainerDefinition, CrossAccountZoneDelegationRecord, CustomActionRegistration, CustomResourceProvider, DockerImageAsset, DropSpamReceiptRule, EqualsAssertion, FargateProfile, GlobalTable, HelmChart, HelmChart, HttpsRedirect, IntegTest, IntegTestCase, KubernetesManifest, KubernetesObjectValue, KubernetesPatch, KubernetesResource, LinuxParameters, LogRetention, NetworkLoadBalancedServiceBase, NetworkMultipleTargetGroupsServiceBase, PipelineBase, ProductStackHistory, Provider, PublishAssetsAction, QueueProcessingServiceBase, Resolver, Resource, ScheduledTaskBase, SecretRotation, ServiceAccount, Stack, Stage, State, StateMachineFragment, StepScalingAction, StepScalingAction, StepScalingPolicy, StepScalingPolicy, Table, TarballImageAsset, TargetGroupBase, TargetTrackingScalingPolicy, TargetTrackingScalingPolicy, Trigger, UpdatePipelineAction, User, VpcEndpointServiceDomainName

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:54.981Z") @Stability(Stable) public class Construct extends software.constructs.Construct 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.

Example:

 String entry = "/path/to/function";
 DockerImage image = DockerImage.fromBuild(entry);
 PythonFunction.Builder.create(this, "function")
         .entry(entry)
         .runtime(Runtime.PYTHON_3_8)
         .bundling(BundlingOptions.builder()
                 .buildArgs(Map.of("PIP_INDEX_URL", "https://your.index.url/simple/", "PIP_EXTRA_INDEX_URL", "https://your.extra-index.url/simple/"))
                 .build())
         .build();
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.constructs.Construct

    software.constructs.Construct.Builder

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct

    IConstruct.Jsii$Default, IConstruct.Jsii$Proxy

    Nested classes/interfaces inherited from interface software.constructs.IConstruct

    software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Construct(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    Construct(software.amazon.jsii.JsiiObjectRef objRef)
     
     
    Construct(software.constructs.Construct scope, String id)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    The construct tree node associated with this construct.
    static Boolean
    Return whether the given object is a Construct.
    protected void
    Perform final modifications before synthesis.
    protected void
    onSynthesize(software.constructs.ISynthesisSession session)
    Allows this construct to emit artifacts into the cloud assembly during synthesis.
    protected List<String>
    Validate the current construct.
    protected void
    Perform final modifications before synthesis.
    protected void
    Allows this construct to emit artifacts into the cloud assembly during synthesis.
    protected List<String>
    Validate the current construct.

    Methods inherited from class software.constructs.Construct

    toString

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • Construct

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

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

      @Stability(Stable) public Construct(@NotNull software.constructs.Construct scope, @NotNull String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
  • Method Details

    • isConstruct

      @Stability(Stable) @NotNull public static Boolean isConstruct(@NotNull Object x)
      Return whether the given object is a Construct.

      Parameters:
      x - This parameter is required.
    • 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.

      Overrides:
      onPrepare in class software.constructs.Construct
    • onSynthesize

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

      Overrides:
      onSynthesize in class software.constructs.Construct
      Parameters:
      session - The synthesis session. This parameter is required.
    • onValidate

      @Stability(Stable) @NotNull protected List<String> onValidate()
      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.

      Overrides:
      onValidate in class software.constructs.Construct
      Returns:
      An array of validation error messages, or an empty array if the construct is valid.
    • prepare

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

    • synthesize

      @Stability(Stable) protected void synthesize(@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.
    • validate

      @Stability(Stable) @NotNull protected List<String> validate()
      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 the construct is valid.
    • getNode

      @Stability(Stable) @NotNull public ConstructNode getNode()
      The construct tree node associated with this construct.
      Specified by:
      getNode in interface IConstruct