SDK for PHP V3

Client: Aws\imagebuilder\imagebuilderClient
Service ID: imagebuilder
Version: 2019-12-02

This page describes the parameters and results for the operations of the EC2 Image Builder (2019-12-02), and shows how to use the Aws\imagebuilder\imagebuilderClient object to call the described operations. This documentation is specific to the 2019-12-02 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

CancelImageCreation ( array $params = [] )
Cancels the creation of an image.
CancelLifecycleExecution ( array $params = [] )
Cancels a lifecycle execution – a single run of lifecycle actions that a lifecycle policy or a StartResourceStateUpdate request started.
CreateComponent ( array $params = [] )
Creates a new component that can be used to build, validate, test, and assess your image.
CreateContainerRecipe ( array $params = [] )
Creates a new container recipe.
CreateDistributionConfiguration ( array $params = [] )
Creates a new distribution configuration.
CreateImage ( array $params = [] )
Creates a new image along with all configured output resources defined in the distribution configuration.
CreateImagePipeline ( array $params = [] )
Creates a new image pipeline.
CreateImageRecipe ( array $params = [] )
Creates a new image recipe.
CreateInfrastructureConfiguration ( array $params = [] )
Creates a new infrastructure configuration.
CreateLifecyclePolicy ( array $params = [] )
Creates a lifecycle policy resource.
CreateWorkflow ( array $params = [] )
Creates a new workflow or a new version of an existing workflow.
DeleteComponent ( array $params = [] )
Deletes a component build version.
DeleteContainerRecipe ( array $params = [] )
Deletes a container recipe.
DeleteDistributionConfiguration ( array $params = [] )
Deletes a distribution configuration.
DeleteImage ( array $params = [] )
Deletes an Image Builder image resource.
DeleteImagePipeline ( array $params = [] )
Deletes an image pipeline.
DeleteImageRecipe ( array $params = [] )
Deletes an image recipe.
DeleteInfrastructureConfiguration ( array $params = [] )
Deletes an infrastructure configuration.
DeleteLifecyclePolicy ( array $params = [] )
Deletes the specified lifecycle policy resource.
DeleteWorkflow ( array $params = [] )
Deletes a specific workflow resource.
DistributeImage ( array $params = [] )
Distributes an existing AMI to target Regions and accounts without running the full image build process.
GetComponent ( array $params = [] )
Retrieves a component object.
GetComponentPolicy ( array $params = [] )
Retrieves a component policy.
GetContainerRecipe ( array $params = [] )
Retrieves a container recipe.
GetContainerRecipePolicy ( array $params = [] )
Retrieves the policy for a container recipe.
GetDistributionConfiguration ( array $params = [] )
Retrieves a distribution configuration.
GetImage ( array $params = [] )
Retrieves an image.
GetImagePipeline ( array $params = [] )
Retrieves an image pipeline.
GetImagePolicy ( array $params = [] )
Retrieves an image policy.
GetImageRecipe ( array $params = [] )
Retrieves an image recipe.
GetImageRecipePolicy ( array $params = [] )
Retrieves an image recipe policy.
GetInfrastructureConfiguration ( array $params = [] )
Retrieves an infrastructure configuration.
GetLifecycleExecution ( array $params = [] )
Retrieves runtime information for a lifecycle execution – a single run of lifecycle actions that a lifecycle policy or a StartResourceStateUpdate request started.
GetLifecyclePolicy ( array $params = [] )
Retrieves details for the specified image lifecycle policy.
GetMarketplaceResource ( array $params = [] )
Verifies the subscription and performs resource dependency checks on the requested Amazon Web Services Marketplace resource.
GetWorkflow ( array $params = [] )
Retrieves a workflow resource object.
GetWorkflowExecution ( array $params = [] )
Retrieves runtime information for a specific runtime instance of the workflow.
GetWorkflowStepExecution ( array $params = [] )
Retrieves runtime information for a specific runtime instance of the workflow step.
ImportComponent ( array $params = [] )
Imports a component and transforms its data into a component document.
ImportDiskImage ( array $params = [] )
Imports a Windows operating system image from a verified Microsoft ISO disk file.
ImportVmImage ( array $params = [] )
Creates an Image Builder image resource from an Amazon EC2 VM import task.
ListComponentBuildVersions ( array $params = [] )
Returns a list of component build versions for the specified component version ARN.
ListComponents ( array $params = [] )
Returns the list of components that you have access to.
ListContainerRecipes ( array $params = [] )
Returns a list of container recipes.
ListDistributionConfigurations ( array $params = [] )
Returns a list of distribution configurations.
ListImageBuildVersions ( array $params = [] )
Returns a list of image build versions.
ListImagePackages ( array $params = [] )
Lists the packages that are associated with an image build version, as determined by Amazon Web Services Systems Manager Inventory at build time.
ListImagePipelineImages ( array $params = [] )
Returns a list of images created by the specified pipeline.
ListImagePipelines ( array $params = [] )
Returns a list of image pipelines.
ListImageRecipes ( array $params = [] )
Returns a list of image recipes.
ListImageScanFindingAggregations ( array $params = [] )
Returns a list of image scan aggregations for your account.
ListImageScanFindings ( array $params = [] )
Returns a list of image scan findings for your account.
ListImages ( array $params = [] )
Returns the list of images that you have access to.
ListInfrastructureConfigurations ( array $params = [] )
Returns a list of infrastructure configurations.
ListLifecycleExecutionResources ( array $params = [] )
Lists resources that the runtime instance of the image lifecycle identified for lifecycle actions.
ListLifecycleExecutions ( array $params = [] )
Retrieves the lifecycle runtime history for the specified resource.
ListLifecyclePolicies ( array $params = [] )
Retrieves a list of lifecycle policies in your Amazon Web Services account.
ListTagsForResource ( array $params = [] )
Returns the list of tags for the specified resource.
ListWaitingWorkflowSteps ( array $params = [] )
Lists the workflow steps in your Amazon Web Services account that have paused at a WaitForAction step, and are waiting for you to respond.
ListWorkflowBuildVersions ( array $params = [] )
Returns a list of build versions for a specific workflow resource.
ListWorkflowExecutions ( array $params = [] )
Returns a list of workflow runtime instance metadata objects for a specific image build version.
ListWorkflowStepExecutions ( array $params = [] )
Returns runtime data for each step in a runtime instance of the workflow that you specify in the request.
ListWorkflows ( array $params = [] )
Lists workflow versions based on filtering parameters.
PutComponentPolicy ( array $params = [] )
Applies a policy to a component.
PutContainerRecipePolicy ( array $params = [] )
Applies a policy to a container recipe.
PutImagePolicy ( array $params = [] )
Applies a policy to an image.
PutImageRecipePolicy ( array $params = [] )
Applies a policy to an image recipe.
RetryImage ( array $params = [] )
Retries a failed or canceled image build without rebuilding the phases that already completed.
SendWorkflowStepAction ( array $params = [] )
Sends an action to a workflow step that has paused at a WaitForAction step, so that image creation can continue.
StartImagePipelineExecution ( array $params = [] )
Manually triggers a pipeline to create an image.
StartResourceStateUpdate ( array $params = [] )
Begins an ad-hoc state change for the specified image build version.
TagResource ( array $params = [] )
Adds a tag to a resource.
UntagResource ( array $params = [] )
Removes a tag from a resource.
UpdateDistributionConfiguration ( array $params = [] )
Updates a distribution configuration.
UpdateImagePipeline ( array $params = [] )
Updates an image pipeline.
UpdateInfrastructureConfiguration ( array $params = [] )
Updates an infrastructure configuration.
UpdateLifecyclePolicy ( array $params = [] )
Updates the specified lifecycle policy.

Paginators

Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:

ListComponentBuildVersions
ListComponents
ListContainerRecipes
ListDistributionConfigurations
ListImageBuildVersions
ListImagePackages
ListImagePipelineImages
ListImagePipelines
ListImageRecipes
ListImageScanFindingAggregations
ListImageScanFindings
ListImages
ListInfrastructureConfigurations
ListLifecycleExecutionResources
ListLifecycleExecutions
ListLifecyclePolicies
ListWaitingWorkflowSteps
ListWorkflowBuildVersions
ListWorkflowExecutions
ListWorkflowStepExecutions
ListWorkflows

Operations

CancelImageCreation

$result = $client->cancelImageCreation([/* ... */]);
$promise = $client->cancelImageCreationAsync([/* ... */]);

Cancels the creation of an image. This operation can only be used on images in a non-terminal state. Cancellation is asynchronous: the request returns immediately, then Image Builder stops the running build and moves the image to the CANCELLED state. Output resources that the build already created, such as AMIs and snapshots, aren't removed.

Parameter Syntax

$result = $client->cancelImageCreation([
    'clientToken' => '<string>', // REQUIRED
    'imageBuildVersionArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
clientToken
Required: Yes
Type: string

A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.

imageBuildVersionArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the image that you want to cancel creation for.

Result Syntax

[
    'clientToken' => '<string>',
    'imageBuildVersionArn' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
clientToken
Type: string

The client token that uniquely identifies the request.

imageBuildVersionArn
Type: string

The Amazon Resource Name (ARN) of the image whose creation this request canceled.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

IdempotentParameterMismatchException:

You have specified a client token for an operation using parameter values that differ from a previous request that used the same client token.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

ResourceInUseException:

The resource that you are trying to operate on is currently in use. Review the message details and retry later.

Examples

Example 1: Cancel an image build

The following example cancels a build that is in progress for the specified image build version.

$result = $client->cancelImageCreation([
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE77777',
    'imageBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1',
]);

Result syntax:

[
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE77777',
    'imageBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1',
    'requestId' => 'fead325f-72d9-42b5-b2ed-c5294984c6a9',
]

CancelLifecycleExecution

$result = $client->cancelLifecycleExecution([/* ... */]);
$promise = $client->cancelLifecycleExecutionAsync([/* ... */]);

Cancels a lifecycle execution – a single run of lifecycle actions that a lifecycle policy or a StartResourceStateUpdate request started. You can only cancel an execution that hasn't reached a terminal state. Cancellation is asynchronous and doesn't undo completed lifecycle actions.

Parameter Syntax

$result = $client->cancelLifecycleExecution([
    'clientToken' => '<string>', // REQUIRED
    'lifecycleExecutionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
clientToken
Required: Yes
Type: string

A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.

lifecycleExecutionId
Required: Yes
Type: string

Identifies the specific runtime instance of the image lifecycle to cancel.

Result Syntax

[
    'lifecycleExecutionId' => '<string>',
]

Result Details

Members
lifecycleExecutionId
Type: string

The unique identifier of the lifecycle execution that the cancellation request applies to. The cancellation completes asynchronously.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

IdempotentParameterMismatchException:

You have specified a client token for an operation using parameter values that differ from a previous request that used the same client token.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

ResourceInUseException:

The resource that you are trying to operate on is currently in use. Review the message details and retry later.

Examples

Example 1: Cancel a lifecycle execution

The following example cancels the scheduled resource state update associated with the specified lifecycle execution ID before it runs.

$result = $client->cancelLifecycleExecution([
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE97531',
    'lifecycleExecutionId' => 'lce-401aefc3-a829-46f6-8fc2-91497988a503',
]);

Result syntax:

[
    'lifecycleExecutionId' => 'lce-401aefc3-a829-46f6-8fc2-91497988a503',
]

CreateComponent

$result = $client->createComponent([/* ... */]);
$promise = $client->createComponentAsync([/* ... */]);

Creates a new component that can be used to build, validate, test, and assess your image. The component is based on a YAML document that you specify using exactly one of the following methods:

  • Inline, using the data property in the request body.

  • A URL that points to a YAML document file stored in Amazon S3, using the uri property in the request body.

Image Builder determines the component type from the document. If the document contains a single phase named test, the component type is TEST. Otherwise, the component type is BUILD.

Parameter Syntax

$result = $client->createComponent([
    'changeDescription' => '<string>',
    'clientToken' => '<string>', // REQUIRED
    'data' => '<string>',
    'description' => '<string>',
    'dryRun' => true || false,
    'kmsKeyId' => '<string>',
    'name' => '<string>', // REQUIRED
    'platform' => 'Windows|Linux|macOS', // REQUIRED
    'semanticVersion' => '<string>', // REQUIRED
    'supportedOsVersions' => ['<string>', ...],
    'tags' => ['<string>', ...],
    'uri' => '<string>',
]);

Parameter Details

Members
changeDescription
Type: string

The change description of the component. Describes what change has been made in this version, or what makes this version different from other versions of the component.

clientToken
Required: Yes
Type: string

A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.

data
Type: string

Component data contains inline YAML document content for the component. Alternatively, you can specify the uri of a YAML document file stored in Amazon S3. However, you cannot specify both properties.

description
Type: string

Describes the contents of the component.

dryRun
Type: boolean

Validates the required permissions and request parameters without performing the operation. If validation succeeds, the operation returns a DryRunOperationException error response.

kmsKeyId
Type: string

The Amazon Resource Name (ARN) that uniquely identifies the KMS key used to encrypt this component. This can be either the Key ARN or the Alias ARN. For more information, see Key identifiers (KeyId) in the Key Management Service Developer Guide. If you don't specify a key, Image Builder encrypts the component data with a KMS key that Image Builder owns.

name
Required: Yes
Type: string

The name of the component. Image Builder generates the component ARN from a normalized form of the name, so names that differ only in case, spaces, or underscores count as the same name. If a component with the same name and semantic version already exists in your account in the same Amazon Web Services Region, the request creates a new build version for it. If the content is also identical to the latest build version, the request fails because the component already exists.

platform
Required: Yes
Type: string

The operating system platform of the component.

semanticVersion
Required: Yes
Type: string

The semantic version of the component. This version follows the semantic version syntax.

The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign values for the first three, and can filter on all of them.

Assignment: For the first three nodes, you can assign any positive integer value, including zero. The upper limit is 2^30-1, or 1073741823, for each node. Image Builder automatically assigns the build number to the fourth node.

Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as 2021.01.01.

supportedOsVersions
Type: Array of strings

The operating system (OS) version supported by the component. If the OS information is available, a prefix match is performed against the base image OS version during image recipe creation.

tags
Type: Associative array of custom strings keys (TagKey) to strings

The tags that apply to the component.

uri
Type: string

The uri of a YAML component document file. This must be an S3 URL (s3://bucket/key), and you must have permission to access the S3 bucket it points to. If you use Amazon S3, you can specify component content up to your service quota for component size, which is 64 KB by default.

Alternatively, you can specify the YAML document inline, using the component data property. You cannot specify both properties.

Result Syntax

[
    'clientToken' => '<string>',
    'componentBuildVersionArn' => '<string>',
    'latestVersionReferences' => [
        'latestMajorVersionArn' => '<string>',
        'latestMinorVersionArn' => '<string>',
        'latestPatchVersionArn' => '<string>',
        'latestVersionArn' => '<string>',
    ],
    'requestId' => '<string>',
]

Result Details

Members
clientToken
Type: string

The client token that uniquely identifies the request.

componentBuildVersionArn
Type: string

The Amazon Resource Name (ARN) of the component that the request created.

latestVersionReferences
Type: LatestVersionReferences structure

A set of wildcard version ARNs that always reference the latest version of the resource. ARNs are included for the latest version overall, and for the latest versions within the same major, minor, and patch levels.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

IdempotentParameterMismatchException:

You have specified a client token for an operation using parameter values that differ from a previous request that used the same client token.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

InvalidVersionNumberException:

Your version number is out of bounds or does not follow the required syntax.

ResourceInUseException:

The resource that you are trying to operate on is currently in use. Review the message details and retry later.

InvalidParameterCombinationException:

You have specified a combination of parameters that isn't valid. For example, two mutually exclusive parameters, or a parameter without its required companion parameter. Review the error message for details.

ServiceQuotaExceededException:

You have exceeded the number of permitted resources or operations for this service. For service quotas, see EC2 Image Builder endpoints and quotas.

DryRunOperationException:

The dry run operation of the resource was successful, and no resources or mutations were actually performed due to the dry run flag in the request.

Examples

Example 1: Create a component from an inline document

The following example creates a build component from a YAML document provided inline in the request.

$result = $client->createComponent([
    'name' => 'my-example-component',
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE11111',
    'data' => 'name: InstallMyAppdescription: Installs my applicationschemaVersion: 1.0phases: - name: build steps: - name: InstallApp action: ExecuteBash inputs: commands: - sudo yum -y install my-app',
    'description' => 'Installs the latest version of my application',
    'platform' => 'Linux',
    'semanticVersion' => '1.0.0',
]);

Result syntax:

[
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE11111',
    'componentBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-component/1.0.0/1',
    'latestVersionReferences' => [
        'latestMajorVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-component/1.x.x',
        'latestMinorVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-component/1.0.x',
        'latestPatchVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-component/1.0.0',
        'latestVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-component/x.x.x',
    ],
    'requestId' => 'e769f240-fb6a-4253-88d1-20a80cbe787d',
]
Example 2: Create a component from a document stored in Amazon S3

The following example creates a component from a YAML definition document that's stored in an Amazon S3 bucket. The definition document for this component includes an AppVersion parameter that recipes can set when they include the component.

$result = $client->createComponent([
    'name' => 'my-example-parameterized-component',
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE10101',
    'description' => 'Installs a configurable version of my application',
    'platform' => 'Linux',
    'semanticVersion' => '1.0.0',
    'uri' => 's3://amzn-s3-demo-bucket/components/install-my-app.yaml',
]);

Result syntax:

[
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE10101',
    'componentBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-parameterized-component/1.0.0/1',
    'latestVersionReferences' => [
        'latestMajorVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-parameterized-component/1.x.x',
        'latestMinorVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-parameterized-component/1.0.x',
        'latestPatchVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-parameterized-component/1.0.0',
        'latestVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-parameterized-component/x.x.x',
    ],
    'requestId' => '0cec8e32-a5c6-4aeb-ac3a-6471c8a2a8a9',
]

CreateContainerRecipe

$result = $client->createContainerRecipe([/* ... */]);
$promise = $client->createContainerRecipeAsync([/* ... */]);

Creates a new container recipe. Container recipes define how images are configured, tested, and assessed.

Parameter Syntax

$result = $client->createContainerRecipe([
    'clientToken' => '<string>', // REQUIRED
    'components' => [
        [
            'componentArn' => '<string>', // REQUIRED
            'parameters' => [
                [
                    'name' => '<string>', // REQUIRED
                    'value' => ['<string>', ...], // REQUIRED
                ],
                // ...
            ],
        ],
        // ...
    ],
    'containerType' => 'DOCKER', // REQUIRED
    'description' => '<string>',
    'dockerfileTemplateData' => '<string>',
    'dockerfileTemplateUri' => '<string>',
    'dryRun' => true || false,
    'imageOsVersionOverride' => '<string>',
    'instanceConfiguration' => [
        'blockDeviceMappings' => [
            [
                'deviceName' => '<string>',
                'ebs' => [
                    'deleteOnTermination' => true || false,
                    'encrypted' => true || false,
                    'iops' => <integer>,
                    'kmsKeyId' => '<string>',
                    'snapshotId' => '<string>',
                    'throughput' => <integer>,
                    'volumeSize' => <integer>,
                    'volumeType' => 'standard|io1|io2|gp2|gp3|sc1|st1',
                ],
                'noDevice' => '<string>',
                'virtualName' => '<string>',
            ],
            // ...
        ],
        'image' => '<string>',
    ],
    'kmsKeyId' => '<string>',
    'name' => '<string>', // REQUIRED
    'parentImage' => '<string>', // REQUIRED
    'platformOverride' => 'Windows|Linux|macOS',
    'semanticVersion' => '<string>', // REQUIRED
    'tags' => ['<string>', ...],
    'targetRepository' => [ // REQUIRED
        'repositoryName' => '<string>', // REQUIRED
        'service' => 'ECR', // REQUIRED
    ],
    'workingDirectory' => '<string>',
]);

Parameter Details

Members
clientToken
Required: Yes
Type: string

A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.

components
Type: Array of ComponentConfiguration structures

The components included in the container recipe. You can specify each component only one time in a recipe.

containerType
Required: Yes
Type: string

The type of container to create.

description
Type: string

The description of the container recipe.

dockerfileTemplateData
Type: string

The Dockerfile template used to build your image, as an inline data blob. You must specify exactly one of the dockerfileTemplateData or dockerfileTemplateUri properties. For the contextual variables that the template can include, see Create a new version of a container recipe in the EC2 Image Builder User Guide.

dockerfileTemplateUri
Type: string

The Amazon S3 URI for the Dockerfile template that is used to build your container image. You must have permission to read the object. Image Builder reads the object once, when it creates the recipe, and stores its content in the recipe. Later changes to the S3 object don't affect the recipe. You must specify exactly one of the dockerfileTemplateData or dockerfileTemplateUri properties.

dryRun
Type: boolean

Validates the required permissions and request parameters without performing the operation. If validation succeeds, the operation returns a DryRunOperationException error response.

imageOsVersionOverride
Type: string

Specifies the operating system version for the base image. Use this property only when the base image is a container image from a registry. When the base image is an Image Builder image, the operating system version comes from the parent image.

instanceConfiguration
Type: InstanceConfiguration structure

A group of options that can be used to configure an instance for building and testing container images.

kmsKeyId
Type: string

The Amazon Resource Name (ARN) that uniquely identifies which KMS key is used to encrypt the Dockerfile template. This can be either the Key ARN or the Alias ARN. For more information, see Key identifiers (KeyId) in the Key Management Service Developer Guide.

name
Required: Yes
Type: string

The name of the container recipe. The recipe name, combined with the semantic version, must be unique to your account in each Amazon Web Services Region. Image Builder generates the container recipe ARN from a normalized form of the name, so names that differ only in case, spaces, or underscores count as the same name.

parentImage
Required: Yes
Type: string

The base image for the container recipe. This can be an Image Builder image resource ARN or a container image URI from a registry, for example amazonlinux:latest.

platformOverride
Type: string

Specifies the operating system platform when you use a custom base image. Container recipes support only the Linux and Windows platforms.

semanticVersion
Required: Yes
Type: string

The semantic version of the container recipe. This version follows the semantic version syntax.

The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign values for the first three, and can filter on all of them.

Assignment: For the first three nodes, you can assign any positive integer value, including zero. The upper limit is 2^30-1, or 1073741823, for each node. Image Builder automatically assigns the build number to the fourth node.

Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as 2021.01.01.

tags
Type: Associative array of custom strings keys (TagKey) to strings

Tags that are attached to the container recipe.

targetRepository
Required: Yes
Type: TargetContainerRepository structure

The destination repository for the container image. The Amazon ECR repository must already exist in the Amazon Web Services Region where the build runs.

workingDirectory
Type: string

The working directory for use during build and test workflows.

Result Syntax

[
    'clientToken' => '<string>',
    'containerRecipeArn' => '<string>',
    'latestVersionReferences' => [
        'latestMajorVersionArn' => '<string>',
        'latestMinorVersionArn' => '<string>',
        'latestPatchVersionArn' => '<string>',
        'latestVersionArn' => '<string>',
    ],
    'requestId' => '<string>',
]

Result Details

Members
clientToken
Type: string

The client token that uniquely identifies the request.

containerRecipeArn
Type: string

Returns the Amazon Resource Name (ARN) of the container recipe that the request created.

latestVersionReferences
Type: LatestVersionReferences structure

A set of wildcard version ARNs that always reference the latest version of the resource. ARNs are included for the latest version overall, and for the latest versions within the same major, minor, and patch levels.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

IdempotentParameterMismatchException:

You have specified a client token for an operation using parameter values that differ from a previous request that used the same client token.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

InvalidVersionNumberException:

Your version number is out of bounds or does not follow the required syntax.

ResourceInUseException:

The resource that you are trying to operate on is currently in use. Review the message details and retry later.

ResourceAlreadyExistsException:

The resource that you are trying to create already exists.

ServiceQuotaExceededException:

You have exceeded the number of permitted resources or operations for this service. For service quotas, see EC2 Image Builder endpoints and quotas.

DryRunOperationException:

The dry run operation of the resource was successful, and no resources or mutations were actually performed due to the dry run flag in the request.

Examples

Example 1: Create a container recipe with an inline Dockerfile template

The following example creates a Docker container recipe that applies one build component, using the latest Amazon Linux container image as the parent and an existing ECR repository as the target.

$result = $client->createContainerRecipe([
    'name' => 'my-example-container-recipe',
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE99999',
    'components' => [
        [
            'componentArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-container-component/1.0.0/1',
        ],
    ],
    'containerType' => 'DOCKER',
    'dockerfileTemplateData' => 'FROM {{{ imagebuilder:parentImage }}}{{{ imagebuilder:environments }}}{{{ imagebuilder:components }}}',
    'parentImage' => 'amazonlinux:latest',
    'semanticVersion' => '1.0.0',
    'targetRepository' => [
        'repositoryName' => 'my-example-container-repo',
        'service' => 'ECR',
    ],
]);

Result syntax:

[
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE99999',
    'containerRecipeArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:container-recipe/my-example-container-recipe/1.0.0',
    'latestVersionReferences' => [
        'latestMajorVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:container-recipe/my-example-container-recipe/1.x.x',
        'latestMinorVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:container-recipe/my-example-container-recipe/1.0.x',
        'latestPatchVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:container-recipe/my-example-container-recipe/1.0.0',
        'latestVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:container-recipe/my-example-container-recipe/x.x.x',
    ],
    'requestId' => '20b16948-45a4-4b3a-9a17-d54779847365',
]
Example 2: Create a container recipe with a custom build instance configuration

The following example creates a container recipe that customizes the Amazon EC2 instance that builds the container image. The build instance launches from an Amazon ECS-optimized instance image and uses a 40 GiB gp3 volume.

$result = $client->createContainerRecipe([
    'name' => 'my-example-container-recipe',
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE40404',
    'components' => [
        [
            'componentArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-container-component/1.0.0/1',
        ],
    ],
    'containerType' => 'DOCKER',
    'description' => 'A container recipe that builds on an ECS-optimized instance image with a larger build volume',
    'dockerfileTemplateData' => 'FROM {{{ imagebuilder:parentImage }}}{{{ imagebuilder:environments }}}{{{ imagebuilder:components }}}',
    'instanceConfiguration' => [
        'blockDeviceMappings' => [
            [
                'deviceName' => '/dev/xvda',
                'ebs' => [
                    'deleteOnTermination' => 1,
                    'volumeSize' => 40,
                    'volumeType' => 'gp3',
                ],
            ],
        ],
        'image' => 'ami-1234567890abcdef0',
    ],
    'parentImage' => 'amazonlinux:latest',
    'semanticVersion' => '1.1.0',
    'targetRepository' => [
        'repositoryName' => 'my-example-container-repo',
        'service' => 'ECR',
    ],
]);

Result syntax:

[
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE40404',
    'containerRecipeArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:container-recipe/my-example-container-recipe/1.1.0',
    'latestVersionReferences' => [
        'latestMajorVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:container-recipe/my-example-container-recipe/1.x.x',
        'latestMinorVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:container-recipe/my-example-container-recipe/1.1.x',
        'latestPatchVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:container-recipe/my-example-container-recipe/1.1.0',
        'latestVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:container-recipe/my-example-container-recipe/x.x.x',
    ],
    'requestId' => '4b6fc7f3-5b6b-4086-858e-22d4c7f9a37f',
]

CreateDistributionConfiguration

$result = $client->createDistributionConfiguration([/* ... */]);
$promise = $client->createDistributionConfigurationAsync([/* ... */]);

Creates a new distribution configuration. Distribution configurations define and configure the outputs for your images, including the target Regions, accounts, and settings for each Region.

Parameter Syntax

$result = $client->createDistributionConfiguration([
    'clientToken' => '<string>', // REQUIRED
    'description' => '<string>',
    'distributions' => [ // REQUIRED
        [
            'amiDistributionConfiguration' => [
                'amiTags' => ['<string>', ...],
                'description' => '<string>',
                'kmsKeyId' => '<string>',
                'launchPermission' => [
                    'organizationArns' => ['<string>', ...],
                    'organizationalUnitArns' => ['<string>', ...],
                    'userGroups' => ['<string>', ...],
                    'userIds' => ['<string>', ...],
                ],
                'name' => '<string>',
                'targetAccountIds' => ['<string>', ...],
            ],
            'containerDistributionConfiguration' => [
                'containerTags' => ['<string>', ...],
                'description' => '<string>',
                'targetRepository' => [ // REQUIRED
                    'repositoryName' => '<string>', // REQUIRED
                    'service' => 'ECR', // REQUIRED
                ],
            ],
            'fastLaunchConfigurations' => [
                [
                    'accountId' => '<string>',
                    'enabled' => true || false, // REQUIRED
                    'launchTemplate' => [
                        'launchTemplateId' => '<string>',
                        'launchTemplateName' => '<string>',
                        'launchTemplateVersion' => '<string>',
                    ],
                    'maxParallelLaunches' => <integer>,
                    'snapshotConfiguration' => [
                        'targetResourceCount' => <integer>,
                    ],
                ],
                // ...
            ],
            'launchTemplateConfigurations' => [
                [
                    'accountId' => '<string>',
                    'launchTemplateId' => '<string>', // REQUIRED
                    'setDefaultVersion' => true || false,
                ],
                // ...
            ],
            'licenseConfigurationArns' => ['<string>', ...],
            'region' => '<string>', // REQUIRED
            's3ExportConfiguration' => [
                'diskImageFormat' => 'VMDK|RAW|VHD', // REQUIRED
                'roleName' => '<string>', // REQUIRED
                's3Bucket' => '<string>', // REQUIRED
                's3Prefix' => '<string>',
            ],
            'ssmParameterConfigurations' => [
                [
                    'amiAccountId' => '<string>',
                    'dataType' => 'text|aws:ec2:image',
                    'parameterName' => '<string>', // REQUIRED
                ],
                // ...
            ],
        ],
        // ...
    ],
    'dryRun' => true || false,
    'name' => '<string>', // REQUIRED
    'tags' => ['<string>', ...],
]);

Parameter Details

Members
clientToken
Required: Yes
Type: string

A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.

description
Type: string

The description of the distribution configuration.

distributions
Required: Yes
Type: Array of Distribution structures

The distribution settings for the configuration. Each entry defines how output images are distributed in one target Amazon Web Services Region. A Region can appear at most once in the list.

dryRun
Type: boolean

Validates the required permissions and request parameters without performing the operation. If validation succeeds, the operation returns a DryRunOperationException error response.

name
Required: Yes
Type: string

The name of the distribution configuration. Distribution configuration names must be unique to your account in each Amazon Web Services Region. Image Builder generates the distribution configuration ARN from a normalized form of the name, so names that differ only in case, spaces, or underscores count as the same name.

tags
Type: Associative array of custom strings keys (TagKey) to strings

The tags of the distribution configuration.

Result Syntax

[
    'clientToken' => '<string>',
    'distributionConfigurationArn' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
clientToken
Type: string

The client token that uniquely identifies the request.

distributionConfigurationArn
Type: string

The Amazon Resource Name (ARN) of the distribution configuration that was created by this request.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

IdempotentParameterMismatchException:

You have specified a client token for an operation using parameter values that differ from a previous request that used the same client token.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

ResourceInUseException:

The resource that you are trying to operate on is currently in use. Review the message details and retry later.

ResourceAlreadyExistsException:

The resource that you are trying to create already exists.

InvalidParameterCombinationException:

You have specified a combination of parameters that isn't valid. For example, two mutually exclusive parameters, or a parameter without its required companion parameter. Review the error message for details.

ServiceQuotaExceededException:

You have exceeded the number of permitted resources or operations for this service. For service quotas, see EC2 Image Builder endpoints and quotas.

DryRunOperationException:

The dry run operation of the resource was successful, and no resources or mutations were actually performed due to the dry run flag in the request.

Examples

Example 1: Create a distribution configuration

The following example creates a distribution configuration that distributes the output AMI to two Regions. The AMI name includes the build date, so that repeated builds create unique AMI names.

$result = $client->createDistributionConfiguration([
    'name' => 'my-example-distribution',
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE44444',
    'description' => 'Copies the output AMI to a second Region',
    'distributions' => [
        [
            'amiDistributionConfiguration' => [
                'name' => 'my-example-image-{{ imagebuilder:buildDate }}',
            ],
            'region' => 'us-west-2',
        ],
        [
            'amiDistributionConfiguration' => [
                'name' => 'my-example-image-{{ imagebuilder:buildDate }}',
            ],
            'region' => 'us-east-1',
        ],
    ],
]);

Result syntax:

[
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE44444',
    'distributionConfigurationArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:distribution-configuration/my-example-distribution',
    'requestId' => 'ca5312ad-a273-4c8c-817e-042941a5762d',
]
Example 2: Create a distribution configuration with launch permissions and a launch template update

The following example creates a distribution configuration that distributes the output AMI to two Regions. In us-east-1, it shares the AMI with another AWS account. In us-west-2, it sets the new AMI as the default version of your launch template.

$result = $client->createDistributionConfiguration([
    'name' => 'my-example-distribution',
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE56789',
    'description' => 'Distributes the output AMI to two Regions and shares it with another account',
    'distributions' => [
        [
            'amiDistributionConfiguration' => [
                'name' => 'my-example-image-{{ imagebuilder:buildDate }}',
            ],
            'launchTemplateConfigurations' => [
                [
                    'launchTemplateId' => 'lt-1234567890abcdef0',
                    'setDefaultVersion' => 1,
                ],
            ],
            'region' => 'us-west-2',
        ],
        [
            'amiDistributionConfiguration' => [
                'name' => 'my-example-image-{{ imagebuilder:buildDate }}',
                'launchPermission' => [
                    'userIds' => [
                        '444455556666',
                    ],
                ],
            ],
            'region' => 'us-east-1',
        ],
    ],
]);

Result syntax:

[
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE56789',
    'distributionConfigurationArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:distribution-configuration/my-example-distribution',
    'requestId' => '13c97ae8-8e39-4e12-af78-25e70def0933',
]

CreateImage

$result = $client->createImage([/* ... */]);
$promise = $client->createImageAsync([/* ... */]);

Creates a new image along with all configured output resources defined in the distribution configuration. You must specify exactly one recipe for your image, using either a containerRecipeArn or an imageRecipeArn.

The response returns as soon as Image Builder creates the new image resource. The image build process runs asynchronously. To check its progress, call GetImage and check the image status.

Parameter Syntax

$result = $client->createImage([
    'clientToken' => '<string>', // REQUIRED
    'containerRecipeArn' => '<string>',
    'distributionConfigurationArn' => '<string>',
    'enhancedImageMetadataEnabled' => true || false,
    'executionRole' => '<string>',
    'imageRecipeArn' => '<string>',
    'imageScanningConfiguration' => [
        'ecrConfiguration' => [
            'containerTags' => ['<string>', ...],
            'repositoryName' => '<string>',
        ],
        'imageScanningEnabled' => true || false,
    ],
    'imageTestsConfiguration' => [
        'imageTestsEnabled' => true || false,
        'timeoutMinutes' => <integer>,
    ],
    'infrastructureConfigurationArn' => '<string>', // REQUIRED
    'loggingConfiguration' => [
        'logGroupName' => '<string>',
    ],
    'tags' => ['<string>', ...],
    'workflows' => [
        [
            'onFailure' => 'CONTINUE|ABORT',
            'parallelGroup' => '<string>',
            'parameters' => [
                [
                    'name' => '<string>', // REQUIRED
                    'value' => ['<string>', ...], // REQUIRED
                ],
                // ...
            ],
            'workflowArn' => '<string>', // REQUIRED
        ],
        // ...
    ],
]);

Parameter Details

Members
clientToken
Required: Yes
Type: string

A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.

containerRecipeArn
Type: string

The Amazon Resource Name (ARN) of the container recipe that defines how images are configured and tested. You must specify either this property or imageRecipeArn, but not both.

distributionConfigurationArn
Type: string

The Amazon Resource Name (ARN) of the distribution configuration that defines and configures the outputs of the image build. If you don't specify a distribution configuration, Image Builder creates the output image only in the account and Amazon Web Services Region where the build runs.

enhancedImageMetadataEnabled
Type: boolean

Specifies whether to collect additional information about the image being created, including the operating system (OS) version and package list. Defaults to true.

executionRole
Type: string

The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to perform workflow actions. This property is required if you specify workflows. If you don't provide a role, Image Builder uses the Image Builder service-linked role in your account, and creates it if it doesn't exist.

imageRecipeArn
Type: string

The Amazon Resource Name (ARN) of the image recipe that defines how images are configured, tested, and assessed. You must specify either this property or containerRecipeArn, but not both.

imageScanningConfiguration
Type: ImageScanningConfiguration structure

Settings for vulnerability scans that Amazon Inspector runs during image creation. For AMI output, Amazon Inspector scans the test instance. For container output, Amazon Inspector scans the container image that Image Builder pushes to the Amazon ECR repository specified in ecrConfiguration.

imageTestsConfiguration
Type: ImageTestsConfiguration structure

Settings that determine whether Image Builder runs tests on the image after building it. Image tests are enabled by default.

infrastructureConfigurationArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the infrastructure configuration that defines the environment in which your image will be built and tested.

loggingConfiguration
Type: ImageLoggingConfiguration structure

The CloudWatch Logs log group where Image Builder sends the image build logs. If you specify a log group name outside of the /aws/imagebuilder/ namespace, you must also provide an executionRole that has permission to write to that log group.

tags
Type: Associative array of custom strings keys (TagKey) to strings

The tags of the image.

workflows
Type: Array of WorkflowConfiguration structures

The array of workflow configuration objects for the build. If you specify workflows, they replace the default workflows that Image Builder otherwise runs for the build, and you must also provide an executionRole.

Result Syntax

[
    'clientToken' => '<string>',
    'imageBuildVersionArn' => '<string>',
    'latestVersionReferences' => [
        'latestMajorVersionArn' => '<string>',
        'latestMinorVersionArn' => '<string>',
        'latestPatchVersionArn' => '<string>',
        'latestVersionArn' => '<string>',
    ],
    'requestId' => '<string>',
]

Result Details

Members
clientToken
Type: string

The client token that uniquely identifies the request.

imageBuildVersionArn
Type: string

The Amazon Resource Name (ARN) of the image that the request created.

latestVersionReferences
Type: LatestVersionReferences structure

A set of wildcard version ARNs that always reference the latest version of the resource. ARNs are included for the latest version overall, and for the latest versions within the same major, minor, and patch levels.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

IdempotentParameterMismatchException:

You have specified a client token for an operation using parameter values that differ from a previous request that used the same client token.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

ResourceInUseException:

The resource that you are trying to operate on is currently in use. Review the message details and retry later.

ServiceQuotaExceededException:

You have exceeded the number of permitted resources or operations for this service. For service quotas, see EC2 Image Builder endpoints and quotas.

Examples

Example 1: Create an image

The following example creates a new image from the specified image recipe and infrastructure configuration.

$result = $client->createImage([
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLEeeeee',
    'imageRecipeArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-recipe/1.0.0',
    'infrastructureConfigurationArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:infrastructure-configuration/my-example-infrastructure',
]);

Result syntax:

[
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLEeeeee',
    'imageBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1',
    'latestVersionReferences' => [
        'latestMajorVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.x.x',
        'latestMinorVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.x',
        'latestPatchVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0',
        'latestVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/x.x.x',
    ],
    'requestId' => '62e9b43f-a9fd-4272-89fb-ce6235d07ab4',
]
Example 2: Create an image with custom build and parallel test workflows

The following example creates an image that uses your custom build and test workflows. It uses the Image Builder service-linked role as the execution role. Both test workflows are in the same parallel group, so they can run at the same time after the build workflow completes.

$result = $client->createImage([
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE01234',
    'executionRole' => 'arn:aws:iam::111122223333:role/aws-service-role/imagebuilder.amazonaws.com/AWSServiceRoleForImageBuilder',
    'imageRecipeArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-recipe/1.0.0',
    'infrastructureConfigurationArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:infrastructure-configuration/my-example-infrastructure',
    'workflows' => [
        [
            'workflowArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:workflow/build/my-example-workflow/1.0.0/1',
        ],
        [
            'parallelGroup' => 'post-build-tests',
            'workflowArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:workflow/test/my-example-integration-tests/1.0.0/1',
        ],
        [
            'parallelGroup' => 'post-build-tests',
            'workflowArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:workflow/test/my-example-compliance-tests/1.0.0/1',
        ],
    ],
]);

Result syntax:

[
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE01234',
    'imageBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1',
    'latestVersionReferences' => [
        'latestMajorVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.x.x',
        'latestMinorVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.x',
        'latestPatchVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0',
        'latestVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/x.x.x',
    ],
    'requestId' => '359f18b1-814f-4857-987f-924214970897',
]

CreateImagePipeline

$result = $client->createImagePipeline([/* ... */]);
$promise = $client->createImagePipelineAsync([/* ... */]);

Creates a new image pipeline. Use image pipelines to automate the creation and distribution of images. You must specify exactly one recipe for the pipeline, using either a containerRecipeArn or an imageRecipeArn.

Parameter Syntax

$result = $client->createImagePipeline([
    'clientToken' => '<string>', // REQUIRED
    'containerRecipeArn' => '<string>',
    'description' => '<string>',
    'distributionConfigurationArn' => '<string>',
    'dryRun' => true || false,
    'enhancedImageMetadataEnabled' => true || false,
    'executionRole' => '<string>',
    'imageRecipeArn' => '<string>',
    'imageScanningConfiguration' => [
        'ecrConfiguration' => [
            'containerTags' => ['<string>', ...],
            'repositoryName' => '<string>',
        ],
        'imageScanningEnabled' => true || false,
    ],
    'imageTags' => ['<string>', ...],
    'imageTestsConfiguration' => [
        'imageTestsEnabled' => true || false,
        'timeoutMinutes' => <integer>,
    ],
    'infrastructureConfigurationArn' => '<string>', // REQUIRED
    'loggingConfiguration' => [
        'imageLogGroupName' => '<string>',
        'pipelineLogGroupName' => '<string>',
    ],
    'name' => '<string>', // REQUIRED
    'schedule' => [
        'autoDisablePolicy' => [
            'failureCount' => <integer>, // REQUIRED
        ],
        'pipelineExecutionStartCondition' => 'EXPRESSION_MATCH_ONLY|EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE',
        'scheduleExpression' => '<string>',
        'timezone' => '<string>',
    ],
    'status' => 'DISABLED|ENABLED',
    'tags' => ['<string>', ...],
    'workflows' => [
        [
            'onFailure' => 'CONTINUE|ABORT',
            'parallelGroup' => '<string>',
            'parameters' => [
                [
                    'name' => '<string>', // REQUIRED
                    'value' => ['<string>', ...], // REQUIRED
                ],
                // ...
            ],
            'workflowArn' => '<string>', // REQUIRED
        ],
        // ...
    ],
]);

Parameter Details

Members
clientToken
Required: Yes
Type: string

A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.

containerRecipeArn
Type: string

The Amazon Resource Name (ARN) of the container recipe that is used to configure images created by this container pipeline. You must specify either this property or imageRecipeArn, but not both.

description
Type: string

The description of the image pipeline.

distributionConfigurationArn
Type: string

The Amazon Resource Name (ARN) of the distribution configuration that configures and distributes images created by this image pipeline.

dryRun
Type: boolean

Validates the required permissions and request parameters without performing the operation. If validation succeeds, the operation returns a DryRunOperationException error response.

enhancedImageMetadataEnabled
Type: boolean

Specifies whether to collect additional information about the image being created, including the operating system (OS) version and package list. Defaults to true.

executionRole
Type: string

The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to perform workflow actions.

imageRecipeArn
Type: string

The Amazon Resource Name (ARN) of the image recipe that configures images created by this image pipeline. You must specify either this property or containerRecipeArn, but not both.

imageScanningConfiguration
Type: ImageScanningConfiguration structure

Contains settings for vulnerability scans that Amazon Inspector runs against the test instance during image creation.

imageTags
Type: Associative array of custom strings keys (TagKey) to strings

The tags that Image Builder applies to the Image Builder image resource that this pipeline's scheduled executions create. These tags don't apply to the output AMI. To tag output AMIs, use amiTags in the pipeline's distribution configuration.

imageTestsConfiguration
Type: ImageTestsConfiguration structure

Specifies the test settings that Image Builder applies to images that this pipeline creates. If you don't provide test settings, Image Builder stores a default configuration with image tests enabled.

infrastructureConfigurationArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the infrastructure configuration that builds images created by this image pipeline.

loggingConfiguration

Specifies the logging configuration for the image pipeline. Use this to define custom CloudWatch Logs log groups for your pipeline execution logs and image build logs. The service manages log groups with names starting with /aws/imagebuilder/ using the service-linked role. For custom log group names outside of this prefix, you must also provide an executionRole.

name
Required: Yes
Type: string

The name of the image pipeline. Pipeline names must be unique to your account in each Amazon Web Services Region. Image Builder generates the pipeline ARN from a normalized form of the name, so names that differ only in case, spaces, or underscores count as the same name.

schedule
Type: Schedule structure

The schedule of the image pipeline. If you don't provide a schedule, the pipeline runs only when you call StartImagePipelineExecution.

status
Type: string

The status of the image pipeline. If you don't specify a status, it defaults to ENABLED. A disabled pipeline doesn't run on its schedule, but you can still start builds manually.

tags
Type: Associative array of custom strings keys (TagKey) to strings

The tags of the image pipeline.

workflows
Type: Array of WorkflowConfiguration structures

The array of workflow configuration objects for builds that this pipeline starts. You must also specify executionRole when you provide workflows.

Result Syntax

[
    'clientToken' => '<string>',
    'imagePipelineArn' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
clientToken
Type: string

The client token that uniquely identifies the request.

imagePipelineArn
Type: string

The Amazon Resource Name (ARN) of the image pipeline that was created by this request.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

IdempotentParameterMismatchException:

You have specified a client token for an operation using parameter values that differ from a previous request that used the same client token.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

ResourceInUseException:

The resource that you are trying to operate on is currently in use. Review the message details and retry later.

ResourceAlreadyExistsException:

The resource that you are trying to create already exists.

ServiceQuotaExceededException:

You have exceeded the number of permitted resources or operations for this service. For service quotas, see EC2 Image Builder endpoints and quotas.

DryRunOperationException:

The dry run operation of the resource was successful, and no resources or mutations were actually performed due to the dry run flag in the request.

Examples

Example 1: Create an image pipeline

The following example creates a pipeline that builds a new image version every Sunday at 9:00 AM UTC, if the base image or components have updates.

$result = $client->createImagePipeline([
    'name' => 'my-example-pipeline',
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE55555',
    'description' => 'Builds a new version of my image every Sunday',
    'distributionConfigurationArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:distribution-configuration/my-example-distribution',
    'imageRecipeArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-recipe/1.0.0',
    'infrastructureConfigurationArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:infrastructure-configuration/my-example-infrastructure',
    'schedule' => [
        'pipelineExecutionStartCondition' => 'EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE',
        'scheduleExpression' => 'cron(0 9 ? * SUN *)',
    ],
    'status' => 'ENABLED',
]);

Result syntax:

[
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE55555',
    'imagePipelineArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-pipeline/my-example-pipeline',
    'requestId' => 'db0a9329-35ef-4b53-98d0-a34385e44e28',
]
Example 2: Create an image pipeline with scanning, custom workflows, and an auto-disable policy

The following example creates a pipeline that uses your custom build workflow and enables image scanning. The schedule evaluates its cron expression in the America/Los_Angeles time zone. The auto-disable policy disables the pipeline after 3 consecutive failed scheduled builds.

$result = $client->createImagePipeline([
    'name' => 'my-example-pipeline',
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE30303',
    'description' => 'Builds a scanned image with my custom build workflow on Sunday mornings when dependency updates are available',
    'distributionConfigurationArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:distribution-configuration/my-example-distribution',
    'executionRole' => 'arn:aws:iam::111122223333:role/aws-service-role/imagebuilder.amazonaws.com/AWSServiceRoleForImageBuilder',
    'imageRecipeArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-recipe/1.1.0',
    'imageScanningConfiguration' => [
        'imageScanningEnabled' => 1,
    ],
    'infrastructureConfigurationArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:infrastructure-configuration/my-example-infrastructure',
    'schedule' => [
        'autoDisablePolicy' => [
            'failureCount' => 3,
        ],
        'pipelineExecutionStartCondition' => 'EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE',
        'scheduleExpression' => 'cron(0 9 ? * SUN *)',
        'timezone' => 'America/Los_Angeles',
    ],
    'status' => 'ENABLED',
    'workflows' => [
        [
            'workflowArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:workflow/build/my-example-workflow/1.0.0/1',
        ],
    ],
]);

Result syntax:

[
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE30303',
    'imagePipelineArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-pipeline/my-example-pipeline',
    'requestId' => 'f8da3ec9-4b76-4aa3-817a-c35a90f59dca',
]

CreateImageRecipe

$result = $client->createImageRecipe([/* ... */]);
$promise = $client->createImageRecipeAsync([/* ... */]);

Creates a new image recipe. Image recipes define how images are configured, tested, and assessed.

Parameter Syntax

$result = $client->createImageRecipe([
    'additionalInstanceConfiguration' => [
        'systemsManagerAgent' => [
            'uninstallAfterBuild' => true || false,
        ],
        'userDataOverride' => '<string>',
    ],
    'amiTags' => ['<string>', ...],
    'amiWatermarks' => ['<string>', ...],
    'blockDeviceMappings' => [
        [
            'deviceName' => '<string>',
            'ebs' => [
                'deleteOnTermination' => true || false,
                'encrypted' => true || false,
                'iops' => <integer>,
                'kmsKeyId' => '<string>',
                'snapshotId' => '<string>',
                'throughput' => <integer>,
                'volumeSize' => <integer>,
                'volumeType' => 'standard|io1|io2|gp2|gp3|sc1|st1',
            ],
            'noDevice' => '<string>',
            'virtualName' => '<string>',
        ],
        // ...
    ],
    'clientToken' => '<string>', // REQUIRED
    'components' => [
        [
            'componentArn' => '<string>', // REQUIRED
            'parameters' => [
                [
                    'name' => '<string>', // REQUIRED
                    'value' => ['<string>', ...], // REQUIRED
                ],
                // ...
            ],
        ],
        // ...
    ],
    'description' => '<string>',
    'dryRun' => true || false,
    'name' => '<string>', // REQUIRED
    'parentImage' => '<string>', // REQUIRED
    'semanticVersion' => '<string>', // REQUIRED
    'tags' => ['<string>', ...],
    'workingDirectory' => '<string>',
]);

Parameter Details

Members
additionalInstanceConfiguration

The additional settings and launch scripts for your build instances.

amiTags
Type: Associative array of custom strings keys (TagKey) to strings

Tags that are applied to the AMI that Image Builder creates during the Build phase prior to image distribution.

amiWatermarks
Type: Array of strings

The AMI watermark names to attach to the output AMI from this recipe. AMI watermarks are lineage markers. They automatically propagate to derivative AMIs when the source AMI is copied or distributed across Regions or accounts.

AMI watermarks are supported only for image recipes. AMIs with watermarks cannot be made public.

blockDeviceMappings
Type: Array of InstanceBlockDeviceMapping structures

The block device mappings that Image Builder applies to the build instance and the output AMI. For example, you can override the size of the base image's root volume or attach additional EBS volumes.

clientToken
Required: Yes
Type: string

A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.

components
Type: Array of ComponentConfiguration structures

The components included in the image recipe. Components are optional. A recipe with no components bakes the base image without additional customization. You can specify each component only one time in a recipe. Components with a status of DEPRECATED or DISABLED can't be added to new recipes.

description
Type: string

The description of the image recipe.

dryRun
Type: boolean

Validates the required permissions and request parameters without performing the operation. If validation succeeds, the operation returns a DryRunOperationException error response.

name
Required: Yes
Type: string

The name of the image recipe. The recipe name, combined with the semantic version, must be unique to your account in each Amazon Web Services Region. Image Builder generates the image recipe ARN from a normalized form of the name, so names that differ only in case, spaces, or underscores count as the same name.

parentImage
Required: Yes
Type: string

The base image for customizations specified in the image recipe. You can specify the parent image using one of the following options:

  • AMI ID

  • Image Builder image Amazon Resource Name (ARN)

  • Amazon Web Services Systems Manager (SSM) Parameter Store Parameter, prefixed by ssm:, followed by the parameter name or ARN.

  • Amazon Web Services Marketplace product ID

If you enter an AMI ID or an SSM parameter that contains the AMI ID, you must have access to the AMI. The AMI must also be in the Region where you're creating the recipe.

semanticVersion
Required: Yes
Type: string

The semantic version of the image recipe. This version follows the semantic version syntax.

The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign values for the first three, and can filter on all of them.

Assignment: For the first three nodes, you can assign any positive integer value, including zero. The upper limit is 2^30-1, or 1073741823, for each node. Image Builder automatically assigns the build number to the fourth node.

Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as 2021.01.01.

tags
Type: Associative array of custom strings keys (TagKey) to strings

The tags of the image recipe.

workingDirectory
Type: string

The working directory used during build and test workflows. If you don't specify a working directory, Image Builder uses /tmp for Linux and macOS build instances, and C:/ for Windows build instances.

Result Syntax

[
    'clientToken' => '<string>',
    'imageRecipeArn' => '<string>',
    'latestVersionReferences' => [
        'latestMajorVersionArn' => '<string>',
        'latestMinorVersionArn' => '<string>',
        'latestPatchVersionArn' => '<string>',
        'latestVersionArn' => '<string>',
    ],
    'requestId' => '<string>',
]

Result Details

Members
clientToken
Type: string

The client token that uniquely identifies the request.

imageRecipeArn
Type: string

The Amazon Resource Name (ARN) of the image recipe that was created by this request.

latestVersionReferences
Type: LatestVersionReferences structure

A set of wildcard version ARNs that always reference the latest version of the resource. ARNs are included for the latest version overall, and for the latest versions within the same major, minor, and patch levels.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

IdempotentParameterMismatchException:

You have specified a client token for an operation using parameter values that differ from a previous request that used the same client token.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

InvalidVersionNumberException:

Your version number is out of bounds or does not follow the required syntax.

ResourceInUseException:

The resource that you are trying to operate on is currently in use. Review the message details and retry later.

ResourceAlreadyExistsException:

The resource that you are trying to create already exists.

ServiceQuotaExceededException:

You have exceeded the number of permitted resources or operations for this service. For service quotas, see EC2 Image Builder endpoints and quotas.

DryRunOperationException:

The dry run operation of the resource was successful, and no resources or mutations were actually performed due to the dry run flag in the request.

Examples

Example 1: Create an image recipe

The following example creates an image recipe that applies a custom component on top of the latest Amazon Linux 2023 base image.

$result = $client->createImageRecipe([
    'name' => 'my-example-recipe',
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE22222',
    'components' => [
        [
            'componentArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-component/1.0.0/1',
        ],
    ],
    'description' => 'An image recipe that installs my application on Amazon Linux 2023',
    'parentImage' => 'arn:aws:imagebuilder:us-west-2:aws:image/amazon-linux-2023-x86/x.x.x',
    'semanticVersion' => '1.0.0',
]);

Result syntax:

[
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE22222',
    'imageRecipeArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-recipe/1.0.0',
    'latestVersionReferences' => [
        'latestMajorVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-recipe/1.x.x',
        'latestMinorVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-recipe/1.0.x',
        'latestPatchVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-recipe/1.0.0',
        'latestVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-recipe/x.x.x',
    ],
    'requestId' => '89f4af2f-4f28-45e6-a9d8-abeba591df6a',
]
Example 2: Create an image recipe with component parameters and block device mappings

The following example creates an image recipe that configures its components and storage. The AppVersion component parameter selects the application version to install. The block device mapping increases the root volume to an encrypted 30 GiB gp3 volume.

$result = $client->createImageRecipe([
    'name' => 'my-example-recipe',
    'blockDeviceMappings' => [
        [
            'deviceName' => '/dev/xvda',
            'ebs' => [
                'deleteOnTermination' => 1,
                'encrypted' => 1,
                'volumeSize' => 30,
                'volumeType' => 'gp3',
            ],
        ],
    ],
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE20202',
    'components' => [
        [
            'componentArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-parameterized-component/1.0.0/1',
            'parameters' => [
                [
                    'name' => 'AppVersion',
                    'value' => [
                        '2.5.0',
                    ],
                ],
            ],
        ],
    ],
    'description' => 'Installs a specific version of my application on Amazon Linux 2023 with a larger encrypted root volume',
    'parentImage' => 'arn:aws:imagebuilder:us-west-2:aws:image/amazon-linux-2023-x86/x.x.x',
    'semanticVersion' => '1.1.0',
]);

Result syntax:

[
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE20202',
    'imageRecipeArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-recipe/1.1.0',
    'latestVersionReferences' => [
        'latestMajorVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-recipe/1.x.x',
        'latestMinorVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-recipe/1.1.x',
        'latestPatchVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-recipe/1.1.0',
        'latestVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-recipe/x.x.x',
    ],
    'requestId' => 'e3bdc054-d12e-4578-a847-68a18da724ca',
]

CreateInfrastructureConfiguration

$result = $client->createInfrastructureConfiguration([/* ... */]);
$promise = $client->createInfrastructureConfigurationAsync([/* ... */]);

Creates a new infrastructure configuration. An infrastructure configuration defines the environment in which your image will be built and tested.

Parameter Syntax

$result = $client->createInfrastructureConfiguration([
    'clientToken' => '<string>', // REQUIRED
    'description' => '<string>',
    'dryRun' => true || false,
    'instanceMetadataOptions' => [
        'httpPutResponseHopLimit' => <integer>,
        'httpTokens' => '<string>',
    ],
    'instanceProfileName' => '<string>', // REQUIRED
    'instanceTypes' => ['<string>', ...],
    'keyPair' => '<string>',
    'logging' => [
        's3Logs' => [
            's3BucketName' => '<string>',
            's3KeyPrefix' => '<string>',
        ],
    ],
    'name' => '<string>', // REQUIRED
    'placement' => [
        'availabilityZone' => '<string>',
        'hostId' => '<string>',
        'hostResourceGroupArn' => '<string>',
        'tenancy' => 'default|dedicated|host',
    ],
    'resourceTags' => ['<string>', ...],
    'securityGroupIds' => ['<string>', ...],
    'snsTopicArn' => '<string>',
    'subnetId' => '<string>',
    'tags' => ['<string>', ...],
    'terminateInstanceOnFailure' => true || false,
]);

Parameter Details

Members
clientToken
Required: Yes
Type: string

A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.

description
Type: string

The description of the infrastructure configuration.

dryRun
Type: boolean

Validates the required permissions and request parameters without performing the operation. If validation succeeds, the operation returns a DryRunOperationException error response.

instanceMetadataOptions
Type: InstanceMetadataOptions structure

The instance metadata service (IMDS) settings that Image Builder applies to the EC2 build and test instances it launches during image creation. If you don't set these options, the EC2 launch defaults for the instance apply. For more information about instance metadata options, see one of the following links:

instanceProfileName
Required: Yes
Type: string

The instance profile to associate with the instance used to customize your Amazon EC2 AMI. The instance profile must exist in your account.

instanceTypes
Type: Array of strings

The instance types of the infrastructure configuration. You can specify one or more instance types to use for this build. Image Builder picks one of these instance types based on availability. If you don't specify instance types, Image Builder selects compatible instance types automatically. If you specify a Dedicated Host, Image Builder uses only instance types that the host supports.

keyPair
Type: string

The key pair of the infrastructure configuration. You can use this to log on to and debug the instance used to create your image.

logging
Type: Logging structure

The logging configuration of the infrastructure configuration. When you configure S3 logs, Image Builder writes logs from the build and test process to the specified bucket under the key prefix.

name
Required: Yes
Type: string

The name of the infrastructure configuration. Infrastructure configuration names must be unique to your account in each Amazon Web Services Region. Image Builder generates the infrastructure configuration ARN from a normalized form of the name, so names that differ only in case, spaces, or underscores count as the same name.

placement
Type: Placement structure

The instance placement settings that define where the build and test instances that Image Builder launches during image creation run. These settings don't affect instances that you launch from the output image.

resourceTags
Type: Associative array of custom strings keys (TagKey) to strings

The metadata tags to assign to the Amazon EC2 instance that Image Builder launches during the build process. Tags are formatted as key value pairs. Tag keys can't begin with aws: or match one of the following reserved keys: CreatedBy, Ec2ImageBuilderArn, Name, or Tags.

securityGroupIds
Type: Array of strings

The security group IDs to associate with the instance used to customize your Amazon EC2 AMI.

snsTopicArn
Type: string

The Amazon Resource Name (ARN) of the SNS topic to which Image Builder sends image build event notifications. Specify a standard topic. Image Builder doesn't support FIFO topics. Image Builder validates the topic when you create or update the configuration. You must have permission to publish to the topic.

EC2 Image Builder can't send notifications to SNS topics that are encrypted using keys from other accounts. If your SNS topic is encrypted, the key must be owned by the same account that owns your Image Builder resources.

subnetId
Type: string

The subnet ID in which to place the instance used to customize your Amazon EC2 AMI. If you specify subnetId, you must also specify one or more security group IDs in securityGroupIds. Otherwise, the request fails.

tags
Type: Associative array of custom strings keys (TagKey) to strings

The metadata tags to assign to the infrastructure configuration resource that Image Builder creates as output. Tags are formatted as key value pairs.

terminateInstanceOnFailure
Type: boolean

Specifies whether to terminate the instance on failure. Set to false if you want Image Builder to retain the instance used to configure your AMI if the build or test phase of your workflow fails. Defaults to true.

Result Syntax

[
    'clientToken' => '<string>',
    'infrastructureConfigurationArn' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
clientToken
Type: string

The client token that uniquely identifies the request.

infrastructureConfigurationArn
Type: string

The Amazon Resource Name (ARN) of the infrastructure configuration that was created by this request.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

IdempotentParameterMismatchException:

You have specified a client token for an operation using parameter values that differ from a previous request that used the same client token.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

ResourceInUseException:

The resource that you are trying to operate on is currently in use. Review the message details and retry later.

ResourceAlreadyExistsException:

The resource that you are trying to create already exists.

ServiceQuotaExceededException:

You have exceeded the number of permitted resources or operations for this service. For service quotas, see EC2 Image Builder endpoints and quotas.

DryRunOperationException:

The dry run operation of the resource was successful, and no resources or mutations were actually performed due to the dry run flag in the request.

Examples

Example 1: Create an infrastructure configuration

The following example creates an infrastructure configuration that gives Image Builder a choice of two instance types for its build and test instances.

$result = $client->createInfrastructureConfiguration([
    'name' => 'my-example-infrastructure',
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE33333',
    'description' => 'An infrastructure configuration for Amazon Linux builds',
    'instanceProfileName' => 'EC2InstanceProfileForImageBuilder',
    'instanceTypes' => [
        't3.medium',
        't3.large',
    ],
    'terminateInstanceOnFailure' => 1,
]);

Result syntax:

[
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE33333',
    'infrastructureConfigurationArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:infrastructure-configuration/my-example-infrastructure',
    'requestId' => '67082698-415b-4d9f-8be0-84a58380b93f',
]
Example 2: Create an infrastructure configuration with instance placement and metadata options

The following example creates an infrastructure configuration. It places your build and test instances in a single Availability Zone and requires IMDSv2 for instance metadata requests. It also applies resource tags to the resources that Image Builder creates during the build.

$result = $client->createInfrastructureConfiguration([
    'name' => 'my-example-infrastructure',
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE98765',
    'description' => 'An infrastructure configuration that pins build instances to one Availability Zone and requires IMDSv2',
    'instanceMetadataOptions' => [
        'httpPutResponseHopLimit' => 2,
        'httpTokens' => 'required',
    ],
    'instanceProfileName' => 'my-example-instance-role',
    'placement' => [
        'availabilityZone' => 'us-west-2a',
    ],
    'resourceTags' => [
        'CostCenter' => '12345',
        'Environment' => 'test',
    ],
    'terminateInstanceOnFailure' => 1,
]);

Result syntax:

[
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE98765',
    'infrastructureConfigurationArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:infrastructure-configuration/my-example-infrastructure',
    'requestId' => 'b96b54d8-daa6-4fdf-b25a-7b570bc2ab25',
]

CreateLifecyclePolicy

$result = $client->createLifecyclePolicy([/* ... */]);
$promise = $client->createLifecyclePolicyAsync([/* ... */]);

Creates a lifecycle policy resource.

Parameter Syntax

$result = $client->createLifecyclePolicy([
    'clientToken' => '<string>', // REQUIRED
    'description' => '<string>',
    'dryRun' => true || false,
    'executionRole' => '<string>', // REQUIRED
    'name' => '<string>', // REQUIRED
    'policyDetails' => [ // REQUIRED
        [
            'action' => [ // REQUIRED
                'includeResources' => [
                    'amis' => true || false,
                    'containers' => true || false,
                    'snapshots' => true || false,
                ],
                'type' => 'DELETE|DEPRECATE|DISABLE', // REQUIRED
            ],
            'exclusionRules' => [
                'amis' => [
                    'isPublic' => true || false,
                    'lastLaunched' => [
                        'unit' => 'DAYS|WEEKS|MONTHS|YEARS', // REQUIRED
                        'value' => <integer>, // REQUIRED
                    ],
                    'regions' => ['<string>', ...],
                    'sharedAccounts' => ['<string>', ...],
                    'tagMap' => ['<string>', ...],
                ],
                'tagMap' => ['<string>', ...],
            ],
            'filter' => [ // REQUIRED
                'retainAtLeast' => <integer>,
                'type' => 'AGE|COUNT', // REQUIRED
                'unit' => 'DAYS|WEEKS|MONTHS|YEARS',
                'value' => <integer>, // REQUIRED
            ],
        ],
        // ...
    ],
    'resourceSelection' => [ // REQUIRED
        'recipes' => [
            [
                'name' => '<string>', // REQUIRED
                'semanticVersion' => '<string>', // REQUIRED
            ],
            // ...
        ],
        'tagMap' => ['<string>', ...],
    ],
    'resourceType' => 'AMI_IMAGE|CONTAINER_IMAGE', // REQUIRED
    'status' => 'DISABLED|ENABLED',
    'tags' => ['<string>', ...],
]);

Parameter Details

Members
clientToken
Required: Yes
Type: string

A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.

description
Type: string

Optional description for the lifecycle policy.

dryRun
Type: boolean

Validates the required permissions and request parameters without performing the operation. If validation succeeds, the operation returns a DryRunOperationException error response.

executionRole
Required: Yes
Type: string

The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to run lifecycle actions. You must have permission to pass the role, and the role's trust policy must allow the Image Builder service principal to assume it.

name
Required: Yes
Type: string

The name of the lifecycle policy to create. Policy names must be unique to your account in each Amazon Web Services Region. Image Builder generates the policy ARN from a normalized form of the name, so names that differ only in case, spaces, or underscores count as the same name. You can't change the name after creation.

policyDetails
Required: Yes
Type: Array of LifecyclePolicyDetail structures

Configuration details for the lifecycle policy rules. A policy can contain at most one rule per action type: one DELETE, one DEPRECATE, and one DISABLE.

resourceSelection
Required: Yes
Type: LifecyclePolicyResourceSelection structure

Selection criteria for the resources that the lifecycle policy applies to. You must specify exactly one selection criteria: either recipes or a tag map, not both.

resourceType
Required: Yes
Type: string

The type of Image Builder resource that the lifecycle policy applies to. The resource type determines the allowed rule actions: policies for AMI-based Image Builder images support DELETE, DEPRECATE, and DISABLE, and policies for container-based Image Builder images support only DELETE. You can't change the resource type after creation.

status
Type: string

Indicates whether the lifecycle policy resource is enabled. If you don't specify a status, it defaults to ENABLED. Only enabled policies run on their schedule.

tags
Type: Associative array of custom strings keys (TagKey) to strings

Tags to apply to the lifecycle policy resource.

Result Syntax

[
    'clientToken' => '<string>',
    'lifecyclePolicyArn' => '<string>',
]

Result Details

Members
clientToken
Type: string

The client token that uniquely identifies the request.

lifecyclePolicyArn
Type: string

The Amazon Resource Name (ARN) of the lifecycle policy that the request created.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

IdempotentParameterMismatchException:

You have specified a client token for an operation using parameter values that differ from a previous request that used the same client token.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

ResourceInUseException:

The resource that you are trying to operate on is currently in use. Review the message details and retry later.

ResourceAlreadyExistsException:

The resource that you are trying to create already exists.

ServiceQuotaExceededException:

You have exceeded the number of permitted resources or operations for this service. For service quotas, see EC2 Image Builder endpoints and quotas.

DryRunOperationException:

The dry run operation of the resource was successful, and no resources or mutations were actually performed due to the dry run flag in the request.

Examples

Example 1: Create a lifecycle policy

The following example creates a lifecycle policy that deletes AMI-based images six months after they were created, selecting the images that match the specified resource tags.

$result = $client->createLifecyclePolicy([
    'name' => 'my-example-lifecycle-policy',
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE13579',
    'executionRole' => 'arn:aws:iam::111122223333:role/my-example-lifecycle-role',
    'policyDetails' => [
        [
            'action' => [
                'type' => 'DELETE',
            ],
            'filter' => [
                'type' => 'AGE',
                'value' => 6,
                'unit' => 'MONTHS',
            ],
        ],
    ],
    'resourceSelection' => [
        'tagMap' => [
            'Environment' => 'test',
        ],
    ],
    'resourceType' => 'AMI_IMAGE',
]);

Result syntax:

[
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE13579',
    'lifecyclePolicyArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:lifecycle-policy/my-example-lifecycle-policy',
]
Example 2: Create a lifecycle policy with exclusion rules

The following example creates a lifecycle policy that deletes images created from the specified recipe version after six months. The policy excludes images whose AMIs launched an instance within the last 30 days or are tagged to be retained.

$result = $client->createLifecyclePolicy([
    'name' => 'my-example-lifecycle-policy',
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE43210',
    'executionRole' => 'arn:aws:iam::111122223333:role/my-example-lifecycle-role',
    'policyDetails' => [
        [
            'action' => [
                'type' => 'DELETE',
            ],
            'exclusionRules' => [
                'amis' => [
                    'lastLaunched' => [
                        'value' => 30,
                        'unit' => 'DAYS',
                    ],
                    'tagMap' => [
                        'Retention' => 'keep',
                    ],
                ],
            ],
            'filter' => [
                'type' => 'AGE',
                'value' => 6,
                'unit' => 'MONTHS',
            ],
        ],
    ],
    'resourceSelection' => [
        'recipes' => [
            [
                'name' => 'my-example-recipe',
                'semanticVersion' => '1.0.0',
            ],
        ],
    ],
    'resourceType' => 'AMI_IMAGE',
]);

Result syntax:

[
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE43210',
    'lifecyclePolicyArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:lifecycle-policy/my-example-lifecycle-policy',
]

CreateWorkflow

$result = $client->createWorkflow([/* ... */]);
$promise = $client->createWorkflowAsync([/* ... */]);

Creates a new workflow or a new version of an existing workflow. If a workflow with the same name and semantic version already exists, and your request changes its configuration, Image Builder creates a new build version. If the configuration is identical to the latest build version, the request fails because that workflow configuration already exists.

Parameter Syntax

$result = $client->createWorkflow([
    'changeDescription' => '<string>',
    'clientToken' => '<string>', // REQUIRED
    'data' => '<string>',
    'description' => '<string>',
    'dryRun' => true || false,
    'kmsKeyId' => '<string>',
    'name' => '<string>', // REQUIRED
    'semanticVersion' => '<string>', // REQUIRED
    'tags' => ['<string>', ...],
    'type' => 'BUILD|TEST|DISTRIBUTION', // REQUIRED
    'uri' => '<string>',
]);

Parameter Details

Members
changeDescription
Type: string

Describes what change has been made in this version of the workflow, or what makes this version different from other versions of the workflow.

clientToken
Required: Yes
Type: string

A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.

data
Type: string

The UTF-8 encoded YAML document content for the workflow, up to 16,000 characters. For larger documents, store the document in Amazon S3 and specify the uri property instead. You must specify exactly one of the data or uri properties.

description
Type: string

Describes the workflow.

dryRun
Type: boolean

Validates the required permissions and request parameters without performing the operation. If validation succeeds, the operation returns a DryRunOperationException error response.

kmsKeyId
Type: string

The Amazon Resource Name (ARN) that uniquely identifies the KMS key used to encrypt this workflow resource. This can be either the Key ARN or the Alias ARN. For more information, see Key identifiers (KeyId) in the Key Management Service Developer Guide. If you don't specify a key, Image Builder encrypts the workflow document with a KMS key that Image Builder owns.

name
Required: Yes
Type: string

The name of the workflow to create. Image Builder generates the workflow ARN from a normalized form of the name, so names that differ only in case, spaces, or underscores count as the same name. If a workflow with the same name and semantic version already exists in your account in the same Amazon Web Services Region, the request creates a new build version for it. If the content is also identical to the latest build version, the request fails because the workflow already exists.

semanticVersion
Required: Yes
Type: string

The semantic version of this workflow resource. The semantic version syntax adheres to the following rules.

The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign values for the first three, and can filter on all of them.

Assignment: For the first three nodes, you can assign any positive integer value, including zero. The upper limit is 2^30-1, or 1073741823, for each node. Image Builder automatically assigns the build number to the fourth node.

Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as 2021.01.01.

tags
Type: Associative array of custom strings keys (TagKey) to strings

Tags that apply to the workflow resource.

type
Required: Yes
Type: string

The image creation stage that this workflow applies to. Image Builder validates the workflow document steps against the stage you specify.

uri
Type: string

The uri of a YAML workflow document file stored in Amazon S3. This must be an S3 URL (s3://bucket/key), and you must have permission to access the S3 bucket it points to. A workflow document that you provide from Amazon S3 can be up to your service quota for workflow size.

Alternatively, you can specify the YAML document inline, using the workflow data property. You must specify exactly one of the data or uri properties.

Result Syntax

[
    'clientToken' => '<string>',
    'latestVersionReferences' => [
        'latestMajorVersionArn' => '<string>',
        'latestMinorVersionArn' => '<string>',
        'latestPatchVersionArn' => '<string>',
        'latestVersionArn' => '<string>',
    ],
    'workflowBuildVersionArn' => '<string>',
]

Result Details

Members
clientToken
Type: string

The client token that uniquely identifies the request.

latestVersionReferences
Type: LatestVersionReferences structure

A set of wildcard version ARNs that always reference the latest version of the resource. ARNs are included for the latest version overall, and for the latest versions within the same major, minor, and patch levels.

workflowBuildVersionArn
Type: string

The Amazon Resource Name (ARN) of the workflow resource that the request created.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

IdempotentParameterMismatchException:

You have specified a client token for an operation using parameter values that differ from a previous request that used the same client token.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

InvalidVersionNumberException:

Your version number is out of bounds or does not follow the required syntax.

ResourceInUseException:

The resource that you are trying to operate on is currently in use. Review the message details and retry later.

InvalidParameterCombinationException:

You have specified a combination of parameters that isn't valid. For example, two mutually exclusive parameters, or a parameter without its required companion parameter. Review the error message for details.

ServiceQuotaExceededException:

You have exceeded the number of permitted resources or operations for this service. For service quotas, see EC2 Image Builder endpoints and quotas.

DryRunOperationException:

The dry run operation of the resource was successful, and no resources or mutations were actually performed due to the dry run flag in the request.

Examples

Example 1: Create a build workflow from an inline document

The following example creates a build workflow from a YAML workflow document provided inline in the request.

$result = $client->createWorkflow([
    'name' => 'my-example-workflow',
    'type' => 'BUILD',
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE54321',
    'data' => 'name: my-example-workflowdescription: Workflow to build an AMIschemaVersion: 1.0steps: - name: LaunchBuildInstance action: LaunchInstance onFailure: Abort inputs: waitFor: ssmAgent - name: ApplyBuildComponents action: ExecuteComponents onFailure: Abort inputs: instanceId.$: $.stepOutputs.LaunchBuildInstance.instanceId - name: CreateOutputAMI action: CreateImage onFailure: Abort inputs: instanceId.$: $.stepOutputs.LaunchBuildInstance.instanceId - name: TerminateBuildInstance action: TerminateInstance onFailure: Continue inputs: instanceId.$: $.stepOutputs.LaunchBuildInstance.instanceId',
    'description' => 'Workflow to build an AMI',
    'semanticVersion' => '1.0.0',
]);

Result syntax:

[
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE54321',
    'latestVersionReferences' => [
        'latestMajorVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:workflow/build/my-example-workflow/1.x.x',
        'latestMinorVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:workflow/build/my-example-workflow/1.0.x',
        'latestPatchVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:workflow/build/my-example-workflow/1.0.0',
        'latestVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:workflow/build/my-example-workflow/x.x.x',
    ],
    'workflowBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:workflow/build/my-example-workflow/1.0.0/1',
]

DeleteComponent

$result = $client->deleteComponent([/* ... */]);
$promise = $client->deleteComponentAsync([/* ... */]);

Deletes a component build version. The request fails with ResourceDependencyException if an image recipe or container recipe references this component version. It also fails if the component build version is shared with other accounts.

Parameter Syntax

$result = $client->deleteComponent([
    'componentBuildVersionArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
componentBuildVersionArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the component build version to delete.

Result Syntax

[
    'componentBuildVersionArn' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
componentBuildVersionArn
Type: string

The Amazon Resource Name (ARN) of the component build version that this request deleted.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

ResourceDependencyException:

You have attempted to mutate or delete a resource with a dependency that prohibits this action. See the error message for more details.

Examples

Example 1: Delete a component build version

The following example deletes the specified component build version.

$result = $client->deleteComponent([
    'componentBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-component/1.0.0/1',
]);

Result syntax:

[
    'componentBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-component/1.0.0/1',
    'requestId' => 'c75a1764-2ca3-4cb4-9ce9-6d49f87942b0',
]

DeleteContainerRecipe

$result = $client->deleteContainerRecipe([/* ... */]);
$promise = $client->deleteContainerRecipeAsync([/* ... */]);

Deletes a container recipe. The request fails with ResourceDependencyException if the recipe is shared with other accounts, or if an image pipeline references it.

Parameter Syntax

$result = $client->deleteContainerRecipe([
    'containerRecipeArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
containerRecipeArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the container recipe to delete.

Result Syntax

[
    'containerRecipeArn' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
containerRecipeArn
Type: string

The Amazon Resource Name (ARN) of the container recipe that was deleted.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

ResourceDependencyException:

You have attempted to mutate or delete a resource with a dependency that prohibits this action. See the error message for more details.

Examples

Example 1: Delete a container recipe

The following example deletes the specified container recipe.

$result = $client->deleteContainerRecipe([
    'containerRecipeArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:container-recipe/my-example-container-recipe/1.0.0',
]);

Result syntax:

[
    'containerRecipeArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:container-recipe/my-example-container-recipe/1.0.0',
    'requestId' => '988e934a-b785-4705-aff1-4d9840a165aa',
]

DeleteDistributionConfiguration

$result = $client->deleteDistributionConfiguration([/* ... */]);
$promise = $client->deleteDistributionConfigurationAsync([/* ... */]);

Deletes a distribution configuration. You can't delete a configuration that an image pipeline still references. The request fails with ResourceDependencyException. Update or delete the referencing pipelines first.

Parameter Syntax

$result = $client->deleteDistributionConfiguration([
    'distributionConfigurationArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
distributionConfigurationArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the distribution configuration to delete.

Result Syntax

[
    'distributionConfigurationArn' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
distributionConfigurationArn
Type: string

The Amazon Resource Name (ARN) of the distribution configuration that was deleted.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

ServiceUnavailableException:

The service is unable to process your request at this time.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

ResourceDependencyException:

You have attempted to mutate or delete a resource with a dependency that prohibits this action. See the error message for more details.

Examples

Example 1: Delete a distribution configuration

The following example deletes the specified distribution configuration.

$result = $client->deleteDistributionConfiguration([
    'distributionConfigurationArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:distribution-configuration/my-example-distribution-configuration',
]);

Result syntax:

[
    'distributionConfigurationArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:distribution-configuration/my-example-distribution-configuration',
    'requestId' => '2b752b77-2038-40f4-996a-0a6da1be5e92',
]

DeleteImage

$result = $client->deleteImage([/* ... */]);
$promise = $client->deleteImageAsync([/* ... */]);

Deletes an Image Builder image resource. This does not delete any EC2 AMIs or ECR container images that are created during the image build process. You must clean those up separately, using the appropriate Amazon EC2 or Amazon ECR console actions, or API or CLI commands.

The request fails with ResourceDependencyException if the image is shared with other accounts, or if other resources depend on it. It also fails while the image build is still running. Cancel an in-progress build with CancelImageCreation before you delete the image.

Parameter Syntax

$result = $client->deleteImage([
    'imageBuildVersionArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
imageBuildVersionArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the Image Builder image resource to delete.

Result Syntax

[
    'imageBuildVersionArn' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
imageBuildVersionArn
Type: string

The Amazon Resource Name (ARN) of the Image Builder image resource that this request deleted.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

ServiceUnavailableException:

The service is unable to process your request at this time.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

ResourceDependencyException:

You have attempted to mutate or delete a resource with a dependency that prohibits this action. See the error message for more details.

Examples

Example 1: Delete an image build version

The following example deletes the Image Builder image record for the specified build version - EC2 AMIs or ECR container images that the build created aren't removed.

$result = $client->deleteImage([
    'imageBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1',
]);

Result syntax:

[
    'imageBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1',
    'requestId' => 'fd45526c-ec37-4345-8843-329e4268e00e',
]

DeleteImagePipeline

$result = $client->deleteImagePipeline([/* ... */]);
$promise = $client->deleteImagePipelineAsync([/* ... */]);

Deletes an image pipeline. Images that the pipeline created aren't deleted - remove those separately with DeleteImage. You can delete a pipeline while a build that it started is still running. The build continues independently.

Parameter Syntax

$result = $client->deleteImagePipeline([
    'imagePipelineArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
imagePipelineArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the image pipeline to delete.

Result Syntax

[
    'imagePipelineArn' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
imagePipelineArn
Type: string

The Amazon Resource Name (ARN) of the image pipeline that was deleted.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

ResourceDependencyException:

You have attempted to mutate or delete a resource with a dependency that prohibits this action. See the error message for more details.

Examples

Example 1: Delete an image pipeline

The following example deletes an image pipeline.

$result = $client->deleteImagePipeline([
    'imagePipelineArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-pipeline/my-example-pipeline',
]);

Result syntax:

[
    'imagePipelineArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-pipeline/my-example-pipeline',
    'requestId' => '0536e4e9-5331-493a-921e-e8f86d367043',
]

DeleteImageRecipe

$result = $client->deleteImageRecipe([/* ... */]);
$promise = $client->deleteImageRecipeAsync([/* ... */]);

Deletes an image recipe.

Parameter Syntax

$result = $client->deleteImageRecipe([
    'imageRecipeArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
imageRecipeArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the image recipe to delete.

Result Syntax

[
    'imageRecipeArn' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
imageRecipeArn
Type: string

The Amazon Resource Name (ARN) of the image recipe that was deleted.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

ResourceDependencyException:

You have attempted to mutate or delete a resource with a dependency that prohibits this action. See the error message for more details.

Examples

Example 1: Delete an image recipe

The following example deletes the specified image recipe version.

$result = $client->deleteImageRecipe([
    'imageRecipeArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-recipe/1.0.0',
]);

Result syntax:

[
    'imageRecipeArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-recipe/1.0.0',
    'requestId' => 'a27ae6de-0adc-4cbb-9705-a4b8751857b8',
]

DeleteInfrastructureConfiguration

$result = $client->deleteInfrastructureConfiguration([/* ... */]);
$promise = $client->deleteInfrastructureConfigurationAsync([/* ... */]);

Deletes an infrastructure configuration. You can't delete a configuration that an image pipeline still references. The request fails with ResourceDependencyException. Update or delete the referencing pipelines first.

Parameter Syntax

$result = $client->deleteInfrastructureConfiguration([
    'infrastructureConfigurationArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
infrastructureConfigurationArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the infrastructure configuration to delete.

Result Syntax

[
    'infrastructureConfigurationArn' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
infrastructureConfigurationArn
Type: string

The Amazon Resource Name (ARN) of the infrastructure configuration that was deleted.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

ResourceDependencyException:

You have attempted to mutate or delete a resource with a dependency that prohibits this action. See the error message for more details.

Examples

Example 1: Delete an infrastructure configuration

The following example deletes the infrastructure configuration with the specified ARN.

$result = $client->deleteInfrastructureConfiguration([
    'infrastructureConfigurationArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:infrastructure-configuration/my-example-infrastructure',
]);

Result syntax:

[
    'infrastructureConfigurationArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:infrastructure-configuration/my-example-infrastructure',
    'requestId' => 'fbae57f4-59fc-48ab-a25e-c67b0d9b454c',
]

DeleteLifecyclePolicy

$result = $client->deleteLifecyclePolicy([/* ... */]);
$promise = $client->deleteLifecyclePolicyAsync([/* ... */]);

Deletes the specified lifecycle policy resource. Deleting the policy removes its schedule, so no further lifecycle runs occur for that policy. If a lifecycle execution is in progress for the policy, Image Builder cancels it. Deletion doesn't revert actions that the policy already applied to your resources.

Parameter Syntax

$result = $client->deleteLifecyclePolicy([
    'lifecyclePolicyArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
lifecyclePolicyArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the lifecycle policy resource to delete.

Result Syntax

[
    'lifecyclePolicyArn' => '<string>',
]

Result Details

Members
lifecyclePolicyArn
Type: string

The Amazon Resource Name (ARN) of the lifecycle policy that was deleted.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

ServiceUnavailableException:

The service is unable to process your request at this time.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

ResourceDependencyException:

You have attempted to mutate or delete a resource with a dependency that prohibits this action. See the error message for more details.

Examples

Example 1: Delete a lifecycle policy

The following example deletes the specified lifecycle policy.

$result = $client->deleteLifecyclePolicy([
    'lifecyclePolicyArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:lifecycle-policy/my-example-lifecycle-policy',
]);

Result syntax:

[
    'lifecyclePolicyArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:lifecycle-policy/my-example-lifecycle-policy',
]

DeleteWorkflow

$result = $client->deleteWorkflow([/* ... */]);
$promise = $client->deleteWorkflowAsync([/* ... */]);

Deletes a specific workflow resource. You can't delete a workflow build version while an image pipeline references it. The request fails with ResourceDependencyException.

Parameter Syntax

$result = $client->deleteWorkflow([
    'workflowBuildVersionArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
workflowBuildVersionArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the workflow resource to delete.

Result Syntax

[
    'workflowBuildVersionArn' => '<string>',
]

Result Details

Members
workflowBuildVersionArn
Type: string

The Amazon Resource Name (ARN) of the workflow resource that this request deleted.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

ResourceDependencyException:

You have attempted to mutate or delete a resource with a dependency that prohibits this action. See the error message for more details.

Examples

Example 1: Delete a workflow build version

The following example deletes the workflow build version that the ARN specifies.

$result = $client->deleteWorkflow([
    'workflowBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:workflow/build/my-example-workflow/1.0.0/1',
]);

Result syntax:

[
    'workflowBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:workflow/build/my-example-workflow/1.0.0/1',
]

DistributeImage

$result = $client->distributeImage([/* ... */]);
$promise = $client->distributeImageAsync([/* ... */]);

Distributes an existing AMI to target Regions and accounts without running the full image build process. This operation only runs the distribution phase on an image that has already been built.

Parameter Syntax

$result = $client->distributeImage([
    'clientToken' => '<string>', // REQUIRED
    'distributionConfigurationArn' => '<string>', // REQUIRED
    'executionRole' => '<string>', // REQUIRED
    'loggingConfiguration' => [
        'logGroupName' => '<string>',
    ],
    'sourceImage' => '<string>', // REQUIRED
    'tags' => ['<string>', ...],
]);

Parameter Details

Members
clientToken
Required: Yes
Type: string

A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.

distributionConfigurationArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the distribution configuration. The configuration defines target Regions, accounts, and AMI settings. The distribution configuration must be in the same Region as this operation.

executionRole
Required: Yes
Type: string

The name or Amazon Resource Name (ARN) of the IAM role that Image Builder assumes to distribute the image.

loggingConfiguration
Type: ImageLoggingConfiguration structure

The logging configuration for the distribution.

sourceImage
Required: Yes
Type: string

The source image to distribute. You can specify the source in any of the following formats:

  • An AMI ID.

  • An Amazon Web Services Systems Manager Parameter Store reference, prefixed by ssm:, followed by the parameter name or ARN.

  • An Image Builder image Amazon Resource Name (ARN). An image version ARN resolves to the latest available build version.

Whichever format you use, the source must resolve to an AMI in the current Amazon Web Services Region.

tags
Type: Associative array of custom strings keys (TagKey) to strings

The tags to apply to the new Image Builder image resource that this operation creates. To tag the output AMIs, use amiTags in the distribution configuration.

Result Syntax

[
    'clientToken' => '<string>',
    'imageBuildVersionArn' => '<string>',
]

Result Details

Members
clientToken
Type: string

The client token that uniquely identifies the request.

imageBuildVersionArn
Type: string

The Amazon Resource Name (ARN) of the new Image Builder image resource that this operation creates to track the distribution. Use this ARN with GetImage to monitor distribution progress.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

IdempotentParameterMismatchException:

You have specified a client token for an operation using parameter values that differ from a previous request that used the same client token.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

ResourceInUseException:

The resource that you are trying to operate on is currently in use. Review the message details and retry later.

ServiceQuotaExceededException:

You have exceeded the number of permitted resources or operations for this service. For service quotas, see EC2 Image Builder endpoints and quotas.

AccessDeniedException:

You do not have permissions to perform the requested operation.

TooManyRequestsException:

You have attempted too many requests for the specific operation.

ResourceNotFoundException:

At least one of the resources referenced by your request does not exist.

Examples

Example 1: Distribute an existing AMI

The following example distributes an AMI that you own to the targets defined in the specified distribution configuration. It returns the ARN of a new Image Builder image resource that you can use with GetImage to monitor distribution progress.

$result = $client->distributeImage([
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE86420',
    'distributionConfigurationArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:distribution-configuration/my-example-distribution-configuration',
    'executionRole' => 'arn:aws:iam::111122223333:role/aws-service-role/imagebuilder.amazonaws.com/AWSServiceRoleForImageBuilder',
    'sourceImage' => 'ami-1234567890abcdef0',
]);

Result syntax:

[
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE86420',
    'imageBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-source-ami/1.0.0/1',
]

GetComponent

$result = $client->getComponent([/* ... */]);
$promise = $client->getComponentAsync([/* ... */]);

Retrieves a component object.

Parameter Syntax

$result = $client->getComponent([
    'componentBuildVersionArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
componentBuildVersionArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the component that you want to get. You can specify a build version ARN, or a component version ARN. The version can use the x wildcard in trailing positions, for example 1.0.x or 1.x.x. Version ARNs resolve to the latest available matching component build version.

Result Syntax

[
    'component' => [
        'arn' => '<string>',
        'changeDescription' => '<string>',
        'data' => '<string>',
        'dateCreated' => '<string>',
        'description' => '<string>',
        'encrypted' => true || false,
        'kmsKeyId' => '<string>',
        'name' => '<string>',
        'obfuscate' => true || false,
        'owner' => '<string>',
        'parameters' => [
            [
                'defaultValue' => ['<string>', ...],
                'description' => '<string>',
                'name' => '<string>',
                'type' => '<string>',
            ],
            // ...
        ],
        'platform' => 'Windows|Linux|macOS',
        'productCodes' => [
            [
                'productCodeId' => '<string>',
                'productCodeType' => 'marketplace',
            ],
            // ...
        ],
        'publisher' => '<string>',
        'state' => [
            'reason' => '<string>',
            'status' => 'DEPRECATED|DISABLED|ACTIVE',
        ],
        'supportedOsVersions' => ['<string>', ...],
        'tags' => ['<string>', ...],
        'type' => 'BUILD|TEST',
        'version' => '<string>',
    ],
    'latestVersionReferences' => [
        'latestMajorVersionArn' => '<string>',
        'latestMinorVersionArn' => '<string>',
        'latestPatchVersionArn' => '<string>',
        'latestVersionArn' => '<string>',
    ],
    'requestId' => '<string>',
]

Result Details

Members
component
Type: Component structure

The component object specified in the request.

latestVersionReferences
Type: LatestVersionReferences structure

A set of wildcard version ARNs that always reference the latest version of the resource. ARNs are included for the latest version overall, and for the latest versions within the same major, minor, and patch levels.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: Get the details of a component build version

The following example retrieves a component build version. The data field in the response contains the YAML document that defines the component.

$result = $client->getComponent([
    'componentBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-component/1.0.0/1',
]);

Result syntax:

[
    'component' => [
        'version' => '1.0.0',
        'name' => 'my-example-component',
        'type' => 'BUILD',
        'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-component/1.0.0/1',
        'changeDescription' => 'Initial version',
        'data' => 'name: InstallMyAppdescription: Installs my applicationschemaVersion: 1.0phases: - name: build steps: - name: InstallApp action: ExecuteBash inputs: commands: - sudo yum -y install my-app',
        'dateCreated' => '2026-09-09T18:31:30.404Z',
        'description' => 'Installs the latest version of my application',
        'encrypted' => 1,
        'owner' => '111122223333',
        'platform' => 'Linux',
        'state' => [
            'status' => 'ACTIVE',
        ],
    ],
    'latestVersionReferences' => [
        'latestMajorVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-component/1.x.x',
        'latestMinorVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-component/1.0.x',
        'latestPatchVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-component/1.0.0',
        'latestVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-component/x.x.x',
    ],
    'requestId' => 'f5401098-035f-4be2-9eee-784c388ed04b',
]

GetComponentPolicy

$result = $client->getComponentPolicy([/* ... */]);
$promise = $client->getComponentPolicyAsync([/* ... */]);

Retrieves a component policy.

Parameter Syntax

$result = $client->getComponentPolicy([
    'componentArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
componentArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the component whose policy you want to retrieve.

Result Syntax

[
    'policy' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
policy
Type: string

The component policy.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ServiceUnavailableException:

The service is unable to process your request at this time.

ResourceNotFoundException:

At least one of the resources referenced by your request does not exist.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: Get the resource policy for a component

The following example retrieves the resource policy that's applied to a component that the owner shared with another account.

$result = $client->getComponentPolicy([
    'componentArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-shared-component/1.0.0/1',
]);

Result syntax:

[
    'policy' => '{"Version": "2012-10-17", "Statement": [{"Effect": "Allow", "Principal": {"AWS": "arn:aws:iam::444455556666:root"}, "Action": ["imagebuilder:GetComponent", "imagebuilder:ListComponents"], "Resource": ["arn:aws:imagebuilder:us-west-2:111122223333:component/my-shared-component/1.0.0/1"]}]}',
    'requestId' => 'cb458998-6e6f-442a-9325-78c730b80895',
]

GetContainerRecipe

$result = $client->getContainerRecipe([/* ... */]);
$promise = $client->getContainerRecipeAsync([/* ... */]);

Retrieves a container recipe.

Parameter Syntax

$result = $client->getContainerRecipe([
    'containerRecipeArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
containerRecipeArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the container recipe to retrieve.

Result Syntax

[
    'containerRecipe' => [
        'arn' => '<string>',
        'components' => [
            [
                'componentArn' => '<string>',
                'parameters' => [
                    [
                        'name' => '<string>',
                        'value' => ['<string>', ...],
                    ],
                    // ...
                ],
            ],
            // ...
        ],
        'containerType' => 'DOCKER',
        'dateCreated' => '<string>',
        'description' => '<string>',
        'dockerfileTemplateData' => '<string>',
        'encrypted' => true || false,
        'instanceConfiguration' => [
            'blockDeviceMappings' => [
                [
                    'deviceName' => '<string>',
                    'ebs' => [
                        'deleteOnTermination' => true || false,
                        'encrypted' => true || false,
                        'iops' => <integer>,
                        'kmsKeyId' => '<string>',
                        'snapshotId' => '<string>',
                        'throughput' => <integer>,
                        'volumeSize' => <integer>,
                        'volumeType' => 'standard|io1|io2|gp2|gp3|sc1|st1',
                    ],
                    'noDevice' => '<string>',
                    'virtualName' => '<string>',
                ],
                // ...
            ],
            'image' => '<string>',
        ],
        'kmsKeyId' => '<string>',
        'name' => '<string>',
        'owner' => '<string>',
        'parentImage' => '<string>',
        'platform' => 'Windows|Linux|macOS',
        'tags' => ['<string>', ...],
        'targetRepository' => [
            'repositoryName' => '<string>',
            'service' => 'ECR',
        ],
        'version' => '<string>',
        'workingDirectory' => '<string>',
    ],
    'latestVersionReferences' => [
        'latestMajorVersionArn' => '<string>',
        'latestMinorVersionArn' => '<string>',
        'latestPatchVersionArn' => '<string>',
        'latestVersionArn' => '<string>',
    ],
    'requestId' => '<string>',
]

Result Details

Members
containerRecipe
Type: ContainerRecipe structure

The container recipe object that is returned.

latestVersionReferences
Type: LatestVersionReferences structure

A set of wildcard version ARNs that always reference the latest version of the resource. ARNs are included for the latest version overall, and for the latest versions within the same major, minor, and patch levels.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: Get the details of a container recipe

The following example retrieves the details of the specified container recipe.

$result = $client->getContainerRecipe([
    'containerRecipeArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:container-recipe/my-example-container-recipe/1.0.0',
]);

Result syntax:

[
    'containerRecipe' => [
        'version' => '1.0.0',
        'name' => 'my-example-container-recipe',
        'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:container-recipe/my-example-container-recipe/1.0.0',
        'components' => [
            [
                'componentArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-container-component/1.0.0/1',
            ],
        ],
        'containerType' => 'DOCKER',
        'dateCreated' => '2026-09-09T19:32:53.983Z',
        'description' => 'A container recipe that installs my application on Amazon Linux',
        'dockerfileTemplateData' => 'FROM {{{ imagebuilder:parentImage }}}{{{ imagebuilder:environments }}}{{{ imagebuilder:components }}}',
        'encrypted' => 1,
        'owner' => '111122223333',
        'parentImage' => 'amazonlinux:latest',
        'platform' => 'Linux',
        'targetRepository' => [
            'repositoryName' => 'my-example-container-repo',
            'service' => 'ECR',
        ],
    ],
    'latestVersionReferences' => [
        'latestMajorVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:container-recipe/my-example-container-recipe/1.x.x',
        'latestMinorVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:container-recipe/my-example-container-recipe/1.0.x',
        'latestPatchVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:container-recipe/my-example-container-recipe/1.0.0',
        'latestVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:container-recipe/my-example-container-recipe/x.x.x',
    ],
    'requestId' => '15b03ca7-050f-46d4-945e-00232cff6b19',
]

GetContainerRecipePolicy

$result = $client->getContainerRecipePolicy([/* ... */]);
$promise = $client->getContainerRecipePolicyAsync([/* ... */]);

Retrieves the policy for a container recipe.

Parameter Syntax

$result = $client->getContainerRecipePolicy([
    'containerRecipeArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
containerRecipeArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the container recipe for the policy being requested.

Result Syntax

[
    'policy' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
policy
Type: string

The resource policy for the container recipe, as a JSON policy document. If no policy has been applied, the response contains an empty JSON object ({}).

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

ResourceNotFoundException:

At least one of the resources referenced by your request does not exist.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: Get the policy attached to a container recipe

The following example retrieves the resource policy for a container recipe that you shared with another AWS account. The policy property contains the resource-based policy document as a JSON-encoded string.

$result = $client->getContainerRecipePolicy([
    'containerRecipeArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:container-recipe/my-example-container-recipe-shared/1.0.0',
]);

Result syntax:

[
    'policy' => '{"Version": "2012-10-17", "Statement": [{"Sid": "AllowSharedAccountContainerRecipeAccess", "Effect": "Allow", "Principal": {"AWS": "arn:aws:iam::444455556666:root"}, "Action": ["imagebuilder:GetContainerRecipe", "imagebuilder:ListContainerRecipes"], "Resource": "arn:aws:imagebuilder:us-west-2:111122223333:container-recipe/my-example-container-recipe-shared/1.0.0"}]}',
    'requestId' => '1b8334a0-5ae7-4c3c-8092-5d589dab7a2b',
]

GetDistributionConfiguration

$result = $client->getDistributionConfiguration([/* ... */]);
$promise = $client->getDistributionConfigurationAsync([/* ... */]);

Retrieves a distribution configuration.

Parameter Syntax

$result = $client->getDistributionConfiguration([
    'distributionConfigurationArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
distributionConfigurationArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the distribution configuration that you want to retrieve.

Result Syntax

[
    'distributionConfiguration' => [
        'arn' => '<string>',
        'dateCreated' => '<string>',
        'dateUpdated' => '<string>',
        'description' => '<string>',
        'distributions' => [
            [
                'amiDistributionConfiguration' => [
                    'amiTags' => ['<string>', ...],
                    'description' => '<string>',
                    'kmsKeyId' => '<string>',
                    'launchPermission' => [
                        'organizationArns' => ['<string>', ...],
                        'organizationalUnitArns' => ['<string>', ...],
                        'userGroups' => ['<string>', ...],
                        'userIds' => ['<string>', ...],
                    ],
                    'name' => '<string>',
                    'targetAccountIds' => ['<string>', ...],
                ],
                'containerDistributionConfiguration' => [
                    'containerTags' => ['<string>', ...],
                    'description' => '<string>',
                    'targetRepository' => [
                        'repositoryName' => '<string>',
                        'service' => 'ECR',
                    ],
                ],
                'fastLaunchConfigurations' => [
                    [
                        'accountId' => '<string>',
                        'enabled' => true || false,
                        'launchTemplate' => [
                            'launchTemplateId' => '<string>',
                            'launchTemplateName' => '<string>',
                            'launchTemplateVersion' => '<string>',
                        ],
                        'maxParallelLaunches' => <integer>,
                        'snapshotConfiguration' => [
                            'targetResourceCount' => <integer>,
                        ],
                    ],
                    // ...
                ],
                'launchTemplateConfigurations' => [
                    [
                        'accountId' => '<string>',
                        'launchTemplateId' => '<string>',
                        'setDefaultVersion' => true || false,
                    ],
                    // ...
                ],
                'licenseConfigurationArns' => ['<string>', ...],
                'region' => '<string>',
                's3ExportConfiguration' => [
                    'diskImageFormat' => 'VMDK|RAW|VHD',
                    'roleName' => '<string>',
                    's3Bucket' => '<string>',
                    's3Prefix' => '<string>',
                ],
                'ssmParameterConfigurations' => [
                    [
                        'amiAccountId' => '<string>',
                        'dataType' => 'text|aws:ec2:image',
                        'parameterName' => '<string>',
                    ],
                    // ...
                ],
            ],
            // ...
        ],
        'name' => '<string>',
        'tags' => ['<string>', ...],
        'timeoutMinutes' => <integer>,
    ],
    'requestId' => '<string>',
]

Result Details

Members
distributionConfiguration
Type: DistributionConfiguration structure

The distribution configuration object.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: Get the details of a distribution configuration

The following example retrieves a distribution configuration that distributes the output AMI to two Regions.

$result = $client->getDistributionConfiguration([
    'distributionConfigurationArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:distribution-configuration/my-example-distribution',
]);

Result syntax:

[
    'distributionConfiguration' => [
        'name' => 'my-example-distribution',
        'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:distribution-configuration/my-example-distribution',
        'dateCreated' => '2026-09-09T19:37:37.231Z',
        'description' => 'Copies the output AMI to a second Region',
        'distributions' => [
            [
                'amiDistributionConfiguration' => [
                    'name' => 'my-example-image-{{ imagebuilder:buildDate }}',
                ],
                'region' => 'us-west-2',
            ],
            [
                'amiDistributionConfiguration' => [
                    'name' => 'my-example-image-{{ imagebuilder:buildDate }}',
                ],
                'region' => 'us-east-1',
            ],
        ],
        'timeoutMinutes' => 720,
    ],
    'requestId' => '2d0a8dc0-99d5-4d7a-af7a-d1aeafd71c2e',
]

GetImage

$result = $client->getImage([/* ... */]);
$promise = $client->getImageAsync([/* ... */]);

Retrieves an image.

Parameter Syntax

$result = $client->getImage([
    'imageBuildVersionArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
imageBuildVersionArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the image that you want to get. You can specify a full build version ARN, or a version ARN with or without wildcards (x.x.x, 1.x.x, or 1.0.x). A version or wildcard ARN resolves to the latest matching build version that has reached AVAILABLE status. Builds that were later deprecated, disabled, or deleted don't resolve. To get an image in any other state, such as a failed or in-progress build, specify the full build version ARN.

Result Syntax

[
    'image' => [
        'arn' => '<string>',
        'buildType' => 'USER_INITIATED|SCHEDULED|IMPORT|IMPORT_ISO',
        'containerRecipe' => [
            'arn' => '<string>',
            'components' => [
                [
                    'componentArn' => '<string>',
                    'parameters' => [
                        [
                            'name' => '<string>',
                            'value' => ['<string>', ...],
                        ],
                        // ...
                    ],
                ],
                // ...
            ],
            'containerType' => 'DOCKER',
            'dateCreated' => '<string>',
            'description' => '<string>',
            'dockerfileTemplateData' => '<string>',
            'encrypted' => true || false,
            'instanceConfiguration' => [
                'blockDeviceMappings' => [
                    [
                        'deviceName' => '<string>',
                        'ebs' => [
                            'deleteOnTermination' => true || false,
                            'encrypted' => true || false,
                            'iops' => <integer>,
                            'kmsKeyId' => '<string>',
                            'snapshotId' => '<string>',
                            'throughput' => <integer>,
                            'volumeSize' => <integer>,
                            'volumeType' => 'standard|io1|io2|gp2|gp3|sc1|st1',
                        ],
                        'noDevice' => '<string>',
                        'virtualName' => '<string>',
                    ],
                    // ...
                ],
                'image' => '<string>',
            ],
            'kmsKeyId' => '<string>',
            'name' => '<string>',
            'owner' => '<string>',
            'parentImage' => '<string>',
            'platform' => 'Windows|Linux|macOS',
            'tags' => ['<string>', ...],
            'targetRepository' => [
                'repositoryName' => '<string>',
                'service' => 'ECR',
            ],
            'version' => '<string>',
            'workingDirectory' => '<string>',
        ],
        'dateCreated' => '<string>',
        'deprecationTime' => <DateTime>,
        'distributionConfiguration' => [
            'arn' => '<string>',
            'dateCreated' => '<string>',
            'dateUpdated' => '<string>',
            'description' => '<string>',
            'distributions' => [
                [
                    'amiDistributionConfiguration' => [
                        'amiTags' => ['<string>', ...],
                        'description' => '<string>',
                        'kmsKeyId' => '<string>',
                        'launchPermission' => [
                            'organizationArns' => ['<string>', ...],
                            'organizationalUnitArns' => ['<string>', ...],
                            'userGroups' => ['<string>', ...],
                            'userIds' => ['<string>', ...],
                        ],
                        'name' => '<string>',
                        'targetAccountIds' => ['<string>', ...],
                    ],
                    'containerDistributionConfiguration' => [
                        'containerTags' => ['<string>', ...],
                        'description' => '<string>',
                        'targetRepository' => [
                            'repositoryName' => '<string>',
                            'service' => 'ECR',
                        ],
                    ],
                    'fastLaunchConfigurations' => [
                        [
                            'accountId' => '<string>',
                            'enabled' => true || false,
                            'launchTemplate' => [
                                'launchTemplateId' => '<string>',
                                'launchTemplateName' => '<string>',
                                'launchTemplateVersion' => '<string>',
                            ],
                            'maxParallelLaunches' => <integer>,
                            'snapshotConfiguration' => [
                                'targetResourceCount' => <integer>,
                            ],
                        ],
                        // ...
                    ],
                    'launchTemplateConfigurations' => [
                        [
                            'accountId' => '<string>',
                            'launchTemplateId' => '<string>',
                            'setDefaultVersion' => true || false,
                        ],
                        // ...
                    ],
                    'licenseConfigurationArns' => ['<string>', ...],
                    'region' => '<string>',
                    's3ExportConfiguration' => [
                        'diskImageFormat' => 'VMDK|RAW|VHD',
                        'roleName' => '<string>',
                        's3Bucket' => '<string>',
                        's3Prefix' => '<string>',
                    ],
                    'ssmParameterConfigurations' => [
                        [
                            'amiAccountId' => '<string>',
                            'dataType' => 'text|aws:ec2:image',
                            'parameterName' => '<string>',
                        ],
                        // ...
                    ],
                ],
                // ...
            ],
            'name' => '<string>',
            'tags' => ['<string>', ...],
            'timeoutMinutes' => <integer>,
        ],
        'enhancedImageMetadataEnabled' => true || false,
        'executionRole' => '<string>',
        'imageRecipe' => [
            'additionalInstanceConfiguration' => [
                'systemsManagerAgent' => [
                    'uninstallAfterBuild' => true || false,
                ],
                'userDataOverride' => '<string>',
            ],
            'amiTags' => ['<string>', ...],
            'amiWatermarks' => ['<string>', ...],
            'arn' => '<string>',
            'blockDeviceMappings' => [
                [
                    'deviceName' => '<string>',
                    'ebs' => [
                        'deleteOnTermination' => true || false,
                        'encrypted' => true || false,
                        'iops' => <integer>,
                        'kmsKeyId' => '<string>',
                        'snapshotId' => '<string>',
                        'throughput' => <integer>,
                        'volumeSize' => <integer>,
                        'volumeType' => 'standard|io1|io2|gp2|gp3|sc1|st1',
                    ],
                    'noDevice' => '<string>',
                    'virtualName' => '<string>',
                ],
                // ...
            ],
            'components' => [
                [
                    'componentArn' => '<string>',
                    'parameters' => [
                        [
                            'name' => '<string>',
                            'value' => ['<string>', ...],
                        ],
                        // ...
                    ],
                ],
                // ...
            ],
            'dateCreated' => '<string>',
            'description' => '<string>',
            'name' => '<string>',
            'owner' => '<string>',
            'parentImage' => '<string>',
            'platform' => 'Windows|Linux|macOS',
            'tags' => ['<string>', ...],
            'type' => 'AMI|DOCKER',
            'version' => '<string>',
            'workingDirectory' => '<string>',
        ],
        'imageScanningConfiguration' => [
            'ecrConfiguration' => [
                'containerTags' => ['<string>', ...],
                'repositoryName' => '<string>',
            ],
            'imageScanningEnabled' => true || false,
        ],
        'imageSource' => 'AMAZON_MANAGED|AWS_MARKETPLACE|IMPORTED|CUSTOM',
        'imageTestsConfiguration' => [
            'imageTestsEnabled' => true || false,
            'timeoutMinutes' => <integer>,
        ],
        'infrastructureConfiguration' => [
            'arn' => '<string>',
            'dateCreated' => '<string>',
            'dateUpdated' => '<string>',
            'description' => '<string>',
            'instanceMetadataOptions' => [
                'httpPutResponseHopLimit' => <integer>,
                'httpTokens' => '<string>',
            ],
            'instanceProfileName' => '<string>',
            'instanceTypes' => ['<string>', ...],
            'keyPair' => '<string>',
            'logging' => [
                's3Logs' => [
                    's3BucketName' => '<string>',
                    's3KeyPrefix' => '<string>',
                ],
            ],
            'name' => '<string>',
            'placement' => [
                'availabilityZone' => '<string>',
                'hostId' => '<string>',
                'hostResourceGroupArn' => '<string>',
                'tenancy' => 'default|dedicated|host',
            ],
            'resourceTags' => ['<string>', ...],
            'securityGroupIds' => ['<string>', ...],
            'snsTopicArn' => '<string>',
            'subnetId' => '<string>',
            'tags' => ['<string>', ...],
            'terminateInstanceOnFailure' => true || false,
        ],
        'lifecycleExecutionId' => '<string>',
        'loggingConfiguration' => [
            'logGroupName' => '<string>',
        ],
        'name' => '<string>',
        'osVersion' => '<string>',
        'outputResources' => [
            'amis' => [
                [
                    'accountId' => '<string>',
                    'description' => '<string>',
                    'image' => '<string>',
                    'name' => '<string>',
                    'region' => '<string>',
                    'state' => [
                        'failureContext' => [
                            'componentFailure' => [
                                'action' => '<string>',
                                'componentArn' => '<string>',
                                'errorMessage' => '<string>',
                                'phaseName' => '<string>',
                                'stepName' => '<string>',
                            ],
                            'distributionFailure' => [
                                'errorMessage' => '<string>',
                                'regionFailures' => [
                                    [
                                        'errorMessage' => '<string>',
                                        'imageConfigurationStep' => 'ASSOCIATE_LICENSES|UPDATE_LAUNCH_TEMPLATES|PUT_SSM_PARAMETERS|UPDATE_FAST_LAUNCH_CONFIGURATIONS|EXPORT_AMI',
                                        'region' => '<string>',
                                        'status' => 'FAILED|CANCELLED|TIMED_OUT',
                                        'targetAccountId' => '<string>',
                                    ],
                                    // ...
                                ],
                            ],
                            'failedStep' => '<string>',
                            'imageStatus' => 'PENDING|CREATING|BUILDING|TESTING|DISTRIBUTING|INTEGRATING|AVAILABLE|CANCELLED|FAILED|DEPRECATED|DELETED|DISABLED',
                            'stepExecutionId' => '<string>',
                            'workflowArn' => '<string>',
                            'workflowExecutionId' => '<string>',
                        ],
                        'reason' => '<string>',
                        'status' => 'PENDING|CREATING|BUILDING|TESTING|DISTRIBUTING|INTEGRATING|AVAILABLE|CANCELLED|FAILED|DEPRECATED|DELETED|DISABLED',
                    ],
                ],
                // ...
            ],
            'containers' => [
                [
                    'imageUris' => ['<string>', ...],
                    'region' => '<string>',
                ],
                // ...
            ],
        ],
        'platform' => 'Windows|Linux|macOS',
        'scanState' => [
            'reason' => '<string>',
            'status' => 'PENDING|SCANNING|COLLECTING|COMPLETED|ABANDONED|FAILED|TIMED_OUT',
        ],
        'sourcePipelineArn' => '<string>',
        'sourcePipelineName' => '<string>',
        'state' => [
            'failureContext' => [
                'componentFailure' => [
                    'action' => '<string>',
                    'componentArn' => '<string>',
                    'errorMessage' => '<string>',
                    'phaseName' => '<string>',
                    'stepName' => '<string>',
                ],
                'distributionFailure' => [
                    'errorMessage' => '<string>',
                    'regionFailures' => [
                        [
                            'errorMessage' => '<string>',
                            'imageConfigurationStep' => 'ASSOCIATE_LICENSES|UPDATE_LAUNCH_TEMPLATES|PUT_SSM_PARAMETERS|UPDATE_FAST_LAUNCH_CONFIGURATIONS|EXPORT_AMI',
                            'region' => '<string>',
                            'status' => 'FAILED|CANCELLED|TIMED_OUT',
                            'targetAccountId' => '<string>',
                        ],
                        // ...
                    ],
                ],
                'failedStep' => '<string>',
                'imageStatus' => 'PENDING|CREATING|BUILDING|TESTING|DISTRIBUTING|INTEGRATING|AVAILABLE|CANCELLED|FAILED|DEPRECATED|DELETED|DISABLED',
                'stepExecutionId' => '<string>',
                'workflowArn' => '<string>',
                'workflowExecutionId' => '<string>',
            ],
            'reason' => '<string>',
            'status' => 'PENDING|CREATING|BUILDING|TESTING|DISTRIBUTING|INTEGRATING|AVAILABLE|CANCELLED|FAILED|DEPRECATED|DELETED|DISABLED',
        ],
        'tags' => ['<string>', ...],
        'type' => 'AMI|DOCKER',
        'version' => '<string>',
        'workflows' => [
            [
                'onFailure' => 'CONTINUE|ABORT',
                'parallelGroup' => '<string>',
                'parameters' => [
                    [
                        'name' => '<string>',
                        'value' => ['<string>', ...],
                    ],
                    // ...
                ],
                'workflowArn' => '<string>',
            ],
            // ...
        ],
    ],
    'latestVersionReferences' => [
        'latestMajorVersionArn' => '<string>',
        'latestMinorVersionArn' => '<string>',
        'latestPatchVersionArn' => '<string>',
        'latestVersionArn' => '<string>',
    ],
    'requestId' => '<string>',
]

Result Details

Members
image
Type: Image structure

The image object.

latestVersionReferences
Type: LatestVersionReferences structure

A set of wildcard version ARNs that always reference the latest version of the resource. ARNs are included for the latest version overall, and for the latest versions within the same major, minor, and patch levels.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: Check the status of an image build

The following example retrieves an image build version to check its status while the build is running. The response is shortened to show a subset of the fields that Image Builder returns.

$result = $client->getImage([
    'imageBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1',
]);

Result syntax:

[
    'image' => [
        'version' => '1.0.0/1',
        'name' => 'my-example-recipe',
        'type' => 'AMI',
        'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1',
        'dateCreated' => '2026-09-03T05:44:21.121Z',
        'enhancedImageMetadataEnabled' => 1,
        'platform' => 'Linux',
        'sourcePipelineArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-pipeline/my-example-pipeline',
        'state' => [
            'status' => 'BUILDING',
        ],
    ],
    'requestId' => '4be892f0-e1d1-47f9-8bc1-d08ec5dec640',
]

GetImagePipeline

$result = $client->getImagePipeline([/* ... */]);
$promise = $client->getImagePipelineAsync([/* ... */]);

Retrieves an image pipeline.

Parameter Syntax

$result = $client->getImagePipeline([
    'imagePipelineArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
imagePipelineArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the image pipeline that you want to retrieve.

Result Syntax

[
    'imagePipeline' => [
        'arn' => '<string>',
        'consecutiveFailures' => <integer>,
        'containerRecipeArn' => '<string>',
        'dateCreated' => '<string>',
        'dateLastRun' => '<string>',
        'dateNextRun' => '<string>',
        'dateUpdated' => '<string>',
        'description' => '<string>',
        'distributionConfigurationArn' => '<string>',
        'enhancedImageMetadataEnabled' => true || false,
        'executionRole' => '<string>',
        'imageRecipeArn' => '<string>',
        'imageScanningConfiguration' => [
            'ecrConfiguration' => [
                'containerTags' => ['<string>', ...],
                'repositoryName' => '<string>',
            ],
            'imageScanningEnabled' => true || false,
        ],
        'imageTags' => ['<string>', ...],
        'imageTestsConfiguration' => [
            'imageTestsEnabled' => true || false,
            'timeoutMinutes' => <integer>,
        ],
        'infrastructureConfigurationArn' => '<string>',
        'lastRunStatus' => 'PENDING|CREATING|BUILDING|TESTING|DISTRIBUTING|INTEGRATING|AVAILABLE|CANCELLED|FAILED|DEPRECATED|DELETED|DISABLED',
        'loggingConfiguration' => [
            'imageLogGroupName' => '<string>',
            'pipelineLogGroupName' => '<string>',
        ],
        'name' => '<string>',
        'platform' => 'Windows|Linux|macOS',
        'schedule' => [
            'autoDisablePolicy' => [
                'failureCount' => <integer>,
            ],
            'pipelineExecutionStartCondition' => 'EXPRESSION_MATCH_ONLY|EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE',
            'scheduleExpression' => '<string>',
            'timezone' => '<string>',
        ],
        'status' => 'DISABLED|ENABLED',
        'tags' => ['<string>', ...],
        'workflows' => [
            [
                'onFailure' => 'CONTINUE|ABORT',
                'parallelGroup' => '<string>',
                'parameters' => [
                    [
                        'name' => '<string>',
                        'value' => ['<string>', ...],
                    ],
                    // ...
                ],
                'workflowArn' => '<string>',
            ],
            // ...
        ],
    ],
    'requestId' => '<string>',
]

Result Details

Members
imagePipeline
Type: ImagePipeline structure

The image pipeline object.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: Get the details of an image pipeline

The following example retrieves an image pipeline that builds a new image every Sunday, including the image tests configuration and schedule start condition defaults that Image Builder applied at creation.

$result = $client->getImagePipeline([
    'imagePipelineArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-pipeline/my-example-pipeline',
]);

Result syntax:

[
    'imagePipeline' => [
        'name' => 'my-example-pipeline',
        'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-pipeline/my-example-pipeline',
        'dateCreated' => '2026-09-09T19:38:26.574Z',
        'dateUpdated' => '2026-09-09T19:38:26.574Z',
        'description' => 'Builds an Amazon Linux 2023 image every Sunday',
        'enhancedImageMetadataEnabled' => 1,
        'imageRecipeArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-recipe/1.0.0',
        'imageTestsConfiguration' => [
            'imageTestsEnabled' => 1,
            'timeoutMinutes' => 720,
        ],
        'infrastructureConfigurationArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:infrastructure-configuration/my-example-infrastructure',
        'platform' => 'Linux',
        'schedule' => [
            'pipelineExecutionStartCondition' => 'EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE',
            'scheduleExpression' => 'cron(0 0 ? * SUN *)',
        ],
        'status' => 'ENABLED',
    ],
    'requestId' => 'b7e58d62-36dc-43a5-87ff-546e04cdabf1',
]

GetImagePolicy

$result = $client->getImagePolicy([/* ... */]);
$promise = $client->getImagePolicyAsync([/* ... */]);

Retrieves an image policy.

Parameter Syntax

$result = $client->getImagePolicy([
    'imageArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
imageArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the image whose policy you want to retrieve.

Result Syntax

[
    'policy' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
policy
Type: string

The resource policy for the image, as a JSON policy document. If the image has no policy applied, the response contains an empty JSON object ({}).

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ServiceUnavailableException:

The service is unable to process your request at this time.

ResourceNotFoundException:

At least one of the resources referenced by your request does not exist.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: Retrieve the resource policy for an image

The following example retrieves the resource policy for an image build version that was shared with account 444455556666.

$result = $client->getImagePolicy([
    'imageArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1',
]);

Result syntax:

[
    'policy' => '{"Version": "2012-10-17", "Statement": [{"Effect": "Allow", "Principal": {"AWS": "arn:aws:iam::444455556666:root"}, "Action": ["imagebuilder:GetImage", "imagebuilder:ListImages"], "Resource": ["arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1"]}]}',
    'requestId' => 'bc0c8348-c0d9-452a-af20-2640430df585',
]

GetImageRecipe

$result = $client->getImageRecipe([/* ... */]);
$promise = $client->getImageRecipeAsync([/* ... */]);

Retrieves an image recipe.

Parameter Syntax

$result = $client->getImageRecipe([
    'imageRecipeArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
imageRecipeArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the image recipe that you want to retrieve. You can use the x wildcard in trailing version positions to retrieve the latest matching version, for example x.x.x or 1.x.x.

Result Syntax

[
    'imageRecipe' => [
        'additionalInstanceConfiguration' => [
            'systemsManagerAgent' => [
                'uninstallAfterBuild' => true || false,
            ],
            'userDataOverride' => '<string>',
        ],
        'amiTags' => ['<string>', ...],
        'amiWatermarks' => ['<string>', ...],
        'arn' => '<string>',
        'blockDeviceMappings' => [
            [
                'deviceName' => '<string>',
                'ebs' => [
                    'deleteOnTermination' => true || false,
                    'encrypted' => true || false,
                    'iops' => <integer>,
                    'kmsKeyId' => '<string>',
                    'snapshotId' => '<string>',
                    'throughput' => <integer>,
                    'volumeSize' => <integer>,
                    'volumeType' => 'standard|io1|io2|gp2|gp3|sc1|st1',
                ],
                'noDevice' => '<string>',
                'virtualName' => '<string>',
            ],
            // ...
        ],
        'components' => [
            [
                'componentArn' => '<string>',
                'parameters' => [
                    [
                        'name' => '<string>',
                        'value' => ['<string>', ...],
                    ],
                    // ...
                ],
            ],
            // ...
        ],
        'dateCreated' => '<string>',
        'description' => '<string>',
        'name' => '<string>',
        'owner' => '<string>',
        'parentImage' => '<string>',
        'platform' => 'Windows|Linux|macOS',
        'tags' => ['<string>', ...],
        'type' => 'AMI|DOCKER',
        'version' => '<string>',
        'workingDirectory' => '<string>',
    ],
    'latestVersionReferences' => [
        'latestMajorVersionArn' => '<string>',
        'latestMinorVersionArn' => '<string>',
        'latestPatchVersionArn' => '<string>',
        'latestVersionArn' => '<string>',
    ],
    'requestId' => '<string>',
]

Result Details

Members
imageRecipe
Type: ImageRecipe structure

The image recipe object.

latestVersionReferences
Type: LatestVersionReferences structure

A set of wildcard version ARNs that always reference the latest version of the resource. ARNs are included for the latest version overall, and for the latest versions within the same major, minor, and patch levels.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: Get the details of an image recipe

The following example retrieves the full definition of an image recipe, including the components it applies and the base image it builds on.

$result = $client->getImageRecipe([
    'imageRecipeArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-app-recipe/1.0.0',
]);

Result syntax:

[
    'imageRecipe' => [
        'version' => '1.0.0',
        'name' => 'my-example-app-recipe',
        'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-app-recipe/1.0.0',
        'components' => [
            [
                'componentArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-app/1.0.0/1',
            ],
        ],
        'dateCreated' => '2026-09-09T19:30:21.183Z',
        'description' => 'An image recipe that installs my application on Amazon Linux 2023',
        'owner' => '111122223333',
        'parentImage' => 'arn:aws:imagebuilder:us-west-2:aws:image/amazon-linux-2023-x86/x.x.x',
        'platform' => 'Linux',
        'workingDirectory' => '/tmp',
    ],
    'latestVersionReferences' => [
        'latestMajorVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-app-recipe/1.x.x',
        'latestMinorVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-app-recipe/1.0.x',
        'latestPatchVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-app-recipe/1.0.0',
        'latestVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-app-recipe/x.x.x',
    ],
    'requestId' => 'adb3ff9a-df84-4b4e-8ecf-11d38281ead7',
]

GetImageRecipePolicy

$result = $client->getImageRecipePolicy([/* ... */]);
$promise = $client->getImageRecipePolicyAsync([/* ... */]);

Retrieves an image recipe policy.

Parameter Syntax

$result = $client->getImageRecipePolicy([
    'imageRecipeArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
imageRecipeArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the image recipe whose policy you want to retrieve.

Result Syntax

[
    'policy' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
policy
Type: string

The resource policy for the image recipe, as a JSON policy document. If no policy has been applied, the response contains an empty JSON object ({}).

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

ResourceNotFoundException:

At least one of the resources referenced by your request does not exist.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: Get the resource policy for an image recipe

The following example retrieves the resource policy that's applied to the specified image recipe.

$result = $client->getImageRecipePolicy([
    'imageRecipeArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-recipe/1.0.0',
]);

Result syntax:

[
    'policy' => '{"Version": "2012-10-17", "Statement": [{"Effect": "Allow", "Principal": {"AWS": "arn:aws:iam::444455556666:root"}, "Action": ["imagebuilder:GetImageRecipe", "imagebuilder:ListImageRecipes"], "Resource": "arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-recipe/1.0.0"}]}',
    'requestId' => '0cf42efc-4b2c-4ba3-b6e3-542a796fffaf',
]

GetInfrastructureConfiguration

$result = $client->getInfrastructureConfiguration([/* ... */]);
$promise = $client->getInfrastructureConfigurationAsync([/* ... */]);

Retrieves an infrastructure configuration.

Parameter Syntax

$result = $client->getInfrastructureConfiguration([
    'infrastructureConfigurationArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
infrastructureConfigurationArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the infrastructure configuration that you want to retrieve.

Result Syntax

[
    'infrastructureConfiguration' => [
        'arn' => '<string>',
        'dateCreated' => '<string>',
        'dateUpdated' => '<string>',
        'description' => '<string>',
        'instanceMetadataOptions' => [
            'httpPutResponseHopLimit' => <integer>,
            'httpTokens' => '<string>',
        ],
        'instanceProfileName' => '<string>',
        'instanceTypes' => ['<string>', ...],
        'keyPair' => '<string>',
        'logging' => [
            's3Logs' => [
                's3BucketName' => '<string>',
                's3KeyPrefix' => '<string>',
            ],
        ],
        'name' => '<string>',
        'placement' => [
            'availabilityZone' => '<string>',
            'hostId' => '<string>',
            'hostResourceGroupArn' => '<string>',
            'tenancy' => 'default|dedicated|host',
        ],
        'resourceTags' => ['<string>', ...],
        'securityGroupIds' => ['<string>', ...],
        'snsTopicArn' => '<string>',
        'subnetId' => '<string>',
        'tags' => ['<string>', ...],
        'terminateInstanceOnFailure' => true || false,
    ],
    'requestId' => '<string>',
]

Result Details

Members
infrastructureConfiguration
Type: InfrastructureConfiguration structure

The infrastructure configuration object.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: Get the details of an infrastructure configuration

The following example retrieves an infrastructure configuration that specifies the instance types, instance profile, and instance metadata options that Image Builder uses for build and test instances.

$result = $client->getInfrastructureConfiguration([
    'infrastructureConfigurationArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:infrastructure-configuration/my-example-infrastructure-configuration',
]);

Result syntax:

[
    'infrastructureConfiguration' => [
        'name' => 'my-example-infrastructure-configuration',
        'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:infrastructure-configuration/my-example-infrastructure-configuration',
        'dateCreated' => '2026-09-09T19:36:48.933Z',
        'description' => 'Infrastructure configuration for my application image builds',
        'instanceMetadataOptions' => [
            'httpPutResponseHopLimit' => 2,
            'httpTokens' => 'required',
        ],
        'instanceProfileName' => 'EC2InstanceProfileForImageBuilder',
        'instanceTypes' => [
            'm5.large',
            'm5.xlarge',
        ],
        'resourceTags' => [
            'CostCenter' => '12345',
        ],
        'tags' => [
            'Environment' => 'test',
        ],
        'terminateInstanceOnFailure' => 1,
    ],
    'requestId' => '7ba25cd0-0735-4f44-bc67-2f231e96503f',
]

GetLifecycleExecution

$result = $client->getLifecycleExecution([/* ... */]);
$promise = $client->getLifecycleExecutionAsync([/* ... */]);

Retrieves runtime information for a lifecycle execution – a single run of lifecycle actions that a lifecycle policy or a StartResourceStateUpdate request started.

Parameter Syntax

$result = $client->getLifecycleExecution([
    'lifecycleExecutionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
lifecycleExecutionId
Required: Yes
Type: string

The unique identifier for a runtime instance of the lifecycle policy.

Result Syntax

[
    'lifecycleExecution' => [
        'endTime' => <DateTime>,
        'lifecycleExecutionId' => '<string>',
        'lifecyclePolicyArn' => '<string>',
        'resourcesImpactedSummary' => [
            'hasImpactedResources' => true || false,
        ],
        'startTime' => <DateTime>,
        'state' => [
            'reason' => '<string>',
            'status' => 'IN_PROGRESS|CANCELLED|CANCELLING|FAILED|SUCCESS|PENDING',
        ],
    ],
]

Result Details

Members
lifecycleExecution
Type: LifecycleExecution structure

Runtime details for the specified runtime instance of the lifecycle policy.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: Get the details of a lifecycle execution

The following example retrieves the runtime status of the specified lifecycle execution. If the execution was started by StartResourceStateUpdate rather than a lifecycle policy run, the response doesn't include the lifecyclePolicyArn field.

$result = $client->getLifecycleExecution([
    'lifecycleExecutionId' => 'lce-401aefc3-a829-46f6-8fc2-91497988a503',
]);

Result syntax:

[
    'lifecycleExecution' => [
        'lifecycleExecutionId' => 'lce-401aefc3-a829-46f6-8fc2-91497988a503',
        'resourcesImpactedSummary' => [
            'hasImpactedResources' => ,
        ],
        'startTime' => ,
        'state' => [
            'status' => 'IN_PROGRESS',
        ],
    ],
]

GetLifecyclePolicy

$result = $client->getLifecyclePolicy([/* ... */]);
$promise = $client->getLifecyclePolicyAsync([/* ... */]);

Retrieves details for the specified image lifecycle policy.

Parameter Syntax

$result = $client->getLifecyclePolicy([
    'lifecyclePolicyArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
lifecyclePolicyArn
Required: Yes
Type: string

Specifies the Amazon Resource Name (ARN) of the image lifecycle policy resource to get.

Result Syntax

[
    'lifecyclePolicy' => [
        'arn' => '<string>',
        'dateCreated' => <DateTime>,
        'dateLastRun' => <DateTime>,
        'dateUpdated' => <DateTime>,
        'description' => '<string>',
        'executionRole' => '<string>',
        'name' => '<string>',
        'policyDetails' => [
            [
                'action' => [
                    'includeResources' => [
                        'amis' => true || false,
                        'containers' => true || false,
                        'snapshots' => true || false,
                    ],
                    'type' => 'DELETE|DEPRECATE|DISABLE',
                ],
                'exclusionRules' => [
                    'amis' => [
                        'isPublic' => true || false,
                        'lastLaunched' => [
                            'unit' => 'DAYS|WEEKS|MONTHS|YEARS',
                            'value' => <integer>,
                        ],
                        'regions' => ['<string>', ...],
                        'sharedAccounts' => ['<string>', ...],
                        'tagMap' => ['<string>', ...],
                    ],
                    'tagMap' => ['<string>', ...],
                ],
                'filter' => [
                    'retainAtLeast' => <integer>,
                    'type' => 'AGE|COUNT',
                    'unit' => 'DAYS|WEEKS|MONTHS|YEARS',
                    'value' => <integer>,
                ],
            ],
            // ...
        ],
        'resourceSelection' => [
            'recipes' => [
                [
                    'name' => '<string>',
                    'semanticVersion' => '<string>',
                ],
                // ...
            ],
            'tagMap' => ['<string>', ...],
        ],
        'resourceType' => 'AMI_IMAGE|CONTAINER_IMAGE',
        'status' => 'DISABLED|ENABLED',
        'tags' => ['<string>', ...],
    ],
]

Result Details

Members
lifecyclePolicy
Type: LifecyclePolicy structure

The details of the lifecycle policy that the request retrieved.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: Get the details of a lifecycle policy

The following example retrieves the full definition of the specified lifecycle policy.

$result = $client->getLifecyclePolicy([
    'lifecyclePolicyArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:lifecycle-policy/my-example-lifecycle-policy',
]);

Result syntax:

[
    'lifecyclePolicy' => [
        'name' => 'my-example-lifecycle-policy',
        'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:lifecycle-policy/my-example-lifecycle-policy',
        'dateCreated' => ,
        'description' => 'Deletes AMIs and snapshots for builds older than six months, keeping at least the five most recent',
        'executionRole' => 'arn:aws:iam::111122223333:role/my-example-lifecycle-role',
        'policyDetails' => [
            [
                'action' => [
                    'type' => 'DELETE',
                    'includeResources' => [
                        'amis' => 1,
                        'snapshots' => 1,
                    ],
                ],
                'filter' => [
                    'type' => 'AGE',
                    'value' => 6,
                    'retainAtLeast' => 5,
                    'unit' => 'MONTHS',
                ],
            ],
        ],
        'resourceSelection' => [
            'tagMap' => [
                'Environment' => 'my-example-environment',
            ],
        ],
        'resourceType' => 'AMI_IMAGE',
        'status' => 'ENABLED',
    ],
]

GetMarketplaceResource

$result = $client->getMarketplaceResource([/* ... */]);
$promise = $client->getMarketplaceResourceAsync([/* ... */]);

Verifies the subscription and performs resource dependency checks on the requested Amazon Web Services Marketplace resource. The caller must be entitled to the resource. For Amazon Web Services Marketplace components, the response contains fields to download the components and their artifacts.

Parameter Syntax

$result = $client->getMarketplaceResource([
    'resourceArn' => '<string>', // REQUIRED
    'resourceLocation' => '<string>',
    'resourceType' => 'COMPONENT_DATA|COMPONENT_ARTIFACT', // REQUIRED
]);

Parameter Details

Members
resourceArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) that uniquely identifies an Amazon Web Services Marketplace resource.

resourceLocation
Type: string

The Amazon S3 location of the component artifact to retrieve, in s3://bucket/key form.

resourceType
Required: Yes
Type: string

Specifies which type of Amazon Web Services Marketplace resource Image Builder retrieves.

Result Syntax

[
    'data' => '<string>',
    'resourceArn' => '<string>',
    'url' => '<string>',
]

Result Details

Members
data
Type: string

Returns obfuscated data that contains the YAML content of the component.

resourceArn
Type: string

The Amazon Resource Name (ARN) for the Amazon Web Services Marketplace resource that was requested.

url
Type: string

A time-limited presigned URL for downloading the component artifact from Amazon S3.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

GetWorkflow

$result = $client->getWorkflow([/* ... */]);
$promise = $client->getWorkflowAsync([/* ... */]);

Retrieves a workflow resource object.

Parameter Syntax

$result = $client->getWorkflow([
    'workflowBuildVersionArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
workflowBuildVersionArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the workflow resource that you want to get. You can specify a build version ARN, or a version ARN with or without wildcards (x) in its version segments. Image Builder resolves version and wildcard ARNs to the most recent matching build version.

Result Syntax

[
    'latestVersionReferences' => [
        'latestMajorVersionArn' => '<string>',
        'latestMinorVersionArn' => '<string>',
        'latestPatchVersionArn' => '<string>',
        'latestVersionArn' => '<string>',
    ],
    'workflow' => [
        'arn' => '<string>',
        'changeDescription' => '<string>',
        'data' => '<string>',
        'dateCreated' => '<string>',
        'description' => '<string>',
        'kmsKeyId' => '<string>',
        'name' => '<string>',
        'owner' => '<string>',
        'parameters' => [
            [
                'defaultValue' => ['<string>', ...],
                'description' => '<string>',
                'name' => '<string>',
                'type' => '<string>',
            ],
            // ...
        ],
        'state' => [
            'reason' => '<string>',
            'status' => 'DEPRECATED',
        ],
        'tags' => ['<string>', ...],
        'type' => 'BUILD|TEST|DISTRIBUTION',
        'version' => '<string>',
    ],
]

Result Details

Members
latestVersionReferences
Type: LatestVersionReferences structure

A set of wildcard version ARNs that always reference the latest version of the resource. ARNs are included for the latest version overall, and for the latest versions within the same major, minor, and patch levels.

workflow
Type: Workflow structure

The workflow resource specified in the request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: Get the details of a workflow build version

The following example retrieves a workflow build version. The response includes the YAML workflow document in the data field and the parameters that Image Builder extracted from it when the workflow was created.

$result = $client->getWorkflow([
    'workflowBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:workflow/build/my-example-workflow/1.0.0/1',
]);

Result syntax:

[
    'latestVersionReferences' => [
        'latestMajorVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:workflow/build/my-example-workflow/1.x.x',
        'latestMinorVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:workflow/build/my-example-workflow/1.0.x',
        'latestPatchVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:workflow/build/my-example-workflow/1.0.0',
        'latestVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:workflow/build/my-example-workflow/x.x.x',
    ],
    'workflow' => [
        'version' => '1.0.0',
        'name' => 'my-example-workflow',
        'type' => 'BUILD',
        'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:workflow/build/my-example-workflow/1.0.0/1',
        'changeDescription' => 'Initial version',
        'data' => 'name: my-example-workflowdescription: Workflow to build an AMI, then wait for an external action before it completesschemaVersion: 1.0parameters: - name: waitForActionAtEnd type: boolean default: truesteps: - name: LaunchBuildInstance action: LaunchInstance onFailure: Abort inputs: waitFor: "ssmAgent" - name: ApplyBuildComponents action: ExecuteComponents onFailure: Abort inputs: instanceId.$: "$.stepOutputs.LaunchBuildInstance.instanceId" - name: CreateOutputAMI action: CreateImage onFailure: Abort inputs: instanceId.$: "$.stepOutputs.LaunchBuildInstance.instanceId" - name: TerminateBuildInstance action: TerminateInstance onFailure: Continue inputs: instanceId.$: "$.stepOutputs.LaunchBuildInstance.instanceId" - name: WaitForActionAtEnd action: WaitForAction if: booleanEquals: true value: "$.parameters.waitForActionAtEnd"',
        'dateCreated' => '2026-09-09T19:55:55.731Z',
        'description' => 'Builds an AMI, and then waits for an external action before the workflow completes',
        'owner' => '111122223333',
        'parameters' => [
            [
                'name' => 'waitForActionAtEnd',
                'type' => 'boolean',
                'defaultValue' => [
                    'true',
                ],
            ],
        ],
    ],
]

GetWorkflowExecution

$result = $client->getWorkflowExecution([/* ... */]);
$promise = $client->getWorkflowExecutionAsync([/* ... */]);

Retrieves runtime information for a specific runtime instance of the workflow.

Parameter Syntax

$result = $client->getWorkflowExecution([
    'workflowExecutionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
workflowExecutionId
Required: Yes
Type: string

Use the unique identifier for a runtime instance of the workflow to get runtime details.

Result Syntax

[
    'endTime' => '<string>',
    'imageBuildVersionArn' => '<string>',
    'message' => '<string>',
    'parallelGroup' => '<string>',
    'requestId' => '<string>',
    'startTime' => '<string>',
    'status' => 'PENDING|SKIPPED|RUNNING|COMPLETED|FAILED|ROLLBACK_IN_PROGRESS|ROLLBACK_COMPLETED|CANCELLED',
    'totalStepCount' => <integer>,
    'totalStepsFailed' => <integer>,
    'totalStepsSkipped' => <integer>,
    'totalStepsSucceeded' => <integer>,
    'type' => 'BUILD|TEST|DISTRIBUTION',
    'workflowBuildVersionArn' => '<string>',
    'workflowExecutionId' => '<string>',
]

Result Details

Members
endTime
Type: string

The timestamp when the specified runtime instance of the workflow finished.

imageBuildVersionArn
Type: string

The Amazon Resource Name (ARN) of the image build version that owns the specified runtime instance of the workflow.

message
Type: string

The output message from the specified runtime instance of the workflow, if applicable.

parallelGroup
Type: string

The name of the parallel group that this runtime instance of the workflow ran in, if configured. Parallel groups apply only to test workflows.

requestId
Type: string

The request ID that uniquely identifies this request.

startTime
Type: string

The timestamp when the specified runtime instance of the workflow started.

status
Type: string

The current runtime status for the specified runtime instance of the workflow. COMPLETED, FAILED, ROLLBACK_COMPLETED, CANCELLED, and SKIPPED are terminal states.

totalStepCount
Type: int

The total number of steps that the workflow document defines for this runtime instance of the workflow. Image Builder sets this count before any steps run. The sum of succeeded, skipped, and failed steps only reaches this total if every step finishes in one of those states.

totalStepsFailed
Type: int

A runtime count for the number of steps that failed in the specified runtime instance of the workflow.

totalStepsSkipped
Type: int

A runtime count for the number of steps that were skipped in the specified runtime instance of the workflow.

totalStepsSucceeded
Type: int

A runtime count for the number of steps that ran successfully in the specified runtime instance of the workflow.

type
Type: string

The type of workflow that Image Builder ran for the specified runtime instance of the workflow.

workflowBuildVersionArn
Type: string

The Amazon Resource Name (ARN) of the build version for the Image Builder workflow resource that defines the specified runtime instance of the workflow.

workflowExecutionId
Type: string

The unique identifier that Image Builder assigned to keep track of runtime details when it ran the workflow.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: Get the runtime details for a workflow execution

The following example retrieves runtime status and step counts for the build workflow that ran for an image build version, using the workflow execution ID returned by ListWorkflowExecutions.

$result = $client->getWorkflowExecution([
    'workflowExecutionId' => 'wf-165b1cb6-3a62-4618-a021-94ddcbe32908',
]);

Result syntax:

[
    'type' => 'BUILD',
    'endTime' => '2026-09-09T19:19:06.158Z',
    'imageBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1',
    'requestId' => 'cd69c813-51c3-4261-8e59-382a1af96f73',
    'startTime' => '2026-09-09T19:12:23.175Z',
    'status' => 'COMPLETED',
    'totalStepCount' => 7,
    'totalStepsFailed' => 0,
    'totalStepsSkipped' => 2,
    'totalStepsSucceeded' => 5,
    'workflowBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:aws:workflow/build/build-image/1.0.3/1',
    'workflowExecutionId' => 'wf-165b1cb6-3a62-4618-a021-94ddcbe32908',
]

GetWorkflowStepExecution

$result = $client->getWorkflowStepExecution([/* ... */]);
$promise = $client->getWorkflowStepExecutionAsync([/* ... */]);

Retrieves runtime information for a specific runtime instance of the workflow step.

Parameter Syntax

$result = $client->getWorkflowStepExecution([
    'stepExecutionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
stepExecutionId
Required: Yes
Type: string

The unique identifier for the runtime instance of the workflow step that you want to get runtime details for. To get the identifiers for the steps that ran in a workflow, call ListWorkflowStepExecutions.

Result Syntax

[
    'action' => '<string>',
    'attemptNumber' => <integer>,
    'description' => '<string>',
    'endTime' => '<string>',
    'imageBuildVersionArn' => '<string>',
    'inputs' => '<string>',
    'maxAttempts' => <integer>,
    'message' => '<string>',
    'name' => '<string>',
    'onFailure' => '<string>',
    'outputs' => '<string>',
    'requestId' => '<string>',
    'rollbackStatus' => 'RUNNING|COMPLETED|SKIPPED|FAILED',
    'startTime' => '<string>',
    'status' => 'PENDING|SKIPPED|RUNNING|COMPLETED|FAILED|CANCELLED',
    'stepExecutionId' => '<string>',
    'timeoutSeconds' => <integer>,
    'workflowBuildVersionArn' => '<string>',
    'workflowExecutionId' => '<string>',
]

Result Details

Members
action
Type: string

The name of the action that the specified step performs.

attemptNumber
Type: int

The current attempt number for the specified runtime instance of the workflow step. The first run is attempt one. The number increases by one for each retry.

description
Type: string

Describes the specified workflow step.

endTime
Type: string

The timestamp when the specified runtime instance of the workflow step finished.

imageBuildVersionArn
Type: string

The Amazon Resource Name (ARN) of the image build version that owns the specified runtime instance of the workflow step.

inputs
Type: string

Input parameters that Image Builder provided for the specified runtime instance of the workflow step, as a JSON-encoded string.

maxAttempts
Type: int

The maximum number of attempts allowed for the specified runtime instance of the workflow step, based on the retry configuration in the workflow document. If the step doesn't configure retries, the maximum is one attempt.

message
Type: string

The output message from the specified runtime instance of the workflow step, if applicable.

name
Type: string

The name of the specified runtime instance of the workflow step.

onFailure
Type: string

The action that the workflow takes if this step fails, as configured in the workflow document. Abort fails the workflow and rolls back completed steps. Continue proceeds to the next step. If the step doesn't set a value, it defaults to Abort.

outputs
Type: string

The output values that the specified runtime instance of the workflow step produced, as a JSON-encoded string. For example, a step that launches an instance outputs the instance ID. If the step failed, this field contains the error message.

requestId
Type: string

The request ID that uniquely identifies this request.

rollbackStatus
Type: string

Reports on the rollback status of the specified runtime instance of the workflow step, if applicable. Rollback runs when the workflow execution fails, and undoes the work that completed steps performed.

startTime
Type: string

The timestamp when the specified runtime instance of the workflow step started.

status
Type: string

The current status for the specified runtime instance of the workflow step.

stepExecutionId
Type: string

The unique identifier for the runtime instance of the workflow step that you specified in the request.

timeoutSeconds
Type: int

The maximum duration in seconds for this step to complete its action. If the workflow document doesn't set a timeout for the step, Image Builder applies the default timeout for the step's action. This field returns that value.

workflowBuildVersionArn
Type: string

The Amazon Resource Name (ARN) of the build version for the Image Builder workflow resource that defines this workflow step.

workflowExecutionId
Type: string

The unique identifier that Image Builder assigned to keep track of runtime details when it ran the workflow.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: Get the runtime details of a workflow step

The following example retrieves runtime details for the step that launched the build instance during an image build, with the step's input parameters and output values returned as JSON-encoded strings.

$result = $client->getWorkflowStepExecution([
    'stepExecutionId' => 'step-2e6fef0d-657c-4b7e-8706-ff24da9afa01',
]);

Result syntax:

[
    'name' => 'LaunchBuildInstance',
    'action' => 'LaunchInstance',
    'endTime' => '2026-09-09T19:14:50.822Z',
    'imageBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1',
    'inputs' => '{"waitFor": "ssmAgent"}',
    'onFailure' => 'Abort',
    'outputs' => '{"instanceId": "i-1234567890abcdef0"}',
    'requestId' => '9ba63d27-9568-4ea3-bfed-6b1ad4c09200',
    'startTime' => '2026-09-09T19:12:23.418Z',
    'status' => 'COMPLETED',
    'stepExecutionId' => 'step-2e6fef0d-657c-4b7e-8706-ff24da9afa01',
    'timeoutSeconds' => 4500,
    'workflowBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:aws:workflow/build/build-image/1.0.3/1',
    'workflowExecutionId' => 'wf-165b1cb6-3a62-4618-a021-94ddcbe32908',
]

ImportComponent

$result = $client->importComponent([/* ... */]);
$promise = $client->importComponentAsync([/* ... */]);

Imports a component and transforms its data into a component document. For the SHELL format, Image Builder wraps your script in a component document with a single step that runs the script.

Parameter Syntax

$result = $client->importComponent([
    'changeDescription' => '<string>',
    'clientToken' => '<string>', // REQUIRED
    'data' => '<string>',
    'description' => '<string>',
    'format' => 'SHELL', // REQUIRED
    'kmsKeyId' => '<string>',
    'name' => '<string>', // REQUIRED
    'platform' => 'Windows|Linux|macOS', // REQUIRED
    'semanticVersion' => '<string>', // REQUIRED
    'tags' => ['<string>', ...],
    'type' => 'BUILD|TEST', // REQUIRED
    'uri' => '<string>',
]);

Parameter Details

Members
changeDescription
Type: string

The change description of the component. This description indicates the change that has been made in this version, or what makes this version different from other versions of the component.

clientToken
Required: Yes
Type: string

A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.

data
Type: string

The data of the component. For the SHELL format, this is the plain script content. You must specify exactly one of the data or uri properties. For scripts that exceed the inline length constraint, use the uri property.

description
Type: string

The description of the component. Describes the contents of the component.

format
Required: Yes
Type: string

The format of the resource that you want to import as a component.

kmsKeyId
Type: string

The Amazon Resource Name (ARN) of the KMS key that is used to encrypt this component. This can be either the Key ARN or the Alias ARN. For more information, see Key identifiers (KeyId) in the Key Management Service Developer Guide. If you don't specify a key, Image Builder encrypts the component data with a KMS key that Image Builder owns.

name
Required: Yes
Type: string

The name of the component. Image Builder generates the component ARN from a normalized form of the name, so names that differ only in case, spaces, or underscores count as the same name. If a component with the same name and semantic version already exists in your account in the same Amazon Web Services Region, the request creates a new build version for it. If the content is also identical to the latest build version, the request fails because the component already exists.

platform
Required: Yes
Type: string

The platform of the component.

semanticVersion
Required: Yes
Type: string

The semantic version of the component. This version follows the semantic version syntax.

The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign values for the first three, and can filter on all of them.

Assignment: For the first three nodes, you can assign any positive integer value, including zero. The upper limit is 2^30-1, or 1073741823, for each node. Image Builder automatically assigns the build number to the fourth node.

Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as 2021.01.01.

tags
Type: Associative array of custom strings keys (TagKey) to strings

The tags of the component.

type
Required: Yes
Type: string

The type of the component denotes whether the component is used to build the image, or only to test it.

uri
Type: string

The uri of the component. Must be an Amazon S3 URL and you must have permission to access the Amazon S3 bucket. If you use Amazon S3, you can specify component content up to your service quota. Either data or uri can be used to specify the data within the component.

Result Syntax

[
    'clientToken' => '<string>',
    'componentBuildVersionArn' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
clientToken
Type: string

The client token that uniquely identifies the request.

componentBuildVersionArn
Type: string

The Amazon Resource Name (ARN) of the imported component.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

IdempotentParameterMismatchException:

You have specified a client token for an operation using parameter values that differ from a previous request that used the same client token.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

InvalidVersionNumberException:

Your version number is out of bounds or does not follow the required syntax.

ResourceInUseException:

The resource that you are trying to operate on is currently in use. Review the message details and retry later.

InvalidParameterCombinationException:

You have specified a combination of parameters that isn't valid. For example, two mutually exclusive parameters, or a parameter without its required companion parameter. Review the error message for details.

Examples

Example 1: Import a component from a shell script

The following example imports a plain shell script as a Linux build component.

$result = $client->importComponent([
    'name' => 'my-example-imported-component',
    'type' => 'BUILD',
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE88888',
    'data' => 'sudo yum update -ysudo yum -y install my-app',
    'description' => 'Installs my application from an imported shell script',
    'format' => 'SHELL',
    'platform' => 'Linux',
    'semanticVersion' => '1.0.0',
]);

Result syntax:

[
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE88888',
    'componentBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-imported-component/1.0.0/1',
    'requestId' => 'e62cb87f-e291-4fb2-9305-54a7878c3b99',
]

ImportDiskImage

$result = $client->importDiskImage([/* ... */]);
$promise = $client->importDiskImageAsync([/* ... */]);

Imports a Windows operating system image from a verified Microsoft ISO disk file. The following disk images are supported:

  • Windows 11 Enterprise

The response returns as soon as Image Builder creates the new image resource in the PENDING state. The conversion from ISO file to AMI then runs asynchronously on an EC2 instance that Image Builder launches with the specified infrastructure configuration.

Parameter Syntax

$result = $client->importDiskImage([
    'clientToken' => '<string>', // REQUIRED
    'description' => '<string>',
    'executionRole' => '<string>',
    'infrastructureConfigurationArn' => '<string>', // REQUIRED
    'loggingConfiguration' => [
        'logGroupName' => '<string>',
    ],
    'name' => '<string>', // REQUIRED
    'osVersion' => '<string>', // REQUIRED
    'platform' => '<string>', // REQUIRED
    'registerImageOptions' => [
        'secureBootEnabled' => true || false,
        'uefiData' => '<string>',
    ],
    'semanticVersion' => '<string>', // REQUIRED
    'tags' => ['<string>', ...],
    'uri' => '<string>', // REQUIRED
    'windowsConfiguration' => [
        'imageIndex' => <integer>, // REQUIRED
    ],
]);

Parameter Details

Members
clientToken
Required: Yes
Type: string

A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.

description
Type: string

The description for your disk image import.

executionRole
Type: string

The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to perform workflow actions to import an image from a Microsoft ISO file. If you don't provide a role, Image Builder uses the Image Builder service-linked role in your account, and creates it if it doesn't exist.

infrastructureConfigurationArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the infrastructure configuration resource that's used for launching the EC2 instance on which the ISO image is built.

loggingConfiguration
Type: ImageLoggingConfiguration structure

The CloudWatch Logs log group where Image Builder sends the import logs. If you specify a log group name outside of the /aws/imagebuilder/ namespace, you must also provide an executionRole that has permission to write to that log group.

name
Required: Yes
Type: string

The name of the image resource that's created from the import. Image Builder generates the image ARN from a normalized form of the name, so names that differ only in case, spaces, or underscores count as the same name. If an image with the same name and semantic version already exists in your account in the same Amazon Web Services Region, the import creates a new build version for it.

osVersion
Required: Yes
Type: string

The operating system version for the imported image. The only supported value is Microsoft Windows 11.

platform
Required: Yes
Type: string

The operating system platform for the imported image. Allowed values include the following: Windows.

registerImageOptions
Type: RegisterImageOptions structure

Configures Secure Boot and UEFI settings for the imported image.

semanticVersion
Required: Yes
Type: string

The semantic version to attach to the image that's created during the import process. This version follows the semantic version syntax.

tags
Type: Associative array of custom strings keys (TagKey) to strings

Tags that are attached to image resources created from the import.

uri
Required: Yes
Type: string

The uri of the ISO disk file that's stored in Amazon S3, in s3://bucket/key format. The key must end with the .iso, .ISO, or .Iso extension, and the bucket must be owned by the account that makes the request.

windowsConfiguration
Type: WindowsConfiguration structure

Specifies Windows settings for ISO imports.

Result Syntax

[
    'clientToken' => '<string>',
    'imageBuildVersionArn' => '<string>',
]

Result Details

Members
clientToken
Type: string

The client token that uniquely identifies the request.

imageBuildVersionArn
Type: string

The Amazon Resource Name (ARN) of the Image Builder image resource that this request created. The AMI doesn't exist yet when the response returns. The import runs asynchronously, and the output AMI appears in the image's output resources when the import completes.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

AccessDeniedException:

You do not have permissions to perform the requested operation.

TooManyRequestsException:

You have attempted too many requests for the specific operation.

Examples

Example 1: Import a Windows 11 ISO disk image

The following example starts an image build that converts a Windows 11 ISO disk file stored in Amazon S3 into an AMI; the imageBuildVersionArn in the response identifies the Image Builder image resource that tracks the build, not the output AMI.

$result = $client->importDiskImage([
    'name' => 'my-example-imported-image',
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE12345',
    'infrastructureConfigurationArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:infrastructure-configuration/my-example-infrastructure',
    'osVersion' => 'Microsoft Windows 11',
    'platform' => 'Windows',
    'semanticVersion' => '1.0.0',
    'uri' => 's3://amzn-s3-demo-bucket/Win11_23H2_English_x64.iso',
]);

Result syntax:

[
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE12345',
    'imageBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-imported-image/1.0.0/1',
]

ImportVmImage

$result = $client->importVmImage([/* ... */]);
$promise = $client->importVmImageAsync([/* ... */]);

Creates an Image Builder image resource from an Amazon EC2 VM import task. The response returns as soon as Image Builder creates the image resource in the PENDING state. Image Builder then monitors the import task asynchronously. When the task completes, Image Builder records the AMI that it produced as the new image's output resource and marks the image AVAILABLE. You can then use the imported image as the base image for your recipes.

To create the VM import task, use the Amazon EC2 API ImportImage operation, or the import-image CLI command.

Parameter Syntax

$result = $client->importVmImage([
    'clientToken' => '<string>', // REQUIRED
    'description' => '<string>',
    'loggingConfiguration' => [
        'logGroupName' => '<string>',
    ],
    'name' => '<string>', // REQUIRED
    'osVersion' => '<string>',
    'platform' => 'Windows|Linux|macOS', // REQUIRED
    'semanticVersion' => '<string>', // REQUIRED
    'tags' => ['<string>', ...],
    'vmImportTaskId' => '<string>', // REQUIRED
]);

Parameter Details

Members
clientToken
Required: Yes
Type: string

A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.

description
Type: string

The description for the base image that is created by the import process.

loggingConfiguration
Type: ImageLoggingConfiguration structure

The CloudWatch Logs log group where Image Builder sends the import logs. For ImportVmImage, the log group name must be within the /aws/imagebuilder/ namespace.

name
Required: Yes
Type: string

The name of the base image that is created by the import process. Image Builder generates the image ARN from a normalized form of the name, so names that differ only in case, spaces, or underscores count as the same name. If an image with the same name and semantic version already exists in your account in the same Amazon Web Services Region, the import creates a new build version for it.

osVersion
Type: string

The operating system version for the imported VM.

platform
Required: Yes
Type: string

The operating system platform for the imported VM.

semanticVersion
Required: Yes
Type: string

The semantic version to attach to the base image that was created during the import process. This version follows the semantic version syntax.

The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign values for the first three, and can filter on all of them.

Assignment: For the first three nodes, you can assign any positive integer value, including zero. The upper limit is 2^30-1, or 1073741823, for each node. Image Builder automatically assigns the build number to the fourth node.

Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as 2021.01.01.

tags
Type: Associative array of custom strings keys (TagKey) to strings

Tags that are attached to the import resources.

vmImportTaskId
Required: Yes
Type: string

The importTaskId (API) or ImportTaskId (CLI) from the Amazon EC2 VM import process. The import task doesn't need to be complete when you call ImportVmImage - Image Builder monitors the task and finishes creating the image when the task completes.

Result Syntax

[
    'clientToken' => '<string>',
    'imageArn' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
clientToken
Type: string

The client token that uniquely identifies the request.

imageArn
Type: string

The Amazon Resource Name (ARN) of the Image Builder image resource that this request created. Image Builder records the AMI from the VM import task in the image's output resources after the task completes.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

Examples

Example 1: Import a virtual machine as an Image Builder image

The following example registers the output of an EC2 VM Import/Export task (import-ami) as a new Image Builder image, so you can use the imported virtual machine as a base image.

$result = $client->importVmImage([
    'name' => 'my-example-imported-image',
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE00000',
    'osVersion' => 'Amazon Linux 2',
    'platform' => 'Linux',
    'semanticVersion' => '1.0.0',
    'vmImportTaskId' => 'import-ami-1234567890abcdef0',
]);

Result syntax:

[
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE00000',
    'imageArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-imported-image/1.0.0/1',
    'requestId' => 'f8a1d0ce-42b7-4d6a-9b12-3c84a02e5f19',
]

ListComponentBuildVersions

$result = $client->listComponentBuildVersions([/* ... */]);
$promise = $client->listComponentBuildVersionsAsync([/* ... */]);

Returns a list of component build versions for the specified component version ARN. You can only list build versions for components that your account owns. Deprecated build versions aren't included in the results.

Parameter Syntax

$result = $client->listComponentBuildVersions([
    'componentVersionArn' => '<string>',
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
componentVersionArn
Type: string

The component version ARN whose build versions you want to list. The ARN must specify an exact version, without a build number suffix. If you don't specify an ARN, Image Builder returns build versions for the components that your account owns.

maxResults
Type: int

The maximum number of items to return in a single request.

nextToken
Type: string

A token to specify where to start paginating. Use the nextToken value from a previously truncated response.

Result Syntax

[
    'componentSummaryList' => [
        [
            'arn' => '<string>',
            'changeDescription' => '<string>',
            'dateCreated' => '<string>',
            'description' => '<string>',
            'name' => '<string>',
            'obfuscate' => true || false,
            'owner' => '<string>',
            'platform' => 'Windows|Linux|macOS',
            'publisher' => '<string>',
            'state' => [
                'reason' => '<string>',
                'status' => 'DEPRECATED|DISABLED|ACTIVE',
            ],
            'supportedOsVersions' => ['<string>', ...],
            'tags' => ['<string>', ...],
            'type' => 'BUILD|TEST',
            'version' => '<string>',
        ],
        // ...
    ],
    'nextToken' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
componentSummaryList
Type: Array of ComponentSummary structures

The list of component summaries. Each summary represents one build version of the specified component version, or of the components that your account owns if you didn't specify an ARN. Deprecated build versions aren't included.

nextToken
Type: string

The next token used for paginated responses. When this field isn't empty, there are additional elements that the service hasn't included in this request. Use this token with the next request to retrieve additional objects.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

InvalidPaginationTokenException:

You have provided an invalid pagination token in your request.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: List the build versions of a component

The following example lists the build versions that exist for version 1.0.0 of the specified component. The list returns the most recent build version first.

$result = $client->listComponentBuildVersions([
    'componentVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-component/1.0.0',
]);

Result syntax:

[
    'componentSummaryList' => [
        [
            'version' => '1.0.0',
            'name' => 'my-example-component',
            'type' => 'BUILD',
            'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-component/1.0.0/2',
            'changeDescription' => 'Updated the install command to use dnf',
            'dateCreated' => '2026-09-09T18:35:23.098Z',
            'description' => 'Installs the latest version of my application',
            'owner' => '111122223333',
            'platform' => 'Linux',
            'state' => [
                'status' => 'ACTIVE',
            ],
            'supportedOsVersions' => [
                'Amazon Linux 2023',
            ],
            'tags' => [
                'Environment' => 'Production',
            ],
        ],
        [
            'version' => '1.0.0',
            'name' => 'my-example-component',
            'type' => 'BUILD',
            'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-component/1.0.0/1',
            'changeDescription' => 'Initial version',
            'dateCreated' => '2026-09-09T18:35:20.731Z',
            'description' => 'Installs the latest version of my application',
            'owner' => '111122223333',
            'platform' => 'Linux',
            'state' => [
                'status' => 'ACTIVE',
            ],
            'supportedOsVersions' => [
                'Amazon Linux 2023',
            ],
            'tags' => [
                'Environment' => 'Production',
            ],
        ],
    ],
    'requestId' => '1d8693f0-26e1-42d7-ba35-d95ace1ce7e0',
]

ListComponents

$result = $client->listComponents([/* ... */]);
$promise = $client->listComponentsAsync([/* ... */]);

Returns the list of components that you have access to. By default, the response doesn't include components in the DEPRECATED state. To list deprecated components, use the status filter with the value DEPRECATED.

The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign values for the first three, and can filter on all of them.

Filtering: You can use wildcards (x) to specify the most recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards.

Parameter Syntax

$result = $client->listComponents([
    'byName' => true || false,
    'filters' => [
        [
            'name' => '<string>',
            'values' => ['<string>', ...],
        ],
        // ...
    ],
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'owner' => 'Self|Shared|Amazon|ThirdParty|AWSMarketplace',
]);

Parameter Details

Members
byName
Type: boolean

Specifies whether to return one entry per component name, with all versions of each component aggregated. Defaults to false, which returns one entry per component version. You can't combine this option with the version filter.

filters
Type: Array of Filter structures

Use the following filters to streamline results:

  • description

  • name

  • platform

  • productCodes

  • status

  • supportedOsVersion

  • type

  • version

maxResults
Type: int

The maximum number of items to return in a single request.

nextToken
Type: string

A token to specify where to start paginating. Use the nextToken value from a previously truncated response.

owner
Type: string

Filters results based on the type of owner for the component. By default, this request returns a list of components that your account owns. To see results for other types of owners, you can specify components that Amazon manages, components from the Amazon Web Services Marketplace, third party components, or components that other accounts have shared with you.

Result Syntax

[
    'componentVersionList' => [
        [
            'arn' => '<string>',
            'dateCreated' => '<string>',
            'description' => '<string>',
            'name' => '<string>',
            'owner' => '<string>',
            'platform' => 'Windows|Linux|macOS',
            'productCodes' => [
                [
                    'productCodeId' => '<string>',
                    'productCodeType' => 'marketplace',
                ],
                // ...
            ],
            'status' => 'DEPRECATED|DISABLED|ACTIVE',
            'supportedOsVersions' => ['<string>', ...],
            'type' => 'BUILD|TEST',
            'version' => '<string>',
        ],
        // ...
    ],
    'nextToken' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
componentVersionList
Type: Array of ComponentVersion structures

The list of component semantic versions.

The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign values for the first three, and can filter on all of them.

nextToken
Type: string

The next token used for paginated responses. When this field isn't empty, there are additional elements that the service hasn't included in this request. Use this token with the next request to retrieve additional objects.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

InvalidPaginationTokenException:

You have provided an invalid pagination token in your request.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: List components that you own

The following example lists the component versions that your account owns, filtered to components for the Linux platform.

$result = $client->listComponents([
    'filters' => [
        [
            'name' => 'platform',
            'values' => [
                'Linux',
            ],
        ],
    ],
    'owner' => 'Self',
]);

Result syntax:

[
    'componentVersionList' => [
        [
            'version' => '1.0.0',
            'name' => 'my-example-component',
            'type' => 'BUILD',
            'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-component/1.0.0',
            'dateCreated' => '2026-09-09T18:31:49.661Z',
            'description' => 'Installs my example application',
            'owner' => '111122223333',
            'platform' => 'Linux',
            'status' => 'ACTIVE',
            'supportedOsVersions' => [
                'Amazon Linux 2023',
            ],
        ],
        [
            'version' => '1.0.0',
            'name' => 'my-example-imported-component',
            'type' => 'BUILD',
            'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-imported-component/1.0.0',
            'dateCreated' => '2026-09-09T18:31:21.941Z',
            'description' => 'Installs my application from an imported shell script',
            'owner' => '111122223333',
            'platform' => 'Linux',
            'status' => 'ACTIVE',
        ],
        [
            'version' => '1.0.0',
            'name' => 'my-example-test-component',
            'type' => 'TEST',
            'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-test-component/1.0.0',
            'dateCreated' => '2026-09-09T18:31:52.888Z',
            'description' => 'Verifies that my example application is installed',
            'owner' => '111122223333',
            'platform' => 'Linux',
            'status' => 'ACTIVE',
        ],
    ],
    'requestId' => 'fc51d989-ca0a-4ac7-9ca6-fb7786e70955',
]

ListContainerRecipes

$result = $client->listContainerRecipes([/* ... */]);
$promise = $client->listContainerRecipesAsync([/* ... */]);

Returns a list of container recipes.

Parameter Syntax

$result = $client->listContainerRecipes([
    'filters' => [
        [
            'name' => '<string>',
            'values' => ['<string>', ...],
        ],
        // ...
    ],
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'owner' => 'Self|Shared|Amazon|ThirdParty|AWSMarketplace',
]);

Parameter Details

Members
filters
Type: Array of Filter structures

Use the following filters to streamline results:

  • containerType

  • name

  • parentImage

  • platform

maxResults
Type: int

The maximum number of items to return in a single request.

nextToken
Type: string

A token to specify where to start paginating. Use the nextToken value from a previously truncated response.

owner
Type: string

Returns container recipes belonging to the specified owner, that have been shared with you. You can omit this field to return container recipes belonging to your account. For container recipes, the valid owner values are Self, Shared, and Amazon.

Result Syntax

[
    'containerRecipeSummaryList' => [
        [
            'arn' => '<string>',
            'containerType' => 'DOCKER',
            'dateCreated' => '<string>',
            'instanceImage' => '<string>',
            'name' => '<string>',
            'owner' => '<string>',
            'parentImage' => '<string>',
            'platform' => 'Windows|Linux|macOS',
            'tags' => ['<string>', ...],
        ],
        // ...
    ],
    'nextToken' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
containerRecipeSummaryList
Type: Array of ContainerRecipeSummary structures

The list of container recipes returned for the request.

nextToken
Type: string

The next token used for paginated responses. When this field isn't empty, there are additional elements that the service hasn't included in this request. Use this token with the next request to retrieve additional objects.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

InvalidPaginationTokenException:

You have provided an invalid pagination token in your request.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: List the container recipes you own

The following example lists the container recipes that you own.

$result = $client->listContainerRecipes([
    'owner' => 'Self',
]);

Result syntax:

[
    'containerRecipeSummaryList' => [
        [
            'name' => 'my-example-container-recipe',
            'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:container-recipe/my-example-container-recipe/1.0.0',
            'containerType' => 'DOCKER',
            'dateCreated' => '2026-09-09T19:31:26.363Z',
            'owner' => '111122223333',
            'parentImage' => 'amazonlinux:latest',
            'platform' => 'Linux',
        ],
    ],
    'requestId' => '883e6f0e-8883-4c1a-9710-791afb74be0d',
]

ListDistributionConfigurations

$result = $client->listDistributionConfigurations([/* ... */]);
$promise = $client->listDistributionConfigurationsAsync([/* ... */]);

Returns a list of distribution configurations.

Parameter Syntax

$result = $client->listDistributionConfigurations([
    'filters' => [
        [
            'name' => '<string>',
            'values' => ['<string>', ...],
        ],
        // ...
    ],
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
filters
Type: Array of Filter structures

You can filter on name to streamline results.

maxResults
Type: int

The maximum number of items to return in a single request.

nextToken
Type: string

A token to specify where to start paginating. Use the nextToken value from a previously truncated response.

Result Syntax

[
    'distributionConfigurationSummaryList' => [
        [
            'arn' => '<string>',
            'dateCreated' => '<string>',
            'dateUpdated' => '<string>',
            'description' => '<string>',
            'name' => '<string>',
            'regions' => ['<string>', ...],
            'tags' => ['<string>', ...],
        ],
        // ...
    ],
    'nextToken' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
distributionConfigurationSummaryList
Type: Array of DistributionConfigurationSummary structures

The list of distributions.

nextToken
Type: string

The next token used for paginated responses. When this field isn't empty, there are additional elements that the service hasn't included in this request. Use this token with the next request to retrieve additional objects.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

InvalidPaginationTokenException:

You have provided an invalid pagination token in your request.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: List distribution configurations that match a name filter

The following example lists the distribution configurations whose name matches the filter value.

$result = $client->listDistributionConfigurations([
    'filters' => [
        [
            'name' => 'name',
            'values' => [
                'my-example-distribution-configuration',
            ],
        ],
    ],
]);

Result syntax:

[
    'distributionConfigurationSummaryList' => [
        [
            'name' => 'my-example-distribution-configuration',
            'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:distribution-configuration/my-example-distribution-configuration',
            'dateCreated' => '2026-09-09T21:09:02.581Z',
            'description' => 'Distributes AMIs to us-west-2',
            'regions' => [
                'us-west-2',
            ],
        ],
    ],
    'requestId' => '1057325c-6b4a-4e16-ac6e-12f1d8fcc6f9',
]

ListImageBuildVersions

$result = $client->listImageBuildVersions([/* ... */]);
$promise = $client->listImageBuildVersionsAsync([/* ... */]);

Returns a list of image build versions.

Parameter Syntax

$result = $client->listImageBuildVersions([
    'filters' => [
        [
            'name' => '<string>',
            'values' => ['<string>', ...],
        ],
        // ...
    ],
    'imageVersionArn' => '<string>',
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
filters
Type: Array of Filter structures

Use the following filters to streamline results:

  • name

  • osVersion

  • platform

  • type

  • version

imageVersionArn
Type: string

The Amazon Resource Name (ARN) of the image version whose build versions you want to retrieve. The ARN must specify an exact version (<major>.<minor>.<patch>) - wildcards aren't allowed. This parameter is optional. If you don't specify it, Image Builder returns build versions for all of the images in your account.

maxResults
Type: int

The maximum number of items to return in a single request.

nextToken
Type: string

A token to specify where to start paginating. Use the nextToken value from a previously truncated response.

Result Syntax

[
    'imageSummaryList' => [
        [
            'arn' => '<string>',
            'buildType' => 'USER_INITIATED|SCHEDULED|IMPORT|IMPORT_ISO',
            'dateCreated' => '<string>',
            'deprecationTime' => <DateTime>,
            'imageSource' => 'AMAZON_MANAGED|AWS_MARKETPLACE|IMPORTED|CUSTOM',
            'lifecycleExecutionId' => '<string>',
            'loggingConfiguration' => [
                'logGroupName' => '<string>',
            ],
            'name' => '<string>',
            'osVersion' => '<string>',
            'outputResources' => [
                'amis' => [
                    [
                        'accountId' => '<string>',
                        'description' => '<string>',
                        'image' => '<string>',
                        'name' => '<string>',
                        'region' => '<string>',
                        'state' => [
                            'failureContext' => [
                                'componentFailure' => [
                                    'action' => '<string>',
                                    'componentArn' => '<string>',
                                    'errorMessage' => '<string>',
                                    'phaseName' => '<string>',
                                    'stepName' => '<string>',
                                ],
                                'distributionFailure' => [
                                    'errorMessage' => '<string>',
                                    'regionFailures' => [
                                        [
                                            'errorMessage' => '<string>',
                                            'imageConfigurationStep' => 'ASSOCIATE_LICENSES|UPDATE_LAUNCH_TEMPLATES|PUT_SSM_PARAMETERS|UPDATE_FAST_LAUNCH_CONFIGURATIONS|EXPORT_AMI',
                                            'region' => '<string>',
                                            'status' => 'FAILED|CANCELLED|TIMED_OUT',
                                            'targetAccountId' => '<string>',
                                        ],
                                        // ...
                                    ],
                                ],
                                'failedStep' => '<string>',
                                'imageStatus' => 'PENDING|CREATING|BUILDING|TESTING|DISTRIBUTING|INTEGRATING|AVAILABLE|CANCELLED|FAILED|DEPRECATED|DELETED|DISABLED',
                                'stepExecutionId' => '<string>',
                                'workflowArn' => '<string>',
                                'workflowExecutionId' => '<string>',
                            ],
                            'reason' => '<string>',
                            'status' => 'PENDING|CREATING|BUILDING|TESTING|DISTRIBUTING|INTEGRATING|AVAILABLE|CANCELLED|FAILED|DEPRECATED|DELETED|DISABLED',
                        ],
                    ],
                    // ...
                ],
                'containers' => [
                    [
                        'imageUris' => ['<string>', ...],
                        'region' => '<string>',
                    ],
                    // ...
                ],
            ],
            'owner' => '<string>',
            'platform' => 'Windows|Linux|macOS',
            'state' => [
                'failureContext' => [
                    'componentFailure' => [
                        'action' => '<string>',
                        'componentArn' => '<string>',
                        'errorMessage' => '<string>',
                        'phaseName' => '<string>',
                        'stepName' => '<string>',
                    ],
                    'distributionFailure' => [
                        'errorMessage' => '<string>',
                        'regionFailures' => [
                            [
                                'errorMessage' => '<string>',
                                'imageConfigurationStep' => 'ASSOCIATE_LICENSES|UPDATE_LAUNCH_TEMPLATES|PUT_SSM_PARAMETERS|UPDATE_FAST_LAUNCH_CONFIGURATIONS|EXPORT_AMI',
                                'region' => '<string>',
                                'status' => 'FAILED|CANCELLED|TIMED_OUT',
                                'targetAccountId' => '<string>',
                            ],
                            // ...
                        ],
                    ],
                    'failedStep' => '<string>',
                    'imageStatus' => 'PENDING|CREATING|BUILDING|TESTING|DISTRIBUTING|INTEGRATING|AVAILABLE|CANCELLED|FAILED|DEPRECATED|DELETED|DISABLED',
                    'stepExecutionId' => '<string>',
                    'workflowArn' => '<string>',
                    'workflowExecutionId' => '<string>',
                ],
                'reason' => '<string>',
                'status' => 'PENDING|CREATING|BUILDING|TESTING|DISTRIBUTING|INTEGRATING|AVAILABLE|CANCELLED|FAILED|DEPRECATED|DELETED|DISABLED',
            ],
            'tags' => ['<string>', ...],
            'type' => 'AMI|DOCKER',
            'version' => '<string>',
        ],
        // ...
    ],
    'nextToken' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
imageSummaryList
Type: Array of ImageSummary structures

The list of image build versions.

nextToken
Type: string

The next token used for paginated responses. When this field isn't empty, there are additional elements that the service hasn't included in this request. Use this token with the next request to retrieve additional objects.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

InvalidPaginationTokenException:

You have provided an invalid pagination token in your request.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: List the build versions of an image

The following example lists the build versions that exist for version 1.0.0 of the specified image, with the output AMI that each build produced.

$result = $client->listImageBuildVersions([
    'imageVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0',
]);

Result syntax:

[
    'imageSummaryList' => [
        [
            'version' => '1.0.0/1',
            'name' => 'my-example-recipe',
            'type' => 'AMI',
            'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1',
            'buildType' => 'USER_INITIATED',
            'dateCreated' => '2026-09-09T19:12:18.677Z',
            'osVersion' => 'Amazon Linux 2023',
            'outputResources' => [
                'amis' => [
                    [
                        'name' => 'my-example-recipe 2026-09-09T19-19-08.103311Z',
                        'accountId' => '111122223333',
                        'image' => 'ami-1234567890abcdef0',
                        'region' => 'us-west-2',
                    ],
                ],
            ],
            'owner' => '111122223333',
            'platform' => 'Linux',
            'state' => [
                'status' => 'AVAILABLE',
            ],
        ],
    ],
    'requestId' => 'b4808907-dcad-4951-ada5-dd151e93135a',
]

ListImagePackages

$result = $client->listImagePackages([/* ... */]);
$promise = $client->listImagePackagesAsync([/* ... */]);

Lists the packages that are associated with an image build version, as determined by Amazon Web Services Systems Manager Inventory at build time.

Parameter Syntax

$result = $client->listImagePackages([
    'imageBuildVersionArn' => '<string>', // REQUIRED
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
imageBuildVersionArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the image build version whose packages you want to list. The value must be a full build version ARN.

maxResults
Type: int

The maximum number of items to return in a single request.

nextToken
Type: string

A token to specify where to start paginating. Use the nextToken value from a previously truncated response.

Result Syntax

[
    'imagePackageList' => [
        [
            'packageName' => '<string>',
            'packageVersion' => '<string>',
        ],
        // ...
    ],
    'nextToken' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
imagePackageList
Type: Array of ImagePackage structures

The list of Image Packages returned in the response.

nextToken
Type: string

The next token used for paginated responses. When this field isn't empty, there are additional elements that the service hasn't included in this request. Use this token with the next request to retrieve additional objects.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

InvalidPaginationTokenException:

You have provided an invalid pagination token in your request.

ResourceNotFoundException:

At least one of the resources referenced by your request does not exist.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: List the packages in an image build version

The following example lists the operating system packages that Image Builder detected in the specified image build version.

$result = $client->listImagePackages([
    'imageBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1',
]);

Result syntax:

[
    'imagePackageList' => [
        [
            'packageName' => 'passwd',
            'packageVersion' => '0.80',
        ],
        [
            'packageName' => 'dracut-config-ec2',
            'packageVersion' => '3.1',
        ],
        [
            'packageName' => 'libsolv',
            'packageVersion' => '0.7.22',
        ],
        [
            'packageName' => 'libxcrypt',
            'packageVersion' => '4.4.33',
        ],
        [
            'packageName' => 'python3-policycoreutils',
            'packageVersion' => '3.4',
        ],
    ],
    'requestId' => '0363bd96-1a54-4736-a307-7ac6095744e0',
]

ListImagePipelineImages

$result = $client->listImagePipelineImages([/* ... */]);
$promise = $client->listImagePipelineImagesAsync([/* ... */]);

Returns a list of images created by the specified pipeline.

Parameter Syntax

$result = $client->listImagePipelineImages([
    'filters' => [
        [
            'name' => '<string>',
            'values' => ['<string>', ...],
        ],
        // ...
    ],
    'imagePipelineArn' => '<string>', // REQUIRED
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
filters
Type: Array of Filter structures

Use the following filters to streamline results:

  • name

  • version

imagePipelineArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the image pipeline whose images you want to view.

maxResults
Type: int

The maximum number of items to return in a single request.

nextToken
Type: string

A token to specify where to start paginating. Use the nextToken value from a previously truncated response.

Result Syntax

[
    'imageSummaryList' => [
        [
            'arn' => '<string>',
            'buildType' => 'USER_INITIATED|SCHEDULED|IMPORT|IMPORT_ISO',
            'dateCreated' => '<string>',
            'deprecationTime' => <DateTime>,
            'imageSource' => 'AMAZON_MANAGED|AWS_MARKETPLACE|IMPORTED|CUSTOM',
            'lifecycleExecutionId' => '<string>',
            'loggingConfiguration' => [
                'logGroupName' => '<string>',
            ],
            'name' => '<string>',
            'osVersion' => '<string>',
            'outputResources' => [
                'amis' => [
                    [
                        'accountId' => '<string>',
                        'description' => '<string>',
                        'image' => '<string>',
                        'name' => '<string>',
                        'region' => '<string>',
                        'state' => [
                            'failureContext' => [
                                'componentFailure' => [
                                    'action' => '<string>',
                                    'componentArn' => '<string>',
                                    'errorMessage' => '<string>',
                                    'phaseName' => '<string>',
                                    'stepName' => '<string>',
                                ],
                                'distributionFailure' => [
                                    'errorMessage' => '<string>',
                                    'regionFailures' => [
                                        [
                                            'errorMessage' => '<string>',
                                            'imageConfigurationStep' => 'ASSOCIATE_LICENSES|UPDATE_LAUNCH_TEMPLATES|PUT_SSM_PARAMETERS|UPDATE_FAST_LAUNCH_CONFIGURATIONS|EXPORT_AMI',
                                            'region' => '<string>',
                                            'status' => 'FAILED|CANCELLED|TIMED_OUT',
                                            'targetAccountId' => '<string>',
                                        ],
                                        // ...
                                    ],
                                ],
                                'failedStep' => '<string>',
                                'imageStatus' => 'PENDING|CREATING|BUILDING|TESTING|DISTRIBUTING|INTEGRATING|AVAILABLE|CANCELLED|FAILED|DEPRECATED|DELETED|DISABLED',
                                'stepExecutionId' => '<string>',
                                'workflowArn' => '<string>',
                                'workflowExecutionId' => '<string>',
                            ],
                            'reason' => '<string>',
                            'status' => 'PENDING|CREATING|BUILDING|TESTING|DISTRIBUTING|INTEGRATING|AVAILABLE|CANCELLED|FAILED|DEPRECATED|DELETED|DISABLED',
                        ],
                    ],
                    // ...
                ],
                'containers' => [
                    [
                        'imageUris' => ['<string>', ...],
                        'region' => '<string>',
                    ],
                    // ...
                ],
            ],
            'owner' => '<string>',
            'platform' => 'Windows|Linux|macOS',
            'state' => [
                'failureContext' => [
                    'componentFailure' => [
                        'action' => '<string>',
                        'componentArn' => '<string>',
                        'errorMessage' => '<string>',
                        'phaseName' => '<string>',
                        'stepName' => '<string>',
                    ],
                    'distributionFailure' => [
                        'errorMessage' => '<string>',
                        'regionFailures' => [
                            [
                                'errorMessage' => '<string>',
                                'imageConfigurationStep' => 'ASSOCIATE_LICENSES|UPDATE_LAUNCH_TEMPLATES|PUT_SSM_PARAMETERS|UPDATE_FAST_LAUNCH_CONFIGURATIONS|EXPORT_AMI',
                                'region' => '<string>',
                                'status' => 'FAILED|CANCELLED|TIMED_OUT',
                                'targetAccountId' => '<string>',
                            ],
                            // ...
                        ],
                    ],
                    'failedStep' => '<string>',
                    'imageStatus' => 'PENDING|CREATING|BUILDING|TESTING|DISTRIBUTING|INTEGRATING|AVAILABLE|CANCELLED|FAILED|DEPRECATED|DELETED|DISABLED',
                    'stepExecutionId' => '<string>',
                    'workflowArn' => '<string>',
                    'workflowExecutionId' => '<string>',
                ],
                'reason' => '<string>',
                'status' => 'PENDING|CREATING|BUILDING|TESTING|DISTRIBUTING|INTEGRATING|AVAILABLE|CANCELLED|FAILED|DEPRECATED|DELETED|DISABLED',
            ],
            'tags' => ['<string>', ...],
            'type' => 'AMI|DOCKER',
            'version' => '<string>',
        ],
        // ...
    ],
    'nextToken' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
imageSummaryList
Type: Array of ImageSummary structures

The list of images built by this pipeline.

nextToken
Type: string

The next token used for paginated responses. When this field isn't empty, there are additional elements that the service hasn't included in this request. Use this token with the next request to retrieve additional objects.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

InvalidPaginationTokenException:

You have provided an invalid pagination token in your request.

ResourceNotFoundException:

At least one of the resources referenced by your request does not exist.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: List the images that an image pipeline created

The following example lists the images that the specified pipeline created, including a build that is still in progress.

$result = $client->listImagePipelineImages([
    'imagePipelineArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-pipeline/my-example-pipeline',
]);

Result syntax:

[
    'imageSummaryList' => [
        [
            'version' => '1.0.0/1',
            'name' => 'my-example-recipe',
            'type' => 'AMI',
            'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1',
            'buildType' => 'USER_INITIATED',
            'dateCreated' => '2026-09-09T19:39:20.458Z',
            'outputResources' => [
                'amis' => [
                ],
            ],
            'owner' => '111122223333',
            'platform' => 'Linux',
            'state' => [
                'status' => 'BUILDING',
            ],
        ],
    ],
    'requestId' => '071a0ecb-b07d-4485-832c-e6b88de8ebed',
]

ListImagePipelines

$result = $client->listImagePipelines([/* ... */]);
$promise = $client->listImagePipelinesAsync([/* ... */]);

Returns a list of image pipelines.

Parameter Syntax

$result = $client->listImagePipelines([
    'filters' => [
        [
            'name' => '<string>',
            'values' => ['<string>', ...],
        ],
        // ...
    ],
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
filters
Type: Array of Filter structures

Use the following filters to streamline results:

  • description

  • distributionConfigurationArn

  • imageRecipeArn

  • infrastructureConfigurationArn

  • name

  • status

maxResults
Type: int

The maximum number of items to return in a single request.

nextToken
Type: string

A token to specify where to start paginating. Use the nextToken value from a previously truncated response.

Result Syntax

[
    'imagePipelineList' => [
        [
            'arn' => '<string>',
            'consecutiveFailures' => <integer>,
            'containerRecipeArn' => '<string>',
            'dateCreated' => '<string>',
            'dateLastRun' => '<string>',
            'dateNextRun' => '<string>',
            'dateUpdated' => '<string>',
            'description' => '<string>',
            'distributionConfigurationArn' => '<string>',
            'enhancedImageMetadataEnabled' => true || false,
            'executionRole' => '<string>',
            'imageRecipeArn' => '<string>',
            'imageScanningConfiguration' => [
                'ecrConfiguration' => [
                    'containerTags' => ['<string>', ...],
                    'repositoryName' => '<string>',
                ],
                'imageScanningEnabled' => true || false,
            ],
            'imageTags' => ['<string>', ...],
            'imageTestsConfiguration' => [
                'imageTestsEnabled' => true || false,
                'timeoutMinutes' => <integer>,
            ],
            'infrastructureConfigurationArn' => '<string>',
            'lastRunStatus' => 'PENDING|CREATING|BUILDING|TESTING|DISTRIBUTING|INTEGRATING|AVAILABLE|CANCELLED|FAILED|DEPRECATED|DELETED|DISABLED',
            'loggingConfiguration' => [
                'imageLogGroupName' => '<string>',
                'pipelineLogGroupName' => '<string>',
            ],
            'name' => '<string>',
            'platform' => 'Windows|Linux|macOS',
            'schedule' => [
                'autoDisablePolicy' => [
                    'failureCount' => <integer>,
                ],
                'pipelineExecutionStartCondition' => 'EXPRESSION_MATCH_ONLY|EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE',
                'scheduleExpression' => '<string>',
                'timezone' => '<string>',
            ],
            'status' => 'DISABLED|ENABLED',
            'tags' => ['<string>', ...],
            'workflows' => [
                [
                    'onFailure' => 'CONTINUE|ABORT',
                    'parallelGroup' => '<string>',
                    'parameters' => [
                        [
                            'name' => '<string>',
                            'value' => ['<string>', ...],
                        ],
                        // ...
                    ],
                    'workflowArn' => '<string>',
                ],
                // ...
            ],
        ],
        // ...
    ],
    'nextToken' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
imagePipelineList
Type: Array of ImagePipeline structures

The list of image pipelines.

nextToken
Type: string

The next token used for paginated responses. When this field isn't empty, there are additional elements that the service hasn't included in this request. Use this token with the next request to retrieve additional objects.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

InvalidPaginationTokenException:

You have provided an invalid pagination token in your request.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: List image pipelines filtered by name

The following example lists the image pipelines in your account, using a filter to match a specific pipeline name.

$result = $client->listImagePipelines([
    'filters' => [
        [
            'name' => 'name',
            'values' => [
                'my-example-pipeline',
            ],
        ],
    ],
]);

Result syntax:

[
    'imagePipelineList' => [
        [
            'name' => 'my-example-pipeline',
            'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-pipeline/my-example-pipeline',
            'dateCreated' => '2026-09-09T19:52:05.146Z',
            'dateUpdated' => '2026-09-09T19:52:05.146Z',
            'description' => 'Builds a new version of my image every Sunday',
            'enhancedImageMetadataEnabled' => 1,
            'imageRecipeArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-recipe/1.0.0',
            'imageTestsConfiguration' => [
                'imageTestsEnabled' => 1,
                'timeoutMinutes' => 720,
            ],
            'infrastructureConfigurationArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:infrastructure-configuration/my-example-infrastructure',
            'platform' => 'Linux',
            'schedule' => [
                'pipelineExecutionStartCondition' => 'EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE',
                'scheduleExpression' => 'cron(0 9 ? * SUN *)',
            ],
            'status' => 'ENABLED',
        ],
    ],
    'requestId' => 'b818f3f9-b851-4de7-95f3-8fabed4e1841',
]

ListImageRecipes

$result = $client->listImageRecipes([/* ... */]);
$promise = $client->listImageRecipesAsync([/* ... */]);

Returns a list of image recipes.

Parameter Syntax

$result = $client->listImageRecipes([
    'filters' => [
        [
            'name' => '<string>',
            'values' => ['<string>', ...],
        ],
        // ...
    ],
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'owner' => 'Self|Shared|Amazon|ThirdParty|AWSMarketplace',
]);

Parameter Details

Members
filters
Type: Array of Filter structures

Use the following filters to streamline results:

  • name

  • parentImage

  • platform

maxResults
Type: int

The maximum number of items to return in a single request.

nextToken
Type: string

A token to specify where to start paginating. Use the nextToken value from a previously truncated response.

owner
Type: string

You can specify the recipe owner to filter results by that owner. By default, this request will only show image recipes owned by your account. To filter by a different owner, specify one of the Valid Values that are listed for this parameter.

Result Syntax

[
    'imageRecipeSummaryList' => [
        [
            'arn' => '<string>',
            'dateCreated' => '<string>',
            'name' => '<string>',
            'owner' => '<string>',
            'parentImage' => '<string>',
            'platform' => 'Windows|Linux|macOS',
            'tags' => ['<string>', ...],
        ],
        // ...
    ],
    'nextToken' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
imageRecipeSummaryList
Type: Array of ImageRecipeSummary structures

A list of ImageRecipeSummary objects that contain identifying characteristics for the image recipe, such as the name, the Amazon Resource Name (ARN), and the date created, along with other key details.

nextToken
Type: string

The next token used for paginated responses. When this field isn't empty, there are additional elements that the service hasn't included in this request. Use this token with the next request to retrieve additional objects.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

InvalidPaginationTokenException:

You have provided an invalid pagination token in your request.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: List the image recipes that you own

The following example lists the image recipes that you own.

$result = $client->listImageRecipes([
    'owner' => 'Self',
]);

Result syntax:

[
    'imageRecipeSummaryList' => [
        [
            'name' => 'my-example-linux-recipe',
            'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-linux-recipe/1.0.0',
            'dateCreated' => '2026-09-09T19:30:33.064Z',
            'owner' => '111122223333',
            'parentImage' => 'arn:aws:imagebuilder:us-west-2:aws:image/amazon-linux-2023-x86/x.x.x',
            'platform' => 'Linux',
        ],
        [
            'name' => 'my-example-windows-recipe',
            'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-windows-recipe/1.0.0',
            'dateCreated' => '2026-09-09T19:30:35.110Z',
            'owner' => '111122223333',
            'parentImage' => 'arn:aws:imagebuilder:us-west-2:aws:image/windows-server-2022-english-full-base-x86/x.x.x',
            'platform' => 'Windows',
        ],
    ],
    'requestId' => '4b036f1a-3716-441d-a401-419249f6569e',
]

ListImageScanFindingAggregations

$result = $client->listImageScanFindingAggregations([/* ... */]);
$promise = $client->listImageScanFindingAggregationsAsync([/* ... */]);

Returns a list of image scan aggregations for your account. You can filter by the type of key that Image Builder uses to group results. For example, if you want to get a list of findings by severity level for one of your pipelines, you might specify your pipeline with the imagePipelineArn filter. If you don't specify a filter, Image Builder returns an aggregation for your account.

To streamline results, you can use the following filters in your request:

  • imageBuildVersionArn

  • imagePipelineArn

  • vulnerabilityId

Parameter Syntax

$result = $client->listImageScanFindingAggregations([
    'filter' => [
        'name' => '<string>',
        'values' => ['<string>', ...],
    ],
    'nextToken' => '<string>',
]);

Parameter Details

Members
filter
Type: Filter structure

A filter name and value pair that determines the type of aggregation that Image Builder returns. Use one of the following filter names:

  • imageBuildVersionArn

  • imagePipelineArn

  • vulnerabilityId

If you don't specify a filter, Image Builder returns an aggregation for your account.

nextToken
Type: string

A token to specify where to start paginating. Use the nextToken value from a previously truncated response.

Result Syntax

[
    'aggregationType' => '<string>',
    'nextToken' => '<string>',
    'requestId' => '<string>',
    'responses' => [
        [
            'accountAggregation' => [
                'accountId' => '<string>',
                'severityCounts' => [
                    'all' => <integer>,
                    'critical' => <integer>,
                    'high' => <integer>,
                    'medium' => <integer>,
                ],
            ],
            'imageAggregation' => [
                'imageBuildVersionArn' => '<string>',
                'severityCounts' => [
                    'all' => <integer>,
                    'critical' => <integer>,
                    'high' => <integer>,
                    'medium' => <integer>,
                ],
            ],
            'imagePipelineAggregation' => [
                'imagePipelineArn' => '<string>',
                'severityCounts' => [
                    'all' => <integer>,
                    'critical' => <integer>,
                    'high' => <integer>,
                    'medium' => <integer>,
                ],
            ],
            'vulnerabilityIdAggregation' => [
                'severityCounts' => [
                    'all' => <integer>,
                    'critical' => <integer>,
                    'high' => <integer>,
                    'medium' => <integer>,
                ],
                'vulnerabilityId' => '<string>',
            ],
        ],
        // ...
    ],
]

Result Details

Members
aggregationType
Type: string

The aggregation type specifies what type of key is used to group the image scan findings. Image Builder returns results based on the request filter. If you didn't specify a filter in the request, the type defaults to accountId.

Aggregation types

  • accountId

  • imageBuildVersionArn

  • imagePipelineArn

  • vulnerabilityId

Each aggregation includes counts by severity level for medium severity and higher level findings, plus a total for all of the findings for each key value.

nextToken
Type: string

The next token used for paginated responses. When this field isn't empty, there are additional elements that the service hasn't included in this request. Use this token with the next request to retrieve additional objects.

requestId
Type: string

The request ID that uniquely identifies this request.

responses
Type: Array of ImageScanFindingAggregation structures

An array of image scan finding aggregations that match the filter criteria.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

InvalidPaginationTokenException:

You have provided an invalid pagination token in your request.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: List image scan finding aggregations for an image pipeline

The following example aggregates vulnerability findings for images that the specified pipeline created, with counts grouped by severity level.

$result = $client->listImageScanFindingAggregations([
    'filter' => [
        'name' => 'imagePipelineArn',
        'values' => [
            'arn:aws:imagebuilder:us-west-2:111122223333:image-pipeline/my-example-pipeline',
        ],
    ],
]);

Result syntax:

[
    'aggregationType' => 'imagePipelineArn',
    'requestId' => 'b1c9dd23-7a9c-4a52-a1f7-3b8e9e17b2c4',
    'responses' => [
        [
            'imagePipelineAggregation' => [
                'imagePipelineArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-pipeline/my-example-pipeline',
                'severityCounts' => [
                    'all' => 25,
                    'critical' => 1,
                    'high' => 7,
                    'medium' => 12,
                ],
            ],
        ],
    ],
]

ListImageScanFindings

$result = $client->listImageScanFindings([/* ... */]);
$promise = $client->listImageScanFindingsAsync([/* ... */]);

Returns a list of image scan findings for your account. Amazon Inspector generates the findings when it scans images that have scanning enabled.

Parameter Syntax

$result = $client->listImageScanFindings([
    'filters' => [
        [
            'name' => '<string>',
            'values' => ['<string>', ...],
        ],
        // ...
    ],
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
filters
Type: Array of ImageScanFindingsFilter structures

An array of name value pairs that you can use to filter your results. You can use the following filters to streamline results:

  • imageBuildVersionArn – Filters findings by the image build version that was scanned.

  • imagePipelineArn – Filters findings by the pipeline that created the scanned image.

  • vulnerabilityId – Filters findings by vulnerability ID, for example a CVE ID.

  • severity – Filters findings by severity level.

If you don't request a filter, then all findings in your account are listed.

maxResults
Type: int

The maximum number of items to return in a single request.

nextToken
Type: string

A token to specify where to start paginating. Use the nextToken value from a previously truncated response.

Result Syntax

[
    'findings' => [
        [
            'awsAccountId' => '<string>',
            'description' => '<string>',
            'firstObservedAt' => <DateTime>,
            'fixAvailable' => '<string>',
            'imageBuildVersionArn' => '<string>',
            'imagePipelineArn' => '<string>',
            'inspectorScore' => <float>,
            'inspectorScoreDetails' => [
                'adjustedCvss' => [
                    'adjustments' => [
                        [
                            'metric' => '<string>',
                            'reason' => '<string>',
                        ],
                        // ...
                    ],
                    'cvssSource' => '<string>',
                    'score' => <float>,
                    'scoreSource' => '<string>',
                    'scoringVector' => '<string>',
                    'version' => '<string>',
                ],
            ],
            'packageVulnerabilityDetails' => [
                'cvss' => [
                    [
                        'baseScore' => <float>,
                        'scoringVector' => '<string>',
                        'source' => '<string>',
                        'version' => '<string>',
                    ],
                    // ...
                ],
                'referenceUrls' => ['<string>', ...],
                'relatedVulnerabilities' => ['<string>', ...],
                'source' => '<string>',
                'sourceUrl' => '<string>',
                'vendorCreatedAt' => <DateTime>,
                'vendorSeverity' => '<string>',
                'vendorUpdatedAt' => <DateTime>,
                'vulnerabilityId' => '<string>',
                'vulnerablePackages' => [
                    [
                        'arch' => '<string>',
                        'epoch' => <integer>,
                        'filePath' => '<string>',
                        'fixedInVersion' => '<string>',
                        'name' => '<string>',
                        'packageManager' => '<string>',
                        'release' => '<string>',
                        'remediation' => '<string>',
                        'sourceLayerHash' => '<string>',
                        'version' => '<string>',
                    ],
                    // ...
                ],
            ],
            'remediation' => [
                'recommendation' => [
                    'text' => '<string>',
                    'url' => '<string>',
                ],
            ],
            'severity' => '<string>',
            'title' => '<string>',
            'type' => '<string>',
            'updatedAt' => <DateTime>,
        ],
        // ...
    ],
    'nextToken' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
findings
Type: Array of ImageScanFinding structures

The image scan findings for your account that meet your request filter criteria.

nextToken
Type: string

The next token used for paginated responses. When this field isn't empty, there are additional elements that the service hasn't included in this request. Use this token with the next request to retrieve additional objects.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

InvalidPaginationTokenException:

You have provided an invalid pagination token in your request.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: List vulnerability findings for an image build

The following example lists the vulnerability findings that Amazon Inspector detected for the specified image build version.

$result = $client->listImageScanFindings([
    'filters' => [
        [
            'name' => 'imageBuildVersionArn',
            'values' => [
                'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1',
            ],
        ],
    ],
]);

Result syntax:

[
    'findings' => [
        [
            'type' => 'PACKAGE_VULNERABILITY',
            'awsAccountId' => '111122223333',
            'description' => 'In the Linux kernel, the following vulnerability has been resolved:virtio: break and reset virtio devices on device_shutdown()',
            'firstObservedAt' => ,
            'fixAvailable' => 'YES',
            'imageBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1',
            'imagePipelineArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-pipeline/my-example-pipeline',
            'inspectorScore' => 7,
            'inspectorScoreDetails' => [
                'adjustedCvss' => [
                    'version' => '3.1',
                    'adjustments' => [
                    ],
                    'cvssSource' => 'AMAZON_CVE',
                    'score' => 7,
                    'scoreSource' => 'AMAZON_CVE',
                    'scoringVector' => 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H',
                ],
            ],
            'packageVulnerabilityDetails' => [
                'cvss' => [
                    [
                        'version' => '3.1',
                        'baseScore' => 7,
                        'scoringVector' => 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H',
                        'source' => 'AMAZON_CVE',
                    ],
                ],
                'referenceUrls' => [
                    'https://alas.aws.amazon.com/AL2/ALAS2-2025-2955.html',
                    'https://alas.aws.amazon.com/AL2023/ALAS2023-2025-1130.html',
                ],
                'relatedVulnerabilities' => [
                    'ALAS2-2025-2955',
                    'ALAS2023-2025-1130',
                ],
                'source' => 'AMAZON_CVE',
                'sourceUrl' => 'https://alas.aws.amazon.com/cve/json/v1/CVE-2025-38064.json',
                'vendorCreatedAt' => ,
                'vendorSeverity' => 'Important',
                'vendorUpdatedAt' => ,
                'vulnerabilityId' => 'CVE-2025-38064',
                'vulnerablePackages' => [
                    [
                        'version' => '4.14.355',
                        'name' => 'kernel',
                        'arch' => 'X86_64',
                        'epoch' => 0,
                        'fixedInVersion' => '0:5.15.189-131.202.amzn2',
                        'packageManager' => 'OS',
                        'release' => '280.652.amzn2',
                        'remediation' => 'yum update kernel',
                    ],
                ],
            ],
            'remediation' => [
                'recommendation' => [
                    'text' => 'None Provided',
                ],
            ],
            'severity' => 'HIGH',
            'title' => 'CVE-2025-38064 - kernel',
            'updatedAt' => ,
        ],
    ],
    'requestId' => '233de8e7-3b58-4319-a6af-f6774cf7d371',
]

ListImages

$result = $client->listImages([/* ... */]);
$promise = $client->listImagesAsync([/* ... */]);

Returns the list of images that you have access to.

Parameter Syntax

$result = $client->listImages([
    'byName' => true || false,
    'filters' => [
        [
            'name' => '<string>',
            'values' => ['<string>', ...],
        ],
        // ...
    ],
    'includeDeprecated' => true || false,
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'owner' => 'Self|Shared|Amazon|ThirdParty|AWSMarketplace',
]);

Parameter Details

Members
byName
Type: boolean

Specifies whether to return one entry per image name, with all versions of each image aggregated. Defaults to false, which returns one entry per image version. You can't combine this option with the version filter.

filters
Type: Array of Filter structures

Use the following filters to streamline results:

  • name

  • osVersion

  • platform

  • type

  • version

includeDeprecated
Type: boolean

Specifies whether to include deprecated Amazon-managed images in the results. Deprecated images that you own are always returned. Defaults to false.

maxResults
Type: int

The maximum number of items to return in a single request.

nextToken
Type: string

A token to specify where to start paginating. Use the nextToken value from a previously truncated response.

owner
Type: string

Filters the list to images owned by you, by Amazon, or shared with you by other accounts. By default, only your account's images are returned.

Result Syntax

[
    'imageVersionList' => [
        [
            'arn' => '<string>',
            'buildType' => 'USER_INITIATED|SCHEDULED|IMPORT|IMPORT_ISO',
            'dateCreated' => '<string>',
            'imageSource' => 'AMAZON_MANAGED|AWS_MARKETPLACE|IMPORTED|CUSTOM',
            'name' => '<string>',
            'osVersion' => '<string>',
            'owner' => '<string>',
            'platform' => 'Windows|Linux|macOS',
            'type' => 'AMI|DOCKER',
            'version' => '<string>',
        ],
        // ...
    ],
    'nextToken' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
imageVersionList
Type: Array of ImageVersion structures

The list of image semantic versions.

The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign values for the first three, and can filter on all of them.

Filtering: You can use wildcards (x) to specify the most recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards.

nextToken
Type: string

The next token used for paginated responses. When this field isn't empty, there are additional elements that the service hasn't included in this request. Use this token with the next request to retrieve additional objects.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

InvalidPaginationTokenException:

You have provided an invalid pagination token in your request.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: List images that you own

The following example lists the image versions that you own. Setting byName to false returns each image version as its own entry, instead of grouping build versions under their image name.

$result = $client->listImages([
    'byName' => ,
    'owner' => 'Self',
]);

Result syntax:

[
    'imageVersionList' => [
        [
            'version' => '1.0.0',
            'name' => 'my-example-recipe',
            'type' => 'AMI',
            'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0',
            'buildType' => 'USER_INITIATED',
            'dateCreated' => '2026-09-09T19:12:18.677Z',
            'osVersion' => 'Amazon Linux 2023',
            'owner' => '111122223333',
            'platform' => 'Linux',
        ],
        [
            'version' => '1.0.0',
            'name' => 'my-example-windows-image',
            'type' => 'AMI',
            'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-windows-image/1.0.0',
            'buildType' => 'USER_INITIATED',
            'dateCreated' => '2026-03-10T19:57:27.323Z',
            'osVersion' => 'Microsoft Windows Server 2025',
            'owner' => '111122223333',
            'platform' => 'Windows',
        ],
        [
            'version' => '1.0.1',
            'name' => 'my-example-windows-image',
            'type' => 'AMI',
            'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-windows-image/1.0.1',
            'buildType' => 'USER_INITIATED',
            'dateCreated' => '2026-03-10T20:32:31.795Z',
            'osVersion' => 'Microsoft Windows Server 2025',
            'owner' => '111122223333',
            'platform' => 'Windows',
        ],
    ],
    'requestId' => '19794296-a45f-4079-8741-e00d3c916318',
]

ListInfrastructureConfigurations

$result = $client->listInfrastructureConfigurations([/* ... */]);
$promise = $client->listInfrastructureConfigurationsAsync([/* ... */]);

Returns a list of infrastructure configurations.

Parameter Syntax

$result = $client->listInfrastructureConfigurations([
    'filters' => [
        [
            'name' => '<string>',
            'values' => ['<string>', ...],
        ],
        // ...
    ],
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
filters
Type: Array of Filter structures

You can filter on name to streamline results.

maxResults
Type: int

The maximum number of items to return in a single request.

nextToken
Type: string

A token to specify where to start paginating. Use the nextToken value from a previously truncated response.

Result Syntax

[
    'infrastructureConfigurationSummaryList' => [
        [
            'arn' => '<string>',
            'dateCreated' => '<string>',
            'dateUpdated' => '<string>',
            'description' => '<string>',
            'instanceProfileName' => '<string>',
            'instanceTypes' => ['<string>', ...],
            'name' => '<string>',
            'placement' => [
                'availabilityZone' => '<string>',
                'hostId' => '<string>',
                'hostResourceGroupArn' => '<string>',
                'tenancy' => 'default|dedicated|host',
            ],
            'resourceTags' => ['<string>', ...],
            'tags' => ['<string>', ...],
        ],
        // ...
    ],
    'nextToken' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
infrastructureConfigurationSummaryList
Type: Array of InfrastructureConfigurationSummary structures

The list of infrastructure configurations.

nextToken
Type: string

The next token used for paginated responses. When this field isn't empty, there are additional elements that the service hasn't included in this request. Use this token with the next request to retrieve additional objects.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

InvalidPaginationTokenException:

You have provided an invalid pagination token in your request.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: List infrastructure configurations by name

The following example lists your infrastructure configurations, filtered to a specific resource name.

$result = $client->listInfrastructureConfigurations([
    'filters' => [
        [
            'name' => 'name',
            'values' => [
                'my-example-infrastructure-configuration',
            ],
        ],
    ],
]);

Result syntax:

[
    'infrastructureConfigurationSummaryList' => [
        [
            'name' => 'my-example-infrastructure-configuration',
            'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:infrastructure-configuration/my-example-infrastructure-configuration',
            'dateCreated' => '2026-09-09T19:37:17.350Z',
            'description' => 'An example infrastructure configuration for Amazon Linux builds',
            'instanceProfileName' => 'EC2InstanceProfileForImageBuilder',
            'instanceTypes' => [
                'm5.large',
                'm5.xlarge',
            ],
            'tags' => [
                'Environment' => 'test',
            ],
        ],
    ],
    'requestId' => 'dbadaf86-3a9d-48fc-8e34-6062ef0a70f2',
]

ListLifecycleExecutionResources

$result = $client->listLifecycleExecutionResources([/* ... */]);
$promise = $client->listLifecycleExecutionResourcesAsync([/* ... */]);

Lists resources that the runtime instance of the image lifecycle identified for lifecycle actions.

Parameter Syntax

$result = $client->listLifecycleExecutionResources([
    'lifecycleExecutionId' => '<string>', // REQUIRED
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'parentResourceId' => '<string>',
]);

Parameter Details

Members
lifecycleExecutionId
Required: Yes
Type: string

The unique identifier for a runtime instance of the lifecycle policy.

maxResults
Type: int

The maximum number of items to return in a single request.

nextToken
Type: string

A token to specify where to start paginating. Use the nextToken value from a previously truncated response.

parentResourceId
Type: string

The Amazon Resource Name (ARN) of an image build version to get the output resources for, such as AMIs or container images in Amazon ECR. You can get this value from the resourceId in the top-level response. If you leave this property empty, the response lists the Image Builder resources that the lifecycle execution identified for lifecycle actions. If the image build version that you specify in parentResourceId wasn't part of this lifecycle execution, the response contains an empty list.

Result Syntax

[
    'lifecycleExecutionId' => '<string>',
    'lifecycleExecutionState' => [
        'reason' => '<string>',
        'status' => 'IN_PROGRESS|CANCELLED|CANCELLING|FAILED|SUCCESS|PENDING',
    ],
    'nextToken' => '<string>',
    'resources' => [
        [
            'accountId' => '<string>',
            'action' => [
                'name' => 'AVAILABLE|DELETE|DEPRECATE|DISABLE',
                'reason' => '<string>',
            ],
            'endTime' => <DateTime>,
            'imageUris' => ['<string>', ...],
            'region' => '<string>',
            'resourceId' => '<string>',
            'snapshots' => [
                [
                    'snapshotId' => '<string>',
                    'state' => [
                        'reason' => '<string>',
                        'status' => 'FAILED|IN_PROGRESS|SKIPPED|SUCCESS',
                    ],
                ],
                // ...
            ],
            'startTime' => <DateTime>,
            'state' => [
                'reason' => '<string>',
                'status' => 'FAILED|IN_PROGRESS|SKIPPED|SUCCESS',
            ],
        ],
        // ...
    ],
]

Result Details

Members
lifecycleExecutionId
Type: string

The unique identifier for the runtime instance of the lifecycle policy.

lifecycleExecutionState
Type: LifecycleExecutionState structure

The current state of the lifecycle runtime instance.

nextToken
Type: string

The next token used for paginated responses. When this field isn't empty, there are additional elements that the service hasn't included in this request. Use this token with the next request to retrieve additional objects.

resources
Type: Array of LifecycleExecutionResource structures

A list of resources that were identified for lifecycle actions.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

InvalidPaginationTokenException:

You have provided an invalid pagination token in your request.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: List the resources that a lifecycle execution acted on

The following example lists the resources that the specified lifecycle execution acted on. For a scheduled resource state update that hasn't started to apply changes yet, the resources list is empty.

$result = $client->listLifecycleExecutionResources([
    'lifecycleExecutionId' => 'lce-401aefc3-a829-46f6-8fc2-91497988a503',
]);

Result syntax:

[
    'lifecycleExecutionId' => 'lce-401aefc3-a829-46f6-8fc2-91497988a503',
    'lifecycleExecutionState' => [
        'status' => 'IN_PROGRESS',
    ],
    'resources' => [
    ],
]

ListLifecycleExecutions

$result = $client->listLifecycleExecutions([/* ... */]);
$promise = $client->listLifecycleExecutionsAsync([/* ... */]);

Retrieves the lifecycle runtime history for the specified resource.

Parameter Syntax

$result = $client->listLifecycleExecutions([
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'resourceArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
maxResults
Type: int

The maximum number of items to return in a single request.

nextToken
Type: string

A token to specify where to start paginating. Use the nextToken value from a previously truncated response.

resourceArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the resource for which to list lifecycle executions. Specify a lifecycle policy ARN to list its executions, or an image build version ARN to list the executions that StartResourceStateUpdate started for that image. Other ARN types aren't valid for this request.

Result Syntax

[
    'lifecycleExecutions' => [
        [
            'endTime' => <DateTime>,
            'lifecycleExecutionId' => '<string>',
            'lifecyclePolicyArn' => '<string>',
            'resourcesImpactedSummary' => [
                'hasImpactedResources' => true || false,
            ],
            'startTime' => <DateTime>,
            'state' => [
                'reason' => '<string>',
                'status' => 'IN_PROGRESS|CANCELLED|CANCELLING|FAILED|SUCCESS|PENDING',
            ],
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
lifecycleExecutions
Type: Array of LifecycleExecution structures

A list of lifecycle runtime instances for the specified resource.

nextToken
Type: string

The next token used for paginated responses. When this field isn't empty, there are additional elements that the service hasn't included in this request. Use this token with the next request to retrieve additional objects.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

InvalidPaginationTokenException:

You have provided an invalid pagination token in your request.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: List lifecycle executions for an image build version

The following example lists the lifecycle executions that have run against the specified image build version. The execution shown was started with StartResourceStateUpdate rather than a lifecycle policy, so it has no lifecyclePolicyArn.

$result = $client->listLifecycleExecutions([
    'resourceArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1',
]);

Result syntax:

[
    'lifecycleExecutions' => [
        [
            'lifecycleExecutionId' => 'lce-401aefc3-a829-46f6-8fc2-91497988a503',
            'resourcesImpactedSummary' => [
                'hasImpactedResources' => ,
            ],
            'startTime' => ,
            'state' => [
                'status' => 'IN_PROGRESS',
            ],
        ],
    ],
]

ListLifecyclePolicies

$result = $client->listLifecyclePolicies([/* ... */]);
$promise = $client->listLifecyclePoliciesAsync([/* ... */]);

Retrieves a list of lifecycle policies in your Amazon Web Services account.

Parameter Syntax

$result = $client->listLifecyclePolicies([
    'filters' => [
        [
            'name' => '<string>',
            'values' => ['<string>', ...],
        ],
        // ...
    ],
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
filters
Type: Array of Filter structures

Use the following filters to streamline results: name, resourceType, and status. Filter names are matched exactly as shown.

maxResults
Type: int

The maximum number of items to return in a single request.

nextToken
Type: string

A token to specify where to start paginating. Use the nextToken value from a previously truncated response.

Result Syntax

[
    'lifecyclePolicySummaryList' => [
        [
            'arn' => '<string>',
            'dateCreated' => <DateTime>,
            'dateLastRun' => <DateTime>,
            'dateUpdated' => <DateTime>,
            'description' => '<string>',
            'executionRole' => '<string>',
            'name' => '<string>',
            'resourceType' => 'AMI_IMAGE|CONTAINER_IMAGE',
            'status' => 'DISABLED|ENABLED',
            'tags' => ['<string>', ...],
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
lifecyclePolicySummaryList
Type: Array of LifecyclePolicySummary structures

A list of lifecycle policies in your Amazon Web Services account that meet the criteria specified in the request.

nextToken
Type: string

The next token used for paginated responses. When this field isn't empty, there are additional elements that the service hasn't included in this request. Use this token with the next request to retrieve additional objects.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

InvalidPaginationTokenException:

You have provided an invalid pagination token in your request.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: List enabled lifecycle policies

The following example lists the lifecycle policies in your account that have ENABLED status.

$result = $client->listLifecyclePolicies([
    'filters' => [
        [
            'name' => 'status',
            'values' => [
                'ENABLED',
            ],
        ],
    ],
]);

Result syntax:

[
    'lifecyclePolicySummaryList' => [
        [
            'name' => 'my-example-ami-policy',
            'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:lifecycle-policy/my-example-ami-policy',
            'dateCreated' => ,
            'description' => 'Deletes AMI image builds after they reach 6 months old',
            'executionRole' => 'arn:aws:iam::111122223333:role/my-example-lifecycle-role',
            'resourceType' => 'AMI_IMAGE',
            'status' => 'ENABLED',
        ],
        [
            'name' => 'my-example-container-policy',
            'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:lifecycle-policy/my-example-container-policy',
            'dateCreated' => ,
            'description' => 'Deletes container image builds after they reach 6 months old',
            'executionRole' => 'arn:aws:iam::111122223333:role/my-example-lifecycle-role',
            'resourceType' => 'CONTAINER_IMAGE',
            'status' => 'ENABLED',
        ],
    ],
]

ListTagsForResource

$result = $client->listTagsForResource([/* ... */]);
$promise = $client->listTagsForResourceAsync([/* ... */]);

Returns the list of tags for the specified resource.

Parameter Syntax

$result = $client->listTagsForResource([
    'resourceArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
resourceArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the resource whose tags you want to retrieve.

Result Syntax

[
    'tags' => ['<string>', ...],
]

Result Details

Members
tags
Type: Associative array of custom strings keys (TagKey) to strings

The tags for the specified resource.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

InvalidParameterException:

The specified parameter is invalid. Review the available parameters for the API request.

ResourceNotFoundException:

At least one of the resources referenced by your request does not exist.

Examples

Example 1: List the tags for a resource

The following example lists the tags that are assigned to an existing component build version.

$result = $client->listTagsForResource([
    'resourceArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-component/1.0.0/1',
]);

Result syntax:

[
    'tags' => [
        'CostCenter' => '12345',
        'Environment' => 'Production',
    ],
]

ListWaitingWorkflowSteps

$result = $client->listWaitingWorkflowSteps([/* ... */]);
$promise = $client->listWaitingWorkflowStepsAsync([/* ... */]);

Lists the workflow steps in your Amazon Web Services account that have paused at a WaitForAction step, and are waiting for you to respond. To send a response, call SendWorkflowStepAction.

Parameter Syntax

$result = $client->listWaitingWorkflowSteps([
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
maxResults
Type: int

The maximum number of items to return in a single request.

nextToken
Type: string

A token to specify where to start paginating. Use the nextToken value from a previously truncated response.

Result Syntax

[
    'nextToken' => '<string>',
    'steps' => [
        [
            'action' => '<string>',
            'imageBuildVersionArn' => '<string>',
            'name' => '<string>',
            'startTime' => '<string>',
            'stepExecutionId' => '<string>',
            'workflowBuildVersionArn' => '<string>',
            'workflowExecutionId' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
nextToken
Type: string

The next token used for paginated responses. When this field isn't empty, there are additional elements that the service hasn't included in this request. Use this token with the next request to retrieve additional objects.

steps
Type: Array of WorkflowStepExecution structures

An array of the workflow steps that are waiting for action in your Amazon Web Services account. Each step is paused at a WaitForAction step, and remains in the list until you respond with SendWorkflowStepAction or the wait times out.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

InvalidPaginationTokenException:

You have provided an invalid pagination token in your request.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: List workflow steps that are waiting for an action

The following example lists the workflow steps in your account that are paused at a WaitForAction step, waiting for you to resume or stop the workflow with SendWorkflowStepAction.

$result = $client->listWaitingWorkflowSteps([
    'maxResults' => 25,
]);

Result syntax:

[
    'steps' => [
        [
            'name' => 'WaitForApproval',
            'action' => 'WaitForAction',
            'imageBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-wait-recipe/1.0.0/1',
            'startTime' => '2026-09-09T20:02:59.931Z',
            'stepExecutionId' => 'step-8eb24d7a-036e-46b5-94a3-90a5d8b5ac4a',
            'workflowBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:workflow/build/my-example-wait-workflow/1.0.0/1',
            'workflowExecutionId' => 'wf-782460a6-8dc5-4262-90ff-0509eef0053c',
        ],
    ],
]

ListWorkflowBuildVersions

$result = $client->listWorkflowBuildVersions([/* ... */]);
$promise = $client->listWorkflowBuildVersionsAsync([/* ... */]);

Returns a list of build versions for a specific workflow resource.

Parameter Syntax

$result = $client->listWorkflowBuildVersions([
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'workflowVersionArn' => '<string>',
]);

Parameter Details

Members
maxResults
Type: int

The maximum number of items to return in a single request.

nextToken
Type: string

A token to specify where to start paginating. Use the nextToken value from a previously truncated response.

workflowVersionArn
Type: string

The Amazon Resource Name (ARN) of the workflow resource for which to get a list of build versions. The version segments can contain wildcards (x) to match multiple versions of the workflow. If you don't specify an ARN, the response lists build versions for all of the workflows in your account.

Result Syntax

[
    'nextToken' => '<string>',
    'workflowSummaryList' => [
        [
            'arn' => '<string>',
            'changeDescription' => '<string>',
            'dateCreated' => '<string>',
            'description' => '<string>',
            'name' => '<string>',
            'owner' => '<string>',
            'state' => [
                'reason' => '<string>',
                'status' => 'DEPRECATED',
            ],
            'tags' => ['<string>', ...],
            'type' => 'BUILD|TEST|DISTRIBUTION',
            'version' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
nextToken
Type: string

The next token used for paginated responses. When this field isn't empty, there are additional elements that the service hasn't included in this request. Use this token with the next request to retrieve additional objects.

workflowSummaryList
Type: Array of WorkflowSummary structures

A list that contains metadata for the build versions of the workflow resource specified in the request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

InvalidPaginationTokenException:

You have provided an invalid pagination token in your request.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: List the build versions of a workflow

The following example lists the build versions that exist for version 1.0.0 of the specified workflow, with the most recent build version first and the change description for each build version showing what changed.

$result = $client->listWorkflowBuildVersions([
    'workflowVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:workflow/build/my-example-workflow/1.0.0',
]);

Result syntax:

[
    'workflowSummaryList' => [
        [
            'version' => '1.0.0',
            'name' => 'my-example-workflow',
            'type' => 'BUILD',
            'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:workflow/build/my-example-workflow/1.0.0/2',
            'changeDescription' => 'Added a step to collect image metadata from the build instance',
            'dateCreated' => '2026-09-09T19:56:38.339Z',
            'description' => 'Workflow to build my example image',
            'owner' => '111122223333',
        ],
        [
            'version' => '1.0.0',
            'name' => 'my-example-workflow',
            'type' => 'BUILD',
            'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:workflow/build/my-example-workflow/1.0.0/1',
            'changeDescription' => 'Initial version',
            'dateCreated' => '2026-09-09T19:41:14.997Z',
            'description' => 'Workflow to build my example image',
            'owner' => '111122223333',
        ],
    ],
]

ListWorkflowExecutions

$result = $client->listWorkflowExecutions([/* ... */]);
$promise = $client->listWorkflowExecutionsAsync([/* ... */]);

Returns a list of workflow runtime instance metadata objects for a specific image build version.

Parameter Syntax

$result = $client->listWorkflowExecutions([
    'imageBuildVersionArn' => '<string>', // REQUIRED
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
imageBuildVersionArn
Required: Yes
Type: string

List all workflow runtime instances for the specified image build version resource ARN.

maxResults
Type: int

The maximum number of items to return in a single request.

nextToken
Type: string

A token to specify where to start paginating. Use the nextToken value from a previously truncated response.

Result Syntax

[
    'imageBuildVersionArn' => '<string>',
    'message' => '<string>',
    'nextToken' => '<string>',
    'requestId' => '<string>',
    'workflowExecutions' => [
        [
            'endTime' => '<string>',
            'message' => '<string>',
            'parallelGroup' => '<string>',
            'retried' => true || false,
            'startTime' => '<string>',
            'status' => 'PENDING|SKIPPED|RUNNING|COMPLETED|FAILED|ROLLBACK_IN_PROGRESS|ROLLBACK_COMPLETED|CANCELLED',
            'totalStepCount' => <integer>,
            'totalStepsFailed' => <integer>,
            'totalStepsSkipped' => <integer>,
            'totalStepsSucceeded' => <integer>,
            'type' => 'BUILD|TEST|DISTRIBUTION',
            'workflowBuildVersionArn' => '<string>',
            'workflowExecutionId' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
imageBuildVersionArn
Type: string

The resource Amazon Resource Name (ARN) of the image build version for which you requested a list of workflow runtime details.

message
Type: string

The failure reason for the image build version, if it's in a failed state. This comes from the image itself, not from an individual workflow, so it's available even when no workflow executions remain for the image.

nextToken
Type: string

The next token used for paginated responses. When this field isn't empty, there are additional elements that the service hasn't included in this request. Use this token with the next request to retrieve additional objects.

requestId
Type: string

The request ID that uniquely identifies this request.

workflowExecutions
Type: Array of WorkflowExecutionMetadata structures

An array of runtime details that represents each time a workflow ran for the requested image build version. Image Builder retains workflow execution records for a limited time, so this array can be empty for older image build versions.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

InvalidPaginationTokenException:

You have provided an invalid pagination token in your request.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: List the workflow runtime instances for an image build version

The following example lists the workflow runtime instances that ran for the specified image build version, which was built with the Image Builder default build and test workflows.

$result = $client->listWorkflowExecutions([
    'imageBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1',
]);

Result syntax:

[
    'imageBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1',
    'requestId' => 'c78ef9a3-cce8-4e7d-ae96-426fb7e59f5d',
    'workflowExecutions' => [
        [
            'type' => 'BUILD',
            'endTime' => '2026-09-09T19:19:06.158Z',
            'retried' => ,
            'startTime' => '2026-09-09T19:12:23.175Z',
            'status' => 'COMPLETED',
            'totalStepCount' => 7,
            'totalStepsFailed' => 0,
            'totalStepsSkipped' => 2,
            'totalStepsSucceeded' => 5,
            'workflowBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:aws:workflow/build/build-image/1.0.3/1',
            'workflowExecutionId' => 'wf-165b1cb6-3a62-4618-a021-94ddcbe32908',
        ],
        [
            'type' => 'TEST',
            'endTime' => '2026-09-09T19:21:47.830Z',
            'retried' => ,
            'startTime' => '2026-09-09T19:19:11.709Z',
            'status' => 'COMPLETED',
            'totalStepCount' => 4,
            'totalStepsFailed' => 0,
            'totalStepsSkipped' => 2,
            'totalStepsSucceeded' => 2,
            'workflowBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:aws:workflow/test/test-image/1.0.3/1',
            'workflowExecutionId' => 'wf-1a3639b8-1366-4b73-8347-706874020dad',
        ],
    ],
]

ListWorkflowStepExecutions

$result = $client->listWorkflowStepExecutions([/* ... */]);
$promise = $client->listWorkflowStepExecutionsAsync([/* ... */]);

Returns runtime data for each step in a runtime instance of the workflow that you specify in the request.

Parameter Syntax

$result = $client->listWorkflowStepExecutions([
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'workflowExecutionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
maxResults
Type: int

The maximum number of items to return in a single request.

nextToken
Type: string

A token to specify where to start paginating. Use the nextToken value from a previously truncated response.

workflowExecutionId
Required: Yes
Type: string

The unique identifier that Image Builder assigned to keep track of runtime details when it ran the workflow.

Result Syntax

[
    'imageBuildVersionArn' => '<string>',
    'message' => '<string>',
    'nextToken' => '<string>',
    'requestId' => '<string>',
    'steps' => [
        [
            'action' => '<string>',
            'attemptNumber' => <integer>,
            'description' => '<string>',
            'endTime' => '<string>',
            'inputs' => '<string>',
            'maxAttempts' => <integer>,
            'message' => '<string>',
            'name' => '<string>',
            'outputs' => '<string>',
            'rollbackStatus' => 'RUNNING|COMPLETED|SKIPPED|FAILED',
            'startTime' => '<string>',
            'status' => 'PENDING|SKIPPED|RUNNING|COMPLETED|FAILED|CANCELLED',
            'stepExecutionId' => '<string>',
        ],
        // ...
    ],
    'workflowBuildVersionArn' => '<string>',
    'workflowExecutionId' => '<string>',
]

Result Details

Members
imageBuildVersionArn
Type: string

The image build version resource Amazon Resource Name (ARN) that's associated with the specified runtime instance of the workflow.

message
Type: string

The output message from the list action, if applicable.

nextToken
Type: string

The next token used for paginated responses. When this field isn't empty, there are additional elements that the service hasn't included in this request. Use this token with the next request to retrieve additional objects.

requestId
Type: string

The request ID that uniquely identifies this request.

steps
Type: Array of WorkflowStepMetadata structures

Contains an array of runtime details that represents each step in this runtime instance of the workflow.

workflowBuildVersionArn
Type: string

The build version Amazon Resource Name (ARN) for the Image Builder workflow resource that defines the steps for this runtime instance of the workflow.

workflowExecutionId
Type: string

The unique identifier that Image Builder assigned to keep track of runtime details when it ran the workflow.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

InvalidPaginationTokenException:

You have provided an invalid pagination token in your request.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: List the steps that ran in a workflow execution

The following example lists runtime details for each step in the specified runtime instance of a workflow, in this case the build workflow from an image build.

$result = $client->listWorkflowStepExecutions([
    'workflowExecutionId' => 'wf-165b1cb6-3a62-4618-a021-94ddcbe32908',
]);

Result syntax:

[
    'imageBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1',
    'requestId' => 'c6258beb-bc78-40dc-8bf9-fa5a8a93d3f3',
    'steps' => [
        [
            'name' => 'LaunchBuildInstance',
            'action' => 'LaunchInstance',
            'endTime' => '2026-09-09T19:14:50.822Z',
            'inputs' => '{"waitFor": "ssmAgent"}',
            'outputs' => '{"instanceId": "i-1234567890abcdef0"}',
            'startTime' => '2026-09-09T19:12:23.418Z',
            'status' => 'COMPLETED',
            'stepExecutionId' => 'step-2e6fef0d-657c-4b7e-8706-ff24da9afa01',
        ],
        [
            'name' => 'ApplyBuildComponents',
            'action' => 'ExecuteComponents',
            'endTime' => '2026-09-09T19:14:51.229Z',
            'inputs' => '{"instanceId.$": "$.stepOutputs.LaunchBuildInstance.instanceId"}',
            'startTime' => '2026-09-09T19:14:51.229Z',
            'status' => 'SKIPPED',
            'stepExecutionId' => 'step-f76c24fe-dc70-435b-8dc1-987a0ca6d5a5',
        ],
        [
            'name' => 'InventoryCollection',
            'action' => 'CollectImageMetadata',
            'endTime' => '2026-09-09T19:16:26.267Z',
            'inputs' => '{"instanceId": "i-1234567890abcdef0"}',
            'outputs' => '{"osVersion": "Amazon Linux 2023", "associationId": "7416ce2e-4ee8-4660-8c42-a09a03f61010"}',
            'startTime' => '2026-09-09T19:14:51.818Z',
            'status' => 'COMPLETED',
            'stepExecutionId' => 'step-aa880a39-e72c-4561-aa05-eb3de860441a',
        ],
        [
            'name' => 'RunSanitizeScript',
            'action' => 'SanitizeInstance',
            'endTime' => '2026-09-09T19:16:36.559Z',
            'outputs' => '{"status": "Success", "output": "Skipping cleanup\n", "runCommandId": "9eef9fe1-12e8-4c97-8e9a-4e79632864f4"}',
            'startTime' => '2026-09-09T19:16:26.742Z',
            'status' => 'COMPLETED',
            'stepExecutionId' => 'step-572bdd17-25c4-4729-9f2e-7fd611807751',
        ],
        [
            'name' => 'RunSysPrepScript',
            'action' => 'RunSysPrep',
            'endTime' => '2026-09-09T19:16:36.973Z',
            'inputs' => '{"instanceId.$": "$.stepOutputs.LaunchBuildInstance.instanceId"}',
            'startTime' => '2026-09-09T19:16:36.973Z',
            'status' => 'SKIPPED',
            'stepExecutionId' => 'step-06026579-939d-4b1b-b36e-fa58cb712a48',
        ],
        [
            'name' => 'CreateOutputAMI',
            'action' => 'CreateImage',
            'endTime' => '2026-09-09T19:19:02.135Z',
            'inputs' => '{"instanceId": "i-1234567890abcdef0"}',
            'outputs' => '{"imageId": "ami-1234567890abcdef0"}',
            'startTime' => '2026-09-09T19:16:37.499Z',
            'status' => 'COMPLETED',
            'stepExecutionId' => 'step-50e4312d-400c-453e-957c-714cbee6961c',
        ],
        [
            'name' => 'TerminateBuildInstance',
            'action' => 'TerminateInstance',
            'endTime' => '2026-09-09T19:19:06.132Z',
            'inputs' => '{"instanceId": "i-1234567890abcdef0"}',
            'startTime' => '2026-09-09T19:19:02.546Z',
            'status' => 'COMPLETED',
            'stepExecutionId' => 'step-22673db0-e280-4948-b9b5-789791531c34',
        ],
    ],
    'workflowBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:aws:workflow/build/build-image/1.0.3/1',
    'workflowExecutionId' => 'wf-165b1cb6-3a62-4618-a021-94ddcbe32908',
]

ListWorkflows

$result = $client->listWorkflows([/* ... */]);
$promise = $client->listWorkflowsAsync([/* ... */]);

Lists workflow versions based on filtering parameters. To list the build versions of a specific workflow version, call ListWorkflowBuildVersions.

Parameter Syntax

$result = $client->listWorkflows([
    'byName' => true || false,
    'filters' => [
        [
            'name' => '<string>',
            'values' => ['<string>', ...],
        ],
        // ...
    ],
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'owner' => 'Self|Shared|Amazon|ThirdParty|AWSMarketplace',
]);

Parameter Details

Members
byName
Type: boolean

Specifies whether to return one entry per workflow name, with all versions of each workflow aggregated. Defaults to false, which returns one entry per workflow version. You can't combine this option with the version filter.

filters
Type: Array of Filter structures

Filters to narrow the list of workflows. You can filter on name, version, description, and type.

maxResults
Type: int

The maximum number of items to return in a single request.

nextToken
Type: string

A token to specify where to start paginating. Use the nextToken value from a previously truncated response.

owner
Type: string

Filters results based on the workflow owner. By default, this request returns the workflows that your account owns (Self). Specify Amazon to list the workflows that Image Builder manages. Image Builder rejects the Shared and ThirdParty owner values for workflows, and AWSMarketplace returns no results.

Result Syntax

[
    'nextToken' => '<string>',
    'workflowVersionList' => [
        [
            'arn' => '<string>',
            'dateCreated' => '<string>',
            'description' => '<string>',
            'name' => '<string>',
            'owner' => '<string>',
            'type' => 'BUILD|TEST|DISTRIBUTION',
            'version' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
nextToken
Type: string

The next token used for paginated responses. When this field isn't empty, there are additional elements that the service hasn't included in this request. Use this token with the next request to retrieve additional objects.

workflowVersionList
Type: Array of WorkflowVersion structures

A list of workflow versions that match the request criteria.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

InvalidPaginationTokenException:

You have provided an invalid pagination token in your request.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: List workflows that you own

The following example lists the workflow versions that you own.

$result = $client->listWorkflows([
    'owner' => 'Self',
]);

Result syntax:

[
    'workflowVersionList' => [
        [
            'version' => '1.0.0',
            'name' => 'my-example-build-workflow',
            'type' => 'BUILD',
            'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:workflow/build/my-example-build-workflow/1.0.0',
            'dateCreated' => '2026-09-09T19:56:09.033Z',
            'description' => 'Builds my example image',
            'owner' => '111122223333',
        ],
        [
            'version' => '1.0.0',
            'name' => 'my-example-test-workflow',
            'type' => 'TEST',
            'arn' => 'arn:aws:imagebuilder:us-west-2:111122223333:workflow/test/my-example-test-workflow/1.0.0',
            'dateCreated' => '2026-09-09T19:56:12.440Z',
            'description' => 'Tests my example image',
            'owner' => '111122223333',
        ],
    ],
]

PutComponentPolicy

$result = $client->putComponentPolicy([/* ... */]);
$promise = $client->putComponentPolicyAsync([/* ... */]);

Applies a policy to a component. The preferred way to share resources is with the RAM API CreateResourceShare. If you use the PutComponentPolicy operation instead, you must also call the RAM API PromoteResourceShareCreatedFromPolicy. Otherwise, the resource isn't visible to the principals that it's shared with.

Parameter Syntax

$result = $client->putComponentPolicy([
    'componentArn' => '<string>', // REQUIRED
    'policy' => '<string>', // REQUIRED
]);

Parameter Details

Members
componentArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the component that this policy should be applied to.

policy
Required: Yes
Type: string

The policy to apply.

Result Syntax

[
    'componentArn' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
componentArn
Type: string

The Amazon Resource Name (ARN) of the component that this policy was applied to.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

InvalidParameterValueException:

The value that you provided for the specified parameter is invalid.

ResourceNotFoundException:

At least one of the resources referenced by your request does not exist.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: Share a component with another account

The following example applies a resource policy that grants another account permission to get and list the component.

$result = $client->putComponentPolicy([
    'componentArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-shared-component/1.0.0/1',
    'policy' => '{"Version": "2012-10-17", "Statement": [{"Effect": "Allow", "Principal": {"AWS": "arn:aws:iam::444455556666:root"}, "Action": ["imagebuilder:GetComponent", "imagebuilder:ListComponents"], "Resource": ["arn:aws:imagebuilder:us-west-2:111122223333:component/my-shared-component/1.0.0/1"]}]}',
]);

Result syntax:

[
    'componentArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-shared-component/1.0.0/1',
    'requestId' => 'ad5a3a66-95c0-4eb5-b34e-f28980256275',
]

PutContainerRecipePolicy

$result = $client->putContainerRecipePolicy([/* ... */]);
$promise = $client->putContainerRecipePolicyAsync([/* ... */]);

Applies a policy to a container recipe. The preferred way to share resources is with the RAM API CreateResourceShare. If you use the PutContainerRecipePolicy operation instead, you must also call the RAM API PromoteResourceShareCreatedFromPolicy. Otherwise, the resource isn't visible to the principals that it's shared with.

Parameter Syntax

$result = $client->putContainerRecipePolicy([
    'containerRecipeArn' => '<string>', // REQUIRED
    'policy' => '<string>', // REQUIRED
]);

Parameter Details

Members
containerRecipeArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the container recipe that this policy should be applied to.

policy
Required: Yes
Type: string

The policy to apply to the container recipe.

Result Syntax

[
    'containerRecipeArn' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
containerRecipeArn
Type: string

The Amazon Resource Name (ARN) of the container recipe that this policy was applied to.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

InvalidParameterValueException:

The value that you provided for the specified parameter is invalid.

ResourceNotFoundException:

At least one of the resources referenced by your request does not exist.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: Share a container recipe with another account

The following example applies a resource policy that grants another AWS account permission to view and use the specified container recipe.

$result = $client->putContainerRecipePolicy([
    'containerRecipeArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:container-recipe/my-example-container-recipe-shared/1.0.0',
    'policy' => '{"Version": "2012-10-17", "Statement": [{"Sid": "AllowSharedAccountContainerRecipeAccess", "Effect": "Allow", "Principal": {"AWS": "arn:aws:iam::444455556666:root"}, "Action": ["imagebuilder:GetContainerRecipe", "imagebuilder:ListContainerRecipes"], "Resource": "arn:aws:imagebuilder:us-west-2:111122223333:container-recipe/my-example-container-recipe-shared/1.0.0"}]}',
]);

Result syntax:

[
    'containerRecipeArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:container-recipe/my-example-container-recipe-shared/1.0.0',
    'requestId' => 'dd917975-9d5d-49ce-9d94-daa753088dec',
]

PutImagePolicy

$result = $client->putImagePolicy([/* ... */]);
$promise = $client->putImagePolicyAsync([/* ... */]);

Applies a policy to an image. The preferred way to share resources is with the RAM API CreateResourceShare. If you use the PutImagePolicy operation instead, you must also call the RAM API PromoteResourceShareCreatedFromPolicy. Otherwise, the resource isn't visible to the principals that it's shared with.

Parameter Syntax

$result = $client->putImagePolicy([
    'imageArn' => '<string>', // REQUIRED
    'policy' => '<string>', // REQUIRED
]);

Parameter Details

Members
imageArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the image that this policy should be applied to.

policy
Required: Yes
Type: string

The resource policy to apply to the image, as a JSON policy document. Image Builder validates the policy with Amazon Web Services RAM before applying it, and rejects invalid policies with InvalidParameterValueException.

Result Syntax

[
    'imageArn' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
imageArn
Type: string

The Amazon Resource Name (ARN) of the image that this policy was applied to.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

InvalidParameterValueException:

The value that you provided for the specified parameter is invalid.

ResourceNotFoundException:

At least one of the resources referenced by your request does not exist.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: Share an image with another AWS account

The following example applies a resource policy to an image build version that grants another AWS account permission to view the image.

$result = $client->putImagePolicy([
    'imageArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1',
    'policy' => '{"Version": "2012-10-17", "Statement": [{"Effect": "Allow", "Principal": {"AWS": "arn:aws:iam::444455556666:root"}, "Action": ["imagebuilder:GetImage", "imagebuilder:ListImages"], "Resource": ["arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1"]}]}',
]);

Result syntax:

[
    'imageArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1',
    'requestId' => '7bbf7e76-0f08-430d-b77e-17c161725825',
]

PutImageRecipePolicy

$result = $client->putImageRecipePolicy([/* ... */]);
$promise = $client->putImageRecipePolicyAsync([/* ... */]);

Applies a policy to an image recipe. The preferred way to share resources is with the RAM API CreateResourceShare. If you use the PutImageRecipePolicy operation instead, you must also call the RAM API PromoteResourceShareCreatedFromPolicy. Otherwise, the resource isn't visible to the principals that it's shared with.

Parameter Syntax

$result = $client->putImageRecipePolicy([
    'imageRecipeArn' => '<string>', // REQUIRED
    'policy' => '<string>', // REQUIRED
]);

Parameter Details

Members
imageRecipeArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the image recipe that this policy should be applied to.

policy
Required: Yes
Type: string

The policy to apply.

Result Syntax

[
    'imageRecipeArn' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
imageRecipeArn
Type: string

The Amazon Resource Name (ARN) of the image recipe that this policy was applied to.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

InvalidParameterValueException:

The value that you provided for the specified parameter is invalid.

ResourceNotFoundException:

At least one of the resources referenced by your request does not exist.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Examples

Example 1: Share an image recipe with another account

The following example applies a resource policy that grants another AWS account permission to view the specified image recipe.

$result = $client->putImageRecipePolicy([
    'imageRecipeArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-recipe/1.0.0',
    'policy' => '{"Version": "2012-10-17", "Statement": [{"Effect": "Allow", "Principal": {"AWS": "arn:aws:iam::444455556666:root"}, "Action": ["imagebuilder:GetImageRecipe", "imagebuilder:ListImageRecipes"], "Resource": "arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-recipe/1.0.0"}]}',
]);

Result syntax:

[
    'imageRecipeArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-recipe/1.0.0',
    'requestId' => '3a27bb63-329e-40ab-88f2-c1638504bd35',
]

RetryImage

$result = $client->retryImage([/* ... */]);
$promise = $client->retryImageAsync([/* ... */]);

Retries a failed or canceled image build without rebuilding the phases that already completed. The image re-runs asynchronously in place: the same build version returns to the test or distribution phase where it failed and continues from there. No new image build version is created. Retry is only supported for AMI-based images.

Parameter Syntax

$result = $client->retryImage([
    'clientToken' => '<string>', // REQUIRED
    'imageBuildVersionArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
clientToken
Required: Yes
Type: string

A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.

imageBuildVersionArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the image build version that you want to retry. The image must be in the FAILED or CANCELLED state.

Result Syntax

[
    'clientToken' => '<string>',
    'imageBuildVersionArn' => '<string>',
]

Result Details

Members
clientToken
Type: string

The client token that uniquely identifies the request.

imageBuildVersionArn
Type: string

The ARN of the image to be retried.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

IdempotentParameterMismatchException:

You have specified a client token for an operation using parameter values that differ from a previous request that used the same client token.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

ResourceInUseException:

The resource that you are trying to operate on is currently in use. Review the message details and retry later.

Examples

Example 1: Retry an image build

The following example retries a cancelled image build, which resumes in place from the phase where it stopped.

$result = $client->retryImage([
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLEfffff',
    'imageBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1',
]);

Result syntax:

[
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLEfffff',
    'imageBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1',
]

SendWorkflowStepAction

$result = $client->sendWorkflowStepAction([/* ... */]);
$promise = $client->sendWorkflowStepActionAsync([/* ... */]);

Sends an action to a workflow step that has paused at a WaitForAction step, so that image creation can continue. To find the steps that are waiting for an action, call ListWaitingWorkflowSteps.

Parameter Syntax

$result = $client->sendWorkflowStepAction([
    'action' => 'RESUME|STOP', // REQUIRED
    'clientToken' => '<string>', // REQUIRED
    'imageBuildVersionArn' => '<string>', // REQUIRED
    'reason' => '<string>',
    'stepExecutionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
action
Required: Yes
Type: string

The action to perform on the paused workflow step. RESUME completes the waiting step, and the workflow continues. STOP fails the step, and the step's onFailure setting determines whether the workflow continues or aborts. The workflow step must be in a waiting state to accept an action. The request fails if the step has already timed out or been actioned.

clientToken
Required: Yes
Type: string

A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.

imageBuildVersionArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the image build version associated with the workflow step execution. This value must match the image that owns the waiting step. If the ARN does not correspond to the image running the workflow, then the request fails with a validation error.

reason
Type: string

The reason for the action. This value is stored with the step execution record and is accessible in subsequent workflow steps via step output references.

stepExecutionId
Required: Yes
Type: string

Uniquely identifies the waiting workflow step that you send the action to. To get this identifier, call ListWaitingWorkflowSteps.

Result Syntax

[
    'clientToken' => '<string>',
    'imageBuildVersionArn' => '<string>',
    'stepExecutionId' => '<string>',
]

Result Details

Members
clientToken
Type: string

The client token that uniquely identifies the request.

imageBuildVersionArn
Type: string

The Amazon Resource Name (ARN) of the image build version that received the action request.

stepExecutionId
Type: string

The unique identifier for the workflow step that received the action, as specified in the request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ResourceNotFoundException:

At least one of the resources referenced by your request does not exist.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

InvalidParameterValueException:

The value that you provided for the specified parameter is invalid.

ServiceUnavailableException:

The service is unable to process your request at this time.

IdempotentParameterMismatchException:

You have specified a client token for an operation using parameter values that differ from a previous request that used the same client token.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

ResourceInUseException:

The resource that you are trying to operate on is currently in use. Review the message details and retry later.

Examples

Example 1: Stop a workflow step that is waiting for action

The following example sends the STOP action to a workflow step that has paused the image build, identified by the step execution ID that ListWaitingWorkflowSteps returns.

$result = $client->sendWorkflowStepAction([
    'action' => 'STOP',
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE67890',
    'imageBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-wait-recipe/1.0.0/1',
    'stepExecutionId' => 'step-8eb24d7a-036e-46b5-94a3-90a5d8b5ac4a',
]);

Result syntax:

[
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE67890',
    'imageBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-wait-recipe/1.0.0/1',
    'stepExecutionId' => 'step-8eb24d7a-036e-46b5-94a3-90a5d8b5ac4a',
]

StartImagePipelineExecution

$result = $client->startImagePipelineExecution([/* ... */]);
$promise = $client->startImagePipelineExecutionAsync([/* ... */]);

Manually triggers a pipeline to create an image. You can start a build this way whether the pipeline is enabled or disabled. The response returns as soon as Image Builder creates the new image resource and queues the build. Use the returned imageBuildVersionArn with GetImage to track build progress.

Parameter Syntax

$result = $client->startImagePipelineExecution([
    'clientToken' => '<string>', // REQUIRED
    'imagePipelineArn' => '<string>', // REQUIRED
    'tags' => ['<string>', ...],
]);

Parameter Details

Members
clientToken
Required: Yes
Type: string

A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.

imagePipelineArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the image pipeline that you want to manually invoke.

tags
Type: Associative array of custom strings keys (TagKey) to strings

The tags for Image Builder to apply to the image resource that's created when pipeline execution starts.

Result Syntax

[
    'clientToken' => '<string>',
    'imageBuildVersionArn' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
clientToken
Type: string

The client token that uniquely identifies the request.

imageBuildVersionArn
Type: string

The Amazon Resource Name (ARN) of the image that the request created.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

ResourceNotFoundException:

At least one of the resources referenced by your request does not exist.

IdempotentParameterMismatchException:

You have specified a client token for an operation using parameter values that differ from a previous request that used the same client token.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

ResourceInUseException:

The resource that you are trying to operate on is currently in use. Review the message details and retry later.

Examples

Example 1: Start a pipeline build manually

The following example starts a build for the specified pipeline. The response returns the ARN of the new image build version.

$result = $client->startImagePipelineExecution([
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE66666',
    'imagePipelineArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-pipeline/my-example-pipeline',
]);

Result syntax:

[
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE66666',
    'imageBuildVersionArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1',
    'requestId' => 'f477f64c-9ece-4478-977d-5821f8ed051b',
]

StartResourceStateUpdate

$result = $client->startResourceStateUpdate([/* ... */]);
$promise = $client->startResourceStateUpdateAsync([/* ... */]);

Begins an ad-hoc state change for the specified image build version. This is a one-time operation - if you schedule the update, it runs only once. If the request includes underlying resources, or schedules the update far enough in the future, Image Builder runs the update as an asynchronous lifecycle execution and returns its identifier. Otherwise, for target states other than DELETED, the state change applies immediately. If a request that starts a lifecycle execution arrives while the image already has one in progress, Image Builder rejects it.

Parameter Syntax

$result = $client->startResourceStateUpdate([
    'clientToken' => '<string>', // REQUIRED
    'exclusionRules' => [
        'amis' => [
            'isPublic' => true || false,
            'lastLaunched' => [
                'unit' => 'DAYS|WEEKS|MONTHS|YEARS', // REQUIRED
                'value' => <integer>, // REQUIRED
            ],
            'regions' => ['<string>', ...],
            'sharedAccounts' => ['<string>', ...],
            'tagMap' => ['<string>', ...],
        ],
    ],
    'executionRole' => '<string>',
    'includeResources' => [
        'amis' => true || false,
        'containers' => true || false,
        'snapshots' => true || false,
    ],
    'resourceArn' => '<string>', // REQUIRED
    'state' => [ // REQUIRED
        'status' => 'AVAILABLE|DELETED|DEPRECATED|DISABLED',
    ],
    'updateAt' => <integer || string || DateTime>,
]);

Parameter Details

Members
clientToken
Required: Yes
Type: string

A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.

exclusionRules

Rules that Image Builder evaluates against each of the image's AMIs. Matching AMIs and their snapshots are skipped. Exclusion rules only take effect when the request includes AMIs. If the target state is DELETED and any resource was skipped, the Image Builder image resource itself is also retained. For the DEPRECATED and DISABLED target states, Image Builder updates the image resource's state regardless of exclusions.

executionRole
Type: string

The name or Amazon Resource Name (ARN) of the IAM role that's used to update image state. You must provide this property together with includeResources. Neither is valid without the other.

includeResources

Specifies which underlying resources to update, in addition to the Image Builder image resource itself. Snapshots and containers are only valid for the DELETED state. To set an image to DELETED, you must include its underlying resources. To delete only the Image Builder image record, use the DeleteImage operation instead.

resourceArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the image build version to update. The image must be in one of these terminal states: AVAILABLE, DEPRECATED, DISABLED, FAILED, or CANCELLED. Images with FAILED or CANCELLED status can transition only to DELETED.

state
Required: Yes
Type: ResourceState structure

Specifies the lifecycle action to take for this request. For AMI-based images, valid values are AVAILABLE, DEPRECATED, DISABLED, and DELETED. For container-based images, only DELETED is supported.

updateAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp that indicates when resources are updated by a lifecycle action. This property is valid only when the target status is DEPRECATED, and the value must be a future time. If you don't specify a value, Image Builder begins the state update right away. For a scheduled deprecation, included AMIs get their EC2 deprecation time set immediately, and Image Builder schedules the image resource to transition to DEPRECATED at that time.

Result Syntax

[
    'lifecycleExecutionId' => '<string>',
    'resourceArn' => '<string>',
]

Result Details

Members
lifecycleExecutionId
Type: string

Identifies the lifecycle execution that performs the resource state update. Image Builder only returns this field when it started a lifecycle execution for the update. Use it with GetLifecycleExecution to track progress.

resourceArn
Type: string

The requested Amazon Resource Name (ARN) of the Image Builder resource for the asynchronous update.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

ResourceNotFoundException:

At least one of the resources referenced by your request does not exist.

IdempotentParameterMismatchException:

You have specified a client token for an operation using parameter values that differ from a previous request that used the same client token.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

ResourceInUseException:

The resource that you are trying to operate on is currently in use. Review the message details and retry later.

Examples

Example 1: Schedule an image build version for deprecation

The following example schedules the specified image build version and its AMI to move to the DEPRECATED state at the requested future time. It returns the ID of the lifecycle execution that applies the update.

$result = $client->startResourceStateUpdate([
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLE24680',
    'executionRole' => 'arn:aws:iam::111122223333:role/my-example-state-update-role',
    'includeResources' => [
        'amis' => 1,
    ],
    'resourceArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1',
    'state' => [
        'status' => 'DEPRECATED',
    ],
    'updateAt' => ,
]);

Result syntax:

[
    'lifecycleExecutionId' => 'lce-401aefc3-a829-46f6-8fc2-91497988a503',
    'resourceArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1',
]

TagResource

$result = $client->tagResource([/* ... */]);
$promise = $client->tagResourceAsync([/* ... */]);

Adds a tag to a resource.

Parameter Syntax

$result = $client->tagResource([
    'resourceArn' => '<string>', // REQUIRED
    'tags' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
resourceArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the resource that you want to tag.

tags
Required: Yes
Type: Associative array of custom strings keys (TagKey) to strings

The tags to apply to the resource.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

InvalidParameterException:

The specified parameter is invalid. Review the available parameters for the API request.

ResourceNotFoundException:

At least one of the resources referenced by your request does not exist.

Examples

Example 1: Add tags to a component build version

The following example adds two tags to a component build version.

$result = $client->tagResource([
    'resourceArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-tagged-component/1.0.0/1',
    'tags' => [
        'CostCenter' => '12345',
        'Environment' => 'Production',
    ],
]);

Result syntax:

[
]

UntagResource

$result = $client->untagResource([/* ... */]);
$promise = $client->untagResourceAsync([/* ... */]);

Removes a tag from a resource.

Parameter Syntax

$result = $client->untagResource([
    'resourceArn' => '<string>', // REQUIRED
    'tagKeys' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
resourceArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the resource that you want to untag.

tagKeys
Required: Yes
Type: Array of strings

The tag keys to remove from the resource.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

InvalidParameterException:

The specified parameter is invalid. Review the available parameters for the API request.

ResourceNotFoundException:

At least one of the resources referenced by your request does not exist.

Examples

Example 1: Remove a tag from a resource

The following example removes the CostCenter tag key from the specified component build version.

$result = $client->untagResource([
    'resourceArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:component/my-example-tagged-component/1.0.0/1',
    'tagKeys' => [
        'CostCenter',
    ],
]);

Result syntax:

[
]

UpdateDistributionConfiguration

$result = $client->updateDistributionConfiguration([/* ... */]);
$promise = $client->updateDistributionConfigurationAsync([/* ... */]);

Updates a distribution configuration. Distribution configurations define and configure the outputs for your images, including the target Regions, accounts, and settings for each Region.

This operation doesn't support selective updates. The request replaces the stored configuration, so include every setting that you want to keep.

Parameter Syntax

$result = $client->updateDistributionConfiguration([
    'clientToken' => '<string>', // REQUIRED
    'description' => '<string>',
    'distributionConfigurationArn' => '<string>', // REQUIRED
    'distributions' => [ // REQUIRED
        [
            'amiDistributionConfiguration' => [
                'amiTags' => ['<string>', ...],
                'description' => '<string>',
                'kmsKeyId' => '<string>',
                'launchPermission' => [
                    'organizationArns' => ['<string>', ...],
                    'organizationalUnitArns' => ['<string>', ...],
                    'userGroups' => ['<string>', ...],
                    'userIds' => ['<string>', ...],
                ],
                'name' => '<string>',
                'targetAccountIds' => ['<string>', ...],
            ],
            'containerDistributionConfiguration' => [
                'containerTags' => ['<string>', ...],
                'description' => '<string>',
                'targetRepository' => [ // REQUIRED
                    'repositoryName' => '<string>', // REQUIRED
                    'service' => 'ECR', // REQUIRED
                ],
            ],
            'fastLaunchConfigurations' => [
                [
                    'accountId' => '<string>',
                    'enabled' => true || false, // REQUIRED
                    'launchTemplate' => [
                        'launchTemplateId' => '<string>',
                        'launchTemplateName' => '<string>',
                        'launchTemplateVersion' => '<string>',
                    ],
                    'maxParallelLaunches' => <integer>,
                    'snapshotConfiguration' => [
                        'targetResourceCount' => <integer>,
                    ],
                ],
                // ...
            ],
            'launchTemplateConfigurations' => [
                [
                    'accountId' => '<string>',
                    'launchTemplateId' => '<string>', // REQUIRED
                    'setDefaultVersion' => true || false,
                ],
                // ...
            ],
            'licenseConfigurationArns' => ['<string>', ...],
            'region' => '<string>', // REQUIRED
            's3ExportConfiguration' => [
                'diskImageFormat' => 'VMDK|RAW|VHD', // REQUIRED
                'roleName' => '<string>', // REQUIRED
                's3Bucket' => '<string>', // REQUIRED
                's3Prefix' => '<string>',
            ],
            'ssmParameterConfigurations' => [
                [
                    'amiAccountId' => '<string>',
                    'dataType' => 'text|aws:ec2:image',
                    'parameterName' => '<string>', // REQUIRED
                ],
                // ...
            ],
        ],
        // ...
    ],
]);

Parameter Details

Members
clientToken
Required: Yes
Type: string

A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.

description
Type: string

The description of the distribution configuration.

distributionConfigurationArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the distribution configuration that you want to update.

distributions
Required: Yes
Type: Array of Distribution structures

The distribution settings for the configuration. Each entry defines how output images are distributed in one target Amazon Web Services Region. A Region can appear at most once in the list. This list replaces the configuration's existing distributions entirely.

Result Syntax

[
    'clientToken' => '<string>',
    'distributionConfigurationArn' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
clientToken
Type: string

The client token that uniquely identifies the request.

distributionConfigurationArn
Type: string

The Amazon Resource Name (ARN) of the distribution configuration that was updated by this request.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

IdempotentParameterMismatchException:

You have specified a client token for an operation using parameter values that differ from a previous request that used the same client token.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

ResourceInUseException:

The resource that you are trying to operate on is currently in use. Review the message details and retry later.

InvalidParameterCombinationException:

You have specified a combination of parameters that isn't valid. For example, two mutually exclusive parameters, or a parameter without its required companion parameter. Review the error message for details.

Examples

Example 1: Update a distribution configuration

The following example replaces the distribution settings for the specified configuration with a single distribution that names the output AMI with the build date.

$result = $client->updateDistributionConfiguration([
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLEccccc',
    'distributionConfigurationArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:distribution-configuration/my-example-distribution',
    'distributions' => [
        [
            'amiDistributionConfiguration' => [
                'name' => 'my-example-image-{{ imagebuilder:buildDate }}',
            ],
            'region' => 'us-west-2',
        ],
    ],
]);

Result syntax:

[
    'distributionConfigurationArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:distribution-configuration/my-example-distribution',
    'requestId' => '97d5c3e8-93d6-424c-90e0-bab18b20bf54',
]

UpdateImagePipeline

$result = $client->updateImagePipeline([/* ... */]);
$promise = $client->updateImagePipelineAsync([/* ... */]);

Updates an image pipeline. Use image pipelines to automate the creation and distribution of images. You must specify exactly one recipe for your image, using either a containerRecipeArn or an imageRecipeArn. The recipe must be the same type, image or container, as the pipeline's current recipe.

UpdateImagePipeline does not support selective updates. The request replaces the pipeline's entire configuration, so include every setting that you want to keep. Any optional property that you omit is removed or reset to its default.

Parameter Syntax

$result = $client->updateImagePipeline([
    'clientToken' => '<string>', // REQUIRED
    'containerRecipeArn' => '<string>',
    'description' => '<string>',
    'distributionConfigurationArn' => '<string>',
    'enhancedImageMetadataEnabled' => true || false,
    'executionRole' => '<string>',
    'imagePipelineArn' => '<string>', // REQUIRED
    'imageRecipeArn' => '<string>',
    'imageScanningConfiguration' => [
        'ecrConfiguration' => [
            'containerTags' => ['<string>', ...],
            'repositoryName' => '<string>',
        ],
        'imageScanningEnabled' => true || false,
    ],
    'imageTags' => ['<string>', ...],
    'imageTestsConfiguration' => [
        'imageTestsEnabled' => true || false,
        'timeoutMinutes' => <integer>,
    ],
    'infrastructureConfigurationArn' => '<string>', // REQUIRED
    'loggingConfiguration' => [
        'imageLogGroupName' => '<string>',
        'pipelineLogGroupName' => '<string>',
    ],
    'schedule' => [
        'autoDisablePolicy' => [
            'failureCount' => <integer>, // REQUIRED
        ],
        'pipelineExecutionStartCondition' => 'EXPRESSION_MATCH_ONLY|EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE',
        'scheduleExpression' => '<string>',
        'timezone' => '<string>',
    ],
    'status' => 'DISABLED|ENABLED',
    'workflows' => [
        [
            'onFailure' => 'CONTINUE|ABORT',
            'parallelGroup' => '<string>',
            'parameters' => [
                [
                    'name' => '<string>', // REQUIRED
                    'value' => ['<string>', ...], // REQUIRED
                ],
                // ...
            ],
            'workflowArn' => '<string>', // REQUIRED
        ],
        // ...
    ],
]);

Parameter Details

Members
clientToken
Required: Yes
Type: string

A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.

containerRecipeArn
Type: string

The Amazon Resource Name (ARN) of the container recipe that is used to configure images created by this container pipeline. You must specify either this property or imageRecipeArn, but not both.

description
Type: string

The description of the image pipeline.

distributionConfigurationArn
Type: string

The Amazon Resource Name (ARN) of the distribution configuration that Image Builder uses to configure and distribute images created by this image pipeline.

enhancedImageMetadataEnabled
Type: boolean

Specifies whether to collect additional information about the image being created, including the operating system (OS) version and package list. Defaults to true.

executionRole
Type: string

The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to perform workflow actions. If you omit this property, the pipeline reverts to the Image Builder service-linked role.

imagePipelineArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the image pipeline that you want to update.

imageRecipeArn
Type: string

The Amazon Resource Name (ARN) of the image recipe that configures images created by this image pipeline. You must specify either this property or containerRecipeArn, but not both.

imageScanningConfiguration
Type: ImageScanningConfiguration structure

Contains settings for vulnerability scans that Amazon Inspector runs against the test instance during image creation.

imageTags
Type: Associative array of custom strings keys (TagKey) to strings

The tags that Image Builder applies to the Image Builder image resource that this pipeline's scheduled executions create. These tags don't apply to the output AMI. To tag output AMIs, use amiTags in the pipeline's distribution configuration.

imageTestsConfiguration
Type: ImageTestsConfiguration structure

Specifies the test settings that Image Builder applies to images that this pipeline creates. If you don't provide test settings, Image Builder stores a default configuration with image tests enabled.

infrastructureConfigurationArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the infrastructure configuration that Image Builder uses to build images created by this image pipeline.

loggingConfiguration

Specifies the logging configuration for the image pipeline. Use this to define custom CloudWatch Logs log groups for your pipeline execution logs and image build logs. The service manages log groups with names starting with /aws/imagebuilder/ using the service-linked role. For custom log group names outside of this prefix, you must also provide an executionRole.

schedule
Type: Schedule structure

The schedule of the image pipeline. Because the update replaces the entire configuration, omitting this property removes any existing schedule. The pipeline then runs only when you call StartImagePipelineExecution.

status
Type: string

The status of the image pipeline. Defaults to ENABLED when omitted. To keep a pipeline disabled, include this property set to DISABLED in your update request.

workflows
Type: Array of WorkflowConfiguration structures

The array of workflow configuration objects for builds that this pipeline starts. You must also specify executionRole when you provide workflows.

Result Syntax

[
    'clientToken' => '<string>',
    'imagePipelineArn' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
clientToken
Type: string

The client token that uniquely identifies the request.

imagePipelineArn
Type: string

The Amazon Resource Name (ARN) of the image pipeline that was updated by this request.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

IdempotentParameterMismatchException:

You have specified a client token for an operation using parameter values that differ from a previous request that used the same client token.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

ResourceInUseException:

The resource that you are trying to operate on is currently in use. Review the message details and retry later.

Examples

Example 1: Update an image pipeline

The following example changes the pipeline's schedule to build every day at 6:00 AM UTC.

$result = $client->updateImagePipeline([
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLEddddd',
    'imagePipelineArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-pipeline/my-example-pipeline',
    'imageRecipeArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-recipe/1.0.0',
    'infrastructureConfigurationArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:infrastructure-configuration/my-example-infrastructure',
    'schedule' => [
        'pipelineExecutionStartCondition' => 'EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE',
        'scheduleExpression' => 'cron(0 6 * * ? *)',
    ],
    'status' => 'ENABLED',
]);

Result syntax:

[
    'imagePipelineArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:image-pipeline/my-example-pipeline',
    'requestId' => '7a414b2d-e462-4850-ae7a-fe25a1223e0f',
]

UpdateInfrastructureConfiguration

$result = $client->updateInfrastructureConfiguration([/* ... */]);
$promise = $client->updateInfrastructureConfigurationAsync([/* ... */]);

Updates an infrastructure configuration. An infrastructure configuration defines the environment in which Image Builder builds and tests your image.

This operation doesn't support selective updates. The request replaces the configuration, so include every setting that you want to keep. Omitted optional properties are cleared.

Parameter Syntax

$result = $client->updateInfrastructureConfiguration([
    'clientToken' => '<string>', // REQUIRED
    'description' => '<string>',
    'infrastructureConfigurationArn' => '<string>', // REQUIRED
    'instanceMetadataOptions' => [
        'httpPutResponseHopLimit' => <integer>,
        'httpTokens' => '<string>',
    ],
    'instanceProfileName' => '<string>', // REQUIRED
    'instanceTypes' => ['<string>', ...],
    'keyPair' => '<string>',
    'logging' => [
        's3Logs' => [
            's3BucketName' => '<string>',
            's3KeyPrefix' => '<string>',
        ],
    ],
    'placement' => [
        'availabilityZone' => '<string>',
        'hostId' => '<string>',
        'hostResourceGroupArn' => '<string>',
        'tenancy' => 'default|dedicated|host',
    ],
    'resourceTags' => ['<string>', ...],
    'securityGroupIds' => ['<string>', ...],
    'snsTopicArn' => '<string>',
    'subnetId' => '<string>',
    'terminateInstanceOnFailure' => true || false,
]);

Parameter Details

Members
clientToken
Required: Yes
Type: string

A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.

description
Type: string

The description of the infrastructure configuration.

infrastructureConfigurationArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the infrastructure configuration that you want to update.

instanceMetadataOptions
Type: InstanceMetadataOptions structure

The instance metadata service (IMDS) settings that Image Builder applies to the EC2 build and test instances it launches during image creation. If you don't set these options, the EC2 launch defaults for the instance apply. For more information about instance metadata options, see one of the following links:

instanceProfileName
Required: Yes
Type: string

The instance profile to associate with the instance used to customize your Amazon EC2 AMI. The instance profile must exist in your account.

instanceTypes
Type: Array of strings

The instance types of the infrastructure configuration. You can specify one or more instance types to use for this build. Image Builder picks one of these instance types based on availability. If you don't specify instance types, Image Builder selects compatible instance types automatically. If you specify a Dedicated Host, Image Builder uses only instance types that the host supports.

keyPair
Type: string

The key pair of the infrastructure configuration. You can use this to log on to and debug the instance used to create your image.

logging
Type: Logging structure

The logging configuration of the infrastructure configuration. When you configure S3 logs, Image Builder writes logs from the build and test process to the specified bucket under the key prefix.

placement
Type: Placement structure

The instance placement settings that define where the build and test instances that Image Builder launches during image creation run. These settings don't affect instances that you launch from the output image.

resourceTags
Type: Associative array of custom strings keys (TagKey) to strings

The metadata tags to assign to the Amazon EC2 instance that Image Builder launches during the build process. Tags are formatted as key value pairs. Tag keys can't begin with aws: or match one of the following reserved keys: CreatedBy, Ec2ImageBuilderArn, Name, or Tags.

securityGroupIds
Type: Array of strings

The security group IDs to associate with the instance used to customize your Amazon EC2 AMI.

snsTopicArn
Type: string

The Amazon Resource Name (ARN) of the SNS topic to which Image Builder sends image build event notifications. Specify a standard topic. Image Builder doesn't support FIFO topics. Image Builder validates the topic when you create or update the configuration. You must have permission to publish to the topic.

EC2 Image Builder can't send notifications to SNS topics that are encrypted using keys from other accounts. If your SNS topic is encrypted, the key must be owned by the same account that owns your Image Builder resources.

subnetId
Type: string

The subnet ID in which to place the instance used to customize your Amazon EC2 AMI. If you specify subnetId, you must also specify one or more security group IDs in securityGroupIds. Otherwise, the request fails.

terminateInstanceOnFailure
Type: boolean

Specifies whether to terminate the instance on failure. Set to false if you want Image Builder to retain the instance used to configure your AMI if the build or test phase of your workflow fails. Defaults to true.

Result Syntax

[
    'clientToken' => '<string>',
    'infrastructureConfigurationArn' => '<string>',
    'requestId' => '<string>',
]

Result Details

Members
clientToken
Type: string

The client token that uniquely identifies the request.

infrastructureConfigurationArn
Type: string

The Amazon Resource Name (ARN) of the infrastructure configuration that was updated by this request.

requestId
Type: string

The request ID that uniquely identifies this request.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

IdempotentParameterMismatchException:

You have specified a client token for an operation using parameter values that differ from a previous request that used the same client token.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

ResourceInUseException:

The resource that you are trying to operate on is currently in use. Review the message details and retry later.

Examples

Example 1: Update an infrastructure configuration

The following example updates an infrastructure configuration to use larger instance types and to keep the build instance running when the image build fails.

$result = $client->updateInfrastructureConfiguration([
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLEbbbbb',
    'description' => 'An infrastructure configuration for Amazon Linux builds',
    'infrastructureConfigurationArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:infrastructure-configuration/my-example-infrastructure',
    'instanceProfileName' => 'EC2InstanceProfileForImageBuilder',
    'instanceTypes' => [
        't3.large',
        't3.xlarge',
    ],
    'terminateInstanceOnFailure' => ,
]);

Result syntax:

[
    'infrastructureConfigurationArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:infrastructure-configuration/my-example-infrastructure',
    'requestId' => 'ffe990d5-7720-4061-a8d6-da6a7c4a6a3e',
]

UpdateLifecyclePolicy

$result = $client->updateLifecyclePolicy([/* ... */]);
$promise = $client->updateLifecyclePolicyAsync([/* ... */]);

Updates the specified lifecycle policy. The request replaces the existing policy configuration rather than merging changes, so re-specify every setting that you want to keep. The resourceType must match the existing policy's value.

Parameter Syntax

$result = $client->updateLifecyclePolicy([
    'clientToken' => '<string>', // REQUIRED
    'description' => '<string>',
    'executionRole' => '<string>', // REQUIRED
    'lifecyclePolicyArn' => '<string>', // REQUIRED
    'policyDetails' => [ // REQUIRED
        [
            'action' => [ // REQUIRED
                'includeResources' => [
                    'amis' => true || false,
                    'containers' => true || false,
                    'snapshots' => true || false,
                ],
                'type' => 'DELETE|DEPRECATE|DISABLE', // REQUIRED
            ],
            'exclusionRules' => [
                'amis' => [
                    'isPublic' => true || false,
                    'lastLaunched' => [
                        'unit' => 'DAYS|WEEKS|MONTHS|YEARS', // REQUIRED
                        'value' => <integer>, // REQUIRED
                    ],
                    'regions' => ['<string>', ...],
                    'sharedAccounts' => ['<string>', ...],
                    'tagMap' => ['<string>', ...],
                ],
                'tagMap' => ['<string>', ...],
            ],
            'filter' => [ // REQUIRED
                'retainAtLeast' => <integer>,
                'type' => 'AGE|COUNT', // REQUIRED
                'unit' => 'DAYS|WEEKS|MONTHS|YEARS',
                'value' => <integer>, // REQUIRED
            ],
        ],
        // ...
    ],
    'resourceSelection' => [ // REQUIRED
        'recipes' => [
            [
                'name' => '<string>', // REQUIRED
                'semanticVersion' => '<string>', // REQUIRED
            ],
            // ...
        ],
        'tagMap' => ['<string>', ...],
    ],
    'resourceType' => 'AMI_IMAGE|CONTAINER_IMAGE', // REQUIRED
    'status' => 'DISABLED|ENABLED',
]);

Parameter Details

Members
clientToken
Required: Yes
Type: string

A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.

description
Type: string

Optional description for the lifecycle policy. Because the update replaces the entire configuration, omitting this property removes any existing description.

executionRole
Required: Yes
Type: string

The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to run lifecycle actions.

lifecyclePolicyArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the lifecycle policy resource.

policyDetails
Required: Yes
Type: Array of LifecyclePolicyDetail structures

The configuration details for a lifecycle policy resource.

resourceSelection
Required: Yes
Type: LifecyclePolicyResourceSelection structure

Selection criteria for resources that the lifecycle policy applies to. You must specify exactly one selection criteria: either recipes or a tag map, not both.

resourceType
Required: Yes
Type: string

The type of image resource that the lifecycle policy applies to. The value must match the policy's existing resource type. You can't change the resource type of an existing lifecycle policy.

status
Type: string

Indicates whether the lifecycle policy resource is enabled. Defaults to ENABLED when omitted, so updating a disabled policy without setting this property re-enables it.

Result Syntax

[
    'lifecyclePolicyArn' => '<string>',
]

Result Details

Members
lifecyclePolicyArn
Type: string

The Amazon Resource Name (ARN) of the image lifecycle policy resource that was updated.

Errors

ServiceException:

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

ClientException:

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

ServiceUnavailableException:

The service is unable to process your request at this time.

InvalidRequestException:

The request is malformed or otherwise invalid. Verify the request and try again.

IdempotentParameterMismatchException:

You have specified a client token for an operation using parameter values that differ from a previous request that used the same client token.

ForbiddenException:

You are not authorized to perform the requested operation.

CallRateLimitExceededException:

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

ResourceInUseException:

The resource that you are trying to operate on is currently in use. Review the message details and retry later.

InvalidParameterCombinationException:

You have specified a combination of parameters that isn't valid. For example, two mutually exclusive parameters, or a parameter without its required companion parameter. Review the error message for details.

Examples

Example 1: Update a lifecycle policy

The following example updates a lifecycle policy to delete AMI images and their associated snapshots after 12 months, retaining the 3 most recent images.

$result = $client->updateLifecyclePolicy([
    'clientToken' => 'a1b2c3d4-5678-90ab-cdef-EXAMPLEaaaaa',
    'description' => 'Deletes AMI images and their snapshots after 12 months, retaining the 3 most recent',
    'executionRole' => 'arn:aws:iam::111122223333:role/my-example-lifecycle-role',
    'lifecyclePolicyArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:lifecycle-policy/my-example-policy',
    'policyDetails' => [
        [
            'action' => [
                'type' => 'DELETE',
                'includeResources' => [
                    'amis' => 1,
                    'snapshots' => 1,
                ],
            ],
            'filter' => [
                'type' => 'AGE',
                'value' => 12,
                'retainAtLeast' => 3,
                'unit' => 'MONTHS',
            ],
        ],
    ],
    'resourceSelection' => [
        'tagMap' => [
            'environment' => 'production',
        ],
    ],
    'resourceType' => 'AMI_IMAGE',
    'status' => 'ENABLED',
]);

Result syntax:

[
    'lifecyclePolicyArn' => 'arn:aws:imagebuilder:us-west-2:111122223333:lifecycle-policy/my-example-policy',
]

Shapes

AccessDeniedException

Description

You do not have permissions to perform the requested operation.

Members
message
Type: string

AccountAggregation

Description

Contains counts of vulnerability findings from image scans that run when you create new Image Builder images, or build new versions of existing images. The vulnerability counts are grouped by severity level. The counts are aggregated across resources to create the final tally for the account that owns them.

Members
accountId
Type: string

Identifies the account that owns the aggregated resource findings.

severityCounts
Type: SeverityCounts structure

Counts by severity level for medium severity and higher level findings, plus a total for all of the findings.

AdditionalInstanceConfiguration

Description

In addition to your infrastructure configuration, these settings provide an extra layer of control over your build instances. You can also specify commands to run on launch for all of your build instances.

Image Builder does not automatically install the Systems Manager agent on Windows instances. If your base image includes the Systems Manager agent, then the AMI that you create will also include the agent. For Linux instances, if the base image does not already include the Systems Manager agent, Image Builder installs it. For Linux instances where Image Builder installs the Systems Manager agent, you can choose whether to keep it for the AMI that you create.

Members
systemsManagerAgent
Type: SystemsManagerAgent structure

The Systems Manager agent settings for your build instance. This setting applies to Linux and macOS build instances only. Requests that set it for a recipe with a Windows base image are rejected.

userDataOverride
Type: string

Use this property to provide commands or a command script to run when you launch your build instance.

The userDataOverride property replaces any commands that Image Builder might have added to ensure that Systems Manager is installed on your Linux build instance. If you override the user data, make sure that you add commands to install Systems Manager, if it is not pre-installed on your base image.

The user data is always base 64 encoded. For example, the following commands are encoded as IyEvYmluL2Jhc2gKbWtkaXIgLXAgL3Zhci9iYi8KdG91Y2ggL3Zhcg==:

#!/bin/bash

mkdir -p /var/bb/

touch /var

Ami

Description

Details of an Amazon EC2 AMI.

Members
accountId
Type: string

The account ID of the owner of the AMI.

description
Type: string

The description of the Amazon EC2 AMI. Minimum and maximum length are in characters.

image
Type: string

The AMI ID of the Amazon EC2 AMI.

name
Type: string

The name of the Amazon EC2 AMI.

region
Type: string

The Amazon Web Services Region of the Amazon EC2 AMI.

state
Type: ImageState structure

The state of the AMI, which includes the status and, if applicable, the reason for that status.

AmiDistributionConfiguration

Description

Define and configure the output AMIs of the pipeline.

Members
amiTags
Type: Associative array of custom strings keys (TagKey) to strings

The tags to apply to AMIs distributed to this Region.

description
Type: string

The description to apply to the distributed AMI. Image Builder sets this as the output AMI's description in each target Region and account. If you don't specify a description, the AMI in the build Region uses the image recipe's description, if the recipe has one. Copies distributed to other Regions and accounts don't receive a default description.

kmsKeyId
Type: string

The Amazon Resource Name (ARN) that uniquely identifies the KMS key used to encrypt the distributed image. This can be either the Key ARN or the Alias ARN. For more information, see Key identifiers (KeyId) in the Key Management Service Developer Guide.

launchPermission

Launch permissions can be used to configure which Amazon Web Services accounts can use the AMI to launch instances.

name
Type: string

The name of the output AMI. The name must include the {{ imagebuilder:buildDate }} dynamic tag so that each build produces a uniquely named AMI. If you don't specify a name, Image Builder names the output AMI with the image name followed by the build timestamp, for example my-image 2022-10-26T22-30-05.912619Z.

targetAccountIds
Type: Array of strings

The Amazon Web Services account IDs to distribute the AMI to in this Region. Each listed account receives its own copy of the output AMI. If you don't specify accounts, Image Builder distributes the AMI only to your own account.

AutoDisablePolicy

Description

Defines the rules by which an image pipeline is automatically disabled when it fails. By default, if the schedule doesn't include an auto-disable policy, Image Builder disables the pipeline after 5 consecutive failed scheduled builds.

Members
failureCount
Required: Yes
Type: int

The number of consecutive scheduled image pipeline executions that must fail before Image Builder automatically disables the pipeline.

CallRateLimitExceededException

Description

You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.

Members
message
Type: string

ClientException

Description

A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.

Members
message
Type: string

Component

Description

A detailed view of a component.

Members
arn
Type: string

The Amazon Resource Name (ARN) of the component.

changeDescription
Type: string

Describes what change has been made in this version of the component, or what makes this version different from other versions of the component.

data
Type: string

Component data contains the YAML document content for the component.

dateCreated
Type: string

The date that Image Builder created the component.

description
Type: string

The description of the component.

encrypted
Type: boolean

Indicates whether the component data is encrypted at rest. Image Builder encrypts all component data at rest, so this value is always true. This field is retained for backward compatibility.

kmsKeyId
Type: string

The KMS key identifier used to encrypt the component. This can be either the Key ARN or the Alias ARN. For more information, see Key identifiers (KeyId) in the Key Management Service Developer Guide.

name
Type: string

The name of the component.

obfuscate
Type: boolean

Indicates whether component source is hidden from view in the console, and from component detail results for API, CLI, or SDK operations.

owner
Type: string

The owner of the component. The value is your account ID for components that you own, the sharing account's ID for shared components, or Amazon, ThirdParty, or AWSMarketplace.

parameters
Type: Array of ComponentParameterDetail structures

Contains parameter details for each of the parameters that the component document defined for the component.

platform
Type: string

The operating system platform of the component.

productCodes
Type: Array of ProductCodeListItem structures

Contains product codes that are used for billing purposes for Amazon Web Services Marketplace components.

publisher
Type: string

Contains the name of the publisher if this is a third-party component. Otherwise, this property is empty.

state
Type: ComponentState structure

Describes the current status of the component.

supportedOsVersions
Type: Array of strings

The operating system (OS) version supported by the component. If the OS information is available, Image Builder performs a prefix match against the base image OS version during image recipe creation.

tags
Type: Associative array of custom strings keys (TagKey) to strings

The tags that apply to the component.

type
Type: string

The component type specifies whether Image Builder uses the component to build the image or only to test it.

version
Type: string

The version of the component.

ComponentConfiguration

Description

Configuration details of the component. You can specify each component only once in a recipe, regardless of version. Components with a status of DEPRECATED or DISABLED can't be added to new recipes.

Members
componentArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the component. You can specify a build version ARN, or a component version ARN whose version segments can use x wildcards, for example 1.x.x.

parameters
Type: Array of ComponentParameter structures

A group of parameter settings that Image Builder uses to configure the component for a specific recipe. You must supply a value for every component parameter that has no default value, and you can only supply parameters that the component defines.

ComponentFailureContext

Description

Contains details about the component that caused the image creation process to fail. The details identify the first step that failed when the component ran.

Members
action
Type: string

The action that the failed step runs, for example ExecuteBash.

componentArn
Type: string

The Amazon Resource Name (ARN) of the component build version that failed.

errorMessage
Type: string

The error message from the step that failed. Image Builder truncates messages that are longer than 1024 characters. The component log in Amazon CloudWatch Logs contains the full output.

phaseName
Type: string

The name of the phase in the component document where the failure occurred, such as build, validate, or test.

stepName
Type: string

The name of the step in the component document that failed.

ComponentParameter

Description

Contains a key/value pair that sets the named component parameter.

Members
name
Required: Yes
Type: string

The name of the component parameter to set.

value
Required: Yes
Type: Array of strings

Sets the value for the named component parameter.

ComponentParameterDetail

Description

Defines a parameter that is used to provide configuration details for the component.

Members
defaultValue
Type: Array of strings

The default value of this parameter if no input is provided.

description
Type: string

Describes this parameter.

name
Required: Yes
Type: string

The name of this input parameter.

type
Required: Yes
Type: string

The type of input this parameter provides. The currently supported value is "string".

ComponentState

Description

A group of fields that describe the current status of components.

Members
reason
Type: string

Describes how or why the component changed state.

status
Type: string

The current state of the component. Components with a status of DEPRECATED or DISABLED can't be added to new recipes.

ComponentSummary

Description

A high-level summary of a component.

Members
arn
Type: string

The Amazon Resource Name (ARN) of the component.

changeDescription
Type: string

The change description for this version of the component.

dateCreated
Type: string

The date that Image Builder created this version of the component.

description
Type: string

The description of the component.

name
Type: string

The name of the component.

obfuscate
Type: boolean

Indicates whether component source is hidden from view in the console, and from component detail results for API, CLI, or SDK operations.

owner
Type: string

The owner of the component. The value is your account ID for components that you own, the sharing account's ID for shared components, or Amazon, ThirdParty, or AWSMarketplace.

platform
Type: string

The operating system platform of the component.

publisher
Type: string

Contains the name of the publisher if this is a third-party component. Otherwise, this property is empty.

state
Type: ComponentState structure

Describes the current status of the component.

supportedOsVersions
Type: Array of strings

The operating system (OS) version that the component supports. If the OS information is available, Image Builder performs a prefix match against the base image OS version during image recipe creation.

tags
Type: Associative array of custom strings keys (TagKey) to strings

The tags that apply to the component.

type
Type: string

The component type specifies whether Image Builder uses the component to build the image or only to test it.

version
Type: string

The version of the component.

ComponentVersion

Description

The defining characteristics of a specific version of a component.

Members
arn
Type: string

The Amazon Resource Name (ARN) of the component.

Semantic versioning is included in each object's Amazon Resource Name (ARN), at the level that applies to that object as follows:

  1. Versionless ARNs and Name ARNs do not include specific values in any of the nodes. The nodes are either left off entirely, or they are specified as wildcards, for example: x.x.x.

  2. Version ARNs have only the first three nodes: <major>.<minor>.<patch>

  3. Build version ARNs have all four nodes, and point to a specific build for a specific version of an object.

dateCreated
Type: string

The date that the component was created.

description
Type: string

The description of the component.

name
Type: string

The name of the component.

owner
Type: string

The owner of the component. The value is your account ID for components that you own, the sharing account's ID for shared components, or Amazon, ThirdParty, or AWSMarketplace.

platform
Type: string

The platform of the component.

productCodes
Type: Array of ProductCodeListItem structures

Contains product codes that are used for billing purposes for Amazon Web Services Marketplace components.

status
Type: string

Describes the current status of the component version.

supportedOsVersions
Type: Array of strings

The operating system (OS) version supported by the component. If OS information is available, Image Builder performs a prefix match against the base image OS version during image recipe creation.

type
Type: string

The type of the component denotes whether the component is used to build the image or only to test it.

version
Type: string

The semantic version of the component.

The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign values for the first three, and can filter on all of them.

Assignment: For the first three nodes, you can assign any positive integer value, including zero. The upper limit is 2^30-1, or 1073741823, for each node. Image Builder automatically assigns the build number to the fourth node.

Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as 2021.01.01.

Filtering: You can use wildcards (x) to specify the most recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards.

Container

Description

Details of the container images that are output resources of an image build in a given Amazon Web Services Region: the Region, and the URIs of the container images.

Members
imageUris
Type: Array of strings

A list of URIs for containers created in the context Region.

region
Type: string

Containers and container images are Region-specific. This is the Region context for the container.

ContainerDistributionConfiguration

Description

Defines how the output container image is distributed in a specific Amazon Web Services Region: the target repository, the image tags to apply to the distributed image, and an optional description.

Members
containerTags
Type: Array of strings

Tags that Image Builder applies to the distributed container image in the target repository. These are repository image tags, not resource tags.

description
Type: string

The description of the container distribution configuration.

targetRepository
Required: Yes
Type: TargetContainerRepository structure

The destination repository for the container distribution configuration.

ContainerRecipe

Description

Defines how Image Builder builds and tests a container image: the base image, components to apply, the Dockerfile template, the build and test instance configuration, and the target repository for the output image.

Members
arn
Type: string

The Amazon Resource Name (ARN) of the container recipe.

Semantic versioning is included in each object's Amazon Resource Name (ARN), at the level that applies to that object as follows:

  1. Versionless ARNs and Name ARNs do not include specific values in any of the nodes. The nodes are either left off entirely, or they are specified as wildcards, for example: x.x.x.

  2. Version ARNs have only the first three nodes: <major>.<minor>.<patch>

  3. Build version ARNs have all four nodes, and point to a specific build for a specific version of an object.

components
Type: Array of ComponentConfiguration structures

Build and test components that are included in the container recipe. A recipe can contain a maximum of 20 build and test components in any combination, by default. This maximum is an adjustable quota. For more information, see EC2 Image Builder endpoints and quotas in the Amazon Web Services General Reference.

containerType
Type: string

Specifies the type of container, such as Docker.

dateCreated
Type: string

The date when this container recipe was created.

description
Type: string

The description of the container recipe.

dockerfileTemplateData
Type: string

The Dockerfile template that Image Builder uses to build the container image. The template can include contextual variables that Image Builder replaces with build information at build time. For the contextual variables that the template can include, see Create a new version of a container recipe in the EC2 Image Builder User Guide.

encrypted
Type: boolean

Specifies whether the recipe's Dockerfile template data is encrypted at rest. Image Builder encrypts all Dockerfile template data at rest, so this value is always true. This field is retained for backward compatibility, and doesn't describe encryption of the output container image.

instanceConfiguration
Type: InstanceConfiguration structure

A group of options that can be used to configure an instance for building and testing container images.

kmsKeyId
Type: string

The KMS key that Image Builder uses to encrypt the recipe's Dockerfile template data at rest. This can be either the Key ARN or the Alias ARN. For more information, see Key identifiers (KeyId) in the Key Management Service Developer Guide. If you don't specify a key, Image Builder encrypts the template data with a KMS key that Image Builder owns. This key isn't used to encrypt the output container image.

name
Type: string

The name of the container recipe.

owner
Type: string

The owner of the container recipe.

parentImage
Type: string

The base image for customizations specified in the container recipe. This can contain an Image Builder image resource ARN or a container image URI, for example amazonlinux:latest.

platform
Type: string

The system platform for the container. Container recipes support only the Linux and Windows platforms.

tags
Type: Associative array of custom strings keys (TagKey) to strings

Tags that are attached to the container recipe.

targetRepository
Type: TargetContainerRepository structure

The destination repository for the container image.

version
Type: string

The semantic version of the container recipe.

The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign values for the first three, and can filter on all of them.

Assignment: For the first three nodes, you can assign any positive integer value, including zero. The upper limit is 2^30-1, or 1073741823, for each node. Image Builder automatically assigns the build number to the fourth node.

Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as 2021.01.01.

Filtering: You can use wildcards (x) to specify the most recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards.

workingDirectory
Type: string

The working directory for use during build and test workflows.

ContainerRecipeSummary

Description

A summary of a container recipe.

Members
arn
Type: string

The Amazon Resource Name (ARN) of the container recipe.

containerType
Type: string

Specifies the type of container, such as "Docker".

dateCreated
Type: string

The date when this container recipe was created.

instanceImage
Type: string

The base image for a container build and test instance. This can contain an AMI ID or it can specify an Amazon Web Services Systems Manager (SSM) Parameter Store Parameter, prefixed by ssm:, followed by the parameter name or ARN.

If not specified, Image Builder uses the appropriate ECS-optimized AMI as a base image.

name
Type: string

The name of the container recipe.

owner
Type: string

The owner of the container recipe.

parentImage
Type: string

The base image for the container recipe.

platform
Type: string

The system platform for the container. Container recipes support only the Linux and Windows platforms.

tags
Type: Associative array of custom strings keys (TagKey) to strings

Tags that are attached to the container recipe.

CvssScore

Description

A CVSS score for the vulnerability, as published by the vulnerability source. Sources include the National Vulnerability Database (NVD) and the operating system vendor's security feed. A finding can include CVSS scores from multiple sources and CVSS versions.

Members
baseScore
Type: double

The CVSS base score.

scoringVector
Type: string

The vector string of the CVSS score.

source
Type: string

The source of the CVSS score.

version
Type: string

The CVSS version that generated the score.

CvssScoreAdjustment

Description

Details about an adjustment that Amazon Inspector made to the CVSS score for a finding.

Members
metric
Type: string

The metric that Amazon Inspector used to adjust the CVSS score.

reason
Type: string

The reason for the CVSS score adjustment.

CvssScoreDetails

Description

Details about the source of the score, and the factors that determined the adjustments to create the final score.

Members
adjustments
Type: Array of CvssScoreAdjustment structures

The adjustments that Amazon Inspector applied to the base CVSS score to produce its own score for the finding. The list is empty when Amazon Inspector made no adjustments.

cvssSource
Type: string

The source of the CVSS data that the Amazon Inspector score for the finding is based on, for example NVD or a vendor security feed.

score
Type: double

The CVSS score.

scoreSource
Type: string

The source for the CVSS score.

scoringVector
Type: string

A vector that measures the severity of the vulnerability.

version
Type: string

The CVSS version that generated the score.

Distribution

Description

Defines the settings for a specific Region.

Members
amiDistributionConfiguration

The specific AMI settings; for example, launch permissions or AMI tags.

containerDistributionConfiguration

Container distribution settings for encryption, licensing, and sharing in a specific Region.

fastLaunchConfigurations
Type: Array of FastLaunchConfiguration structures

The Windows faster-launching configurations to use for AMI distribution.

launchTemplateConfigurations
Type: Array of LaunchTemplateConfiguration structures

A group of launchTemplateConfiguration settings that apply to image distribution for specified accounts.

licenseConfigurationArns
Type: Array of strings

The License Manager Configuration to associate with the AMI in the specified Region.

region
Required: Yes
Type: string

The target Region.

s3ExportConfiguration
Type: S3ExportConfiguration structure

Configure export settings to deliver disk images created from your image build, using a file format that is compatible with your VMs in that Region.

ssmParameterConfigurations
Type: Array of SsmParameterConfiguration structures

Contains settings to update Amazon Web Services Systems Manager (SSM) Parameter Store Parameters with output AMI IDs from the build by target Region.

DistributionConfiguration

Description

Defines how Image Builder distributes the output of an image build. You can configure:

  • The Regions to distribute the image to.

  • The Region-specific settings to apply, such as output AMI names, launch permissions for other Amazon Web Services accounts, and target container repositories.

Members
arn
Type: string

The Amazon Resource Name (ARN) of the distribution configuration.

dateCreated
Type: string

The date on which this distribution configuration was created.

dateUpdated
Type: string

The date on which this distribution configuration was last updated.

description
Type: string

The description of the distribution configuration.

distributions
Type: Array of Distribution structures

The distribution objects that apply Region-specific settings for the deployment of the image to targeted Regions.

name
Type: string

The name of the distribution configuration.

tags
Type: Associative array of custom strings keys (TagKey) to strings

The tags of the distribution configuration.

timeoutMinutes
Required: Yes
Type: int

A property that Image Builder doesn't use. You can't set this property when you create or update a distribution configuration, and it has no effect on distribution behavior.

DistributionConfigurationSummary

Description

A high-level overview of a distribution configuration.

Members
arn
Type: string

The Amazon Resource Name (ARN) of the distribution configuration.

dateCreated
Type: string

The date on which the distribution configuration was created.

dateUpdated
Type: string

The date on which the distribution configuration was updated.

description
Type: string

The description of the distribution configuration.

name
Type: string

The name of the distribution configuration.

regions
Type: Array of strings

A list of the Regions that the distribution configuration distributes images to.

tags
Type: Associative array of custom strings keys (TagKey) to strings

The tags associated with the distribution configuration.

DistributionFailureContext

Description

Contains details about a failure that occurred while Image Builder distributed the image or applied configuration to the distributed image.

Members
errorMessage
Type: string

The error message for the distribution failure.

regionFailures
Type: Array of RegionFailure structures

The details about the failure for each Region where the image didn't finish distribution or configuration.

DryRunOperationException

Description

The dry run operation of the resource was successful, and no resources or mutations were actually performed due to the dry run flag in the request.

Members
message
Type: string

EbsInstanceBlockDeviceSpecification

Description

Amazon EBS-specific block device mapping specifications.

Members
deleteOnTermination
Type: boolean

Specifies whether to delete the associated device on termination.

encrypted
Type: boolean

Specifies whether to encrypt the device.

iops
Type: int

The IOPS value for the device. Required only when volumeType is io1 or io2.

kmsKeyId
Type: string

The Amazon Resource Name (ARN) that uniquely identifies the KMS key to use when encrypting the device. This can be either the Key ARN or the Alias ARN. For more information, see Key identifiers (KeyId) in the Key Management Service Developer Guide.

snapshotId
Type: string

The snapshot that defines the device contents.

throughput
Type: int

For GP3 volumes only – The throughput in MiB/s that the volume supports.

volumeSize
Type: int

Overrides the volume size for the device.

volumeType
Type: string

Overrides the volume type for the device.

EcrConfiguration

Description

Settings that Image Builder uses to configure the ECR repository and the output container images that Amazon Inspector scans.

Members
containerTags
Type: Array of strings

Tags for Image Builder to apply to the output container image that Amazon Inspector scans. Tags can help you identify and manage your scanned images.

repositoryName
Type: string

The name of the container repository where Image Builder pushes the container image for the vulnerability scan. Provide the repository name only (a namespace path is allowed, but not the registry hostname); the repository must already exist in your account. If you don't specify a repository name, Image Builder creates the default repository image-builder-image-scanning-repository in your account.

FastLaunchConfiguration

Description

Defines and configures EC2 Fast Launch for output Windows AMIs.

Members
accountId
Type: string

The owner account ID for the fast-launch enabled Windows AMI.

enabled
Required: Yes
Type: boolean

Specifies whether to enable Windows fast launch on the output AMI during distribution. A value of false means Image Builder takes no fast-launch action for this configuration.

launchTemplate

The launch template that the fast-launch enabled Windows AMI uses when it launches Windows instances to create pre-provisioned snapshots.

maxParallelLaunches
Type: int

The maximum number of parallel instances that are launched for creating resources.

snapshotConfiguration

Configuration settings for managing the number of snapshots that are created from pre-provisioned instances for the Windows AMI when Windows fast launch is enabled.

FastLaunchLaunchTemplateSpecification

Description

Identifies the launch template that the associated Windows AMI uses for launching an instance when Windows fast launch is enabled.

You can specify either the launchTemplateName or the launchTemplateId, but not both.

Members
launchTemplateId
Type: string

The ID of the launch template to use for Windows fast launch for a Windows AMI.

launchTemplateName
Type: string

The name of the launch template to use for Windows fast launch for a Windows AMI.

launchTemplateVersion
Type: string

The version of the launch template to use for Windows fast launch for a Windows AMI.

FastLaunchSnapshotConfiguration

Description

Configuration settings for creating and managing pre-provisioned snapshots for a fast-launch enabled Windows AMI.

Members
targetResourceCount
Type: int

The number of pre-provisioned snapshots to keep on hand for a fast-launch enabled Windows AMI.

Filter

Description

A filter name and value pair that is used to return a more specific list of results from a list operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

Members
name
Type: string

The name of the filter. Filter names are case-sensitive.

values
Type: Array of strings

The filter values. Filter values are case-sensitive.

ForbiddenException

Description

You are not authorized to perform the requested operation.

Members
message
Type: string

IdempotentParameterMismatchException

Description

You have specified a client token for an operation using parameter values that differ from a previous request that used the same client token.

Members
message
Type: string

Image

Description

An Image Builder image resource that keeps track of all of the settings used to create, configure, and distribute output for that image. An image that Image Builder built from a recipe contains exactly one recipe – either a container recipe (containerRecipe), which creates a container image, or an image recipe (imageRecipe), which creates an AMI. Imported images don't contain a recipe.

Members
arn
Type: string

The Amazon Resource Name (ARN) of the image.

Semantic versioning is included in each object's Amazon Resource Name (ARN), at the level that applies to that object as follows:

  1. Versionless ARNs and Name ARNs do not include specific values in any of the nodes. The nodes are either left off entirely, or they are specified as wildcards, for example: x.x.x.

  2. Version ARNs have only the first three nodes: <major>.<minor>.<patch>

  3. Build version ARNs have all four nodes, and point to a specific build for a specific version of an object.

buildType
Type: string

Indicates the type of build that created this image. The build can be initiated in the following ways:

  • USER_INITIATED – A manual pipeline build request.

  • SCHEDULED – A pipeline build initiated by a cron expression in the Image Builder pipeline, or from EventBridge.

  • IMPORT – A VM import created the image to use as the base image for the recipe.

  • IMPORT_ISO – An ISO disk import created the image.

containerRecipe
Type: ContainerRecipe structure

For container images, this is the container recipe that Image Builder used to create the image. For images that distribute an AMI, this is empty.

dateCreated
Type: string

The date on which Image Builder created this image.

deprecationTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time when deprecation occurs for an image resource. This can be a past or future date.

distributionConfiguration
Type: DistributionConfiguration structure

The distribution configuration that Image Builder used to create this image.

enhancedImageMetadataEnabled
Type: boolean

Indicates whether Image Builder collects additional information about the image, such as the operating system (OS) version and package list.

executionRole
Type: string

The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to perform workflow actions.

imageRecipe
Type: ImageRecipe structure

For images that distribute an AMI, this is the image recipe that Image Builder used to create the image. For container images, this is empty.

imageScanningConfiguration
Type: ImageScanningConfiguration structure

Settings for the vulnerability scans that Amazon Inspector runs for this image. For AMI output, Amazon Inspector scans the test instance during image creation. For container output, Amazon Inspector scans the container image in its Amazon ECR repository.

imageSource
Type: string

The origin of the base image that Image Builder used to build this image.

imageTestsConfiguration
Type: ImageTestsConfiguration structure

The image test settings that Image Builder used when it created this image.

infrastructureConfiguration
Type: InfrastructureConfiguration structure

The infrastructure that Image Builder used to create this image.

lifecycleExecutionId
Type: string

Identifies the last runtime instance of the lifecycle policy to take action on the image.

loggingConfiguration
Type: ImageLoggingConfiguration structure

The logging configuration that's defined for the image. Image Builder uses the defined settings to direct execution log output during image creation.

name
Type: string

The name of the image.

osVersion
Type: string

The operating system version for instances that launch from this image. For example, Amazon Linux 2, Ubuntu 18, or Microsoft Windows Server 2019.

outputResources
Type: OutputResources structure

The output resources that Image Builder produces for this image.

platform
Type: string

The image operating system platform, such as Linux or Windows.

scanState
Type: ImageScanState structure

Contains information about the current state of scans for this image.

sourcePipelineArn
Type: string

The Amazon Resource Name (ARN) of the image pipeline that created this image. This field is only present for images that a pipeline execution created.

sourcePipelineName
Type: string

The name of the image pipeline that created this image. Image Builder doesn't return this field for new images. Use sourcePipelineArn instead.

state
Type: ImageState structure

The state of the image.

tags
Type: Associative array of custom strings keys (TagKey) to strings

The tags that apply to this image.

type
Type: string

Specifies whether this image produces an AMI or a container image.

version
Type: string

The semantic version of the image.

The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign values for the first three, and can filter on all of them.

Assignment: For the first three nodes, you can assign any positive integer value, including zero. The upper limit is 2^30-1, or 1073741823, for each node. Image Builder automatically assigns the build number to the fourth node.

Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as 2021.01.01.

Filtering: You can use wildcards (x) to specify the most recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards.

workflows
Type: Array of WorkflowConfiguration structures

The build, test, and distribution workflow configurations that are associated with the image.

ImageAggregation

Description

Contains vulnerability counts for a specific image.

Members
imageBuildVersionArn
Type: string

The Amazon Resource Name (ARN) that identifies the image for this aggregation.

severityCounts
Type: SeverityCounts structure

Counts by severity level for medium severity and higher level findings, plus a total for all of the findings for the specified image.

ImageFailureContext

Description

Contains details about the failure when the image creation process fails. Properties appear in the failure context when the related information is available for the failure.

Members
componentFailure
Type: ComponentFailureContext structure

The details about the component that failed, if the failure occurred while a component was running.

distributionFailure
Type: DistributionFailureContext structure

The details about the distribution failure, if the failure occurred while Image Builder distributed or configured the image.

failedStep
Type: string

The name of the workflow step that failed, as it appears in the workflow document.

imageStatus
Type: string

The status that the image had when the failure occurred. This indicates the stage of the image creation process where the image failed, for example BUILDING or DISTRIBUTING.

stepExecutionId
Type: string

The unique identifier of the workflow step execution that failed.

workflowArn
Type: string

The Amazon Resource Name (ARN) of the workflow build version that was running when the image failed.

workflowExecutionId
Type: string

The unique identifier of the workflow execution that was running when the image failed.

ImageLoggingConfiguration

Description

The logging configuration that's defined for the image. Image Builder uses the defined settings to direct execution log output during image creation.

Members
logGroupName
Type: string

The log group name that Image Builder uses for image creation. If not specified, the log group name defaults to /aws/imagebuilder/image-name.

ImagePackage

Description

A software package that's installed on an image, as detected by Amazon Web Services Systems Manager Inventory at build time. The list includes packages that shipped with the base image.

Members
packageName
Type: string

The name of the package that's reported to the operating system package manager.

packageVersion
Type: string

The version of the package that's reported to the operating system package manager.

ImagePipeline

Description

Defines the automation configuration for building, testing, and distributing images. A pipeline references the resources that its builds use, such as the recipe and infrastructure configuration. It also holds the settings that control its builds, such as the schedule and custom workflows.

Members
arn
Type: string

The Amazon Resource Name (ARN) of the image pipeline.

consecutiveFailures
Type: int

Image Builder tracks the number of consecutive failures for scheduled pipeline executions and takes one of the following actions each time it runs on a schedule:

  • If the pipeline execution is successful, the number of consecutive failures resets to zero.

  • If the pipeline execution fails, Image Builder increments the number of consecutive failures. If the failure count reaches the limit defined in the AutoDisablePolicy, Image Builder disables the pipeline.

The consecutive failure count is also reset to zero under the following conditions:

  • The pipeline runs manually and succeeds.

  • The pipeline configuration is updated.

If the pipeline runs manually and fails, the count remains the same. The next scheduled run continues to increment where it left off before.

containerRecipeArn
Type: string

The Amazon Resource Name (ARN) of the container recipe that is used for this pipeline.

dateCreated
Type: string

The date on which this image pipeline was created.

dateLastRun
Type: string

The date on which this image pipeline was last run.

dateNextRun
Type: string

The next date when the pipeline is scheduled to run.

dateUpdated
Type: string

The date on which this image pipeline was last updated.

description
Type: string

The description of the image pipeline.

distributionConfigurationArn
Type: string

The Amazon Resource Name (ARN) of the distribution configuration associated with this image pipeline.

enhancedImageMetadataEnabled
Type: boolean

Specifies whether to collect additional information about the image being created, including the operating system (OS) version and package list. Defaults to true.

executionRole
Type: string

The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder access to perform workflow actions.

imageRecipeArn
Type: string

The Amazon Resource Name (ARN) of the image recipe associated with this image pipeline.

imageScanningConfiguration
Type: ImageScanningConfiguration structure

Contains settings for vulnerability scans that Amazon Inspector runs against the test instance during image creation.

imageTags
Type: Associative array of custom strings keys (TagKey) to strings

The tags that Image Builder applies to the Image Builder image resource that this pipeline's scheduled executions create. These tags don't apply to the output AMI. Builds that you start manually use the tags from the StartImagePipelineExecution request instead.

imageTestsConfiguration
Type: ImageTestsConfiguration structure

The image tests configuration of the image pipeline.

infrastructureConfigurationArn
Type: string

The Amazon Resource Name (ARN) of the infrastructure configuration associated with this image pipeline.

lastRunStatus
Type: string

The status of the last image that this pipeline built, such as BUILDING, TESTING, FAILED, or AVAILABLE.

loggingConfiguration

The CloudWatch Logs configuration for the pipeline: the log group for image build logs and the log group for pipeline execution logs.

name
Type: string

The name of the image pipeline.

platform
Type: string

The platform of the image pipeline, inherited from the recipe that the pipeline uses.

schedule
Type: Schedule structure

The schedule of the image pipeline.

status
Type: string

The status of the image pipeline. A disabled pipeline doesn't run on its schedule, but you can still start builds manually. Image Builder can also disable a pipeline automatically when consecutive scheduled builds fail.

tags
Type: Associative array of custom strings keys (TagKey) to strings

The tags of this image pipeline.

workflows
Type: Array of WorkflowConfiguration structures

Contains the workflows that run for the image pipeline.

ImagePipelineAggregation

Description

Contains vulnerability counts for a specific image pipeline.

Members
imagePipelineArn
Type: string

The Amazon Resource Name (ARN) that identifies the image pipeline for this aggregation.

severityCounts
Type: SeverityCounts structure

Counts by severity level for medium severity and higher level findings, plus a total for all of the findings for the specified image pipeline.

ImageRecipe

Description

An image recipe.

Members
additionalInstanceConfiguration

Before you create a new AMI, Image Builder launches temporary Amazon EC2 instances to build and test your image configuration. Instance configuration adds a layer of control over those instances. You can define settings and add scripts to run when Image Builder launches your build instance.

amiTags
Type: Associative array of custom strings keys (TagKey) to strings

Tags that are applied to the AMI that Image Builder creates during the Build phase prior to image distribution.

amiWatermarks
Type: Array of strings

The AMI watermark names attached to the output AMI from this recipe. AMI watermarks are lineage markers that automatically propagate to derivative AMIs when the source AMI is copied or distributed.

arn
Type: string

The Amazon Resource Name (ARN) of the image recipe.

blockDeviceMappings
Type: Array of InstanceBlockDeviceMapping structures

The block device mappings to apply when creating images from this recipe.

components
Type: Array of ComponentConfiguration structures

The components that are included in the image recipe. A recipe can contain a maximum of 20 build and test components in any combination, by default. This maximum is an adjustable quota. For more information, see EC2 Image Builder endpoints and quotas in the Amazon Web Services General Reference.

dateCreated
Type: string

The date on which this image recipe was created.

description
Type: string

The description of the image recipe.

name
Type: string

The name of the image recipe.

owner
Type: string

The owner of the image recipe.

parentImage
Type: string

The base image for customizations specified in the image recipe. You can specify the parent image using one of the following options:

  • AMI ID

  • Image Builder image Amazon Resource Name (ARN)

  • Amazon Web Services Systems Manager (SSM) Parameter Store Parameter, prefixed by ssm:, followed by the parameter name or ARN.

  • Amazon Web Services Marketplace product ID

platform
Type: string

The platform of the image recipe.

tags
Type: Associative array of custom strings keys (TagKey) to strings

The tags of the image recipe.

type
Type: string

The output image type. For an image recipe, this is always AMI. Container images are built from container recipes, a separate resource. This field isn't currently returned in responses.

version
Type: string

The version of the image recipe.

workingDirectory
Type: string

The working directory used during build and test workflows. If you don't specify a working directory, Image Builder uses /tmp for Linux and macOS build instances, and C:/ for Windows build instances.

ImageRecipeSummary

Description

A summary of an image recipe.

Members
arn
Type: string

The Amazon Resource Name (ARN) of the image recipe.

dateCreated
Type: string

The date on which this image recipe was created.

name
Type: string

The name of the image recipe.

owner
Type: string

The owner of the image recipe.

parentImage
Type: string

The base image of the image recipe.

platform
Type: string

The platform of the image recipe.

tags
Type: Associative array of custom strings keys (TagKey) to strings

The tags of the image recipe.

ImageScanFinding

Description

Contains details about a vulnerability scan finding that Amazon Inspector generated for an image.

Members
awsAccountId
Type: string

The Amazon Web Services account ID that's associated with the finding.

description
Type: string

The description of the finding.

firstObservedAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the finding was first observed.

fixAvailable
Type: string

Details about whether a fix is available for any of the packages that are identified in the finding through a version update. Valid values include:

  • YES – A fix is available for all of the packages identified in the finding.

  • NO – No fix is available.

  • PARTIAL – A fix is available for some, but not all, of the packages identified in the finding.

imageBuildVersionArn
Type: string

The Amazon Resource Name (ARN) of the image build version that's associated with the finding.

imagePipelineArn
Type: string

The Amazon Resource Name (ARN) of the image pipeline that's associated with the finding.

inspectorScore
Type: double

The score that Amazon Inspector assigned for the finding.

inspectorScoreDetails
Type: InspectorScoreDetails structure

An object that contains details of the Amazon Inspector score.

packageVulnerabilityDetails
Type: PackageVulnerabilityDetails structure

An object that contains the details of a package vulnerability finding.

remediation
Type: Remediation structure

An object that contains the details about how to remediate the finding.

severity
Type: string

The severity of the finding. For more information, see Severity levels for Amazon Inspector findings in the Amazon Inspector User Guide.

title
Type: string

The title of the finding.

type
Type: string

The type of the finding. Image Builder looks for findings of the type PACKAGE_VULNERABILITY that apply to output images, and excludes other types.

updatedAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp when the finding was last updated.

ImageScanFindingAggregation

Description

This returns exactly one type of aggregation, based on the filter that Image Builder applies in its API action.

Members
accountAggregation
Type: AccountAggregation structure

Returns an object that contains severity counts based on an account ID.

imageAggregation
Type: ImageAggregation structure

Returns an object that contains severity counts based on the Amazon Resource Name (ARN) for a specific image.

imagePipelineAggregation
Type: ImagePipelineAggregation structure

Returns an object that contains severity counts based on an image pipeline ARN.

vulnerabilityIdAggregation
Type: VulnerabilityIdAggregation structure

Returns an object that contains severity counts based on vulnerability ID.

ImageScanFindingsFilter

Description

A name value pair that Image Builder applies to streamline results from the vulnerability scan findings list action.

Members
name
Type: string

The name of the image scan finding filter. Filter names are case-sensitive. Valid filter names are:

  • imageBuildVersionArn – Filters findings by the image build version that was scanned.

  • imagePipelineArn – Filters findings by the pipeline that created the scanned image.

  • vulnerabilityId – Filters findings by vulnerability ID, for example a CVE ID.

  • severity – Filters findings by severity level.

values
Type: Array of strings

The filter values. Filter values are case-sensitive.

ImageScanState

Description

Shows the vulnerability scan status for a specific image, and the reason for that status.

Members
reason
Type: string

The reason for the scan status for the image.

status
Type: string

The current state of vulnerability scans for the image. The scan starts as PENDING and moves through SCANNING and COLLECTING to COMPLETED. Image Builder sets the status to ABANDONED if the image reaches a terminal state before the scan finding collection completes. A scan can also end as FAILED or TIMED_OUT.

ImageScanningConfiguration

Description

Contains settings for Image Builder image resource and container image scans.

Members
ecrConfiguration
Type: EcrConfiguration structure

Contains Amazon ECR settings for vulnerability scans.

imageScanningEnabled
Type: boolean

Specifies whether Amazon Inspector scans for vulnerabilities when you create a new image, and whether Image Builder saves the findings. Amazon Inspector must be enabled in the account. Image tests must also be enabled. For AMI output, Amazon Inspector scans the test instance. For container output, Amazon Inspector scans the container image that Image Builder pushes to the Amazon ECR repository from your ecrConfiguration settings.

ImageState

Description

Image status and the reason for that status.

Members
failureContext
Type: ImageFailureContext structure

The details about the failure, for images that failed to complete. Image Builder only sets this property when the image status is FAILED.

reason
Type: string

The reason for the status of the image.

status
Type: string

The status of the image. A new image moves through build, test, and distribution statuses during creation, and ends in the AVAILABLE, FAILED, or CANCELLED state. The DEPRECATED, DISABLED, and DELETED statuses come from later resource management actions.

ImageSummary

Description

An image summary.

Members
arn
Type: string

The Amazon Resource Name (ARN) of the image.

buildType
Type: string

Indicates the type of build that created this image. The build can be initiated in the following ways:

  • USER_INITIATED – A manual pipeline build request.

  • SCHEDULED – A pipeline build initiated by a cron expression in the Image Builder pipeline, or from EventBridge.

  • IMPORT – A VM import created the image to use as the base image for the recipe.

  • IMPORT_ISO – An ISO disk import created the image.

dateCreated
Type: string

The date on which Image Builder created this image.

deprecationTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time when deprecation occurs for an image resource. This can be a past or future date.

imageSource
Type: string

The origin of the base image that Image Builder used to build this image.

lifecycleExecutionId
Type: string

Identifies the last runtime instance of the lifecycle policy to take action on the image.

loggingConfiguration
Type: ImageLoggingConfiguration structure

The logging configuration that's defined for the image.

name
Type: string

The name of the image.

osVersion
Type: string

The operating system version of the instances that launch from this image. For example, Amazon Linux 2, Ubuntu 18, or Microsoft Windows Server 2019.

outputResources
Type: OutputResources structure

The output resources that Image Builder produced when it created this image.

owner
Type: string

The owner of the image.

platform
Type: string

The image operating system platform, such as Linux or Windows.

state
Type: ImageState structure

The state of the image.

tags
Type: Associative array of custom strings keys (TagKey) to strings

The tags that apply to this image.

type
Type: string

Specifies whether this image produces an AMI or a container image.

version
Type: string

The version of the image.

ImageTestsConfiguration

Description

Configure image tests for your pipeline build. Tests run after building the image, to verify that the AMI or container image is valid before distributing it.

Members
imageTestsEnabled
Type: boolean

Specifies whether tests run after building the image. When enabled, tests run after the image build and before image distribution. Defaults to true.

timeoutMinutes
Type: int

The maximum time in minutes that tests are permitted to run. If you don't specify a value, Image Builder stores and returns 720.

The timeout property is not currently active. This value is ignored.

ImageVersion

Description

The defining characteristics of a specific version of an Image Builder image.

Members
arn
Type: string

The Amazon Resource Name (ARN) of a specific version of an Image Builder image.

Semantic versioning is included in each object's Amazon Resource Name (ARN), at the level that applies to that object as follows:

  1. Versionless ARNs and Name ARNs do not include specific values in any of the nodes. The nodes are either left off entirely, or they are specified as wildcards, for example: x.x.x.

  2. Version ARNs have only the first three nodes: <major>.<minor>.<patch>

  3. Build version ARNs have all four nodes, and point to a specific build for a specific version of an object.

buildType
Type: string

Indicates the type of build that created this image. The build can be initiated in the following ways:

  • USER_INITIATED – A manual pipeline build request.

  • SCHEDULED – A pipeline build initiated by a cron expression in the Image Builder pipeline, or from EventBridge.

  • IMPORT – A VM import created the image to use as the base image for the recipe.

  • IMPORT_ISO – An ISO disk import created the image.

dateCreated
Type: string

The date on which this specific version of the Image Builder image was created.

imageSource
Type: string

The origin of the base image that Image Builder used to build this image.

name
Type: string

The name of this specific version of an Image Builder image.

osVersion
Type: string

The operating system version of the image. For example, Amazon Linux 2023 or Microsoft Windows Server 2022.

owner
Type: string

The owner of the image version.

platform
Type: string

The operating system platform of the image version, for example "Windows" or "Linux".

type
Type: string

Specifies whether this image produces an AMI or a container image.

version
Type: string

The semantic version of the image. This version follows the semantic version syntax.

The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign values for the first three, and can filter on all of them.

Assignment: For the first three nodes, you can assign any positive integer value, including zero. The upper limit is 2^30-1, or 1073741823, for each node. Image Builder automatically assigns the build number to the fourth node.

Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as 2021.01.01.

Filtering: You can use wildcards (x) to specify the most recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards.

InfrastructureConfiguration

Description

Details of the infrastructure configuration.

Members
arn
Type: string

The Amazon Resource Name (ARN) of the infrastructure configuration.

dateCreated
Type: string

The date on which the infrastructure configuration was created.

dateUpdated
Type: string

The date on which the infrastructure configuration was last updated.

description
Type: string

The description of the infrastructure configuration.

instanceMetadataOptions
Type: InstanceMetadataOptions structure

The instance metadata option settings for the infrastructure configuration.

instanceProfileName
Type: string

The instance profile of the infrastructure configuration.

instanceTypes
Type: Array of strings

The instance types of the infrastructure configuration.

keyPair
Type: string

The Amazon EC2 key pair of the infrastructure configuration.

logging
Type: Logging structure

The logging configuration of the infrastructure configuration. When you configure S3 logs, Image Builder writes logs from the build and test process to the specified bucket under the key prefix.

name
Type: string

The name of the infrastructure configuration.

placement
Type: Placement structure

The instance placement settings that define where the build and test instances that Image Builder launches during image creation run. These settings don't affect instances that you launch from the output image.

resourceTags
Type: Associative array of custom strings keys (TagKey) to strings

The metadata tags assigned to the Amazon EC2 build and test instances that Image Builder launches during image creation.

securityGroupIds
Type: Array of strings

The security group IDs of the infrastructure configuration.

snsTopicArn
Type: string

The Amazon Resource Name (ARN) of the SNS topic to which Image Builder sends image build event notifications. Specify a standard topic. Image Builder doesn't support FIFO topics.

EC2 Image Builder can't send notifications to SNS topics that are encrypted using keys from other accounts. If your SNS topic is encrypted, the key must be owned by the same account that owns your Image Builder resources.

subnetId
Type: string

The subnet ID of the infrastructure configuration.

tags
Type: Associative array of custom strings keys (TagKey) to strings

The tags of the infrastructure configuration.

terminateInstanceOnFailure
Type: boolean

Indicates whether Image Builder terminates the build and test instances when the image build fails. When false, Image Builder retains the instance so that you can debug it.

InfrastructureConfigurationSummary

Description

Contains a high-level summary of an infrastructure configuration, including the environment settings that Image Builder uses to build and test images.

Members
arn
Type: string

The Amazon Resource Name (ARN) of the infrastructure configuration.

dateCreated
Type: string

The date on which the infrastructure configuration was created.

dateUpdated
Type: string

The date on which the infrastructure configuration was last updated.

description
Type: string

The description of the infrastructure configuration.

instanceProfileName
Type: string

The instance profile of the infrastructure configuration.

instanceTypes
Type: Array of strings

The instance types of the infrastructure configuration.

name
Type: string

The name of the infrastructure configuration.

placement
Type: Placement structure

The instance placement settings that define where the build and test instances that Image Builder launches during image creation run. These settings don't affect instances that you launch from the output image.

resourceTags
Type: Associative array of custom strings keys (TagKey) to strings

The metadata tags assigned to the Amazon EC2 build and test instances that Image Builder launches during image creation.

tags
Type: Associative array of custom strings keys (TagKey) to strings

The tags of the infrastructure configuration.

InspectorScoreDetails

Description

Information about the factors that influenced the score that Amazon Inspector assigned for a finding.

Members
adjustedCvss
Type: CvssScoreDetails structure

The CVSS score that Amazon Inspector assigned to the finding after applying its adjustments. It includes the score source, CVSS version, scoring vector, and the adjustments applied.

InstanceBlockDeviceMapping

Description

Defines block device mappings for the instance used to configure your image.

Members
deviceName
Type: string

The device to which these mappings apply.

ebs

The Amazon EBS-specific configuration for this mapping.

noDevice
Type: string

Specifies a mapping to remove from the base image.

virtualName
Type: string

The virtual device name for instance ephemeral devices.

InstanceConfiguration

Description

Defines a custom base AMI and block device mapping configurations of an instance used for building and testing container images.

Members
blockDeviceMappings
Type: Array of InstanceBlockDeviceMapping structures

Defines the block device mappings for the EC2 instance that Image Builder launches to build and test your container image.

image
Type: string

The base image for a container build and test instance. This can contain an AMI ID or it can specify an Amazon Web Services Systems Manager (SSM) Parameter Store Parameter, prefixed by ssm:, followed by the parameter name or ARN.

If not specified, Image Builder uses the appropriate ECS-optimized AMI as a base image.

InstanceMetadataOptions

Description

The instance metadata service (IMDS) settings that Image Builder applies to the EC2 build and test instances it launches. These settings control how software on those instances retrieves instance metadata and IAM role credentials.

Members
httpPutResponseHopLimit
Type: int

Limit the number of hops that an instance metadata request can traverse to reach its destination. If you don't set a value, the EC2 launch default for the instance applies. If HTTP tokens are required, container image builds need a minimum of two hops.

httpTokens
Type: string

Indicates whether a signed token header is required for instance metadata retrieval requests. The values affect the response as follows:

  • required – When you retrieve the IAM role credentials, version 2.0 credentials are returned in all cases.

  • optional – You can include a signed token header in your request to retrieve instance metadata, or you can leave it out. If you include it, version 2.0 credentials are returned for the IAM role. Otherwise, version 1.0 credentials are returned.

If you don't set a value, the EC2 launch default applies to the build and test instances. That default depends on the base AMI and any account-level instance metadata defaults. For more information, see Configure the instance metadata options in the Amazon EC2 User Guide .

InvalidPaginationTokenException

Description

You have provided an invalid pagination token in your request.

Members
message
Type: string

InvalidParameterCombinationException

Description

You have specified a combination of parameters that isn't valid. For example, two mutually exclusive parameters, or a parameter without its required companion parameter. Review the error message for details.

Members
message
Type: string

InvalidParameterException

Description

The specified parameter is invalid. Review the available parameters for the API request.

Members
message
Type: string

InvalidParameterValueException

Description

The value that you provided for the specified parameter is invalid.

Members
message
Type: string

InvalidRequestException

Description

The request is malformed or otherwise invalid. Verify the request and try again.

Members
message
Type: string

InvalidVersionNumberException

Description

Your version number is out of bounds or does not follow the required syntax.

Members
message
Type: string

LatestVersionReferences

Description

A set of wildcard version ARNs that always reference the latest version of the resource. ARNs are included for the latest version overall, and for the latest versions within the same major, minor, and patch levels.

Members
latestMajorVersionArn
Type: string

The latest version Amazon Resource Name (ARN) with the same major version of the Image Builder resource.

latestMinorVersionArn
Type: string

The latest version Amazon Resource Name (ARN) with the same minor version of the Image Builder resource.

latestPatchVersionArn
Type: string

The latest version Amazon Resource Name (ARN) with the same patch version of the Image Builder resource.

latestVersionArn
Type: string

The latest version Amazon Resource Name (ARN) of the Image Builder resource.

LaunchPermissionConfiguration

Description

Describes the configuration for a launch permission. The launch permission modification request is sent to the Amazon EC2 ModifyImageAttribute API on behalf of the user for each Region they have selected to distribute the AMI. To make an AMI public, set userGroups to the value all. See the examples for making an AMI public at Amazon EC2 ModifyImageAttribute.

Members
organizationArns
Type: Array of strings

The ARN for an Amazon Web Services Organization that you want to share your AMI with. For more information, see What is Organizations?.

organizationalUnitArns
Type: Array of strings

The ARN for an Organizations organizational unit (OU) that you want to share your AMI with. For more information about key concepts for Organizations, see Organizations terminology and concepts.

userGroups
Type: Array of strings

The name of the group that you want to grant launch permission to. The only supported value is all, which makes the distributed AMI public.

userIds
Type: Array of strings

The Amazon Web Services account IDs to grant launch permission to. Each listed account can use the distributed AMI to launch instances.

LaunchTemplateConfiguration

Description

Identifies an Amazon EC2 launch template to use for a specific account.

Members
accountId
Type: string

The account ID that this configuration applies to.

launchTemplateId
Required: Yes
Type: string

Identifies the Amazon EC2 launch template to use.

setDefaultVersion
Type: boolean

Specifies whether to make the new launch template version that Image Builder creates the default version of the launch template. If you don't set a value, Image Builder treats it as true.

LifecycleExecution

Description

Contains metadata from a runtime instance of a lifecycle policy.

Members
endTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp when the lifecycle runtime instance completed.

lifecycleExecutionId
Type: string

Identifies the lifecycle policy runtime instance.

lifecyclePolicyArn
Type: string

The Amazon Resource Name (ARN) of the lifecycle policy that ran.

resourcesImpactedSummary

A summary flag that indicates whether the lifecycle execution identified any resources to take lifecycle actions on.

startTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp when the lifecycle runtime instance started.

state
Type: LifecycleExecutionState structure

Runtime state that reports whether the lifecycle execution is in progress, succeeded, or failed.

LifecycleExecutionResource

Description

Contains details for a resource that the runtime instance of the lifecycle policy identified for action.

Members
accountId
Type: string

The account that owns the impacted resource.

action

The action to take for the identified resource.

endTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The ending timestamp from the lifecycle action that was applied to the resource.

imageUris
Type: Array of strings

For an impacted container image, this identifies a list of URIs for associated container images distributed to ECR repositories.

region
Type: string

The Amazon Web Services Region where the lifecycle execution resource is stored.

resourceId
Type: string

Identifies the impacted resource. The resource ID depends on the type of resource, as follows.

  • Image Builder image resources: Amazon Resource Name (ARN)

  • Distributed AMIs: AMI ID

  • Container images distributed to an ECR repository: image URI or SHA Digest

snapshots
Type: Array of LifecycleExecutionSnapshotResource structures

A list of associated resource snapshots for the impacted resource if it’s an AMI.

startTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The starting timestamp from the lifecycle action that was applied to the resource.

state

The runtime state of the lifecycle action for this resource.

LifecycleExecutionResourceAction

Description

The lifecycle policy action that was identified for the impacted resource.

Members
name
Type: string

The name of the lifecycle action that was identified for the resource.

reason
Type: string

The reason why the lifecycle policy action is taken.

LifecycleExecutionResourceState

Description

Contains the state of an impacted resource that the runtime instance of the lifecycle policy identified for action.

Members
reason
Type: string

Messaging that clarifies the reason for the assigned status.

status
Type: string

The runtime status of the lifecycle action taken for the impacted resource.

LifecycleExecutionResourcesImpactedSummary

Description

Contains an indicator that shows whether the lifecycle execution identified any resources to take lifecycle actions on.

Members
hasImpactedResources
Type: boolean

Indicates whether the lifecycle execution identified any resources to take lifecycle actions on.

LifecycleExecutionSnapshotResource

Description

Contains the state of an impacted snapshot resource that the runtime instance of the lifecycle policy identified for action.

Members
snapshotId
Type: string

Identifies the impacted snapshot resource.

state

The runtime status of the lifecycle action taken for the snapshot.

LifecycleExecutionState

Description

The current state of the runtime instance of the lifecycle policy.

Members
reason
Type: string

The reason for the current status.

status
Type: string

The runtime status of the lifecycle execution.

LifecyclePolicy

Description

Defines a lifecycle policy resource: its identity, status, execution role, resource type, rules, resource selection, timestamps, and tags.

Members
arn
Type: string

The Amazon Resource Name (ARN) of the lifecycle policy resource.

dateCreated
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp when Image Builder created the lifecycle policy resource.

dateLastRun
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp for the last time Image Builder ran the lifecycle policy.

dateUpdated
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp when Image Builder updated the lifecycle policy resource.

description
Type: string

Optional description for the lifecycle policy.

executionRole
Type: string

The name or Amazon Resource Name (ARN) of the IAM role that Image Builder uses to run the lifecycle policy. This is a custom role that you create.

name
Type: string

The name of the lifecycle policy.

policyDetails
Type: Array of LifecyclePolicyDetail structures

The list of rules for the lifecycle policy. Each rule pairs an action with a filter and optional exclusion rules. A policy can contain at most one rule per action type.

resourceSelection

Resource selection criteria used to run the lifecycle policy.

resourceType
Type: string

The type of resources the lifecycle policy targets.

status
Type: string

Indicates whether the lifecycle policy resource is enabled. Only enabled policies run on their schedule. Disabling or deleting a policy removes its schedule and cancels any in-flight lifecycle execution.

tags
Type: Associative array of custom strings keys (TagKey) to strings

To help manage your lifecycle policy resources, you can assign your own metadata to each resource in the form of tags. Each tag consists of a key and an optional value, both of which you define.

LifecyclePolicyDetail

Description

Defines one lifecycle policy rule: the action to take, the filter that determines which resources the rule applies to, and optional exclusion rules.

Members
action
Required: Yes
Type: LifecyclePolicyDetailAction structure

Configuration details for the policy action.

exclusionRules

Additional rules to specify resources that should be exempt from policy actions.

filter
Required: Yes
Type: LifecyclePolicyDetailFilter structure

Specifies the resources that the lifecycle policy applies to.

LifecyclePolicyDetailAction

Description

Contains the action configuration for a lifecycle policy rule: the action to take, and which underlying resources the action extends to.

Members
includeResources

Specifies which underlying resources the action extends to beyond the Image Builder image resource itself: distributed AMIs, their snapshots, or distributed container images. DELETE rules can include all three, DEPRECATE and DISABLE rules can include AMIs only, and you can only include snapshots together with AMIs.

type
Required: Yes
Type: string

Specifies the lifecycle action to take. DELETE deletes the image resource and, with includeResources, also removes distributed AMIs, snapshots, or container images. DEPRECATE and DISABLE set the corresponding status on the image resource and, if includeResources.amis is set, on its distributed AMIs.

LifecyclePolicyDetailActionIncludeResources

Description

Specifies how the lifecycle policy should apply actions to selected resources.

Members
amis
Type: boolean

Specifies whether the lifecycle action should apply to distributed AMIs.

containers
Type: boolean

Specifies whether the lifecycle action should apply to distributed containers.

snapshots
Type: boolean

Specifies whether the lifecycle action should apply to snapshots associated with distributed AMIs.

LifecyclePolicyDetailExclusionRules

Description

Specifies resources that lifecycle policy actions should not apply to.

Members
amis

Lists configuration values that apply to AMIs that Image Builder should exclude from the lifecycle action.

tagMap
Type: Associative array of custom strings keys (TagKey) to strings

Contains a list of tags that Image Builder uses to skip lifecycle actions for Image Builder image resources that have them.

LifecyclePolicyDetailExclusionRulesAmis

Description

Defines criteria for AMIs that are excluded from lifecycle actions.

Members
isPublic
Type: boolean

Configures whether public AMIs are excluded from the lifecycle action.

lastLaunched

Configures Image Builder to exclude AMIs that were launched within the specified time period from lifecycle actions. AMIs with no recorded last-launched time aren't excluded by this rule.

regions
Type: Array of strings

Configures Amazon Web Services Regions that are excluded from the lifecycle action.

sharedAccounts
Type: Array of strings

The lifecycle action doesn't apply to AMIs that are shared with any of the specified Amazon Web Services accounts.

tagMap
Type: Associative array of custom strings keys (TagKey) to strings

Lifecycle actions don't apply to AMIs that have any of these tags. Both the key and the value must match.

LifecyclePolicyDetailExclusionRulesAmisLastLaunched

Description

Defines criteria to exclude AMIs from lifecycle actions based on the last time they were used to launch an instance.

Members
unit
Required: Yes
Type: string

Defines the unit of time that the lifecycle policy uses to calculate elapsed time since the last launch.

value
Required: Yes
Type: int

The integer number of units for the time period. For example 6 (months).

LifecyclePolicyDetailFilter

Description

Defines filters that the lifecycle policy uses to determine impacted resource.

Members
retainAtLeast
Type: int

For age-based filters, this is the number of resources to keep on hand after the lifecycle DELETE action is applied. Impacted resources are only deleted if you have more than this number of resources. If you have fewer resources than this number, the impacted resource is not deleted.

type
Required: Yes
Type: string

Filter resources based on either AGE or COUNT. You can only use the count filter with the DELETE action type.

unit
Type: string

Defines the unit of time that the lifecycle policy uses to determine impacted resources. This is required for age-based rules.

value
Required: Yes
Type: int

The number of units for the time period or for the count. For example, a value of 6 might refer to six months or six AMIs.

For count-based filters, this value represents the minimum number of resources to keep on hand. If you have fewer resources than this number, the resource is excluded from lifecycle actions.

LifecyclePolicyResourceSelection

Description

Resource selection criteria for the lifecycle policy. You must provide exactly one selection criteria: either recipes or a tag map, not both.

Members
recipes
Type: Array of LifecyclePolicyResourceSelectionRecipe structures

A list of recipes that are used as selection criteria for the output images that the lifecycle policy applies to.

tagMap
Type: Associative array of custom strings keys (TagKey) to strings

A list of tags that are used as selection criteria for the Image Builder image resources that the lifecycle policy applies to.

LifecyclePolicyResourceSelectionRecipe

Description

Specifies an Image Builder recipe that the lifecycle policy uses for resource selection.

Members
name
Required: Yes
Type: string

The name of an Image Builder recipe that the lifecycle policy uses for resource selection.

semanticVersion
Required: Yes
Type: string

The version of the Image Builder recipe specified by the name field.

LifecyclePolicySummary

Description

Contains a summary of lifecycle policy resources.

Members
arn
Type: string

The Amazon Resource Name (ARN) of the lifecycle policy.

dateCreated
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp when Image Builder created the lifecycle policy resource.

dateLastRun
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp for the last time Image Builder ran the lifecycle policy.

dateUpdated
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp when Image Builder updated the lifecycle policy resource.

description
Type: string

Optional description for the lifecycle policy.

executionRole
Type: string

The name or Amazon Resource Name (ARN) of the IAM role that Image Builder uses to run the lifecycle policy.

name
Type: string

The name of the lifecycle policy.

resourceType
Type: string

The type of resources the lifecycle policy targets.

status
Type: string

The lifecycle policy resource status.

tags
Type: Associative array of custom strings keys (TagKey) to strings

To help manage your lifecycle policy resources, you can assign your own metadata to each resource in the form of tags. Each tag consists of a key and an optional value, both of which you define.

Logging

Description

Logging configuration defines where Image Builder uploads your logs.

Members
s3Logs
Type: S3Logs structure

The Amazon S3 logging configuration.

OutputResources

Description

The resources produced by this image.

Members
amis
Type: Array of Ami structures

The Amazon EC2 AMIs created by this image. The list contains one entry per AMI, including copies that distribution created in each target Amazon Web Services Region and account.

containers
Type: Array of Container structures

The container images that Image Builder created when it built this image, stored in the output Amazon ECR repository.

PackageVulnerabilityDetails

Description

Information about package vulnerability findings.

Members
cvss
Type: Array of CvssScore structures

The CVSS scores for the vulnerability in this finding, as published by the vulnerability sources. Sources include NVD and the operating system vendor, and scores can span CVSS versions.

referenceUrls
Type: Array of strings

Links to web pages that contain details about the vulnerabilities that Amazon Inspector identified for the package.

relatedVulnerabilities
Type: Array of strings

Vulnerabilities that are often related to the findings for the package.

source
Type: string

The source of the vulnerability information.

sourceUrl
Type: string

A link to the source of the vulnerability information.

vendorCreatedAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when this vulnerability was first added to the vendor's database.

vendorSeverity
Type: string

The severity that the vendor assigned to this vulnerability type.

vendorUpdatedAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time when the vendor last updated this vulnerability in their database.

vulnerabilityId
Required: Yes
Type: string

A unique identifier for this vulnerability.

vulnerablePackages
Type: Array of VulnerablePackage structures

The packages that this vulnerability impacts.

PipelineLoggingConfiguration

Description

The logging configuration that's defined for pipeline execution.

Members
imageLogGroupName
Type: string

Specifies the CloudWatch Logs log group name for image build logs. The log group name can contain alphanumeric characters, hyphens, underscores, forward slashes, and periods, up to 512 characters. Log group names not starting with /aws/imagebuilder/ require an executionRole with CloudWatch Logs write permissions. If not specified, defaults to /aws/imagebuilder/image-name.

pipelineLogGroupName
Type: string

Specifies the CloudWatch Logs log group name for pipeline execution logs. The log group name can contain alphanumeric characters, hyphens, underscores, forward slashes, and periods, up to 512 characters. Log group names not starting with /aws/imagebuilder/ require an executionRole with CloudWatch Logs write permissions. If not specified, defaults to /aws/imagebuilder/pipeline/pipeline-name.

Placement

Description

By default, EC2 instances run on shared tenancy hardware. This means that multiple Amazon Web Services accounts might share the same physical hardware. When you use dedicated hardware, the physical server that hosts your instances is dedicated to your Amazon Web Services account. Instance placement settings contain the details for the physical hardware where instances that Image Builder launches during image creation will run.

Members
availabilityZone
Type: string

The Availability Zone where your build and test instances will launch.

hostId
Type: string

The ID of the Dedicated Host on which build and test instances run. This only applies if tenancy is host.

hostResourceGroupArn
Type: string

The Amazon Resource Name (ARN) of the host resource group in which to launch build and test instances. This only applies if tenancy is host.

tenancy
Type: string

The tenancy of the instance. An instance with a tenancy of dedicated runs on single-tenant hardware. An instance with a tenancy of host runs on a Dedicated Host.

If tenancy is set to host, then you can optionally specify one target for placement – either host ID or host resource group ARN. If automatic placement is enabled for your host, and you don't specify any placement target, Amazon EC2 will try to find an available host for your build and test instances.

ProductCodeListItem

Description

Information about a single product code.

Members
productCodeId
Required: Yes
Type: string

For Amazon Web Services Marketplace components, this contains the product code ID that can be stamped onto an EC2 AMI to ensure that components are billed correctly. If this property is empty, it might mean that the component is not published.

productCodeType
Required: Yes
Type: string

The owner of the product code that's billed. If this property is empty, it might mean that the component is not published.

RegionFailure

Description

Contains details about a distribution or image configuration failure for a single Region.

Members
errorMessage
Type: string

The error message for the failure in the Region.

imageConfigurationStep
Type: string

The image configuration step where the failure occurred. Image Builder sets this property when the failure happened during post-distribution configuration, such as launch template updates or virtual machine (VM) export. This property doesn't appear for failures that occurred while Image Builder copied the image to the Region.

region
Type: string

The Region where the failure occurred.

status
Type: string

The failure status for the Region. Indicates whether the process failed, was canceled, or timed out.

targetAccountId
Type: string

The account ID of the account that the image was distributed to in the Region.

RegisterImageOptions

Description

Controls Secure Boot and UEFI data settings for the resulting image during ISO imports. For more information, see UEFI Secure Boot for Amazon EC2 instances in the Amazon EC2 User Guide .

Members
secureBootEnabled
Type: boolean

Specifies whether Secure Boot is enabled for the output AMI. The default value is true. To disable Secure Boot for custom unsigned drivers, set this value to false.

uefiData
Type: string

A Base64-encoded representation of the non-volatile UEFI variable store. You can specify this parameter only when secureBootEnabled is true or unspecified. You can inspect and modify the UEFI data by using the python-uefivars tool on GitHub.

For more information, see UEFI variables for Amazon EC2 instances.

Remediation

Description

Information about how to remediate a finding.

Members
recommendation
Type: RemediationRecommendation structure

An object that contains information about the recommended course of action to remediate the finding.

RemediationRecommendation

Description

Details about the recommended course of action to remediate the finding.

Members
text
Type: string

The recommended course of action to remediate the finding.

url
Type: string

A link to more information about the recommended remediation for this vulnerability.

ResourceAlreadyExistsException

Description

The resource that you are trying to create already exists.

Members
message
Type: string

ResourceDependencyException

Description

You have attempted to mutate or delete a resource with a dependency that prohibits this action. See the error message for more details.

Members
message
Type: string

ResourceInUseException

Description

The resource that you are trying to operate on is currently in use. Review the message details and retry later.

Members
message
Type: string

ResourceNotFoundException

Description

At least one of the resources referenced by your request does not exist.

Members
message
Type: string

ResourceState

Description

The state to apply to the image resource in a resource state update request.

Members
status
Type: string

The status to which you want to move the image resource. Set the status to AVAILABLE to restore an image that's currently deprecated or disabled.

ResourceStateUpdateExclusionRules

Description

Additional rules to specify resources that should be exempt from ad-hoc lifecycle actions.

Members
amis

Defines criteria for AMIs that Image Builder should exclude from the resource state update.

ResourceStateUpdateIncludeResources

Description

Specifies which underlying resources the resource state update applies to, in addition to the Image Builder image resource itself: distributed AMIs and their snapshots for AMI images, or distributed container images for container images.

Members
amis
Type: boolean

Specifies whether the lifecycle action should apply to distributed AMIs.

containers
Type: boolean

Specifies whether the lifecycle action should apply to distributed containers.

snapshots
Type: boolean

Specifies whether the lifecycle action should apply to snapshots associated with distributed AMIs.

S3ExportConfiguration

Description

Properties that configure exporting the output image to a disk image file in an Amazon S3 bucket, in a format that's compatible with your VMs.

Members
diskImageFormat
Required: Yes
Type: string

Export the updated image to one of the following supported disk image formats:

  • Virtual Hard Disk (VHD) – Compatible with Citrix Xen and Microsoft Hyper-V virtualization products.

  • Stream-optimized ESX Virtual Machine Disk (VMDK) – Compatible with VMware ESX and VMware vSphere versions 4, 5, and 6.

  • Raw – Raw format.

roleName
Required: Yes
Type: string

The name of the role that grants VM Import/Export permission to export images to your S3 bucket.

s3Bucket
Required: Yes
Type: string

The S3 bucket in which to store the output disk images for your VM.

s3Prefix
Type: string

The Amazon S3 path for the bucket where the output disk images for your VM are stored.

S3Logs

Description

Amazon S3 logging configuration.

Members
s3BucketName
Type: string

The name of an existing Amazon S3 bucket where Image Builder saves build logs. The bucket isn't validated when you create or update the configuration, and Image Builder doesn't create it. The instance profile associated with this infrastructure configuration must have permission to write to the bucket.

s3KeyPrefix
Type: string

The Amazon S3 key prefix under which Image Builder writes build and test logs in the bucket.

Schedule

Description

A schedule configures when and how often a pipeline will automatically create a new image.

Members
autoDisablePolicy
Type: AutoDisablePolicy structure

The policy that configures when Image Builder should automatically disable a pipeline that is failing.

pipelineExecutionStartCondition
Type: string

The start condition configures when the pipeline should trigger a new image build, as follows. If no value is set Image Builder defaults to EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE.

  • EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE (default) – When you use semantic version filters on the base image or components in your image recipe, EC2 Image Builder builds a new image only when there are new versions of the base image or components in your recipe that match the filter.

    For semantic version syntax, see CreateComponent.

  • EXPRESSION_MATCH_ONLY – This condition builds a new image every time the CRON expression matches the current time.

If the recipe references its base image through an Amazon Web Services Systems Manager Parameter Store parameter, a change in the parameter's value also counts as an available dependency update.

scheduleExpression
Type: string

The expression determines how often EC2 Image Builder evaluates your pipelineExecutionStartCondition. You can specify a cron expression, or a rate expression such as rate(1 day).

For information on how to format a cron expression in Image Builder, see Use cron expressions in EC2 Image Builder.

timezone
Type: string

The timezone that applies to the scheduling expression. Specify a value in IANA timezone format, for example Etc/UTC or America/Los_Angeles. If not specified, this defaults to UTC.

ServiceException

Description

An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.

Members
message
Type: string

ServiceQuotaExceededException

Description

You have exceeded the number of permitted resources or operations for this service. For service quotas, see EC2 Image Builder endpoints and quotas.

Members
message
Type: string

ServiceUnavailableException

Description

The service is unable to process your request at this time.

Members
message
Type: string

SeverityCounts

Description

Includes counts by severity level for medium severity and higher level findings, plus a total for all of the findings for the specified filter.

Members
all
Type: long (int|float)

The total number of findings across all severity levels for the specified filter.

critical
Type: long (int|float)

The number of critical severity findings for the specified filter.

high
Type: long (int|float)

The number of high severity findings for the specified filter.

medium
Type: long (int|float)

The number of medium severity findings for the specified filter.

SsmParameterConfiguration

Description

Configuration for a single Parameter in the Amazon Web Services Systems Manager (SSM) Parameter Store in a given Region.

Members
amiAccountId
Type: string

Specify the account that will own the Parameter in a given Region. During distribution, this account must be specified in distribution settings as a target account for the Region.

dataType
Type: string

The type of value the parameter contains. We recommend the aws:ec2:image data type.

parameterName
Required: Yes
Type: string

This is the name of the Parameter in the target Region or account. The image distribution creates the Parameter if it doesn't already exist. Otherwise, it updates the parameter.

SystemsManagerAgent

Description

Contains settings for the Systems Manager agent on your build instance. This setting applies to Linux and macOS build instances only. Requests that set it for a recipe with a Windows base image are rejected.

Members
uninstallAfterBuild
Type: boolean

Specifies whether the Systems Manager agent is removed from your final build image before Image Builder creates the new AMI. If true, the agent is removed. If false, the agent is kept, so that it's included in the AMI. If you don't set this property, Image Builder removes the agent only if Image Builder installed the agent during the build. An agent that was pre-installed on the base image is kept.

TargetContainerRepository

Description

The container repository where the output container image is stored.

Members
repositoryName
Required: Yes
Type: string

The name of the container repository where the output container image is stored. Provide the repository name only (a namespace path such as team-a/my-repo is allowed, but not the registry hostname).

service
Required: Yes
Type: string

Specifies the service in which this image was registered.

TooManyRequestsException

Description

You have attempted too many requests for the specific operation.

Members
message
Type: string

VulnerabilityIdAggregation

Description

Includes counts of image and pipeline resource findings by vulnerability.

Members
severityCounts
Type: SeverityCounts structure

Counts by severity level for medium severity and higher level findings, plus a total for all of the findings for the specified vulnerability.

vulnerabilityId
Type: string

The vulnerability Id for this set of counts.

VulnerablePackage

Description

Information about a vulnerable package that Amazon Inspector identifies in a finding.

Members
arch
Type: string

The architecture of the vulnerable package.

epoch
Type: int

The epoch of the vulnerable package.

filePath
Type: string

The file path of the vulnerable package.

fixedInVersion
Type: string

The version of the package that contains the vulnerability fix.

name
Type: string

The name of the vulnerable package.

packageManager
Type: string

The package manager of the vulnerable package.

release
Type: string

The release of the vulnerable package.

remediation
Type: string

The code to run in your environment to update packages with a fix available.

sourceLayerHash
Type: string

The source layer hash of the vulnerable package.

version
Type: string

The version of the vulnerable package.

WindowsConfiguration

Description

Windows-specific configuration settings for an ISO import, including the edition to install from a multi-edition Windows ISO file.

Members
imageIndex
Required: Yes
Type: long (int|float)

The 1-based index that specifies which Windows edition to install from a multi-edition Windows ISO file. A Windows ISO can contain a .wim file with multiple image indexes, each representing a different edition.

Workflow

Description

Defines a process that Image Builder runs during the build, test, or distribution stage of the image creation process.

Members
arn
Type: string

The Amazon Resource Name (ARN) of the workflow resource.

changeDescription
Type: string

Describes what change has been made in this version of the workflow, or what makes this version different from other versions of the workflow.

data
Type: string

Contains the YAML document content for the workflow.

dateCreated
Type: string

The timestamp when Image Builder created the workflow resource.

description
Type: string

The description of the workflow.

kmsKeyId
Type: string

The KMS key identifier used to encrypt the workflow resource. This can be either the Key ARN or the Alias ARN. For more information, see Key identifiers (KeyId) in the Key Management Service Developer Guide.

name
Type: string

The name of the workflow resource.

owner
Type: string

The owner of the workflow resource.

parameters
Type: Array of WorkflowParameterDetail structures

An array of input parameters that the image workflow uses to control actions or configure settings.

state
Type: WorkflowState structure

Describes the current status of the workflow and the reason for that status.

tags
Type: Associative array of custom strings keys (TagKey) to strings

The tags that apply to the workflow resource.

type
Type: string

The image creation stage that the workflow applies to.

version
Type: string

The workflow resource version. Workflow resources are immutable. To make a change, you can clone a workflow or create a new version.

WorkflowConfiguration

Description

Contains control settings and configurable inputs for a workflow resource.

Members
onFailure
Type: string

The action to take if the workflow fails. With CONTINUE, a failed workflow is logged and image creation proceeds to the next workflow. If you don't set a value, the image build fails when the workflow fails. You can only set this property for test workflows.

parallelGroup
Type: string

Test workflows are defined within named runtime groups called parallel groups. The parallel group is the named group that contains this test workflow. Test workflows within a parallel group can run at the same time. Image Builder starts up to five test workflows in the group at the same time, and starts additional workflows as others complete, until all workflows in the group have completed. This field only applies for test workflows.

parameters
Type: Array of WorkflowParameter structures

Contains parameter values for each of the parameters that the workflow document defined for the workflow resource.

workflowArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the workflow resource.

WorkflowExecutionMetadata

Description

Metadata that includes details and status from this runtime instance of the workflow.

Members
endTime
Type: string

The timestamp when this runtime instance of the workflow finished.

message
Type: string

The runtime output message from the workflow, if applicable.

parallelGroup
Type: string

The name of the test group that included the test workflow resource at runtime.

retried
Type: boolean

Indicates whether a retry of the image build superseded this runtime instance of the workflow. When you retry a failed image build, Image Builder sets this flag to true on the original workflow executions that the retry re-ran.

startTime
Type: string

The timestamp when the runtime instance of this workflow started.

status
Type: string

The current runtime status for this workflow.

totalStepCount
Type: int

The total number of steps that the workflow document defines for this runtime instance of the workflow. Image Builder sets this count before any steps run. The sum of succeeded, skipped, and failed steps only reaches this total if every step finishes in one of those states.

totalStepsFailed
Type: int

A runtime count for the number of steps in the workflow that failed.

totalStepsSkipped
Type: int

A runtime count for the number of steps in the workflow that were skipped.

totalStepsSucceeded
Type: int

A runtime count for the number of steps in the workflow that ran successfully.

type
Type: string

Indicates what type of workflow that Image Builder ran for this runtime instance of the workflow.

workflowBuildVersionArn
Type: string

The Amazon Resource Name (ARN) of the workflow resource build version that ran.

workflowExecutionId
Type: string

Unique identifier that Image Builder assigns to keep track of runtime resources each time it runs a workflow.

WorkflowParameter

Description

Contains a key/value pair that sets the named workflow parameter.

Members
name
Required: Yes
Type: string

The name of the workflow parameter to set.

value
Required: Yes
Type: Array of strings

Sets the value for the named workflow parameter.

WorkflowParameterDetail

Description

Defines a parameter that's used to provide configuration details for the workflow.

Members
defaultValue
Type: Array of strings

The default value of this parameter if no input is provided.

description
Type: string

Describes this parameter.

name
Required: Yes
Type: string

The name of this input parameter.

type
Required: Yes
Type: string

The type of input this parameter provides. Supported values are string, integer, boolean, and stringList.

WorkflowState

Description

A group of fields that describe the current status of the workflow.

Members
reason
Type: string

Describes how or why the workflow changed state.

status
Type: string

The current state of the workflow.

WorkflowStepExecution

Description

Contains runtime details for a workflow step that has paused at a WaitForAction step, and is waiting for you to send an action.

Members
action
Type: string

The name of the step action.

imageBuildVersionArn
Type: string

The Amazon Resource Name (ARN) of the image build version that ran the workflow.

name
Type: string

The name of the workflow step.

startTime
Type: string

The timestamp when the workflow step started.

stepExecutionId
Type: string

Uniquely identifies the workflow step that ran for the associated image build version.

workflowBuildVersionArn
Type: string

The Amazon Resource Name (ARN) of the workflow resource that ran.

workflowExecutionId
Type: string

Uniquely identifies the runtime instance of the workflow that contains the workflow step that ran for the associated image build version.

WorkflowStepMetadata

Description

Runtime details and status for the workflow step.

Members
action
Type: string

The step action name.

attemptNumber
Type: int

The current attempt number for the workflow step. The first run is attempt one. The number increases by one for each retry.

description
Type: string

Description of the workflow step.

endTime
Type: string

The timestamp when the workflow step finished.

inputs
Type: string

Input parameters that Image Builder provides for the workflow step, as a JSON-encoded string.

maxAttempts
Type: int

The maximum number of attempts allowed for the workflow step, based on the retry configuration in the workflow document. If the step doesn't configure retries, the maximum is one attempt.

message
Type: string

Detailed output message that the workflow step provides at runtime.

name
Type: string

The name of the workflow step.

outputs
Type: string

The output values that the workflow step produced for this runtime instance of the workflow, as a JSON-encoded string. For example, a step that launches an instance outputs the instance ID. If the step failed, this field contains the error message.

rollbackStatus
Type: string

Reports on the rollback status of the step, if applicable.

startTime
Type: string

The timestamp when the workflow step started.

status
Type: string

Runtime status for the workflow step.

stepExecutionId
Type: string

A unique identifier for the workflow step, assigned at runtime.

WorkflowSummary

Description

Contains metadata about the workflow resource.

Members
arn
Type: string

The Amazon Resource Name (ARN) of the workflow resource.

changeDescription
Type: string

The change description for the current version of the workflow resource.

dateCreated
Type: string

The original creation date of the workflow resource.

description
Type: string

Describes the workflow.

name
Type: string

The name of the workflow.

owner
Type: string

The owner of the workflow resource.

state
Type: WorkflowState structure

Describes the current state of the workflow resource.

tags
Type: Associative array of custom strings keys (TagKey) to strings

Contains a list of tags that are defined for the workflow.

type
Type: string

The image creation stage that this workflow applies to.

version
Type: string

The version of the workflow.

WorkflowVersion

Description

Contains details about this version of the workflow.

Members
arn
Type: string

The Amazon Resource Name (ARN) of the workflow resource.

dateCreated
Type: string

The timestamp when Image Builder created the workflow version.

description
Type: string

Describes the workflow.

name
Type: string

The name of the workflow.

owner
Type: string

The owner of the workflow resource.

type
Type: string

The image creation stage that this workflow applies to.

version
Type: string

The semantic version of the workflow resource. The format includes three nodes: <major>.<minor>.<patch>.