@Generated(value="jsii-pacmak/1.57.0 (build f614666)", date="2022-04-22T22:36:22.863Z") @Stability(value=Stable) public class CfnComponent extends CfnResource implements IInspectable
Components are orchestration documents that define a sequence of steps for downloading, installing, and configuring software packages or for defining tests to run on software packages. They also define validation and security hardening steps. A component is defined using a YAML document format. For more information, see Using Documents in Image Builder .
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. |
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnComponent(software.constructs.Construct scope,
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 |
|---|---|
String |
getAttrArn()
Returns the Amazon Resource Name (ARN) of the component.
|
IResolvable |
getAttrEncrypted()
Returns the encryption status of the component.
|
String |
getAttrName()
Returns the name of the component.
|
String |
getAttrType()
Returns the component type.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getChangeDescription()
A change description of the component.
|
String |
getData()
The data of the component.
|
String |
getDescription()
The description of the component.
|
String |
getKmsKeyId()
The KMS key identifier used to encrypt the component.
|
String |
getName()
The name of the component.
|
String |
getPlatform()
The platform of the component.
|
List<String> |
getSupportedOsVersions()
The operating system (OS) version supported by the component.
|
TagManager |
getTags()
The tags associated with the component.
|
String |
getUri()
The `uri` of a YAML component document file.
|
String |
getVersion()
The component version.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setChangeDescription(String value)
A change description of the component.
|
void |
setData(String value)
The data of the component.
|
void |
setDescription(String value)
The description of the component.
|
void |
setKmsKeyId(String value)
The KMS key identifier used to encrypt the component.
|
void |
setName(String value)
The name of the component.
|
void |
setPlatform(String value)
The platform of the component.
|
void |
setSupportedOsVersions(List<String> value)
The operating system (OS) version supported by the component.
|
void |
setUri(String value)
The `uri` of a YAML component document file.
|
void |
setVersion(String value)
The component version.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnComponent(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnComponent(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnComponent(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
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.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public 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+)?)?$ .
@Stability(value=Stable) @NotNull public IResolvable getAttrEncrypted()
For example true or false .
@Stability(value=Stable) @NotNull public String getAttrName()
@Stability(value=Stable) @NotNull public String getAttrType()
For example, BUILD or TEST .
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
@Stability(value=Stable) @NotNull public String getName()
@Stability(value=Stable)
public void setName(@NotNull
String value)
@Stability(value=Stable) @NotNull public String getPlatform()
For example, Windows .
@Stability(value=Stable)
public void setPlatform(@NotNull
String value)
For example, Windows .
@Stability(value=Stable) @NotNull public String getVersion()
For example, 1.0.0 .
@Stability(value=Stable)
public void setVersion(@NotNull
String value)
For example, 1.0.0 .
@Stability(value=Stable) @Nullable public String getChangeDescription()
For example initial version .
@Stability(value=Stable)
public void setChangeDescription(@Nullable
String value)
For example initial version .
@Stability(value=Stable) @Nullable public String getData()
For example, name: HelloWorldTestingDocument\ndescription: This is hello world testing document.\nschemaVersion: 1.0\n\nphases:\n - name: test\n steps:\n - name: HelloWorldStep\n action: ExecuteBash\n inputs:\n commands:\n - echo \"Hello World! Test.\"\n . See Examples below for the schema for creating a component using Data.
@Stability(value=Stable)
public void setData(@Nullable
String value)
For example, name: HelloWorldTestingDocument\ndescription: This is hello world testing document.\nschemaVersion: 1.0\n\nphases:\n - name: test\n steps:\n - name: HelloWorldStep\n action: ExecuteBash\n inputs:\n commands:\n - echo \"Hello World! Test.\"\n . See Examples below for the schema for creating a component using Data.
@Stability(value=Stable) @Nullable public String getDescription()
@Stability(value=Stable)
public void setDescription(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getKmsKeyId()
@Stability(value=Stable)
public void setKmsKeyId(@Nullable
String value)
@Stability(value=Stable) @Nullable public List<String> getSupportedOsVersions()
If the OS information is available, a prefix match is performed against the base image OS version during image recipe creation.
@Stability(value=Stable)
public void setSupportedOsVersions(@Nullable
List<String> value)
If the OS information is available, a prefix match is performed against the base image OS version during image recipe creation.
@Stability(value=Stable) @Nullable public 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.
@Stability(value=Stable)
public void setUri(@Nullable
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.
Copyright © 2022. All rights reserved.