Class CfnComponent

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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:57.409Z") @Stability(Stable) public class CfnComponent extends CfnResource implements IInspectable
A CloudFormation AWS::ImageBuilder::Component.

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();
 
  • 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 Construct scope, @NotNull String id, @NotNull CfnComponentProps props)
      Create a new AWS::ImageBuilder::Component.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      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()
      The tags that apply to the component.
    • 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.

      For example, 1.0.0 .

    • setVersion

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

      For example, 1.0.0 .

    • getChangeDescription

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

      Describes what change has been made in this version, or what makes this version different from other versions of this component.

    • setChangeDescription

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

      Describes what change has been made in this version, or what makes this version different from other versions of this component.

    • getData

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

      Alternatively, you can specify the uri of a YAML document file stored in Amazon S3. However, you cannot specify both properties.

    • setData

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

      Alternatively, you can specify the uri of a YAML document file stored in Amazon S3. However, you cannot specify both properties.

    • 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.

      If the OS information is available, a prefix match is performed against the base image OS version during image recipe creation.

    • setSupportedOsVersions

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

      If the OS information is available, a prefix match is performed against the base image OS version during image recipe creation.

    • getUri

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

      This must be an S3 URL ( s3://bucket/key ), and the requester must have permission to access the S3 bucket it points to. If you use Amazon S3, you can specify component content up to your service quota.

      Alternatively, you can specify the YAML document inline, using the component data property. You cannot specify both properties.

    • setUri

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

      This must be an S3 URL ( s3://bucket/key ), and the requester must have permission to access the S3 bucket it points to. If you use Amazon S3, you can specify component content up to your service quota.

      Alternatively, you can specify the YAML document inline, using the component data property. You cannot specify both properties.