Class CfnComponent
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.imagebuilder.CfnComponent
- All Implemented Interfaces:
IEnvironmentAware,IInspectable,ITaggable,IComponentRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.118.0 (build 02eec31)",
date="2025-11-10T13:40:07.386Z")
@Stability(Stable)
public class CfnComponent
extends CfnResource
implements IInspectable, IComponentRef, 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
dataproperty in the request body. - A URL that points to a YAML document file stored in Amazon S3, using the
uriproperty 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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnComponent.static interfaceThe latest version references of the component.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.imagebuilder.IComponentRef
IComponentRef.Jsii$Default, IComponentRef.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnComponent(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnComponent(software.amazon.jsii.JsiiObjectRef objRef) CfnComponent(software.constructs.Construct scope, String id, CfnComponentProps props) -
Method Summary
Modifier and TypeMethodDescriptionReturns the Amazon Resource Name (ARN) of the component.Returns the encryption status of the component.The latest version references of the component.The Amazon Resource Name (ARN) of the component.The latest version ARN of the created component, with the same major version.The latest version ARN of the created component, with the same minor version.The latest version ARN of the created component, with the same patch version.Returns the name of the component.Image Builder determines the component type based on the phases that are defined in the component document.The change description of the component.A reference to a Component resource.getData()Componentdatacontains inline YAML document content for the component.Describes the contents of the component.The Amazon Resource Name (ARN) that uniquely identifies the KMS key used to encrypt this component.getName()The name of the component.The operating system platform of the component.The operating system (OS) version supported by the component.getTags()Tag Manager which manages the tags for this resource.The tags that apply to the component.getUri()Theuriof a YAML component document file.The component version.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetChangeDescription(String value) The change description of the component.voidComponentdatacontains inline YAML document content for the component.voidsetDescription(String value) Describes the contents of the component.voidsetKmsKeyId(String value) The Amazon Resource Name (ARN) that uniquely identifies the KMS key used to encrypt this component.voidThe name of the component.voidsetPlatform(String value) The operating system platform of the component.voidsetSupportedOsVersions(List<String> value) The operating system (OS) version supported by the component.voidsetTagsRaw(Map<String, String> value) The tags that apply to the component.voidTheuriof a YAML component document file.voidsetVersion(String value) The component version.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
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
Returns the encryption status of the component.For example
trueorfalse. -
getAttrLatestVersion
The latest version references of the component. -
getAttrLatestVersionArn
The Amazon Resource Name (ARN) of the component. -
getAttrLatestVersionMajor
The latest version ARN of the created component, with the same major version. -
getAttrLatestVersionMinor
The latest version ARN of the created component, with the same minor version. -
getAttrLatestVersionPatch
The latest version ARN of the created component, with the same patch version. -
getAttrName
Returns the name of the component. -
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 isBUILD. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getComponentRef
A reference to a Component resource.- Specified by:
getComponentRefin interfaceIComponentRef
-
getTags
Tag Manager which manages the tags for this resource. -
getName
The name of the component. -
setName
The name of the component. -
getPlatform
The operating system platform of the component. -
setPlatform
The operating system platform of the component. -
getVersion
The component version. -
setVersion
The component version. -
getChangeDescription
The change description of the component. -
setChangeDescription
The change description of the component. -
getData
Componentdatacontains inline YAML document content for the component. -
setData
Componentdatacontains inline YAML document content for the component. -
getDescription
Describes the contents of the component. -
setDescription
Describes the contents of the component. -
getKmsKeyId
The Amazon Resource Name (ARN) that uniquely identifies the KMS key used to encrypt this component. -
setKmsKeyId
The Amazon Resource Name (ARN) that uniquely identifies the KMS key used to encrypt this component. -
getSupportedOsVersions
The operating system (OS) version supported by the component. -
setSupportedOsVersions
The operating system (OS) version supported by the component. -
getTagsRaw
The tags that apply to the component. -
setTagsRaw
The tags that apply to the component. -
getUri
Theuriof a YAML component document file. -
setUri
Theuriof a YAML component document file.
-