imagebuilder / Client / get_image_pipeline

get_image_pipeline

imagebuilder.Client.get_image_pipeline(**kwargs)

Retrieves an image pipeline.

See also: AWS API Documentation

Request Syntax

response = client.get_image_pipeline(
    imagePipelineArn='string'
)
Parameters:

imagePipelineArn (string) –

[REQUIRED]

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

Return type:

dict

Returns:

Response Syntax

{
    'requestId': 'string',
    'imagePipeline': {
        'arn': 'string',
        'name': 'string',
        'description': 'string',
        'platform': 'Windows'|'Linux'|'macOS',
        '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',
            'autoDisablePolicy': {
                'failureCount': 123
            }
        },
        'status': 'DISABLED'|'ENABLED',
        'dateCreated': 'string',
        'dateUpdated': 'string',
        'dateLastRun': 'string',
        'lastRunStatus': 'PENDING'|'CREATING'|'BUILDING'|'TESTING'|'DISTRIBUTING'|'INTEGRATING'|'AVAILABLE'|'CANCELLED'|'FAILED'|'DEPRECATED'|'DELETED'|'DISABLED',
        'dateNextRun': 'string',
        'tags': {
            'string': 'string'
        },
        'imageScanningConfiguration': {
            'imageScanningEnabled': True|False,
            'ecrConfiguration': {
                'repositoryName': 'string',
                'containerTags': [
                    'string',
                ]
            }
        },
        'imageTags': {
            'string': 'string'
        },
        'executionRole': 'string',
        'workflows': [
            {
                'workflowArn': 'string',
                'parameters': [
                    {
                        'name': 'string',
                        'value': [
                            'string',
                        ]
                    },
                ],
                'parallelGroup': 'string',
                'onFailure': 'CONTINUE'|'ABORT'
            },
        ],
        'loggingConfiguration': {
            'imageLogGroupName': 'string',
            'pipelineLogGroupName': 'string'
        },
        'consecutiveFailures': 123
    }
}

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, inherited from the recipe that the pipeline uses.

      • enhancedImageMetadataEnabled (boolean) –

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

      • 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) –

          Specifies whether tests run after building the image. When enabled, tests run after the image build and before image distribution. Defaults to true.

        • timeoutMinutes (integer) –

          The maximum time in minutes that tests are permitted to run. If you don’t specify a value, Image Builder stores and returns 720.

          Note

          The timeout property is not currently active. This value is ignored.

      • schedule (dict) –

        The schedule of the image pipeline.

        • scheduleExpression (string) –

          The expression determines how often EC2 Image Builder evaluates your pipelineExecutionStartCondition. You can specify a cron expression, or a rate expression such as rate(1 day).

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

        • timezone (string) –

          The timezone that applies to the scheduling expression. Specify a value in IANA timezone format, for example Etc/UTC or America/Los_Angeles. If not specified, this defaults to UTC.

        • pipelineExecutionStartCondition (string) –

          The start condition configures when the pipeline should trigger a new image build, as follows. If no value is set Image Builder defaults to EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE.

          • EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE (default) – When you use semantic version filters on the base image or components in your image recipe, EC2 Image Builder builds a new image only when there are new versions of the base image or components in your recipe that match the filter.

          Note

          For semantic version syntax, see CreateComponent.

          • EXPRESSION_MATCH_ONLY – This condition builds a new image every time the CRON expression matches the current time.

          Note

          If the recipe references its base image through an Amazon Web Services Systems Manager Parameter Store parameter, a change in the parameter’s value also counts as an available dependency update.

        • autoDisablePolicy (dict) –

          The policy that configures when Image Builder should automatically disable a pipeline that is failing.

          • failureCount (integer) –

            The number of consecutive scheduled image pipeline executions that must fail before Image Builder automatically disables the pipeline.

      • status (string) –

        The status of the image pipeline. A disabled pipeline doesn’t run on its schedule, but you can still start builds manually. Image Builder can also disable a pipeline automatically when consecutive scheduled builds fail.

      • 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) –

        The date on which this image pipeline was last run.

      • lastRunStatus (string) –

        The status of the last image that this pipeline built, such as BUILDING, TESTING, FAILED, or AVAILABLE.

      • 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 that Amazon Inspector runs against the test instance during image creation.

        • imageScanningEnabled (boolean) –

          Specifies whether Amazon Inspector scans for vulnerabilities when you create a new image, and whether Image Builder saves the findings. Amazon Inspector must be enabled in the account. Image tests must also be enabled. For AMI output, Amazon Inspector scans the test instance. For container output, Amazon Inspector scans the container image that Image Builder pushes to the Amazon ECR repository from your ecrConfiguration settings.

        • ecrConfiguration (dict) –

          Contains Amazon ECR settings for vulnerability scans.

          • repositoryName (string) –

            The name of the container repository where Image Builder pushes the container image for the vulnerability scan. Provide the repository name only (a namespace path is allowed, but not the registry hostname); the repository must already exist in your account. If you don’t specify a repository name, Image Builder creates the default repository image-builder-image-scanning-repository in your account.

          • containerTags (list) –

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

            • (string) –

      • imageTags (dict) –

        The tags that Image Builder applies to the Image Builder image resource that this pipeline’s scheduled executions create. These tags don’t apply to the output AMI. Builds that you start manually use the tags from the StartImagePipelineExecution request instead.

        • (string) –

          • (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. With CONTINUE, a failed workflow is logged and image creation proceeds to the next workflow. If you don’t set a value, the image build fails when the workflow fails. You can only set this property for test workflows.

      • loggingConfiguration (dict) –

        The CloudWatch Logs configuration for the pipeline: the log group for image build logs and the log group for pipeline execution logs.

        • imageLogGroupName (string) –

          Specifies the CloudWatch Logs log group name for image build logs. The log group name can contain alphanumeric characters, hyphens, underscores, forward slashes, and periods, up to 512 characters. Log group names not starting with /aws/imagebuilder/ require an executionRole with CloudWatch Logs write permissions. If not specified, defaults to /aws/imagebuilder/image-name.

        • pipelineLogGroupName (string) –

          Specifies the CloudWatch Logs log group name for pipeline execution logs. The log group name can contain alphanumeric characters, hyphens, underscores, forward slashes, and periods, up to 512 characters. Log group names not starting with /aws/imagebuilder/ require an executionRole with CloudWatch Logs write permissions. If not specified, defaults to /aws/imagebuilder/pipeline/pipeline-name.

      • consecutiveFailures (integer) –

        Image Builder tracks the number of consecutive failures for scheduled pipeline executions and takes one of the following actions each time it runs on a schedule:

        • If the pipeline execution is successful, the number of consecutive failures resets to zero.

        • If the pipeline execution fails, Image Builder increments the number of consecutive failures. If the failure count reaches the limit defined in the AutoDisablePolicy, Image Builder disables the pipeline.

        The consecutive failure count is also reset to zero under the following conditions:

        • The pipeline runs manually and succeeds.

        • The pipeline configuration is updated.

        If the pipeline runs manually and fails, the count remains the same. The next scheduled run continues to increment where it left off before.

Exceptions