@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-02-09T02:14:25.476Z") public class CfnComponent extends CfnResource implements IInspectable
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:
data
property in the request body.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();
Modifier and Type | Class and Description |
---|---|
static class |
CfnComponent.Builder
A fluent builder for
CfnComponent . |
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnComponent(Construct scope,
java.lang.String id,
CfnComponentProps props)
Create a new `AWS::ImageBuilder::Component`.
|
protected |
CfnComponent(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnComponent(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrArn()
Returns the Amazon Resource Name (ARN) of the component.
|
IResolvable |
getAttrEncrypted()
Returns the encryption status of the component.
|
java.lang.String |
getAttrName()
Returns the name of the component.
|
java.lang.String |
getAttrType()
Image Builder determines the component type based on the phases that are defined in the component document.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getChangeDescription()
The change description of the component.
|
java.lang.String |
getData()
Component `data` contains inline YAML document content for the component.
|
java.lang.String |
getDescription()
Describes the contents of the component.
|
java.lang.String |
getKmsKeyId()
The ID of the KMS key that is used to encrypt this component.
|
java.lang.String |
getName()
The name of the component.
|
java.lang.String |
getPlatform()
The operating system platform of the component.
|
java.util.List<java.lang.String> |
getSupportedOsVersions()
The operating system (OS) version supported by the component.
|
TagManager |
getTags()
The tags that apply to the component.
|
java.lang.String |
getUri()
The `uri` of a YAML component document file.
|
java.lang.String |
getVersion()
The component version.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setChangeDescription(java.lang.String value)
The change description of the component.
|
void |
setData(java.lang.String value)
Component `data` contains inline YAML document content for the component.
|
void |
setDescription(java.lang.String value)
Describes the contents of the component.
|
void |
setKmsKeyId(java.lang.String value)
The ID of the KMS key that is used to encrypt this component.
|
void |
setName(java.lang.String value)
The name of the component.
|
void |
setPlatform(java.lang.String value)
The operating system platform of the component.
|
void |
setSupportedOsVersions(java.util.List<java.lang.String> value)
The operating system (OS) version supported by the component.
|
void |
setUri(java.lang.String value)
The `uri` of a YAML component document file.
|
void |
setVersion(java.lang.String value)
The component version.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnComponent(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnComponent(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnComponent(Construct scope, java.lang.String id, CfnComponentProps props)
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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
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+)?)?$
.
public IResolvable getAttrEncrypted()
For example true
or false
.
public java.lang.String getAttrName()
public java.lang.String getAttrType()
If there is only one phase, and its name is "test", then the type is TEST
. For all other components, the type is BUILD
.
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
public java.lang.String getName()
public void setName(java.lang.String value)
public java.lang.String getPlatform()
public void setPlatform(java.lang.String value)
public java.lang.String getVersion()
For example, 1.0.0
.
public void setVersion(java.lang.String value)
For example, 1.0.0
.
public java.lang.String getChangeDescription()
Describes what change has been made in this version, or what makes this version different from other versions of this component.
public void setChangeDescription(java.lang.String value)
Describes what change has been made in this version, or what makes this version different from other versions of this component.
public java.lang.String getData()
Alternatively, you can specify the uri
of a YAML document file stored in Amazon S3. However, you cannot specify both properties.
public void setData(java.lang.String value)
Alternatively, you can specify the uri
of a YAML document file stored in Amazon S3. However, you cannot specify both properties.
public java.lang.String getDescription()
public void setDescription(java.lang.String value)
public java.lang.String getKmsKeyId()
public void setKmsKeyId(java.lang.String value)
public java.util.List<java.lang.String> getSupportedOsVersions()
If the OS information is available, a prefix match is performed against the base image OS version during image recipe creation.
public void setSupportedOsVersions(java.util.List<java.lang.String> value)
If the OS information is available, a prefix match is performed against the base image OS version during image recipe creation.
public java.lang.String getUri()
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.
public void setUri(java.lang.String value)
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.