java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.imagebuilder.alpha.ComponentData
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
Direct Known Subclasses:
S3ComponentData

@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)", date="2025-11-20T23:37:34.439Z") @Stability(Experimental) public abstract class ComponentData extends software.amazon.jsii.JsiiObject
(experimental) Helper class for referencing and uploading component data.

Example:

 Component component = Component.Builder.create(this, "MyComponent")
         .platform(Platform.LINUX)
         .data(ComponentData.fromJsonObject(Map.of(
                 "schemaVersion", ComponentSchemaVersion.V1_0,
                 "phases", List.of(Map.of(
                         "name", ComponentPhaseName.BUILD,
                         "steps", List.of(Map.of(
                                 "name", "install-app",
                                 "action", ComponentAction.EXECUTE_BASH,
                                 "inputs", Map.of(
                                         "commands", List.of("echo \"Installing my application...\"", "yum update -y")))))))))
         .build();
 
  • Nested Class Summary

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

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
    ComponentData(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    ComponentData(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    fromAsset(software.constructs.Construct scope, String id, String path)
    (experimental) Uploads component data from a local file to S3 to use as the component data.
    fromAsset(software.constructs.Construct scope, String id, String path, AssetOptions options)
    (experimental) Uploads component data from a local file to S3 to use as the component data.
    (experimental) Uses an inline JSON object as the component data, using the ComponentDocument interface.
    (experimental) Uses an inline JSON/YAML string as the component data.
    fromJsonObject(Map<String,? extends Object> data)
    (experimental) Uses an inline JSON object as the component data.
    fromS3(IBucket bucket, String key)
    (experimental) References component data from a pre-existing S3 object.
    abstract Boolean
    (experimental) Indicates that the provided component data is an S3 reference.
    (experimental) The resulting inline string or S3 URL which references the component data.

    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, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • ComponentData

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

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

      @Stability(Experimental) protected ComponentData(@NotNull String value)
      Parameters:
      value - This parameter is required.
  • Method Details

    • fromAsset

      @Stability(Experimental) @NotNull public static S3ComponentData fromAsset(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String path, @Nullable AssetOptions options)
      (experimental) Uploads component data from a local file to S3 to use as the component data.

      Parameters:
      scope - The construct scope. This parameter is required.
      id - Identifier of the construct. This parameter is required.
      path - The local path to the component data file. This parameter is required.
      options - S3 asset upload options.
    • fromAsset

      @Stability(Experimental) @NotNull public static S3ComponentData fromAsset(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String path)
      (experimental) Uploads component data from a local file to S3 to use as the component data.

      Parameters:
      scope - The construct scope. This parameter is required.
      id - Identifier of the construct. This parameter is required.
      path - The local path to the component data file. This parameter is required.
    • fromComponentDocumentJsonObject

      @Stability(Experimental) @NotNull public static ComponentData fromComponentDocumentJsonObject(@NotNull ComponentDocument data)
      (experimental) Uses an inline JSON object as the component data, using the ComponentDocument interface.

      Parameters:
      data - An inline JSON object representing the component data. This parameter is required.
    • fromInline

      @Stability(Experimental) @NotNull public static ComponentData fromInline(@NotNull String data)
      (experimental) Uses an inline JSON/YAML string as the component data.

      Parameters:
      data - An inline JSON/YAML string representing the component data. This parameter is required.
    • fromJsonObject

      @Stability(Experimental) @NotNull public static ComponentData fromJsonObject(@NotNull Map<String,? extends Object> data)
      (experimental) Uses an inline JSON object as the component data.

      Parameters:
      data - An inline JSON object representing the component data. This parameter is required.
    • fromS3

      @Stability(Experimental) @NotNull public static S3ComponentData fromS3(@NotNull IBucket bucket, @NotNull String key)
      (experimental) References component data from a pre-existing S3 object.

      Parameters:
      bucket - The S3 bucket where the component data is stored. This parameter is required.
      key - The S3 key of the component data file. This parameter is required.
    • getIsS3Reference

      @Stability(Experimental) @NotNull public abstract Boolean getIsS3Reference()
      (experimental) Indicates that the provided component data is an S3 reference.
    • getValue

      @Stability(Experimental) @NotNull public String getValue()
      (experimental) The resulting inline string or S3 URL which references the component data.