Class CfnComponent
- All Implemented Interfaces:
IConstruct,IDependable,IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
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
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();
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnComponent(Construct scope, String id, CfnComponentProps props) Create a newAWS::ImageBuilder::Component.protectedCfnComponent(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnComponent(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionReturns the Amazon Resource Name (ARN) of the component.Returns the encryption status of the component.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.getData()Componentdatacontains inline YAML document content for the component.Describes the contents of the component.The ID of the KMS key that is 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()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 ID of the KMS key that is 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.voidTheuriof a YAML component document file.voidsetVersion(String value) The component version.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods 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.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 Construct scope, @NotNull String id, @NotNull CfnComponentProps props) Create a newAWS::ImageBuilder::Component.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
props-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector-- tree inspector to collect and process attributes.
-
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. -
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
-
getTags
The tags that apply to the component. -
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.For example,
1.0.0. -
setVersion
The component version.For example,
1.0.0. -
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
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
Componentdatacontains inline YAML document content for the component.Alternatively, you can specify the
uriof a YAML document file stored in Amazon S3. However, you cannot specify both properties. -
setData
Componentdatacontains inline YAML document content for the component.Alternatively, you can specify the
uriof a YAML document file stored in Amazon S3. However, you cannot specify both properties. -
getDescription
Describes the contents of the component. -
setDescription
Describes the contents of the component. -
getKmsKeyId
The ID of the KMS key that is used to encrypt this component. -
setKmsKeyId
The ID of the KMS key that is used to encrypt this component. -
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
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
Theuriof 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
dataproperty. You cannot specify both properties. -
setUri
Theuriof 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
dataproperty. You cannot specify both properties.
-