Class CloudArtifact

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.cxapi.CloudArtifact
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
Direct Known Subclasses:
AssetManifestArtifact, CloudFormationStackArtifact, NestedCloudAssemblyArtifact, TreeCloudArtifact

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:54.716Z") @Stability(Stable) public class CloudArtifact extends software.amazon.jsii.JsiiObject
Represents an artifact within a cloud assembly.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.cloudassembly.schema.*;
 import software.amazon.awscdk.cxapi.*;
 CloudAssembly cloudAssembly;
 CloudArtifact cloudArtifact = CloudArtifact.fromManifest(cloudAssembly, "MyCloudArtifact", ArtifactManifest.builder()
         .type(ArtifactType.NONE)
         // the properties below are optional
         .dependencies(List.of("dependencies"))
         .displayName("displayName")
         .environment("environment")
         .metadata(Map.of(
                 "metadataKey", List.of(MetadataEntry.builder()
                         .type("type")
                         // the properties below are optional
                         .data("data")
                         .trace(List.of("trace"))
                         .build())))
         .properties(AwsCloudFormationStackProperties.builder()
                 .templateFile("templateFile")
                 // the properties below are optional
                 .assumeRoleArn("assumeRoleArn")
                 .assumeRoleExternalId("assumeRoleExternalId")
                 .bootstrapStackVersionSsmParameter("bootstrapStackVersionSsmParameter")
                 .cloudFormationExecutionRoleArn("cloudFormationExecutionRoleArn")
                 .lookupRole(BootstrapRole.builder()
                         .arn("arn")
                         // the properties below are optional
                         .assumeRoleExternalId("assumeRoleExternalId")
                         .bootstrapStackVersionSsmParameter("bootstrapStackVersionSsmParameter")
                         .requiresBootstrapStackVersion(123)
                         .build())
                 .parameters(Map.of(
                         "parametersKey", "parameters"))
                 .requiresBootstrapStackVersion(123)
                 .stackName("stackName")
                 .stackTemplateAssetObjectUrl("stackTemplateAssetObjectUrl")
                 .tags(Map.of(
                         "tagsKey", "tags"))
                 .terminationProtection(false)
                 .validateOnSynth(false)
                 .build())
         .build());
 
  • Constructor Details

    • CloudArtifact

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

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

      @Stability(Stable) protected CloudArtifact(@NotNull CloudAssembly assembly, @NotNull String id, @NotNull ArtifactManifest manifest)
      Parameters:
      assembly - This parameter is required.
      id - This parameter is required.
      manifest - This parameter is required.
  • Method Details

    • fromManifest

      @Stability(Stable) @Nullable public static CloudArtifact fromManifest(@NotNull CloudAssembly assembly, @NotNull String id, @NotNull ArtifactManifest artifact)
      Returns a subclass of CloudArtifact based on the artifact type defined in the artifact manifest.

      Parameters:
      assembly - The cloud assembly from which to load the artifact. This parameter is required.
      id - The artifact ID. This parameter is required.
      artifact - The artifact manifest. This parameter is required.
      Returns:
      the CloudArtifact that matches the artifact type or undefined if it's an artifact type that is unrecognized by this module.
    • findMetadataByType

      @Stability(Stable) @NotNull public List<MetadataEntryResult> findMetadataByType(@NotNull String type)
      Parameters:
      type - This parameter is required.
      Returns:
      all the metadata entries of a specific type in this artifact.
    • getAssembly

      @Stability(Stable) @NotNull public CloudAssembly getAssembly()
    • getDependencies

      @Stability(Stable) @NotNull public List<CloudArtifact> getDependencies()
      Returns all the artifacts that this artifact depends on.
    • getHierarchicalId

      @Stability(Stable) @NotNull public String getHierarchicalId()
      An identifier that shows where this artifact is located in the tree of nested assemblies, based on their manifests.

      Defaults to the normal id. Should only be used in user interfaces.

    • getId

      @Stability(Stable) @NotNull public String getId()
    • getManifest

      @Stability(Stable) @NotNull public ArtifactManifest getManifest()
      The artifact's manifest.
    • getMessages

      @Stability(Stable) @NotNull public List<SynthesisMessage> getMessages()
      The set of messages extracted from the artifact's metadata.