Skip to content
v2.273.0

Experimental

@aws-cdk/aws-imagebuilder-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

AmazonManagedComponent Class ​

Helper class for working with Amazon-managed components.

Example ​

ts
const imageRecipe = new imagebuilder.ImageRecipe(this, 'AmazonManagedImageRecipe', {
  baseImage: imagebuilder.BaseImage.fromSsmParameterName(
    '/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64'
  ),
  components: [
    {
      component: imagebuilder.AmazonManagedComponent.updateOs(this, 'UpdateOS', {
        platform: imagebuilder.Platform.LINUX
      })
    },
    {
      component: imagebuilder.AmazonManagedComponent.awsCliV2(this, 'AwsCli', {
        platform: imagebuilder.Platform.LINUX
      })
    }
  ]
});

Initializer ​

ts
new AmazonManagedComponent()
python
AmazonManagedComponent()
java
new AmazonManagedComponent()
csharp
new AmazonManagedComponent()
go
NewAmazonManagedComponent()

Methods ​

awsCliV2(scope: Construct, id: string, opts: AmazonManagedComponentOptions): IComponent@staticmethod def aws_cli_v2(scope: Construct, id: str, opts: AmazonManagedComponentOptions) -> IComponentpublic static IComponent awsCliV2(Construct scope, String id, AmazonManagedComponentOptions opts)public static IComponent AwsCliV2(Construct scope, string id, AmazonManagedComponentOptions opts)func AwsCliV2(Scope Construct, Id *string, Opts AmazonManagedComponentOptions) IComponentstatic#
Imports the AWS CLI v2 Amazon-managed component.
3 parameters

Parameters

  • scopescopescopescopeScope — The construct scope.
  • ididididId — Identifier of the construct.
  • optsoptsoptsoptsOpts — The Amazon-managed component options.
fromAmazonManagedComponentAttributes(scope: Construct, id: string, attrs: AmazonManagedComponentAttributes): IComponent@staticmethod def from_amazon_managed_component_attributes(scope: Construct, id: str, attrs: AmazonManagedComponentAttributes) -> IComponentpublic static IComponent fromAmazonManagedComponentAttributes(Construct scope, String id, AmazonManagedComponentAttributes attrs)public static IComponent FromAmazonManagedComponentAttributes(Construct scope, string id, AmazonManagedComponentAttributes attrs)func FromAmazonManagedComponentAttributes(Scope Construct, Id *string, Attrs AmazonManagedComponentAttributes) IComponentstatic#
Imports an Amazon-managed component from its attributes.
3 parameters

Parameters

  • scopescopescopescopeScope — The construct scope.
  • ididididId — Identifier of the construct.
  • attrsattrsattrsattrsAttrs — The Amazon-managed component attributes.
fromAmazonManagedComponentName(scope: Construct, id: string, amazonManagedComponentName: string): IComponent@staticmethod def from_amazon_managed_component_name(scope: Construct, id: str, amazon_managed_component_name: str) -> IComponentpublic static IComponent fromAmazonManagedComponentName(Construct scope, String id, String amazonManagedComponentName)public static IComponent FromAmazonManagedComponentName(Construct scope, string id, string amazonManagedComponentName)func FromAmazonManagedComponentName(Scope Construct, Id *string, AmazonManagedComponentName *string) IComponentstatic#
Imports an Amazon-managed component from its name.
3 parameters

Parameters

  • scopescopescopescopeScope — The construct scope.
  • ididididId — Identifier of the construct.
  • amazonManagedComponentNameamazon_managed_component_nameamazonManagedComponentNameamazonManagedComponentNameAmazonManagedComponentName — - The name of the Amazon-managed component.
helloWorld(scope: Construct, id: string, opts: AmazonManagedComponentOptions): IComponent@staticmethod def hello_world(scope: Construct, id: str, opts: AmazonManagedComponentOptions) -> IComponentpublic static IComponent helloWorld(Construct scope, String id, AmazonManagedComponentOptions opts)public static IComponent HelloWorld(Construct scope, string id, AmazonManagedComponentOptions opts)func HelloWorld(Scope Construct, Id *string, Opts AmazonManagedComponentOptions) IComponentstatic#
Imports the hello world Amazon-managed component.
3 parameters

Parameters

  • scopescopescopescopeScope — The construct scope.
  • ididididId — Identifier of the construct.
  • optsoptsoptsoptsOpts — The Amazon-managed component options.
python3(scope: Construct, id: string, opts: AmazonManagedComponentOptions): IComponent@staticmethod def python3(scope: Construct, id: str, opts: AmazonManagedComponentOptions) -> IComponentpublic static IComponent python3(Construct scope, String id, AmazonManagedComponentOptions opts)public static IComponent Python3(Construct scope, string id, AmazonManagedComponentOptions opts)func Python3(Scope Construct, Id *string, Opts AmazonManagedComponentOptions) IComponentstatic#
Imports the Python 3 Amazon-managed component.
3 parameters

Parameters

  • scopescopescopescopeScope — The construct scope.
  • ididididId — Identifier of the construct.
  • optsoptsoptsoptsOpts — The Amazon-managed component options.
reboot(scope: Construct, id: string, opts: AmazonManagedComponentOptions): IComponent@staticmethod def reboot(scope: Construct, id: str, opts: AmazonManagedComponentOptions) -> IComponentpublic static IComponent reboot(Construct scope, String id, AmazonManagedComponentOptions opts)public static IComponent Reboot(Construct scope, string id, AmazonManagedComponentOptions opts)func Reboot(Scope Construct, Id *string, Opts AmazonManagedComponentOptions) IComponentstatic#
Imports the reboot Amazon-managed component.
3 parameters

Parameters

  • scopescopescopescopeScope — The construct scope.
  • ididididId — Identifier of the construct.
  • optsoptsoptsoptsOpts — The Amazon-managed component options.
stigBuild(scope: Construct, id: string, opts: AmazonManagedComponentOptions): IComponent@staticmethod def stig_build(scope: Construct, id: str, opts: AmazonManagedComponentOptions) -> IComponentpublic static IComponent stigBuild(Construct scope, String id, AmazonManagedComponentOptions opts)public static IComponent StigBuild(Construct scope, string id, AmazonManagedComponentOptions opts)func StigBuild(Scope Construct, Id *string, Opts AmazonManagedComponentOptions) IComponentstatic#
Imports the STIG hardening Amazon-managed component.
3 parameters

Parameters

  • scopescopescopescopeScope — The construct scope.
  • ididididId — Identifier of the construct.
  • optsoptsoptsoptsOpts — The Amazon-managed component options.
updateOs(scope: Construct, id: string, opts: AmazonManagedComponentOptions): IComponent@staticmethod def update_os(scope: Construct, id: str, opts: AmazonManagedComponentOptions) -> IComponentpublic static IComponent updateOs(Construct scope, String id, AmazonManagedComponentOptions opts)public static IComponent UpdateOs(Construct scope, string id, AmazonManagedComponentOptions opts)func UpdateOs(Scope Construct, Id *string, Opts AmazonManagedComponentOptions) IComponentstatic#
Imports the OS update Amazon-managed component.
3 parameters

Parameters

  • scopescopescopescopeScope — The construct scope.
  • ididididId — Identifier of the construct.
  • optsoptsoptsoptsOpts — The Amazon-managed component attributes.