Skip to content
v2.274.0

Experimental

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

ComponentAction Enum ​

The action for a step within the component document.

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 ​

MemberDescription
APPEND_FILEThe AppendFile action adds the provided content to the pre-existing content of a file.
ASSERTThe Assert action performs value with comparison/logic operators, and succeeds/fails the step based on the outcome of the assertion.
COPY_FILEThe CopyFile action copies files from a source file to a destination.
COPY_FOLDERThe CopyFolder action copies folders from a source to a destination.
CREATE_FILEThe CreateFile action creates a file in the provided location.
CREATE_FOLDERThe CreateFolder action creates a folder in the provided location.
CREATE_SYMLINKThe CreateSymlink action creates symbolic links from a given path to a target.
DELETE_FILEThe DeleteFile action deletes file(s) in the provided location.
DELETE_FOLDERThe DeleteFolder action deletes folders in the provided location.
EXECUTE_BASHThe ExecuteBash action runs bash scripts with inline bash commands.
EXECUTE_BINARYThe ExecuteBinary action runs a provided binary executable.
EXECUTE_DOCUMENTThe ExecuteDocument action allows running other component documents from within a given component.
EXECUTE_POWERSHELLThe ExecutePowershell action runs PowerShell scripts with inline PowerShell commands.
INSTALL_MSIThe InstallMSI action runs a Windows application with the provided MSI file.
LIST_FILESThe ListFiles action lists files in the provided folder.
MOVE_FILEThe MoveFile action moves files from a source to a destination.
MOVE_FOLDERThe MoveFolder action moves folders from a source to a destination.
READ_FILEThe ReadFile action reads the content of a text file.
REBOOTThe Reboot action reboots the instance.
SET_FILE_ENCODINGThe SetFileEncoding action modifies the encoding property of an existing file.
SET_FILE_OWNERThe SetFileOwner action modifies the owner and group ownership properties of an existing file.
SET_FOLDER_OWNERThe SetFolderOwner action recursively modifies the owner and group ownership properties of an existing folder.
SET_FILE_PERMISSIONSThe SetFilePermissions action modifies the permission of an existing file.
SET_FOLDER_PERMISSIONSThe SetFolderPermissions action recursively modifies the permissions of an existing folder and all of its subfiles and subfolders.
SET_REGISTRYThe SetRegistry action sets the value for the specified Windows registry key.
S3_DOWNLOADThe S3Download action downloads an Amazon S3 object/folder to a local destination.
S3_UPLOADThe S3Upload action uploads a file or folder to an Amazon S3 location.
UNINSTALL_MSIThe UninstallMSI action removes a Windows application using an MSI file.
UPDATE_OSThe UpdateOS action installs OS updates.
WEB_DOWNLOADThe WebDownload action downloads files from a URL to a local destination.

Referenced by ​