Class CfnComponent

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:03.012Z") @Stability(Stable) public class CfnComponent extends CfnResource implements IInspectable, ITaggable
Creates a new component that can be used to build, validate, test, and assess your image.

The component is based on a YAML document that you specify using exactly one of the following methods:

  • Inline, using the data property in the request body.
  • A URL that points to a YAML document file stored in Amazon S3, using the uri property in the request body.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.imagebuilder.*;
 CfnComponent cfnComponent = CfnComponent.Builder.create(this, "MyCfnComponent")
         .name("name")
         .platform("platform")
         .version("version")
         // the properties below are optional
         .changeDescription("changeDescription")
         .data("data")
         .description("description")
         .kmsKeyId("kmsKeyId")
         .supportedOsVersions(List.of("supportedOsVersions"))
         .tags(Map.of(
                 "tagsKey", "tags"))
         .uri("uri")
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnComponent

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

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

      @Stability(Stable) public CfnComponent(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnComponentProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      Returns the Amazon Resource Name (ARN) of the component.

      The following pattern is applied: ^arn:aws[^:]*:imagebuilder:[^:]+:(?:\d{12}|aws):(?:image-recipe|infrastructure-configuration|distribution-configuration|component|image|image-pipeline)/[a-z0-9-_]+(?:/(?:(?:x|\d+)\.(?:x|\d+)\.(?:x|\d+))(?:/\d+)?)?$ .

    • getAttrEncrypted

      @Stability(Stable) @NotNull public IResolvable getAttrEncrypted()
      Returns the encryption status of the component.

      For example true or false .

    • getAttrName

      @Stability(Stable) @NotNull public String getAttrName()
      Returns the name of the component.
    • getAttrType

      @Stability(Stable) @NotNull public String getAttrType()
      Image Builder determines the component type based on the phases that are defined in the component document.

      If there is only one phase, and its name is "test", then the type is TEST . For all other components, the type is BUILD .

    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getName

      @Stability(Stable) @NotNull public String getName()
      The name of the component.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The name of the component.
    • getPlatform

      @Stability(Stable) @NotNull public String getPlatform()
      The operating system platform of the component.
    • setPlatform

      @Stability(Stable) public void setPlatform(@NotNull String value)
      The operating system platform of the component.
    • getVersion

      @Stability(Stable) @NotNull public String getVersion()
      The component version.
    • setVersion

      @Stability(Stable) public void setVersion(@NotNull String value)
      The component version.
    • getChangeDescription

      @Stability(Stable) @Nullable public String getChangeDescription()
      The change description of the component.
    • setChangeDescription

      @Stability(Stable) public void setChangeDescription(@Nullable String value)
      The change description of the component.
    • getData

      @Stability(Stable) @Nullable public String getData()
      Component data contains inline YAML document content for the component.
    • setData

      @Stability(Stable) public void setData(@Nullable String value)
      Component data contains inline YAML document content for the component.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      Describes the contents of the component.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      Describes the contents of the component.
    • getKmsKeyId

      @Stability(Stable) @Nullable public String getKmsKeyId()
      The ID of the KMS key that is used to encrypt this component.
    • setKmsKeyId

      @Stability(Stable) public void setKmsKeyId(@Nullable String value)
      The ID of the KMS key that is used to encrypt this component.
    • getSupportedOsVersions

      @Stability(Stable) @Nullable public List<String> getSupportedOsVersions()
      The operating system (OS) version supported by the component.
    • setSupportedOsVersions

      @Stability(Stable) public void setSupportedOsVersions(@Nullable List<String> value)
      The operating system (OS) version supported by the component.
    • getTagsRaw

      @Stability(Stable) @Nullable public Map<String,String> getTagsRaw()
      The tags that apply to the component.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable Map<String,String> value)
      The tags that apply to the component.
    • getUri

      @Stability(Stable) @Nullable public String getUri()
      The uri of a YAML component document file.
    • setUri

      @Stability(Stable) public void setUri(@Nullable String value)
      The uri of a YAML component document file.