EC2 Image Builder

2023/12/12 - EC2 Image Builder - 7 new 10 updated api methods

Changes  This release adds the Image Workflows feature to give more flexibility and control over the image building and testing process.

CreateWorkflow (new) Link ¶

Create a new workflow or a new version of an existing workflow.

See also: AWS API Documentation

Request Syntax

client.create_workflow(
    name='string',
    semanticVersion='string',
    description='string',
    changeDescription='string',
    data='string',
    uri='string',
    kmsKeyId='string',
    tags={
        'string': 'string'
    },
    clientToken='string',
    type='BUILD'|'TEST'|'DISTRIBUTION'
)
type name

string

param name

[REQUIRED]

The name of the workflow to create.

type semanticVersion

string

param semanticVersion

[REQUIRED]

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

Note

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, with an upper limit of 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.

type description

string

param description

Describes the workflow.

type changeDescription

string

param changeDescription

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

type data

string

param data

Contains the UTF-8 encoded YAML document content for the workflow. Alternatively, you can specify the uri of a YAML document file stored in Amazon S3. However, you cannot specify both properties.

type uri

string

param uri

The uri of a YAML component document file. This must be an S3 URL (s3://bucket/key ), and the requester 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.

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

type kmsKeyId

string

param kmsKeyId

The ID of the KMS key that is used to encrypt this workflow resource.

type tags

dict

param tags

Tags that apply to the workflow resource.

  • (string) --

    • (string) --

type clientToken

string

param clientToken

[REQUIRED]

Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see Ensuring idempotency in the Amazon EC2 API Reference .

This field is autopopulated if not provided.

type type

string

param type

[REQUIRED]

The phase in the image build process for which the workflow resource is responsible.

rtype

dict

returns

Response Syntax

{
    'clientToken': 'string',
    'workflowBuildVersionArn': 'string'
}

Response Structure

  • (dict) --

    • clientToken (string) --

      The client token that uniquely identifies the request.

    • workflowBuildVersionArn (string) --

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

SendWorkflowStepAction (new) Link ¶

Pauses or resumes image creation when the associated workflow runs a WaitForAction step.

See also: AWS API Documentation

Request Syntax

client.send_workflow_step_action(
    stepExecutionId='string',
    imageBuildVersionArn='string',
    action='RESUME'|'STOP',
    reason='string',
    clientToken='string'
)
type stepExecutionId

string

param stepExecutionId

[REQUIRED]

Uniquely identifies the workflow step that sent the step action.

type imageBuildVersionArn

string

param imageBuildVersionArn

[REQUIRED]

The Amazon Resource Name (ARN) of the image build version to send action for.

type action

string

param action

[REQUIRED]

The action for the image creation process to take while a workflow WaitForAction step waits for an asynchronous action to complete.

type reason

string

param reason

The reason why this action is sent.

type clientToken

string

param clientToken

[REQUIRED]

Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see Ensuring idempotency in the Amazon EC2 API Reference .

This field is autopopulated if not provided.

rtype

dict

returns

Response Syntax

{
    'stepExecutionId': 'string',
    'imageBuildVersionArn': 'string',
    'clientToken': 'string'
}

Response Structure

  • (dict) --

    • stepExecutionId (string) --

      The workflow step that sent the step action.

    • imageBuildVersionArn (string) --

      The Amazon Resource Name (ARN) of the image build version that received the action request.

    • clientToken (string) --

      The client token that uniquely identifies the request.

ListWaitingWorkflowSteps (new) Link ¶

Get a list of workflow steps that are waiting for action for workflows in your Amazon Web Services account.

See also: AWS API Documentation

Request Syntax

client.list_waiting_workflow_steps(
    maxResults=123,
    nextToken='string'
)
type maxResults

integer

param maxResults

The maximum items to return in a request.

type nextToken

string

param nextToken

A token to specify where to start paginating. This is the nextToken from a previously truncated response.

rtype

dict

returns

Response Syntax

{
    'steps': [
        {
            'stepExecutionId': 'string',
            'imageBuildVersionArn': 'string',
            'workflowExecutionId': 'string',
            'workflowBuildVersionArn': 'string',
            'name': 'string',
            'action': 'string',
            'startTime': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • steps (list) --

      An array of the workflow steps that are waiting for action in your Amazon Web Services account.

      • (dict) --

        Contains runtime details for an instance of a workflow that ran for the associated image build version.

        • stepExecutionId (string) --

          Uniquely identifies the workflow step that ran for the associated image build version.

        • imageBuildVersionArn (string) --

          The Amazon Resource Name (ARN) of the image build version that ran the workflow.

        • workflowExecutionId (string) --

          Uniquely identifies the runtime instance of the workflow that contains the workflow step that ran for the associated image build version.

        • workflowBuildVersionArn (string) --

          The ARN of the workflow resource that ran.

        • name (string) --

          The name of the workflow step.

        • action (string) --

          The name of the step action.

        • startTime (string) --

          The timestamp when the workflow step started.

    • nextToken (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.

ListWorkflowBuildVersions (new) Link ¶

Returns a list of build versions for a specific workflow resource.

See also: AWS API Documentation

Request Syntax

client.list_workflow_build_versions(
    workflowVersionArn='string',
    maxResults=123,
    nextToken='string'
)
type workflowVersionArn

string

param workflowVersionArn

[REQUIRED]

The Amazon Resource Name (ARN) of the workflow resource for which to get a list of build versions.

type maxResults

integer

param maxResults

The maximum items to return in a request.

type nextToken

string

param nextToken

A token to specify where to start paginating. This is the nextToken from a previously truncated response.

rtype

dict

returns

Response Syntax

{
    'workflowSummaryList': [
        {
            'arn': 'string',
            'name': 'string',
            'version': 'string',
            'description': 'string',
            'changeDescription': 'string',
            'type': 'BUILD'|'TEST'|'DISTRIBUTION',
            'owner': 'string',
            'state': {
                'status': 'DEPRECATED',
                'reason': 'string'
            },
            'dateCreated': 'string',
            'tags': {
                'string': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • workflowSummaryList (list) --

      A list that contains metadata for the workflow builds that have run for the workflow resource specified in the request.

      • (dict) --

        Contains metadata about the workflow resource.

        • arn (string) --

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

        • name (string) --

          The name of the workflow.

        • version (string) --

          The version of the workflow.

        • description (string) --

          Describes the workflow.

        • changeDescription (string) --

          The change description for the current version of the workflow resource.

        • type (string) --

          The image creation stage that this workflow applies to. Image Builder currently supports build and test stage workflows.

        • owner (string) --

          The owner of the workflow resource.

        • state (dict) --

          Describes the current state of the workflow resource.

          • status (string) --

            The current state of the workflow.

          • reason (string) --

            Describes how or why the workflow changed state.

        • dateCreated (string) --

          The original creation date of the workflow resource.

        • tags (dict) --

          Contains a list of tags that are defined for the workflow.

          • (string) --

            • (string) --

    • nextToken (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.

ListWorkflows (new) Link ¶

Lists workflow build versions based on filtering parameters.

See also: AWS API Documentation

Request Syntax

client.list_workflows(
    owner='Self'|'Shared'|'Amazon'|'ThirdParty',
    filters=[
        {
            'name': 'string',
            'values': [
                'string',
            ]
        },
    ],
    byName=True|False,
    maxResults=123,
    nextToken='string'
)
type owner

string

param owner

Used to get a list of workflow build version filtered by the identity of the creator.

type filters

list

param filters

Used to streamline search results.

  • (dict) --

    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.

    • name (string) --

      The name of the filter. Filter names are case-sensitive.

    • values (list) --

      The filter values. Filter values are case-sensitive.

      • (string) --

type byName

boolean

param byName

Specify all or part of the workflow name to streamline results.

type maxResults

integer

param maxResults

The maximum items to return in a request.

type nextToken

string

param nextToken

A token to specify where to start paginating. This is the nextToken from a previously truncated response.

rtype

dict

returns

Response Syntax

{
    'workflowVersionList': [
        {
            'arn': 'string',
            'name': 'string',
            'version': 'string',
            'description': 'string',
            'type': 'BUILD'|'TEST'|'DISTRIBUTION',
            'owner': 'string',
            'dateCreated': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • workflowVersionList (list) --

      A list of workflow build versions that match the request criteria.

      • (dict) --

        Contains details about this version of the workflow.

        • arn (string) --

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

        • name (string) --

          The name of the workflow.

        • version (string) --

          The semantic version of the workflow resource. The format includes three nodes: <major>.<minor>.<patch>.

        • description (string) --

          Describes the workflow.

        • type (string) --

          The image creation stage that this workflow applies to. Image Builder currently supports build and test stage workflows.

        • owner (string) --

          The owner of the workflow resource.

        • dateCreated (string) --

          The timestamp when Image Builder created the workflow version.

    • nextToken (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.

DeleteWorkflow (new) Link ¶

Deletes a specific workflow resource.

See also: AWS API Documentation

Request Syntax

client.delete_workflow(
    workflowBuildVersionArn='string'
)
type workflowBuildVersionArn

string

param workflowBuildVersionArn

[REQUIRED]

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

rtype

dict

returns

Response Syntax

{
    'workflowBuildVersionArn': 'string'
}

Response Structure

  • (dict) --

    • workflowBuildVersionArn (string) --

      The ARN of the workflow resource that this request deleted.

GetWorkflow (new) Link ¶

Get a workflow resource object.

See also: AWS API Documentation

Request Syntax

client.get_workflow(
    workflowBuildVersionArn='string'
)
type workflowBuildVersionArn

string

param workflowBuildVersionArn

[REQUIRED]

The Amazon Resource Name (ARN) of the workflow resource that you want to get.

rtype

dict

returns

Response Syntax

{
    'workflow': {
        'arn': 'string',
        'name': 'string',
        'version': 'string',
        'description': 'string',
        'changeDescription': 'string',
        'type': 'BUILD'|'TEST'|'DISTRIBUTION',
        'state': {
            'status': 'DEPRECATED',
            'reason': 'string'
        },
        'owner': 'string',
        'data': 'string',
        'kmsKeyId': 'string',
        'dateCreated': 'string',
        'tags': {
            'string': 'string'
        },
        'parameters': [
            {
                'name': 'string',
                'type': 'string',
                'defaultValue': [
                    'string',
                ],
                'description': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • workflow (dict) --

      The workflow resource specified in the request.

      • arn (string) --

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

      • name (string) --

        The name of the workflow resource.

      • version (string) --

        The workflow resource version. Workflow resources are immutable. To make a change, you can clone a workflow or create a new version.

      • description (string) --

        The description of the workflow.

      • changeDescription (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.

      • type (string) --

        Specifies the image creation stage that the workflow applies to. Image Builder currently supports build and test workflows.

      • state (dict) --

        Describes the current status of the workflow and the reason for that status.

        • status (string) --

          The current state of the workflow.

        • reason (string) --

          Describes how or why the workflow changed state.

      • owner (string) --

        The owner of the workflow resource.

      • data (string) --

        Contains the YAML document content for the workflow.

      • kmsKeyId (string) --

        The KMS key identifier used to encrypt the workflow resource.

      • dateCreated (string) --

        The timestamp when Image Builder created the workflow resource.

      • tags (dict) --

        The tags that apply to the workflow resource

        • (string) --

          • (string) --

      • parameters (list) --

        An array of input parameters that that the image workflow uses to control actions or configure settings.

        • (dict) --

          Defines a parameter that's used to provide configuration details for the workflow.

          • name (string) --

            The name of this input parameter.

          • type (string) --

            The type of input this parameter provides. The currently supported value is "string".

          • defaultValue (list) --

            The default value of this parameter if no input is provided.

            • (string) --

          • description (string) --

            Describes this parameter.

CreateImage (updated) Link ¶
Changes (request)
{'executionRole': 'string',
 'workflows': [{'onFailure': 'CONTINUE | ABORT',
                'parallelGroup': 'string',
                'parameters': [{'name': 'string', 'value': ['string']}],
                'workflowArn': 'string'}]}

Creates a new image. This request will create a new image along with all of the configured output resources defined in the distribution configuration. You must specify exactly one recipe for your image, using either a ContainerRecipeArn or an ImageRecipeArn.

See also: AWS API Documentation

Request Syntax

client.create_image(
    imageRecipeArn='string',
    containerRecipeArn='string',
    distributionConfigurationArn='string',
    infrastructureConfigurationArn='string',
    imageTestsConfiguration={
        'imageTestsEnabled': True|False,
        'timeoutMinutes': 123
    },
    enhancedImageMetadataEnabled=True|False,
    tags={
        'string': 'string'
    },
    clientToken='string',
    imageScanningConfiguration={
        'imageScanningEnabled': True|False,
        'ecrConfiguration': {
            'repositoryName': 'string',
            'containerTags': [
                'string',
            ]
        }
    },
    workflows=[
        {
            'workflowArn': 'string',
            'parameters': [
                {
                    'name': 'string',
                    'value': [
                        'string',
                    ]
                },
            ],
            'parallelGroup': 'string',
            'onFailure': 'CONTINUE'|'ABORT'
        },
    ],
    executionRole='string'
)
type imageRecipeArn

string

param imageRecipeArn

The Amazon Resource Name (ARN) of the image recipe that defines how images are configured, tested, and assessed.

type containerRecipeArn

string

param containerRecipeArn

The Amazon Resource Name (ARN) of the container recipe that defines how images are configured and tested.

type distributionConfigurationArn

string

param distributionConfigurationArn

The Amazon Resource Name (ARN) of the distribution configuration that defines and configures the outputs of your pipeline.

type infrastructureConfigurationArn

string

param infrastructureConfigurationArn

[REQUIRED]

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

type imageTestsConfiguration

dict

param imageTestsConfiguration

The image tests configuration of the image.

  • imageTestsEnabled (boolean) --

    Determines if tests should run after building the image. Image Builder defaults to enable tests to run following the image build, before image distribution.

  • timeoutMinutes (integer) --

    The maximum time in minutes that tests are permitted to run.

    Note

    The timeoutMinutes attribute is not currently active. This value is ignored.

type enhancedImageMetadataEnabled

boolean

param enhancedImageMetadataEnabled

Collects additional information about the image being created, including the operating system (OS) version and package list. This information is used to enhance the overall experience of using EC2 Image Builder. Enabled by default.

type tags

dict

param tags

The tags of the image.

  • (string) --

    • (string) --

type clientToken

string

param clientToken

[REQUIRED]

Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see Ensuring idempotency in the Amazon EC2 API Reference .

This field is autopopulated if not provided.

type imageScanningConfiguration

dict

param imageScanningConfiguration

Contains settings for vulnerability scans.

  • imageScanningEnabled (boolean) --

    A setting that indicates whether Image Builder keeps a snapshot of the vulnerability scans that Amazon Inspector runs against the build instance when you create a new image.

  • ecrConfiguration (dict) --

    Contains Amazon ECR settings for vulnerability scans.

    • repositoryName (string) --

      The name of the container repository that Amazon Inspector scans to identify findings for your container images. The name includes the path for the repository location. If you don’t provide this information, Image Builder creates a repository in your account named image-builder-image-scanning-repository for vulnerability scans of your output container images.

    • containerTags (list) --

      Tags for Image Builder to apply to the output container image that &INS; scans. Tags can help you identify and manage your scanned images.

      • (string) --

type workflows

list

param workflows

Contains an array of workflow configuration objects.

  • (dict) --

    Contains control settings and configurable inputs for a workflow resource.

    • workflowArn (string) -- [REQUIRED]

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

    • parameters (list) --

      Contains parameter values for each of the parameters that the workflow document defined for the workflow resource.

      • (dict) --

        Contains a key/value pair that sets the named workflow parameter.

        • name (string) -- [REQUIRED]

          The name of the workflow parameter to set.

        • value (list) -- [REQUIRED]

          Sets the value for the named workflow parameter.

          • (string) --

    • parallelGroup (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.

    • onFailure (string) --

      The action to take if the workflow fails.

type executionRole

string

param executionRole

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

rtype

dict

returns

Response Syntax

{
    'requestId': 'string',
    'clientToken': 'string',
    'imageBuildVersionArn': 'string'
}

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • clientToken (string) --

      The client token that uniquely identifies the request.

    • imageBuildVersionArn (string) --

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

CreateImagePipeline (updated) Link ¶
Changes (request)
{'executionRole': 'string',
 'workflows': [{'onFailure': 'CONTINUE | ABORT',
                'parallelGroup': 'string',
                'parameters': [{'name': 'string', 'value': ['string']}],
                'workflowArn': 'string'}]}

Creates a new image pipeline. Image pipelines enable you to automate the creation and distribution of images.

See also: AWS API Documentation

Request Syntax

client.create_image_pipeline(
    name='string',
    description='string',
    imageRecipeArn='string',
    containerRecipeArn='string',
    infrastructureConfigurationArn='string',
    distributionConfigurationArn='string',
    imageTestsConfiguration={
        'imageTestsEnabled': True|False,
        'timeoutMinutes': 123
    },
    enhancedImageMetadataEnabled=True|False,
    schedule={
        'scheduleExpression': 'string',
        'timezone': 'string',
        'pipelineExecutionStartCondition': 'EXPRESSION_MATCH_ONLY'|'EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE'
    },
    status='DISABLED'|'ENABLED',
    tags={
        'string': 'string'
    },
    clientToken='string',
    imageScanningConfiguration={
        'imageScanningEnabled': True|False,
        'ecrConfiguration': {
            'repositoryName': 'string',
            'containerTags': [
                'string',
            ]
        }
    },
    workflows=[
        {
            'workflowArn': 'string',
            'parameters': [
                {
                    'name': 'string',
                    'value': [
                        'string',
                    ]
                },
            ],
            'parallelGroup': 'string',
            'onFailure': 'CONTINUE'|'ABORT'
        },
    ],
    executionRole='string'
)
type name

string

param name

[REQUIRED]

The name of the image pipeline.

type description

string

param description

The description of the image pipeline.

type imageRecipeArn

string

param imageRecipeArn

The Amazon Resource Name (ARN) of the image recipe that will be used to configure images created by this image pipeline.

type containerRecipeArn

string

param containerRecipeArn

The Amazon Resource Name (ARN) of the container recipe that is used to configure images created by this container pipeline.

type infrastructureConfigurationArn

string

param infrastructureConfigurationArn

[REQUIRED]

The Amazon Resource Name (ARN) of the infrastructure configuration that will be used to build images created by this image pipeline.

type distributionConfigurationArn

string

param distributionConfigurationArn

The Amazon Resource Name (ARN) of the distribution configuration that will be used to configure and distribute images created by this image pipeline.

type imageTestsConfiguration

dict

param imageTestsConfiguration

The image test configuration of the image pipeline.

  • imageTestsEnabled (boolean) --

    Determines if tests should run after building the image. Image Builder defaults to enable tests to run following the image build, before image distribution.

  • timeoutMinutes (integer) --

    The maximum time in minutes that tests are permitted to run.

    Note

    The timeoutMinutes attribute is not currently active. This value is ignored.

type enhancedImageMetadataEnabled

boolean

param enhancedImageMetadataEnabled

Collects additional information about the image being created, including the operating system (OS) version and package list. This information is used to enhance the overall experience of using EC2 Image Builder. Enabled by default.

type schedule

dict

param schedule

The schedule of the image pipeline.

  • scheduleExpression (string) --

    The cron expression determines how often EC2 Image Builder evaluates your pipelineExecutionStartCondition .

    For information on how to format a cron expression in Image Builder, see Use cron expressions in EC2 Image Builder .

  • timezone (string) --

    The timezone that applies to the scheduling expression. For example, "Etc/UTC", "America/Los_Angeles" in the IANA timezone format . If not specified this defaults to UTC.

  • pipelineExecutionStartCondition (string) --

    The condition configures when the pipeline should trigger a new image build. When the pipelineExecutionStartCondition is set to EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE , and you use semantic version filters on the base image or components in your image recipe, EC2 Image Builder will build a new image only when there are new versions of the image or components in your recipe that match the semantic version filter. When it is set to EXPRESSION_MATCH_ONLY , it will build a new image every time the CRON expression matches the current time. For semantic version syntax, see CreateComponent in the EC2 Image Builder API Reference .

type status

string

param status

The status of the image pipeline.

type tags

dict

param tags

The tags of the image pipeline.

  • (string) --

    • (string) --

type clientToken

string

param clientToken

[REQUIRED]

Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see Ensuring idempotency in the Amazon EC2 API Reference .

This field is autopopulated if not provided.

type imageScanningConfiguration

dict

param imageScanningConfiguration

Contains settings for vulnerability scans.

  • imageScanningEnabled (boolean) --

    A setting that indicates whether Image Builder keeps a snapshot of the vulnerability scans that Amazon Inspector runs against the build instance when you create a new image.

  • ecrConfiguration (dict) --

    Contains Amazon ECR settings for vulnerability scans.

    • repositoryName (string) --

      The name of the container repository that Amazon Inspector scans to identify findings for your container images. The name includes the path for the repository location. If you don’t provide this information, Image Builder creates a repository in your account named image-builder-image-scanning-repository for vulnerability scans of your output container images.

    • containerTags (list) --

      Tags for Image Builder to apply to the output container image that &INS; scans. Tags can help you identify and manage your scanned images.

      • (string) --

type workflows

list

param workflows

Contains an array of workflow configuration objects.

  • (dict) --

    Contains control settings and configurable inputs for a workflow resource.

    • workflowArn (string) -- [REQUIRED]

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

    • parameters (list) --

      Contains parameter values for each of the parameters that the workflow document defined for the workflow resource.

      • (dict) --

        Contains a key/value pair that sets the named workflow parameter.

        • name (string) -- [REQUIRED]

          The name of the workflow parameter to set.

        • value (list) -- [REQUIRED]

          Sets the value for the named workflow parameter.

          • (string) --

    • parallelGroup (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.

    • onFailure (string) --

      The action to take if the workflow fails.

type executionRole

string

param executionRole

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

rtype

dict

returns

Response Syntax

{
    'requestId': 'string',
    'clientToken': 'string',
    'imagePipelineArn': 'string'
}

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • clientToken (string) --

      The client token that uniquely identifies the request.

    • imagePipelineArn (string) --

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

GetImage (updated) Link ¶
Changes (response)
{'image': {'executionRole': 'string',
           'workflows': [{'onFailure': 'CONTINUE | ABORT',
                          'parallelGroup': 'string',
                          'parameters': [{'name': 'string',
                                          'value': ['string']}],
                          'workflowArn': 'string'}]}}

Gets an image.

See also: AWS API Documentation

Request Syntax

client.get_image(
    imageBuildVersionArn='string'
)
type imageBuildVersionArn

string

param imageBuildVersionArn

[REQUIRED]

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

rtype

dict

returns

Response Syntax

{
    'requestId': 'string',
    'image': {
        'arn': 'string',
        'type': 'AMI'|'DOCKER',
        'name': 'string',
        'version': 'string',
        'platform': 'Windows'|'Linux',
        'enhancedImageMetadataEnabled': True|False,
        'osVersion': 'string',
        'state': {
            'status': 'PENDING'|'CREATING'|'BUILDING'|'TESTING'|'DISTRIBUTING'|'INTEGRATING'|'AVAILABLE'|'CANCELLED'|'FAILED'|'DEPRECATED'|'DELETED'|'DISABLED',
            'reason': 'string'
        },
        'imageRecipe': {
            'arn': 'string',
            'type': 'AMI'|'DOCKER',
            'name': 'string',
            'description': 'string',
            'platform': 'Windows'|'Linux',
            'owner': 'string',
            'version': 'string',
            'components': [
                {
                    'componentArn': 'string',
                    'parameters': [
                        {
                            'name': 'string',
                            'value': [
                                'string',
                            ]
                        },
                    ]
                },
            ],
            'parentImage': 'string',
            'blockDeviceMappings': [
                {
                    'deviceName': 'string',
                    'ebs': {
                        'encrypted': True|False,
                        'deleteOnTermination': True|False,
                        'iops': 123,
                        'kmsKeyId': 'string',
                        'snapshotId': 'string',
                        'volumeSize': 123,
                        'volumeType': 'standard'|'io1'|'io2'|'gp2'|'gp3'|'sc1'|'st1',
                        'throughput': 123
                    },
                    'virtualName': 'string',
                    'noDevice': 'string'
                },
            ],
            'dateCreated': 'string',
            'tags': {
                'string': 'string'
            },
            'workingDirectory': 'string',
            'additionalInstanceConfiguration': {
                'systemsManagerAgent': {
                    'uninstallAfterBuild': True|False
                },
                'userDataOverride': 'string'
            }
        },
        'containerRecipe': {
            'arn': 'string',
            'containerType': 'DOCKER',
            'name': 'string',
            'description': 'string',
            'platform': 'Windows'|'Linux',
            'owner': 'string',
            'version': 'string',
            'components': [
                {
                    'componentArn': 'string',
                    'parameters': [
                        {
                            'name': 'string',
                            'value': [
                                'string',
                            ]
                        },
                    ]
                },
            ],
            'instanceConfiguration': {
                'image': 'string',
                'blockDeviceMappings': [
                    {
                        'deviceName': 'string',
                        'ebs': {
                            'encrypted': True|False,
                            'deleteOnTermination': True|False,
                            'iops': 123,
                            'kmsKeyId': 'string',
                            'snapshotId': 'string',
                            'volumeSize': 123,
                            'volumeType': 'standard'|'io1'|'io2'|'gp2'|'gp3'|'sc1'|'st1',
                            'throughput': 123
                        },
                        'virtualName': 'string',
                        'noDevice': 'string'
                    },
                ]
            },
            'dockerfileTemplateData': 'string',
            'kmsKeyId': 'string',
            'encrypted': True|False,
            'parentImage': 'string',
            'dateCreated': 'string',
            'tags': {
                'string': 'string'
            },
            'workingDirectory': 'string',
            'targetRepository': {
                'service': 'ECR',
                'repositoryName': 'string'
            }
        },
        'sourcePipelineName': 'string',
        'sourcePipelineArn': 'string',
        'infrastructureConfiguration': {
            'arn': 'string',
            'name': 'string',
            'description': 'string',
            'instanceTypes': [
                'string',
            ],
            'instanceProfileName': 'string',
            'securityGroupIds': [
                'string',
            ],
            'subnetId': 'string',
            'logging': {
                's3Logs': {
                    's3BucketName': 'string',
                    's3KeyPrefix': 'string'
                }
            },
            'keyPair': 'string',
            'terminateInstanceOnFailure': True|False,
            'snsTopicArn': 'string',
            'dateCreated': 'string',
            'dateUpdated': 'string',
            'resourceTags': {
                'string': 'string'
            },
            'instanceMetadataOptions': {
                'httpTokens': 'string',
                'httpPutResponseHopLimit': 123
            },
            'tags': {
                'string': 'string'
            }
        },
        'distributionConfiguration': {
            'arn': 'string',
            'name': 'string',
            'description': 'string',
            'distributions': [
                {
                    'region': 'string',
                    'amiDistributionConfiguration': {
                        'name': 'string',
                        'description': 'string',
                        'targetAccountIds': [
                            'string',
                        ],
                        'amiTags': {
                            'string': 'string'
                        },
                        'kmsKeyId': 'string',
                        'launchPermission': {
                            'userIds': [
                                'string',
                            ],
                            'userGroups': [
                                'string',
                            ],
                            'organizationArns': [
                                'string',
                            ],
                            'organizationalUnitArns': [
                                'string',
                            ]
                        }
                    },
                    'containerDistributionConfiguration': {
                        'description': 'string',
                        'containerTags': [
                            'string',
                        ],
                        'targetRepository': {
                            'service': 'ECR',
                            'repositoryName': 'string'
                        }
                    },
                    'licenseConfigurationArns': [
                        'string',
                    ],
                    'launchTemplateConfigurations': [
                        {
                            'launchTemplateId': 'string',
                            'accountId': 'string',
                            'setDefaultVersion': True|False
                        },
                    ],
                    's3ExportConfiguration': {
                        'roleName': 'string',
                        'diskImageFormat': 'VMDK'|'RAW'|'VHD',
                        's3Bucket': 'string',
                        's3Prefix': 'string'
                    },
                    'fastLaunchConfigurations': [
                        {
                            'enabled': True|False,
                            'snapshotConfiguration': {
                                'targetResourceCount': 123
                            },
                            'maxParallelLaunches': 123,
                            'launchTemplate': {
                                'launchTemplateId': 'string',
                                'launchTemplateName': 'string',
                                'launchTemplateVersion': 'string'
                            },
                            'accountId': 'string'
                        },
                    ]
                },
            ],
            'timeoutMinutes': 123,
            'dateCreated': 'string',
            'dateUpdated': 'string',
            'tags': {
                'string': 'string'
            }
        },
        'imageTestsConfiguration': {
            'imageTestsEnabled': True|False,
            'timeoutMinutes': 123
        },
        'dateCreated': 'string',
        'outputResources': {
            'amis': [
                {
                    'region': 'string',
                    'image': 'string',
                    'name': 'string',
                    'description': 'string',
                    'state': {
                        'status': 'PENDING'|'CREATING'|'BUILDING'|'TESTING'|'DISTRIBUTING'|'INTEGRATING'|'AVAILABLE'|'CANCELLED'|'FAILED'|'DEPRECATED'|'DELETED'|'DISABLED',
                        'reason': 'string'
                    },
                    'accountId': 'string'
                },
            ],
            'containers': [
                {
                    'region': 'string',
                    'imageUris': [
                        'string',
                    ]
                },
            ]
        },
        'tags': {
            'string': 'string'
        },
        'buildType': 'USER_INITIATED'|'SCHEDULED'|'IMPORT',
        'imageSource': 'AMAZON_MANAGED'|'AWS_MARKETPLACE'|'IMPORTED'|'CUSTOM',
        'scanState': {
            'status': 'PENDING'|'SCANNING'|'COLLECTING'|'COMPLETED'|'ABANDONED'|'FAILED'|'TIMED_OUT',
            'reason': 'string'
        },
        'imageScanningConfiguration': {
            'imageScanningEnabled': True|False,
            'ecrConfiguration': {
                'repositoryName': 'string',
                'containerTags': [
                    'string',
                ]
            }
        },
        'deprecationTime': datetime(2015, 1, 1),
        'lifecycleExecutionId': 'string',
        'executionRole': 'string',
        'workflows': [
            {
                'workflowArn': 'string',
                'parameters': [
                    {
                        'name': 'string',
                        'value': [
                            'string',
                        ]
                    },
                ],
                'parallelGroup': 'string',
                'onFailure': 'CONTINUE'|'ABORT'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • image (dict) --

      The image object.

      • arn (string) --

        The Amazon Resource Name (ARN) of the image.

        Note

        Semantic versioning is included in each object's Amazon Resource Name (ARN), at the level that applies to that object as follows:

        • 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.

        • Version ARNs have only the first three nodes: <major>.<minor>.<patch>

        • Build version ARNs have all four nodes, and point to a specific build for a specific version of an object.

      • type (string) --

        Specifies whether this image produces an AMI or a container image.

      • name (string) --

        The name of the image.

      • version (string) --

        The semantic version of the image.

        Note

        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, with an upper limit of 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: With semantic versioning, you have the flexibility to 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.

      • platform (string) --

        The image operating system platform, such as Linux or Windows.

      • enhancedImageMetadataEnabled (boolean) --

        Indicates whether Image Builder collects additional information about the image, such as the operating system (OS) version and package list.

      • osVersion (string) --

        The operating system version for instances that launch from this image. For example, Amazon Linux 2, Ubuntu 18, or Microsoft Windows Server 2019.

      • state (dict) --

        The state of the image.

        • status (string) --

          The status of the image.

        • reason (string) --

          The reason for the status of the image.

      • imageRecipe (dict) --

        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.

        • arn (string) --

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

        • type (string) --

          Specifies which type of image is created by the recipe - an AMI or a container image.

        • name (string) --

          The name of the image recipe.

        • description (string) --

          The description of the image recipe.

        • platform (string) --

          The platform of the image recipe.

        • owner (string) --

          The owner of the image recipe.

        • version (string) --

          The version of the image recipe.

        • components (list) --

          The components that are included in the image recipe. Recipes require a minimum of one build component, and can have a maximum of 20 build and test components in any combination.

          • (dict) --

            Configuration details of the component.

            • componentArn (string) --

              The Amazon Resource Name (ARN) of the component.

            • parameters (list) --

              A group of parameter settings that Image Builder uses to configure the component for a specific recipe.

              • (dict) --

                Contains a key/value pair that sets the named component parameter.

                • name (string) --

                  The name of the component parameter to set.

                • value (list) --

                  Sets the value for the named component parameter.

                  • (string) --

        • parentImage (string) --

          The base image of the image recipe.

        • blockDeviceMappings (list) --

          The block device mappings to apply when creating images from this recipe.

          • (dict) --

            Defines block device mappings for the instance used to configure your image.

            • deviceName (string) --

              The device to which these mappings apply.

            • ebs (dict) --

              Use to manage Amazon EBS-specific configuration for this mapping.

              • encrypted (boolean) --

                Use to configure device encryption.

              • deleteOnTermination (boolean) --

                Use to configure delete on termination of the associated device.

              • iops (integer) --

                Use to configure device IOPS.

              • kmsKeyId (string) --

                Use to configure the KMS key to use when encrypting the device.

              • snapshotId (string) --

                The snapshot that defines the device contents.

              • volumeSize (integer) --

                Use to override the device's volume size.

              • volumeType (string) --

                Use to override the device's volume type.

              • throughput (integer) --

                For GP3 volumes only – The throughput in MiB/s that the volume supports.

            • virtualName (string) --

              Use to manage instance ephemeral devices.

            • noDevice (string) --

              Use to remove a mapping from the base image.

        • dateCreated (string) --

          The date on which this image recipe was created.

        • tags (dict) --

          The tags of the image recipe.

          • (string) --

            • (string) --

        • workingDirectory (string) --

          The working directory to be used during build and test workflows.

        • additionalInstanceConfiguration (dict) --

          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 an instance is launched from your AMI.

          • systemsManagerAgent (dict) --

            Contains settings for the Systems Manager agent on your build instance.

            • uninstallAfterBuild (boolean) --

              Controls whether the Systems Manager agent is removed from your final build image, prior to creating the new AMI. If this is set to true, then the agent is removed from the final image. If it's set to false, then the agent is left in, so that it is included in the new AMI. The default value is false.

          • userDataOverride (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.

            Note

            The user data is always base 64 encoded. For example, the following commands are encoded as IyEvYmluL2Jhc2gKbWtkaXIgLXAgL3Zhci9iYi8KdG91Y2ggL3Zhci$ :

            #!/bin/bash

            mkdir -p /var/bb/

            touch /var

      • containerRecipe (dict) --

        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.

        • arn (string) --

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

          Note

          Semantic versioning is included in each object's Amazon Resource Name (ARN), at the level that applies to that object as follows:

          • 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.

          • Version ARNs have only the first three nodes: <major>.<minor>.<patch>

          • Build version ARNs have all four nodes, and point to a specific build for a specific version of an object.

        • containerType (string) --

          Specifies the type of container, such as Docker.

        • name (string) --

          The name of the container recipe.

        • description (string) --

          The description of the container recipe.

        • platform (string) --

          The system platform for the container, such as Windows or Linux.

        • owner (string) --

          The owner of the container recipe.

        • version (string) --

          The semantic version of the container recipe.

          Note

          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, with an upper limit of 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: With semantic versioning, you have the flexibility to 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.

        • components (list) --

          Build and test components that are included in the container recipe. Recipes require a minimum of one build component, and can have a maximum of 20 build and test components in any combination.

          • (dict) --

            Configuration details of the component.

            • componentArn (string) --

              The Amazon Resource Name (ARN) of the component.

            • parameters (list) --

              A group of parameter settings that Image Builder uses to configure the component for a specific recipe.

              • (dict) --

                Contains a key/value pair that sets the named component parameter.

                • name (string) --

                  The name of the component parameter to set.

                • value (list) --

                  Sets the value for the named component parameter.

                  • (string) --

        • instanceConfiguration (dict) --

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

          • image (string) --

            The AMI ID to use as the base image for a container build and test instance. If not specified, Image Builder will use the appropriate ECS-optimized AMI as a base image.

          • blockDeviceMappings (list) --

            Defines the block devices to attach for building an instance from this Image Builder AMI.

            • (dict) --

              Defines block device mappings for the instance used to configure your image.

              • deviceName (string) --

                The device to which these mappings apply.

              • ebs (dict) --

                Use to manage Amazon EBS-specific configuration for this mapping.

                • encrypted (boolean) --

                  Use to configure device encryption.

                • deleteOnTermination (boolean) --

                  Use to configure delete on termination of the associated device.

                • iops (integer) --

                  Use to configure device IOPS.

                • kmsKeyId (string) --

                  Use to configure the KMS key to use when encrypting the device.

                • snapshotId (string) --

                  The snapshot that defines the device contents.

                • volumeSize (integer) --

                  Use to override the device's volume size.

                • volumeType (string) --

                  Use to override the device's volume type.

                • throughput (integer) --

                  For GP3 volumes only – The throughput in MiB/s that the volume supports.

              • virtualName (string) --

                Use to manage instance ephemeral devices.

              • noDevice (string) --

                Use to remove a mapping from the base image.

        • dockerfileTemplateData (string) --

          Dockerfiles are text documents that are used to build Docker containers, and ensure that they contain all of the elements required by the application running inside. The template data consists of contextual variables where Image Builder places build information or scripts, based on your container image recipe.

        • kmsKeyId (string) --

          Identifies which KMS key is used to encrypt the container image for distribution to the target Region.

        • encrypted (boolean) --

          A flag that indicates if the target container is encrypted.

        • parentImage (string) --

          The base image for the container recipe.

        • dateCreated (string) --

          The date when this container recipe was created.

        • tags (dict) --

          Tags that are attached to the container recipe.

          • (string) --

            • (string) --

        • workingDirectory (string) --

          The working directory for use during build and test workflows.

        • targetRepository (dict) --

          The destination repository for the container image.

          • service (string) --

            Specifies the service in which this image was registered.

          • repositoryName (string) --

            The name of the container repository where the output container image is stored. This name is prefixed by the repository location.

      • sourcePipelineName (string) --

        The name of the image pipeline that created this image.

      • sourcePipelineArn (string) --

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

      • infrastructureConfiguration (dict) --

        The infrastructure that Image Builder used to create this image.

        • arn (string) --

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

        • name (string) --

          The name of the infrastructure configuration.

        • description (string) --

          The description of the infrastructure configuration.

        • instanceTypes (list) --

          The instance types of the infrastructure configuration.

          • (string) --

        • instanceProfileName (string) --

          The instance profile of the infrastructure configuration.

        • securityGroupIds (list) --

          The security group IDs of the infrastructure configuration.

          • (string) --

        • subnetId (string) --

          The subnet ID of the infrastructure configuration.

        • logging (dict) --

          The logging configuration of the infrastructure configuration.

          • s3Logs (dict) --

            The Amazon S3 logging configuration.

            • s3BucketName (string) --

              The S3 bucket in which to store the logs.

            • s3KeyPrefix (string) --

              The Amazon S3 path to the bucket where the logs are stored.

        • keyPair (string) --

          The Amazon EC2 key pair of the infrastructure configuration.

        • terminateInstanceOnFailure (boolean) --

          The terminate instance on failure configuration of the infrastructure configuration.

        • snsTopicArn (string) --

          The Amazon Resource Name (ARN) for the SNS topic to which we send image build event notifications.

          Note

          EC2 Image Builder is unable to send notifications to SNS topics that are encrypted using keys from other accounts. The key that is used to encrypt the SNS topic must reside in the account that the Image Builder service runs under.

        • dateCreated (string) --

          The date on which the infrastructure configuration was created.

        • dateUpdated (string) --

          The date on which the infrastructure configuration was last updated.

        • resourceTags (dict) --

          The tags attached to the resource created by Image Builder.

          • (string) --

            • (string) --

        • instanceMetadataOptions (dict) --

          The instance metadata option settings for the infrastructure configuration.

          • httpTokens (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.

            The default setting is optional .

          • httpPutResponseHopLimit (integer) --

            Limit the number of hops that an instance metadata request can traverse to reach its destination. The default is one hop. However, if HTTP tokens are required, container image builds need a minimum of two hops.

        • tags (dict) --

          The tags of the infrastructure configuration.

          • (string) --

            • (string) --

      • distributionConfiguration (dict) --

        The distribution configuration that Image Builder used to create this image.

        • arn (string) --

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

        • name (string) --

          The name of the distribution configuration.

        • description (string) --

          The description of the distribution configuration.

        • distributions (list) --

          The distribution objects that apply Region-specific settings for the deployment of the image to targeted Regions.

          • (dict) --

            Defines the settings for a specific Region.

            • region (string) --

              The target Region.

            • amiDistributionConfiguration (dict) --

              The specific AMI settings; for example, launch permissions or AMI tags.

              • name (string) --

                The name of the output AMI.

              • description (string) --

                The description of the AMI distribution configuration. Minimum and maximum length are in characters.

              • targetAccountIds (list) --

                The ID of an account to which you want to distribute an image.

                • (string) --

              • amiTags (dict) --

                The tags to apply to AMIs distributed to this Region.

                • (string) --

                  • (string) --

              • kmsKeyId (string) --

                The KMS key identifier used to encrypt the distributed image.

              • launchPermission (dict) --

                Launch permissions can be used to configure which Amazon Web Services accounts can use the AMI to launch instances.

                • userIds (list) --

                  The Amazon Web Services account ID.

                  • (string) --

                • userGroups (list) --

                  The name of the group.

                  • (string) --

                • organizationArns (list) --

                  The ARN for an Amazon Web Services Organization that you want to share your AMI with. For more information, see What is Organizations? .

                  • (string) --

                • organizationalUnitArns (list) --

                  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 .

                  • (string) --

            • containerDistributionConfiguration (dict) --

              Container distribution settings for encryption, licensing, and sharing in a specific Region.

              • description (string) --

                The description of the container distribution configuration.

              • containerTags (list) --

                Tags that are attached to the container distribution configuration.

                • (string) --

              • targetRepository (dict) --

                The destination repository for the container distribution configuration.

                • service (string) --

                  Specifies the service in which this image was registered.

                • repositoryName (string) --

                  The name of the container repository where the output container image is stored. This name is prefixed by the repository location.

            • licenseConfigurationArns (list) --

              The License Manager Configuration to associate with the AMI in the specified Region.

              • (string) --

            • launchTemplateConfigurations (list) --

              A group of launchTemplateConfiguration settings that apply to image distribution for specified accounts.

              • (dict) --

                Identifies an Amazon EC2 launch template to use for a specific account.

                • launchTemplateId (string) --

                  Identifies the Amazon EC2 launch template to use.

                • accountId (string) --

                  The account ID that this configuration applies to.

                • setDefaultVersion (boolean) --

                  Set the specified Amazon EC2 launch template as the default launch template for the specified account.

            • s3ExportConfiguration (dict) --

              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.

              • roleName (string) --

                The name of the role that grants VM Import/Export permission to export images to your S3 bucket.

              • diskImageFormat (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.

              • s3Bucket (string) --

                The S3 bucket in which to store the output disk images for your VM.

              • s3Prefix (string) --

                The Amazon S3 path for the bucket where the output disk images for your VM are stored.

            • fastLaunchConfigurations (list) --

              The Windows faster-launching configurations to use for AMI distribution.

              • (dict) --

                Define and configure faster launching for output Windows AMIs.

                • enabled (boolean) --

                  A Boolean that represents the current state of faster launching for the Windows AMI. Set to true to start using Windows faster launching, or false to stop using it.

                • snapshotConfiguration (dict) --

                  Configuration settings for managing the number of snapshots that are created from pre-provisioned instances for the Windows AMI when faster launching is enabled.

                  • targetResourceCount (integer) --

                    The number of pre-provisioned snapshots to keep on hand for a fast-launch enabled Windows AMI.

                • maxParallelLaunches (integer) --

                  The maximum number of parallel instances that are launched for creating resources.

                • launchTemplate (dict) --

                  The launch template that the fast-launch enabled Windows AMI uses when it launches Windows instances to create pre-provisioned snapshots.

                  • launchTemplateId (string) --

                    The ID of the launch template to use for faster launching for a Windows AMI.

                  • launchTemplateName (string) --

                    The name of the launch template to use for faster launching for a Windows AMI.

                  • launchTemplateVersion (string) --

                    The version of the launch template to use for faster launching for a Windows AMI.

                • accountId (string) --

                  The owner account ID for the fast-launch enabled Windows AMI.

        • timeoutMinutes (integer) --

          The maximum duration in minutes for this distribution configuration.

        • dateCreated (string) --

          The date on which this distribution configuration was created.

        • dateUpdated (string) --

          The date on which this distribution configuration was last updated.

        • tags (dict) --

          The tags of the distribution configuration.

          • (string) --

            • (string) --

      • imageTestsConfiguration (dict) --

        The image tests that ran when that Image Builder created this image.

        • imageTestsEnabled (boolean) --

          Determines if tests should run after building the image. Image Builder defaults to enable tests to run following the image build, before image distribution.

        • timeoutMinutes (integer) --

          The maximum time in minutes that tests are permitted to run.

          Note

          The timeoutMinutes attribute is not currently active. This value is ignored.

      • dateCreated (string) --

        The date on which Image Builder created this image.

      • outputResources (dict) --

        The output resources that Image Builder produces for this image.

        • amis (list) --

          The Amazon EC2 AMIs created by this image.

          • (dict) --

            Details of an Amazon EC2 AMI.

            • region (string) --

              The Amazon Web Services Region of the Amazon EC2 AMI.

            • image (string) --

              The AMI ID of the Amazon EC2 AMI.

            • name (string) --

              The name of the Amazon EC2 AMI.

            • description (string) --

              The description of the Amazon EC2 AMI. Minimum and maximum length are in characters.

            • state (dict) --

              Image status and the reason for that status.

              • status (string) --

                The status of the image.

              • reason (string) --

                The reason for the status of the image.

            • accountId (string) --

              The account ID of the owner of the AMI.

        • containers (list) --

          Container images that the pipeline has generated and stored in the output repository.

          • (dict) --

            A container encapsulates the runtime environment for an application.

            • region (string) --

              Containers and container images are Region-specific. This is the Region context for the container.

            • imageUris (list) --

              A list of URIs for containers created in the context Region.

              • (string) --

      • tags (dict) --

        The tags that apply to this image.

        • (string) --

          • (string) --

      • buildType (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.

      • imageSource (string) --

        The origin of the base image that Image Builder used to build this image.

      • scanState (dict) --

        Contains information about the current state of scans for this image.

        • status (string) --

          The current state of vulnerability scans for the image.

        • reason (string) --

          The reason for the scan status for the image.

      • imageScanningConfiguration (dict) --

        Contains settings for vulnerability scans.

        • imageScanningEnabled (boolean) --

          A setting that indicates whether Image Builder keeps a snapshot of the vulnerability scans that Amazon Inspector runs against the build instance when you create a new image.

        • ecrConfiguration (dict) --

          Contains Amazon ECR settings for vulnerability scans.

          • repositoryName (string) --

            The name of the container repository that Amazon Inspector scans to identify findings for your container images. The name includes the path for the repository location. If you don’t provide this information, Image Builder creates a repository in your account named image-builder-image-scanning-repository for vulnerability scans of your output container images.

          • containerTags (list) --

            Tags for Image Builder to apply to the output container image that &INS; scans. Tags can help you identify and manage your scanned images.

            • (string) --

      • deprecationTime (datetime) --

        The time when deprecation occurs for an image resource. This can be a past or future date.

      • lifecycleExecutionId (string) --

        Identifies the last runtime instance of the lifecycle policy to take action on the image.

      • executionRole (string) --

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

      • workflows (list) --

        Contains the build and test workflows that are associated with the image.

        • (dict) --

          Contains control settings and configurable inputs for a workflow resource.

          • workflowArn (string) --

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

          • parameters (list) --

            Contains parameter values for each of the parameters that the workflow document defined for the workflow resource.

            • (dict) --

              Contains a key/value pair that sets the named workflow parameter.

              • name (string) --

                The name of the workflow parameter to set.

              • value (list) --

                Sets the value for the named workflow parameter.

                • (string) --

          • parallelGroup (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.

          • onFailure (string) --

            The action to take if the workflow fails.

GetImagePipeline (updated) Link ¶
Changes (response)
{'imagePipeline': {'executionRole': 'string',
                   'workflows': [{'onFailure': 'CONTINUE | ABORT',
                                  'parallelGroup': 'string',
                                  'parameters': [{'name': 'string',
                                                  'value': ['string']}],
                                  'workflowArn': 'string'}]}}

Gets an image pipeline.

See also: AWS API Documentation

Request Syntax

client.get_image_pipeline(
    imagePipelineArn='string'
)
type imagePipelineArn

string

param imagePipelineArn

[REQUIRED]

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

rtype

dict

returns

Response Syntax

{
    'requestId': 'string',
    'imagePipeline': {
        'arn': 'string',
        'name': 'string',
        'description': 'string',
        'platform': 'Windows'|'Linux',
        'enhancedImageMetadataEnabled': True|False,
        'imageRecipeArn': 'string',
        'containerRecipeArn': 'string',
        'infrastructureConfigurationArn': 'string',
        'distributionConfigurationArn': 'string',
        'imageTestsConfiguration': {
            'imageTestsEnabled': True|False,
            'timeoutMinutes': 123
        },
        'schedule': {
            'scheduleExpression': 'string',
            'timezone': 'string',
            'pipelineExecutionStartCondition': 'EXPRESSION_MATCH_ONLY'|'EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE'
        },
        'status': 'DISABLED'|'ENABLED',
        'dateCreated': 'string',
        'dateUpdated': 'string',
        'dateLastRun': 'string',
        'dateNextRun': 'string',
        'tags': {
            'string': 'string'
        },
        'imageScanningConfiguration': {
            'imageScanningEnabled': True|False,
            'ecrConfiguration': {
                'repositoryName': 'string',
                'containerTags': [
                    'string',
                ]
            }
        },
        'executionRole': 'string',
        'workflows': [
            {
                'workflowArn': 'string',
                'parameters': [
                    {
                        'name': 'string',
                        'value': [
                            'string',
                        ]
                    },
                ],
                'parallelGroup': 'string',
                'onFailure': 'CONTINUE'|'ABORT'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • imagePipeline (dict) --

      The image pipeline object.

      • arn (string) --

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

      • name (string) --

        The name of the image pipeline.

      • description (string) --

        The description of the image pipeline.

      • platform (string) --

        The platform of the image pipeline.

      • enhancedImageMetadataEnabled (boolean) --

        Collects additional information about the image being created, including the operating system (OS) version and package list. This information is used to enhance the overall experience of using EC2 Image Builder. Enabled by default.

      • imageRecipeArn (string) --

        The Amazon Resource Name (ARN) of the image recipe associated with this image pipeline.

      • containerRecipeArn (string) --

        The Amazon Resource Name (ARN) of the container recipe that is used for this pipeline.

      • infrastructureConfigurationArn (string) --

        The Amazon Resource Name (ARN) of the infrastructure configuration associated with this image pipeline.

      • distributionConfigurationArn (string) --

        The Amazon Resource Name (ARN) of the distribution configuration associated with this image pipeline.

      • imageTestsConfiguration (dict) --

        The image tests configuration of the image pipeline.

        • imageTestsEnabled (boolean) --

          Determines if tests should run after building the image. Image Builder defaults to enable tests to run following the image build, before image distribution.

        • timeoutMinutes (integer) --

          The maximum time in minutes that tests are permitted to run.

          Note

          The timeoutMinutes attribute is not currently active. This value is ignored.

      • schedule (dict) --

        The schedule of the image pipeline.

        • scheduleExpression (string) --

          The cron expression determines how often EC2 Image Builder evaluates your pipelineExecutionStartCondition .

          For information on how to format a cron expression in Image Builder, see Use cron expressions in EC2 Image Builder .

        • timezone (string) --

          The timezone that applies to the scheduling expression. For example, "Etc/UTC", "America/Los_Angeles" in the IANA timezone format . If not specified this defaults to UTC.

        • pipelineExecutionStartCondition (string) --

          The condition configures when the pipeline should trigger a new image build. When the pipelineExecutionStartCondition is set to EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE , and you use semantic version filters on the base image or components in your image recipe, EC2 Image Builder will build a new image only when there are new versions of the image or components in your recipe that match the semantic version filter. When it is set to EXPRESSION_MATCH_ONLY , it will build a new image every time the CRON expression matches the current time. For semantic version syntax, see CreateComponent in the EC2 Image Builder API Reference .

      • status (string) --

        The status of the image pipeline.

      • dateCreated (string) --

        The date on which this image pipeline was created.

      • dateUpdated (string) --

        The date on which this image pipeline was last updated.

      • dateLastRun (string) --

        This is no longer supported, and does not return a value.

      • dateNextRun (string) --

        The next date when the pipeline is scheduled to run.

      • tags (dict) --

        The tags of this image pipeline.

        • (string) --

          • (string) --

      • imageScanningConfiguration (dict) --

        Contains settings for vulnerability scans.

        • imageScanningEnabled (boolean) --

          A setting that indicates whether Image Builder keeps a snapshot of the vulnerability scans that Amazon Inspector runs against the build instance when you create a new image.

        • ecrConfiguration (dict) --

          Contains Amazon ECR settings for vulnerability scans.

          • repositoryName (string) --

            The name of the container repository that Amazon Inspector scans to identify findings for your container images. The name includes the path for the repository location. If you don’t provide this information, Image Builder creates a repository in your account named image-builder-image-scanning-repository for vulnerability scans of your output container images.

          • containerTags (list) --

            Tags for Image Builder to apply to the output container image that &INS; scans. Tags can help you identify and manage your scanned images.

            • (string) --

      • executionRole (string) --

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

      • workflows (list) --

        Contains the workflows that run for the image pipeline.

        • (dict) --

          Contains control settings and configurable inputs for a workflow resource.

          • workflowArn (string) --

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

          • parameters (list) --

            Contains parameter values for each of the parameters that the workflow document defined for the workflow resource.

            • (dict) --

              Contains a key/value pair that sets the named workflow parameter.

              • name (string) --

                The name of the workflow parameter to set.

              • value (list) --

                Sets the value for the named workflow parameter.

                • (string) --

          • parallelGroup (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.

          • onFailure (string) --

            The action to take if the workflow fails.

GetWorkflowExecution (updated) Link ¶
Changes (response)
{'parallelGroup': 'string', 'status': {'CANCELLED'}}

Get the runtime information that was logged for a specific runtime instance of the workflow.

See also: AWS API Documentation

Request Syntax

client.get_workflow_execution(
    workflowExecutionId='string'
)
type workflowExecutionId

string

param workflowExecutionId

[REQUIRED]

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

rtype

dict

returns

Response Syntax

{
    'requestId': 'string',
    'workflowBuildVersionArn': 'string',
    'workflowExecutionId': 'string',
    'imageBuildVersionArn': 'string',
    'type': 'BUILD'|'TEST'|'DISTRIBUTION',
    'status': 'PENDING'|'SKIPPED'|'RUNNING'|'COMPLETED'|'FAILED'|'ROLLBACK_IN_PROGRESS'|'ROLLBACK_COMPLETED'|'CANCELLED',
    'message': 'string',
    'totalStepCount': 123,
    'totalStepsSucceeded': 123,
    'totalStepsFailed': 123,
    'totalStepsSkipped': 123,
    'startTime': 'string',
    'endTime': 'string',
    'parallelGroup': 'string'
}

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • workflowBuildVersionArn (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 (string) --

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

    • imageBuildVersionArn (string) --

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

    • type (string) --

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

    • status (string) --

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

    • message (string) --

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

    • totalStepCount (integer) --

      The total number of steps in the specified runtime instance of the workflow that ran. This number should equal the sum of the step counts for steps that succeeded, were skipped, and failed.

    • totalStepsSucceeded (integer) --

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

    • totalStepsFailed (integer) --

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

    • totalStepsSkipped (integer) --

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

    • startTime (string) --

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

    • endTime (string) --

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

    • parallelGroup (string) --

      Test workflows are defined within named runtime groups. The parallel group is a named group that contains one or more test workflows.

GetWorkflowStepExecution (updated) Link ¶
Changes (response)
{'status': {'CANCELLED'}}

Get the runtime information that was logged for a specific runtime instance of the workflow step.

See also: AWS API Documentation

Request Syntax

client.get_workflow_step_execution(
    stepExecutionId='string'
)
type stepExecutionId

string

param stepExecutionId

[REQUIRED]

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

rtype

dict

returns

Response Syntax

{
    'requestId': 'string',
    'stepExecutionId': 'string',
    'workflowBuildVersionArn': 'string',
    'workflowExecutionId': 'string',
    'imageBuildVersionArn': 'string',
    'name': 'string',
    'description': 'string',
    'action': 'string',
    'status': 'PENDING'|'SKIPPED'|'RUNNING'|'COMPLETED'|'FAILED'|'CANCELLED',
    'rollbackStatus': 'RUNNING'|'COMPLETED'|'SKIPPED'|'FAILED',
    'message': 'string',
    'inputs': 'string',
    'outputs': 'string',
    'startTime': 'string',
    'endTime': 'string',
    'onFailure': 'string',
    'timeoutSeconds': 123
}

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • stepExecutionId (string) --

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

    • workflowBuildVersionArn (string) --

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

    • workflowExecutionId (string) --

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

    • imageBuildVersionArn (string) --

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

    • name (string) --

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

    • description (string) --

      Describes the specified workflow step.

    • action (string) --

      The name of the action that the specified step performs.

    • status (string) --

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

    • rollbackStatus (string) --

      Reports on the rollback status of the specified runtime version of the workflow step, if applicable.

    • message (string) --

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

    • inputs (string) --

      Input parameters that Image Builder provided for the specified runtime instance of the workflow step.

    • outputs (string) --

      The file names that the specified runtime version of the workflow step created as output.

    • startTime (string) --

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

    • endTime (string) --

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

    • onFailure (string) --

      The action to perform if the workflow step fails.

    • timeoutSeconds (integer) --

      The maximum duration in seconds for this step to complete its action.

ListImagePipelines (updated) Link ¶
Changes (response)
{'imagePipelineList': {'executionRole': 'string',
                       'workflows': [{'onFailure': 'CONTINUE | ABORT',
                                      'parallelGroup': 'string',
                                      'parameters': [{'name': 'string',
                                                      'value': ['string']}],
                                      'workflowArn': 'string'}]}}

Returns a list of image pipelines.

See also: AWS API Documentation

Request Syntax

client.list_image_pipelines(
    filters=[
        {
            'name': 'string',
            'values': [
                'string',
            ]
        },
    ],
    maxResults=123,
    nextToken='string'
)
type filters

list

param filters

Use the following filters to streamline results:

  • description

  • distributionConfigurationArn

  • imageRecipeArn

  • infrastructureConfigurationArn

  • name

  • status

  • (dict) --

    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.

    • name (string) --

      The name of the filter. Filter names are case-sensitive.

    • values (list) --

      The filter values. Filter values are case-sensitive.

      • (string) --

type maxResults

integer

param maxResults

The maximum items to return in a request.

type nextToken

string

param nextToken

A token to specify where to start paginating. This is the nextToken from a previously truncated response.

rtype

dict

returns

Response Syntax

{
    'requestId': 'string',
    'imagePipelineList': [
        {
            'arn': 'string',
            'name': 'string',
            'description': 'string',
            'platform': 'Windows'|'Linux',
            'enhancedImageMetadataEnabled': True|False,
            'imageRecipeArn': 'string',
            'containerRecipeArn': 'string',
            'infrastructureConfigurationArn': 'string',
            'distributionConfigurationArn': 'string',
            'imageTestsConfiguration': {
                'imageTestsEnabled': True|False,
                'timeoutMinutes': 123
            },
            'schedule': {
                'scheduleExpression': 'string',
                'timezone': 'string',
                'pipelineExecutionStartCondition': 'EXPRESSION_MATCH_ONLY'|'EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE'
            },
            'status': 'DISABLED'|'ENABLED',
            'dateCreated': 'string',
            'dateUpdated': 'string',
            'dateLastRun': 'string',
            'dateNextRun': 'string',
            'tags': {
                'string': 'string'
            },
            'imageScanningConfiguration': {
                'imageScanningEnabled': True|False,
                'ecrConfiguration': {
                    'repositoryName': 'string',
                    'containerTags': [
                        'string',
                    ]
                }
            },
            'executionRole': 'string',
            'workflows': [
                {
                    'workflowArn': 'string',
                    'parameters': [
                        {
                            'name': 'string',
                            'value': [
                                'string',
                            ]
                        },
                    ],
                    'parallelGroup': 'string',
                    'onFailure': 'CONTINUE'|'ABORT'
                },
            ]
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • imagePipelineList (list) --

      The list of image pipelines.

      • (dict) --

        Details of an image pipeline.

        • arn (string) --

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

        • name (string) --

          The name of the image pipeline.

        • description (string) --

          The description of the image pipeline.

        • platform (string) --

          The platform of the image pipeline.

        • enhancedImageMetadataEnabled (boolean) --

          Collects additional information about the image being created, including the operating system (OS) version and package list. This information is used to enhance the overall experience of using EC2 Image Builder. Enabled by default.

        • imageRecipeArn (string) --

          The Amazon Resource Name (ARN) of the image recipe associated with this image pipeline.

        • containerRecipeArn (string) --

          The Amazon Resource Name (ARN) of the container recipe that is used for this pipeline.

        • infrastructureConfigurationArn (string) --

          The Amazon Resource Name (ARN) of the infrastructure configuration associated with this image pipeline.

        • distributionConfigurationArn (string) --

          The Amazon Resource Name (ARN) of the distribution configuration associated with this image pipeline.

        • imageTestsConfiguration (dict) --

          The image tests configuration of the image pipeline.

          • imageTestsEnabled (boolean) --

            Determines if tests should run after building the image. Image Builder defaults to enable tests to run following the image build, before image distribution.

          • timeoutMinutes (integer) --

            The maximum time in minutes that tests are permitted to run.

            Note

            The timeoutMinutes attribute is not currently active. This value is ignored.

        • schedule (dict) --

          The schedule of the image pipeline.

          • scheduleExpression (string) --

            The cron expression determines how often EC2 Image Builder evaluates your pipelineExecutionStartCondition .

            For information on how to format a cron expression in Image Builder, see Use cron expressions in EC2 Image Builder .

          • timezone (string) --

            The timezone that applies to the scheduling expression. For example, "Etc/UTC", "America/Los_Angeles" in the IANA timezone format . If not specified this defaults to UTC.

          • pipelineExecutionStartCondition (string) --

            The condition configures when the pipeline should trigger a new image build. When the pipelineExecutionStartCondition is set to EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE , and you use semantic version filters on the base image or components in your image recipe, EC2 Image Builder will build a new image only when there are new versions of the image or components in your recipe that match the semantic version filter. When it is set to EXPRESSION_MATCH_ONLY , it will build a new image every time the CRON expression matches the current time. For semantic version syntax, see CreateComponent in the EC2 Image Builder API Reference .

        • status (string) --

          The status of the image pipeline.

        • dateCreated (string) --

          The date on which this image pipeline was created.

        • dateUpdated (string) --

          The date on which this image pipeline was last updated.

        • dateLastRun (string) --

          This is no longer supported, and does not return a value.

        • dateNextRun (string) --

          The next date when the pipeline is scheduled to run.

        • tags (dict) --

          The tags of this image pipeline.

          • (string) --

            • (string) --

        • imageScanningConfiguration (dict) --

          Contains settings for vulnerability scans.

          • imageScanningEnabled (boolean) --

            A setting that indicates whether Image Builder keeps a snapshot of the vulnerability scans that Amazon Inspector runs against the build instance when you create a new image.

          • ecrConfiguration (dict) --

            Contains Amazon ECR settings for vulnerability scans.

            • repositoryName (string) --

              The name of the container repository that Amazon Inspector scans to identify findings for your container images. The name includes the path for the repository location. If you don’t provide this information, Image Builder creates a repository in your account named image-builder-image-scanning-repository for vulnerability scans of your output container images.

            • containerTags (list) --

              Tags for Image Builder to apply to the output container image that &INS; scans. Tags can help you identify and manage your scanned images.

              • (string) --

        • executionRole (string) --

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

        • workflows (list) --

          Contains the workflows that run for the image pipeline.

          • (dict) --

            Contains control settings and configurable inputs for a workflow resource.

            • workflowArn (string) --

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

            • parameters (list) --

              Contains parameter values for each of the parameters that the workflow document defined for the workflow resource.

              • (dict) --

                Contains a key/value pair that sets the named workflow parameter.

                • name (string) --

                  The name of the workflow parameter to set.

                • value (list) --

                  Sets the value for the named workflow parameter.

                  • (string) --

            • parallelGroup (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.

            • onFailure (string) --

              The action to take if the workflow fails.

    • nextToken (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.

ListWorkflowExecutions (updated) Link ¶
Changes (response)
{'workflowExecutions': {'parallelGroup': 'string', 'status': {'CANCELLED'}}}

Returns a list of workflow runtime instance metadata objects for a specific image build version.

See also: AWS API Documentation

Request Syntax

client.list_workflow_executions(
    maxResults=123,
    nextToken='string',
    imageBuildVersionArn='string'
)
type maxResults

integer

param maxResults

The maximum items to return in a request.

type nextToken

string

param nextToken

A token to specify where to start paginating. This is the nextToken from a previously truncated response.

type imageBuildVersionArn

string

param imageBuildVersionArn

[REQUIRED]

List all workflow runtime instances for the specified image build version resource ARN.

rtype

dict

returns

Response Syntax

{
    'requestId': 'string',
    'workflowExecutions': [
        {
            'workflowBuildVersionArn': 'string',
            'workflowExecutionId': 'string',
            'type': 'BUILD'|'TEST'|'DISTRIBUTION',
            'status': 'PENDING'|'SKIPPED'|'RUNNING'|'COMPLETED'|'FAILED'|'ROLLBACK_IN_PROGRESS'|'ROLLBACK_COMPLETED'|'CANCELLED',
            'message': 'string',
            'totalStepCount': 123,
            'totalStepsSucceeded': 123,
            'totalStepsFailed': 123,
            'totalStepsSkipped': 123,
            'startTime': 'string',
            'endTime': 'string',
            'parallelGroup': 'string'
        },
    ],
    'imageBuildVersionArn': 'string',
    'message': 'string',
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • workflowExecutions (list) --

      Contains an array of runtime details that represents each time a workflow ran for the requested image build version.

      • (dict) --

        Metadata that includes details and status from this runtime instance of the workflow.

        • workflowBuildVersionArn (string) --

          The Amazon Resource Name (ARN) of the workflow resource build version that ran.

        • workflowExecutionId (string) --

          Unique identifier that Image Builder assigns to keep track of runtime resources each time it runs a workflow.

        • type (string) --

          Indicates what type of workflow that Image Builder ran for this runtime instance of the workflow.

        • status (string) --

          The current runtime status for this workflow.

        • message (string) --

          The runtime output message from the workflow, if applicable.

        • totalStepCount (integer) --

          The total number of steps in the workflow. This should equal the sum of the step counts for steps that succeeded, were skipped, and failed.

        • totalStepsSucceeded (integer) --

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

        • totalStepsFailed (integer) --

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

        • totalStepsSkipped (integer) --

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

        • startTime (string) --

          The timestamp when the runtime instance of this workflow started.

        • endTime (string) --

          The timestamp when this runtime instance of the workflow finished.

        • parallelGroup (string) --

          The name of the test group that included the test workflow resource at runtime.

    • imageBuildVersionArn (string) --

      The resource ARN of the image build version for which you requested a list of workflow runtime details.

    • message (string) --

      The output message from the list action, if applicable.

    • nextToken (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.

ListWorkflowStepExecutions (updated) Link ¶
Changes (response)
{'steps': {'status': {'CANCELLED'}}}

Returns runtime data for each step in a runtime instance of the workflow that you specify in the request.

See also: AWS API Documentation

Request Syntax

client.list_workflow_step_executions(
    maxResults=123,
    nextToken='string',
    workflowExecutionId='string'
)
type maxResults

integer

param maxResults

The maximum items to return in a request.

type nextToken

string

param nextToken

A token to specify where to start paginating. This is the nextToken from a previously truncated response.

type workflowExecutionId

string

param workflowExecutionId

[REQUIRED]

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

rtype

dict

returns

Response Syntax

{
    'requestId': 'string',
    'steps': [
        {
            'stepExecutionId': 'string',
            'name': 'string',
            'description': 'string',
            'action': 'string',
            'status': 'PENDING'|'SKIPPED'|'RUNNING'|'COMPLETED'|'FAILED'|'CANCELLED',
            'rollbackStatus': 'RUNNING'|'COMPLETED'|'SKIPPED'|'FAILED',
            'message': 'string',
            'inputs': 'string',
            'outputs': 'string',
            'startTime': 'string',
            'endTime': 'string'
        },
    ],
    'workflowBuildVersionArn': 'string',
    'workflowExecutionId': 'string',
    'imageBuildVersionArn': 'string',
    'message': 'string',
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • steps (list) --

      Contains an array of runtime details that represents each step in this runtime instance of the workflow.

      • (dict) --

        Runtime details and status for the workflow step.

        • stepExecutionId (string) --

          A unique identifier for the workflow step, assigned at runtime.

        • name (string) --

          The name of the workflow step.

        • description (string) --

          Description of the workflow step.

        • action (string) --

          The step action name.

        • status (string) --

          Runtime status for the workflow step.

        • rollbackStatus (string) --

          Reports on the rollback status of the step, if applicable.

        • message (string) --

          Detailed output message that the workflow step provides at runtime.

        • inputs (string) --

          Input parameters that Image Builder provides for the workflow step.

        • outputs (string) --

          The file names that the workflow step created as output for this runtime instance of the workflow.

        • startTime (string) --

          The timestamp when the workflow step started.

        • endTime (string) --

          The timestamp when the workflow step finished.

    • workflowBuildVersionArn (string) --

      The build version ARN for the Image Builder workflow resource that defines the steps for this runtime instance of the workflow.

    • workflowExecutionId (string) --

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

    • imageBuildVersionArn (string) --

      The image build version resource ARN that's associated with the specified runtime instance of the workflow.

    • message (string) --

      The output message from the list action, if applicable.

    • nextToken (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.

UpdateImagePipeline (updated) Link ¶
Changes (request)
{'executionRole': 'string',
 'workflows': [{'onFailure': 'CONTINUE | ABORT',
                'parallelGroup': 'string',
                'parameters': [{'name': 'string', 'value': ['string']}],
                'workflowArn': 'string'}]}

Updates an image pipeline. Image pipelines enable you to automate the creation and distribution of images. You must specify exactly one recipe for your image, using either a containerRecipeArn or an imageRecipeArn .

Note

UpdateImagePipeline does not support selective updates for the pipeline. You must specify all of the required properties in the update request, not just the properties that have changed.

See also: AWS API Documentation

Request Syntax

client.update_image_pipeline(
    imagePipelineArn='string',
    description='string',
    imageRecipeArn='string',
    containerRecipeArn='string',
    infrastructureConfigurationArn='string',
    distributionConfigurationArn='string',
    imageTestsConfiguration={
        'imageTestsEnabled': True|False,
        'timeoutMinutes': 123
    },
    enhancedImageMetadataEnabled=True|False,
    schedule={
        'scheduleExpression': 'string',
        'timezone': 'string',
        'pipelineExecutionStartCondition': 'EXPRESSION_MATCH_ONLY'|'EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE'
    },
    status='DISABLED'|'ENABLED',
    clientToken='string',
    imageScanningConfiguration={
        'imageScanningEnabled': True|False,
        'ecrConfiguration': {
            'repositoryName': 'string',
            'containerTags': [
                'string',
            ]
        }
    },
    workflows=[
        {
            'workflowArn': 'string',
            'parameters': [
                {
                    'name': 'string',
                    'value': [
                        'string',
                    ]
                },
            ],
            'parallelGroup': 'string',
            'onFailure': 'CONTINUE'|'ABORT'
        },
    ],
    executionRole='string'
)
type imagePipelineArn

string

param imagePipelineArn

[REQUIRED]

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

type description

string

param description

The description of the image pipeline.

type imageRecipeArn

string

param imageRecipeArn

The Amazon Resource Name (ARN) of the image recipe that will be used to configure images updated by this image pipeline.

type containerRecipeArn

string

param containerRecipeArn

The Amazon Resource Name (ARN) of the container pipeline to update.

type infrastructureConfigurationArn

string

param infrastructureConfigurationArn

[REQUIRED]

The Amazon Resource Name (ARN) of the infrastructure configuration that Image Builder uses to build images that this image pipeline has updated.

type distributionConfigurationArn

string

param distributionConfigurationArn

The Amazon Resource Name (ARN) of the distribution configuration that Image Builder uses to configure and distribute images that this image pipeline has updated.

type imageTestsConfiguration

dict

param imageTestsConfiguration

The image test configuration of the image pipeline.

  • imageTestsEnabled (boolean) --

    Determines if tests should run after building the image. Image Builder defaults to enable tests to run following the image build, before image distribution.

  • timeoutMinutes (integer) --

    The maximum time in minutes that tests are permitted to run.

    Note

    The timeoutMinutes attribute is not currently active. This value is ignored.

type enhancedImageMetadataEnabled

boolean

param enhancedImageMetadataEnabled

Collects additional information about the image being created, including the operating system (OS) version and package list. This information is used to enhance the overall experience of using EC2 Image Builder. Enabled by default.

type schedule

dict

param schedule

The schedule of the image pipeline.

  • scheduleExpression (string) --

    The cron expression determines how often EC2 Image Builder evaluates your pipelineExecutionStartCondition .

    For information on how to format a cron expression in Image Builder, see Use cron expressions in EC2 Image Builder .

  • timezone (string) --

    The timezone that applies to the scheduling expression. For example, "Etc/UTC", "America/Los_Angeles" in the IANA timezone format . If not specified this defaults to UTC.

  • pipelineExecutionStartCondition (string) --

    The condition configures when the pipeline should trigger a new image build. When the pipelineExecutionStartCondition is set to EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE , and you use semantic version filters on the base image or components in your image recipe, EC2 Image Builder will build a new image only when there are new versions of the image or components in your recipe that match the semantic version filter. When it is set to EXPRESSION_MATCH_ONLY , it will build a new image every time the CRON expression matches the current time. For semantic version syntax, see CreateComponent in the EC2 Image Builder API Reference .

type status

string

param status

The status of the image pipeline.

type clientToken

string

param clientToken

[REQUIRED]

Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see Ensuring idempotency in the Amazon EC2 API Reference .

This field is autopopulated if not provided.

type imageScanningConfiguration

dict

param imageScanningConfiguration

Contains settings for vulnerability scans.

  • imageScanningEnabled (boolean) --

    A setting that indicates whether Image Builder keeps a snapshot of the vulnerability scans that Amazon Inspector runs against the build instance when you create a new image.

  • ecrConfiguration (dict) --

    Contains Amazon ECR settings for vulnerability scans.

    • repositoryName (string) --

      The name of the container repository that Amazon Inspector scans to identify findings for your container images. The name includes the path for the repository location. If you don’t provide this information, Image Builder creates a repository in your account named image-builder-image-scanning-repository for vulnerability scans of your output container images.

    • containerTags (list) --

      Tags for Image Builder to apply to the output container image that &INS; scans. Tags can help you identify and manage your scanned images.

      • (string) --

type workflows

list

param workflows

Contains the workflows to run for the pipeline.

  • (dict) --

    Contains control settings and configurable inputs for a workflow resource.

    • workflowArn (string) -- [REQUIRED]

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

    • parameters (list) --

      Contains parameter values for each of the parameters that the workflow document defined for the workflow resource.

      • (dict) --

        Contains a key/value pair that sets the named workflow parameter.

        • name (string) -- [REQUIRED]

          The name of the workflow parameter to set.

        • value (list) -- [REQUIRED]

          Sets the value for the named workflow parameter.

          • (string) --

    • parallelGroup (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.

    • onFailure (string) --

      The action to take if the workflow fails.

type executionRole

string

param executionRole

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

rtype

dict

returns

Response Syntax

{
    'requestId': 'string',
    'clientToken': 'string',
    'imagePipelineArn': 'string'
}

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • clientToken (string) --

      The client token that uniquely identifies the request.

    • imagePipelineArn (string) --

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