> **Experimental**
>
> `@aws-cdk/aws-imagebuilder-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# AmazonManagedComponent

Helper class for working with Amazon-managed components.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/amazon-managed-component.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/@aws-cdk/aws-imagebuilder-alpha/lib/amazon-managed-component.ts#L51)

## Example

TypeScript:

```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
      })
    }
  ]
});
```

Python:

```python
image_recipe = imagebuilder.ImageRecipe(self, "AmazonManagedImageRecipe",
    base_image=imagebuilder.BaseImage.from_ssm_parameter_name("/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64"),
    components=[imagebuilder.ComponentConfiguration(
        component=imagebuilder.AmazonManagedComponent.update_os(self, "UpdateOS",
            platform=imagebuilder.Platform.LINUX
        )
    ), imagebuilder.ComponentConfiguration(
        component=imagebuilder.AmazonManagedComponent.aws_cli_v2(self, "AwsCli",
            platform=imagebuilder.Platform.LINUX
        )
    )
    ]
)
```

Java:

```java
ImageRecipe imageRecipe = ImageRecipe.Builder.create(this, "AmazonManagedImageRecipe")
        .baseImage(BaseImage.fromSsmParameterName("/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64"))
        .components(List.of(ComponentConfiguration.builder()
                .component(AmazonManagedComponent.updateOs(this, "UpdateOS", AmazonManagedComponentOptions.builder()
                        .platform(Platform.LINUX)
                        .build()))
                .build(), ComponentConfiguration.builder()
                .component(AmazonManagedComponent.awsCliV2(this, "AwsCli", AmazonManagedComponentOptions.builder()
                        .platform(Platform.LINUX)
                        .build()))
                .build()))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.ImageBuilder.Alpha
var imageRecipe = new ImageRecipe(this, "AmazonManagedImageRecipe", new ImageRecipeProps {
    BaseImage = BaseImage.FromSsmParameterName("/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64"),
    Components = new [] { new ComponentConfiguration {
        Component = AmazonManagedComponent.UpdateOs(this, "UpdateOS", new AmazonManagedComponentOptions {
            Platform = Platform.LINUX
        })
    }, new ComponentConfiguration {
        Component = AmazonManagedComponent.AwsCliV2(this, "AwsCli", new AmazonManagedComponentOptions {
            Platform = Platform.LINUX
        })
    } }
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awsimagebuilderalpha/v2
imageRecipe := imagebuilder.NewImageRecipe(this, jsii.String("AmazonManagedImageRecipe"), &ImageRecipeProps{
	BaseImage: imagebuilder.BaseImage_*FromSsmParameterName(jsii.String("/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64")),
	Components: []ComponentConfiguration{
		&ComponentConfiguration{
			Component: imagebuilder.AmazonManagedComponent_UpdateOs(this, jsii.String("UpdateOS"), &AmazonManagedComponentOptions{
				Platform: imagebuilder.Platform_LINUX,
			}),
		},
		&ComponentConfiguration{
			Component: imagebuilder.AmazonManagedComponent_AwsCliV2(this, jsii.String("AwsCli"), &AmazonManagedComponentOptions{
				Platform: imagebuilder.Platform_LINUX,
			}),
		},
	},
})
```

## Initializer

TypeScript:

```ts
new AmazonManagedComponent()
```

Python:

```python
AmazonManagedComponent()
```

Java:

```java
new AmazonManagedComponent()
```

C# / .NET:

```csharp
new AmazonManagedComponent()
```

Golang:

```go
NewAmazonManagedComponent()
```

## Methods

- `awsCliV2(scope: Construct, id: string, opts: AmazonManagedComponentOptions): IComponent` (static) — Imports the AWS CLI v2 Amazon-managed component.

  **Parameters**

  - `scope` — The construct scope.
  - `id` — Identifier of the construct.
  - `opts` — The Amazon-managed component options.

- `fromAmazonManagedComponentAttributes(scope: Construct, id: string, attrs: AmazonManagedComponentAttributes): IComponent` (static) — Imports an Amazon-managed component from its attributes.

  **Parameters**

  - `scope` — The construct scope.
  - `id` — Identifier of the construct.
  - `attrs` — The Amazon-managed component attributes.

- `fromAmazonManagedComponentName(scope: Construct, id: string, amazonManagedComponentName: string): IComponent` (static) — Imports an Amazon-managed component from its name.

  **Parameters**

  - `scope` — The construct scope.
  - `id` — Identifier of the construct.
  - `amazonManagedComponentName` — - The name of the Amazon-managed component.

- `helloWorld(scope: Construct, id: string, opts: AmazonManagedComponentOptions): IComponent` (static) — Imports the hello world Amazon-managed component.

  **Parameters**

  - `scope` — The construct scope.
  - `id` — Identifier of the construct.
  - `opts` — The Amazon-managed component options.

- `python3(scope: Construct, id: string, opts: AmazonManagedComponentOptions): IComponent` (static) — Imports the Python 3 Amazon-managed component.

  **Parameters**

  - `scope` — The construct scope.
  - `id` — Identifier of the construct.
  - `opts` — The Amazon-managed component options.

- `reboot(scope: Construct, id: string, opts: AmazonManagedComponentOptions): IComponent` (static) — Imports the reboot Amazon-managed component.

  **Parameters**

  - `scope` — The construct scope.
  - `id` — Identifier of the construct.
  - `opts` — The Amazon-managed component options.

- `stigBuild(scope: Construct, id: string, opts: AmazonManagedComponentOptions): IComponent` (static) — Imports the STIG hardening Amazon-managed component.

  **Parameters**

  - `scope` — The construct scope.
  - `id` — Identifier of the construct.
  - `opts` — The Amazon-managed component options.

- `updateOs(scope: Construct, id: string, opts: AmazonManagedComponentOptions): IComponent` (static) — Imports the OS update Amazon-managed component.

  **Parameters**

  - `scope` — The construct scope.
  - `id` — Identifier of the construct.
  - `opts` — The Amazon-managed component attributes.
