Class Component
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.imagebuilder.alpha.Component
- All Implemented Interfaces:
IEnvironmentAware,IResource,IComponent,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-20T23:37:34.437Z")
@Stability(Experimental)
public class Component
extends Resource
implements IComponent
(experimental) Represents an EC2 Image Builder Component.
Example:
Component component = Component.Builder.create(this, "MyComponent")
.platform(Platform.LINUX)
.data(ComponentData.fromJsonObject(Map.of(
"schemaVersion", ComponentSchemaVersion.V1_0,
"phases", List.of(Map.of(
"name", ComponentPhaseName.BUILD,
"steps", List.of(Map.of(
"name", "install-app",
"action", ComponentAction.EXECUTE_BASH,
"inputs", Map.of(
"commands", List.of("echo \"Installing my application...\"", "yum update -y")))))))))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class(experimental) A fluent builder forComponent.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.alpha.IComponent
IComponent.Jsii$Default, IComponent.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String(experimental) Uniquely identifies this class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedComponent(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedComponent(software.amazon.jsii.JsiiObjectRef objRef) Component(software.constructs.Construct scope, String id, ComponentProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IComponentfromComponentArn(software.constructs.Construct scope, String id, String componentArn) (experimental) Import an existing component given its ARN.static IComponentfromComponentAttributes(software.constructs.Construct scope, String id, ComponentAttributes attrs) (experimental) Import an existing component by providing its attributes.static IComponentfromComponentName(software.constructs.Construct scope, String id, String componentName) (experimental) Import an existing component given its name.(experimental) The ARN of the component.(experimental) The name of the component.(experimental) The type of the component.(experimental) The version of the component.(experimental) Whether the component is encrypted.protected IKeygrant(IGrantable grantee, String... actions) (experimental) Grant custom actions to the given grantee for the component.grantRead(IGrantable grantee) (experimental) Grant read permissions to the given grantee for the component.static Boolean(experimental) Return whether the given object is a Component.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods 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.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
(experimental) Uniquely identifies this class.
-
-
Constructor Details
-
Component
protected Component(software.amazon.jsii.JsiiObjectRef objRef) -
Component
protected Component(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
Component
@Stability(Experimental) public Component(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ComponentProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
fromComponentArn
@Stability(Experimental) @NotNull public static IComponent fromComponentArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String componentArn) (experimental) Import an existing component given its ARN.- Parameters:
scope- This parameter is required.id- This parameter is required.componentArn- This parameter is required.
-
fromComponentAttributes
@Stability(Experimental) @NotNull public static IComponent fromComponentAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ComponentAttributes attrs) (experimental) Import an existing component by providing its attributes.If the component name is provided as an attribute, it must be normalized by converting all alphabetical characters to lowercase, and replacing all spaces and underscores with hyphens.
- Parameters:
scope- This parameter is required.id- This parameter is required.attrs- This parameter is required.
-
fromComponentName
@Stability(Experimental) @NotNull public static IComponent fromComponentName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String componentName) (experimental) Import an existing component given its name.The provided name must be normalized by converting all alphabetical characters to lowercase, and replacing all spaces and underscores with hyphens.
- Parameters:
scope- This parameter is required.id- This parameter is required.componentName- This parameter is required.
-
isComponent
(experimental) Return whether the given object is a Component.- Parameters:
x- This parameter is required.
-
grant
@Stability(Experimental) @NotNull public Grant grant(@NotNull IGrantable grantee, @NotNull String... actions) (experimental) Grant custom actions to the given grantee for the component.- Specified by:
grantin interfaceIComponent- Parameters:
grantee- The principal. This parameter is required.actions- The list of actions. This parameter is required.
-
grantRead
(experimental) Grant read permissions to the given grantee for the component.- Specified by:
grantReadin interfaceIComponent- Parameters:
grantee- The principal. This parameter is required.
-
getComponentArn
(experimental) The ARN of the component.- Specified by:
getComponentArnin interfaceIComponent
-
getComponentName
(experimental) The name of the component.- Specified by:
getComponentNamein interfaceIComponent
-
getComponentType
(experimental) The type of the component. -
getComponentVersion
(experimental) The version of the component.- Specified by:
getComponentVersionin interfaceIComponent
-
getEncrypted
(experimental) Whether the component is encrypted. -
getKmsKey
-