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

The action for a step within the component document.

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

## Example

```ts

const component = new imagebuilder.Component(this, 'JsonComponent', {
  platform: imagebuilder.Platform.LINUX,
  data: imagebuilder.ComponentData.fromJsonObject({
    schemaVersion: imagebuilder.ComponentSchemaVersion.V1_0,
    phases: [
      {
        name: imagebuilder.ComponentPhaseName.BUILD,
        steps: [
          {
            name: 'configure-app',
            action: imagebuilder.ComponentAction.CREATE_FILE,
            inputs: {
              path: '/etc/myapp/config.json',
              content: '{"env": "production"}'
            }
          }
        ]
      }
    ]
  })
});
```

## Members

| Member | Description |
| --- | --- |
| `APPEND_FILE` | The AppendFile action adds the provided content to the pre-existing content of a file. |
| `ASSERT` | The Assert action performs value with comparison/logic operators, and succeeds/fails the step based on the outcome of the assertion. |
| `COPY_FILE` | The CopyFile action copies files from a source file to a destination. |
| `COPY_FOLDER` | The CopyFolder action copies folders from a source to a destination. |
| `CREATE_FILE` | The CreateFile action creates a file in the provided location. |
| `CREATE_FOLDER` | The CreateFolder action creates a folder in the provided location. |
| `CREATE_SYMLINK` | The CreateSymlink action creates symbolic links from a given path to a target. |
| `DELETE_FILE` | The DeleteFile action deletes file(s) in the provided location. |
| `DELETE_FOLDER` | The DeleteFolder action deletes folders in the provided location. |
| `EXECUTE_BASH` | The ExecuteBash action runs bash scripts with inline bash commands. |
| `EXECUTE_BINARY` | The ExecuteBinary action runs a provided binary executable. |
| `EXECUTE_DOCUMENT` | The ExecuteDocument action allows running other component documents from within a given component. |
| `EXECUTE_POWERSHELL` | The ExecutePowershell action runs PowerShell scripts with inline PowerShell commands. |
| `INSTALL_MSI` | The InstallMSI action runs a Windows application with the provided MSI file. |
| `LIST_FILES` | The ListFiles action lists files in the provided folder. |
| `MOVE_FILE` | The MoveFile action moves files from a source to a destination. |
| `MOVE_FOLDER` | The MoveFolder action moves folders from a source to a destination. |
| `READ_FILE` | The ReadFile action reads the content of a text file. |
| `REBOOT` | The Reboot action reboots the instance. |
| `SET_FILE_ENCODING` | The SetFileEncoding action modifies the encoding property of an existing file. |
| `SET_FILE_OWNER` | The SetFileOwner action modifies the owner and group ownership properties of an existing file. |
| `SET_FOLDER_OWNER` | The SetFolderOwner action recursively modifies the owner and group ownership properties of an existing folder. |
| `SET_FILE_PERMISSIONS` | The SetFilePermissions action modifies the permission of an existing file. |
| `SET_FOLDER_PERMISSIONS` | The SetFolderPermissions action recursively modifies the permissions of an existing folder and all of its subfiles and subfolders. |
| `SET_REGISTRY` | The SetRegistry action sets the value for the specified Windows registry key. |
| `S3_DOWNLOAD` | The S3Download action downloads an Amazon S3 object/folder to a local destination. |
| `S3_UPLOAD` | The S3Upload action uploads a file or folder to an Amazon S3 location. |
| `UNINSTALL_MSI` | The UninstallMSI action removes a Windows application using an MSI file. |
| `UPDATE_OS` | The UpdateOS action installs OS updates. |
| `WEB_DOWNLOAD` | The WebDownload action downloads files from a URL to a local destination. |

## Referenced by

- [`ComponentDocumentStep`](/v2/docs/@aws-cdk_aws-imagebuilder-alpha.ComponentDocumentStep).action
