EC2 Image Builder

2021/09/22 - EC2 Image Builder - 10 updated api methods

Changes  This feature adds support for specifying GP3 volume throughput and configuring instance metadata options for instances launched by EC2 Image Builder.

CreateContainerRecipe (updated) Link ¶
Changes (request)
{'instanceConfiguration': {'blockDeviceMappings': {'ebs': {'throughput': 'integer'}}}}

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

See also: AWS API Documentation

Request Syntax

client.create_container_recipe(
    containerType='DOCKER',
    name='string',
    description='string',
    semanticVersion='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',
    dockerfileTemplateUri='string',
    platformOverride='Windows'|'Linux',
    imageOsVersionOverride='string',
    parentImage='string',
    tags={
        'string': 'string'
    },
    workingDirectory='string',
    targetRepository={
        'service': 'ECR',
        'repositoryName': 'string'
    },
    kmsKeyId='string',
    clientToken='string'
)
type containerType

string

param containerType

[REQUIRED]

The type of container to create.

type name

string

param name

[REQUIRED]

The name of the container recipe.

type description

string

param description

The description of the container recipe.

type semanticVersion

string

param semanticVersion

[REQUIRED]

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

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 components

list

param components

[REQUIRED]

Components for build and test that are included in the container recipe.

  • (dict) --

    Configuration details of the component.

    • componentArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the component.

    • parameters (list) --

      A group of parameter settings that are used to configure the component for a specific recipe.

      • (dict) --

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

        • name (string) -- [REQUIRED]

          The name of the component parameter to set.

        • value (list) -- [REQUIRED]

          Sets the value for the named component parameter.

          • (string) --

type instanceConfiguration

dict

param instanceConfiguration

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 parent image.

type dockerfileTemplateData

string

param dockerfileTemplateData

The Dockerfile template used to build your image as an inline data blob.

type dockerfileTemplateUri

string

param dockerfileTemplateUri

The Amazon S3 URI for the Dockerfile that will be used to build your container image.

type platformOverride

string

param platformOverride

Specifies the operating system platform when you use a custom source image.

type imageOsVersionOverride

string

param imageOsVersionOverride

Specifies the operating system version for the source image.

type parentImage

string

param parentImage

[REQUIRED]

The source image for the container recipe.

type tags

dict

param tags

Tags that are attached to the container recipe.

  • (string) --

    • (string) --

type workingDirectory

string

param workingDirectory

The working directory for use during build and test workflows.

type targetRepository

dict

param targetRepository

[REQUIRED]

The destination repository for the container image.

  • service (string) -- [REQUIRED]

    Specifies the service in which this image was registered.

  • repositoryName (string) -- [REQUIRED]

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

type kmsKeyId

string

param kmsKeyId

Identifies which KMS key is used to encrypt the container image.

type clientToken

string

param clientToken

[REQUIRED]

The client token used to make this request idempotent.

This field is autopopulated if not provided.

rtype

dict

returns

Response Syntax

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

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • clientToken (string) --

      The client token used to make this request idempotent.

    • containerRecipeArn (string) --

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

CreateImageRecipe (updated) Link ¶
Changes (request)
{'blockDeviceMappings': {'ebs': {'throughput': 'integer'}}}

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

See also: AWS API Documentation

Request Syntax

client.create_image_recipe(
    name='string',
    description='string',
    semanticVersion='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'
        },
    ],
    tags={
        'string': 'string'
    },
    workingDirectory='string',
    additionalInstanceConfiguration={
        'systemsManagerAgent': {
            'uninstallAfterBuild': True|False
        },
        'userDataOverride': 'string'
    },
    clientToken='string'
)
type name

string

param name

[REQUIRED]

The name of the image recipe.

type description

string

param description

The description of the image recipe.

type semanticVersion

string

param semanticVersion

[REQUIRED]

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

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 components

list

param components

[REQUIRED]

The components of the image recipe.

  • (dict) --

    Configuration details of the component.

    • componentArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the component.

    • parameters (list) --

      A group of parameter settings that are used to configure the component for a specific recipe.

      • (dict) --

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

        • name (string) -- [REQUIRED]

          The name of the component parameter to set.

        • value (list) -- [REQUIRED]

          Sets the value for the named component parameter.

          • (string) --

type parentImage

string

param parentImage

[REQUIRED]

The parent image of the image recipe. The value of the string can be the ARN of the parent image or an AMI ID. The format for the ARN follows this example: arn:aws:imagebuilder:us-west-2:aws:image/windows-server-2016-english-full-base-x86/x.x.x . You can provide the specific version that you want to use, or you can use a wildcard in all of the fields. If you enter an AMI ID for the string value, you must have access to the AMI, and the AMI must be in the same Region in which you are using Image Builder.

type blockDeviceMappings

list

param blockDeviceMappings

The block device mappings of the image 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 parent image.

type tags

dict

param tags

The tags of the image recipe.

  • (string) --

    • (string) --

type workingDirectory

string

param workingDirectory

The working directory used during build and test workflows.

type additionalInstanceConfiguration

dict

param additionalInstanceConfiguration

Specify additional settings and launch scripts for your build instances.

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

    Note

    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 source image.

type clientToken

string

param clientToken

[REQUIRED]

The idempotency token used to make this request idempotent.

This field is autopopulated if not provided.

rtype

dict

returns

Response Syntax

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

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • clientToken (string) --

      The idempotency token used to make this request idempotent.

    • imageRecipeArn (string) --

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

CreateInfrastructureConfiguration (updated) Link ¶
Changes (request)
{'instanceMetadataOptions': {'httpPutResponseHopLimit': 'integer',
                             'httpTokens': 'string'}}

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

See also: AWS API Documentation

Request Syntax

client.create_infrastructure_configuration(
    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',
    resourceTags={
        'string': 'string'
    },
    instanceMetadataOptions={
        'httpTokens': 'string',
        'httpPutResponseHopLimit': 123
    },
    tags={
        'string': 'string'
    },
    clientToken='string'
)
type name

string

param name

[REQUIRED]

The name of the infrastructure configuration.

type description

string

param description

The description of the infrastructure configuration.

type instanceTypes

list

param instanceTypes

The instance metadata options that you can set for the HTTP requests that pipeline builds use to launch EC2 build and test instances. For more information about instance metadata options, see one of the following links:

  • (string) --

type instanceProfileName

string

param instanceProfileName

[REQUIRED]

The instance profile to associate with the instance used to customize your Amazon EC2 AMI.

type securityGroupIds

list

param securityGroupIds

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

  • (string) --

type subnetId

string

param subnetId

The subnet ID in which to place the instance used to customize your Amazon EC2 AMI.

type logging

dict

param logging

The logging configuration of the infrastructure configuration.

  • s3Logs (dict) --

    The Amazon S3 logging configuration.

    • s3BucketName (string) --

      The Amazon S3 bucket in which to store the logs.

    • s3KeyPrefix (string) --

      The Amazon S3 path in which to store the logs.

type keyPair

string

param keyPair

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

type terminateInstanceOnFailure

boolean

param terminateInstanceOnFailure

The terminate instance on failure setting of the infrastructure configuration. Set to false if you want Image Builder to retain the instance used to configure your AMI if the build or test phase of your workflow fails.

type snsTopicArn

string

param snsTopicArn

The SNS topic on which to send image build events.

type resourceTags

dict

param resourceTags

The tags attached to the resource created by Image Builder.

  • (string) --

    • (string) --

type instanceMetadataOptions

dict

param instanceMetadataOptions

The instance metadata options that you can set for the HTTP requests that pipeline builds use to launch EC2 build and test instances.

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

type tags

dict

param tags

The tags of the infrastructure configuration.

  • (string) --

    • (string) --

type clientToken

string

param clientToken

[REQUIRED]

The idempotency token used to make this request idempotent.

This field is autopopulated if not provided.

rtype

dict

returns

Response Syntax

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

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • clientToken (string) --

      The idempotency token used to make this request idempotent.

    • infrastructureConfigurationArn (string) --

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

GetComponent (updated) Link ¶
Changes (response)
{'component': {'state': {'reason': 'string', 'status': 'DEPRECATED'}}}

Gets a component object.

See also: AWS API Documentation

Request Syntax

client.get_component(
    componentBuildVersionArn='string'
)
type componentBuildVersionArn

string

param componentBuildVersionArn

[REQUIRED]

The Amazon Resource Name (ARN) of the component that you want to retrieve. Regex requires "/d+$" suffix.

rtype

dict

returns

Response Syntax

{
    'requestId': 'string',
    'component': {
        'arn': 'string',
        'name': 'string',
        'version': 'string',
        'description': 'string',
        'changeDescription': 'string',
        'type': 'BUILD'|'TEST',
        'platform': 'Windows'|'Linux',
        'supportedOsVersions': [
            'string',
        ],
        'state': {
            'status': 'DEPRECATED',
            'reason': 'string'
        },
        'parameters': [
            {
                'name': 'string',
                'type': 'string',
                'defaultValue': [
                    'string',
                ],
                'description': 'string'
            },
        ],
        'owner': 'string',
        'data': 'string',
        'kmsKeyId': 'string',
        'encrypted': True|False,
        'dateCreated': 'string',
        'tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • component (dict) --

      The component object associated with the specified ARN.

      • arn (string) --

        The Amazon Resource Name (ARN) of the component.

      • name (string) --

        The name of the component.

      • version (string) --

        The version of the component.

      • description (string) --

        The description of the component.

      • changeDescription (string) --

        The change description of the component.

      • type (string) --

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

      • platform (string) --

        The platform of the component.

      • supportedOsVersions (list) --

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

        • (string) --

      • state (dict) --

        Describes the current status of the component. This is used for components that are no longer active.

        • status (string) --

          The current state of the component.

        • reason (string) --

          Describes how or why the component changed state.

      • parameters (list) --

        Contains parameter details for each of the parameters that are defined for the component.

        • (dict) --

          Defines a parameter that is used to provide configuration details for the component.

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

      • owner (string) --

        The owner of the component.

      • data (string) --

        The data of the component.

      • kmsKeyId (string) --

        The KMS key identifier used to encrypt the component.

      • encrypted (boolean) --

        The encryption status of the component.

      • dateCreated (string) --

        The date that the component was created.

      • tags (dict) --

        The tags associated with the component.

        • (string) --

          • (string) --

GetContainerRecipe (updated) Link ¶
Changes (response)
{'containerRecipe': {'instanceConfiguration': {'blockDeviceMappings': {'ebs': {'throughput': 'integer'}}}}}

Retrieves a container recipe.

See also: AWS API Documentation

Request Syntax

client.get_container_recipe(
    containerRecipeArn='string'
)
type containerRecipeArn

string

param containerRecipeArn

[REQUIRED]

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

rtype

dict

returns

Response Syntax

{
    'requestId': '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'
        }
    }
}

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • containerRecipe (dict) --

      The container recipe object that is returned.

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

        Components for build and test that are included in the container recipe.

        • (dict) --

          Configuration details of the component.

          • componentArn (string) --

            The Amazon Resource Name (ARN) of the component.

          • parameters (list) --

            A group of parameter settings that are used 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 parent 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 source 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.

GetImage (updated) Link ¶
Changes (response)
{'image': {'containerRecipe': {'instanceConfiguration': {'blockDeviceMappings': {'ebs': {'throughput': 'integer'}}}},
           'imageRecipe': {'blockDeviceMappings': {'ebs': {'throughput': 'integer'}}},
           'infrastructureConfiguration': {'instanceMetadataOptions': {'httpPutResponseHopLimit': 'integer',
                                                                       'httpTokens': '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 retrieve.

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',
            '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',
                            ]
                        }
                    },
                    'containerDistributionConfiguration': {
                        'description': 'string',
                        'containerTags': [
                            'string',
                        ],
                        'targetRepository': {
                            'service': 'ECR',
                            'repositoryName': 'string'
                        }
                    },
                    'licenseConfigurationArns': [
                        'string',
                    ],
                    'launchTemplateConfigurations': [
                        {
                            'launchTemplateId': 'string',
                            'accountId': 'string',
                            'setDefaultVersion': True|False
                        },
                    ]
                },
            ],
            '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',
                        'reason': 'string'
                    },
                    'accountId': 'string'
                },
            ],
            'containers': [
                {
                    'region': 'string',
                    'imageUris': [
                        'string',
                    ]
                },
            ]
        },
        'tags': {
            'string': 'string'
        }
    }
}

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 is an AMI or 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 source 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 platform of the image.

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

      • osVersion (string) --

        The operating system version of the instance. 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 image's status.

      • imageRecipe (dict) --

        The image recipe used when creating the image.

        • 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 of the image recipe.

          • (dict) --

            Configuration details of the component.

            • componentArn (string) --

              The Amazon Resource Name (ARN) of the component.

            • parameters (list) --

              A group of parameter settings that are used 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 parent 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 parent 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.

            Note

            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 source image.

      • containerRecipe (dict) --

        The recipe that is used to create an Image Builder container image.

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

          Components for build and test that are included in the container recipe.

          • (dict) --

            Configuration details of the component.

            • componentArn (string) --

              The Amazon Resource Name (ARN) of the component.

            • parameters (list) --

              A group of parameter settings that are used 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 parent 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 source 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 used when creating 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 Amazon S3 bucket in which to store the logs.

            • s3KeyPrefix (string) --

              The Amazon S3 path in which to store the logs.

        • 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 SNS topic Amazon Resource Name (ARN) of the infrastructure configuration.

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

        • tags (dict) --

          The tags of the infrastructure configuration.

          • (string) --

            • (string) --

      • distributionConfiguration (dict) --

        The distribution configuration used when creating 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 distribution configuration.

              • description (string) --

                The description of the 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) --

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

        • 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 configuration used when creating this image.

        • imageTestsEnabled (boolean) --

          Defines if tests should be executed when building this image.

        • timeoutMinutes (integer) --

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

      • dateCreated (string) --

        The date on which this image was created.

      • outputResources (dict) --

        The output resources produced when creating 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 state shows the image status and the reason for that status.

              • status (string) --

                The status of the image.

              • reason (string) --

                The reason for the image's status.

            • 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 of the image.

        • (string) --

          • (string) --

GetImageRecipe (updated) Link ¶
Changes (response)
{'imageRecipe': {'blockDeviceMappings': {'ebs': {'throughput': 'integer'}}}}

Gets an image recipe.

See also: AWS API Documentation

Request Syntax

client.get_image_recipe(
    imageRecipeArn='string'
)
type imageRecipeArn

string

param imageRecipeArn

[REQUIRED]

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

rtype

dict

returns

Response Syntax

{
    'requestId': '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'
        }
    }
}

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • imageRecipe (dict) --

      The image recipe object.

      • 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 of the image recipe.

        • (dict) --

          Configuration details of the component.

          • componentArn (string) --

            The Amazon Resource Name (ARN) of the component.

          • parameters (list) --

            A group of parameter settings that are used 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 parent 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 parent 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.

          Note

          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 source image.

GetInfrastructureConfiguration (updated) Link ¶
Changes (response)
{'infrastructureConfiguration': {'instanceMetadataOptions': {'httpPutResponseHopLimit': 'integer',
                                                             'httpTokens': 'string'}}}

Gets an infrastructure configuration.

See also: AWS API Documentation

Request Syntax

client.get_infrastructure_configuration(
    infrastructureConfigurationArn='string'
)
type infrastructureConfigurationArn

string

param infrastructureConfigurationArn

[REQUIRED]

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

rtype

dict

returns

Response Syntax

{
    'requestId': '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'
        }
    }
}

Response Structure

  • (dict) --

    GetInfrastructureConfiguration response object.

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • infrastructureConfiguration (dict) --

      The infrastructure configuration object.

      • 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 Amazon S3 bucket in which to store the logs.

          • s3KeyPrefix (string) --

            The Amazon S3 path in which to store the logs.

      • 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 SNS topic Amazon Resource Name (ARN) of the infrastructure configuration.

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

      • tags (dict) --

        The tags of the infrastructure configuration.

        • (string) --

          • (string) --

ListComponentBuildVersions (updated) Link ¶
Changes (response)
{'componentSummaryList': {'state': {'reason': 'string',
                                    'status': 'DEPRECATED'}}}

Returns the list of component build versions for the specified semantic version.

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.

Filtering: With semantic versioning, you have the flexibility to use wildcards (x) to specify the most recent versions or nodes when selecting the source 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.

See also: AWS API Documentation

Request Syntax

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

string

param componentVersionArn

[REQUIRED]

The component version Amazon Resource Name (ARN) whose versions you want to list.

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',
    'componentSummaryList': [
        {
            'arn': 'string',
            'name': 'string',
            'version': 'string',
            'platform': 'Windows'|'Linux',
            'supportedOsVersions': [
                'string',
            ],
            'state': {
                'status': 'DEPRECATED',
                'reason': 'string'
            },
            'type': 'BUILD'|'TEST',
            'owner': 'string',
            'description': 'string',
            'changeDescription': 'string',
            'dateCreated': 'string',
            'tags': {
                'string': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • componentSummaryList (list) --

      The list of component summaries for the specified semantic version.

      • (dict) --

        A high-level summary of a component.

        • arn (string) --

          The Amazon Resource Name (ARN) of the component.

        • name (string) --

          The name of the component.

        • version (string) --

          The version of the component.

        • platform (string) --

          The platform of the component.

        • supportedOsVersions (list) --

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

          • (string) --

        • state (dict) --

          Describes the current status of the component.

          • status (string) --

            The current state of the component.

          • reason (string) --

            Describes how or why the component changed state.

        • type (string) --

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

        • owner (string) --

          The owner of the component.

        • description (string) --

          The description of the component.

        • changeDescription (string) --

          The change description of the component.

        • dateCreated (string) --

          The date that the component was created.

        • tags (dict) --

          The tags associated with the component.

          • (string) --

            • (string) --

    • nextToken (string) --

      The next token used for paginated responses. When this is not empty, there are additional elements that the service has not included in this request. Use this token with the next request to retrieve additional objects.

UpdateInfrastructureConfiguration (updated) Link ¶
Changes (request)
{'instanceMetadataOptions': {'httpPutResponseHopLimit': 'integer',
                             'httpTokens': 'string'}}

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

See also: AWS API Documentation

Request Syntax

client.update_infrastructure_configuration(
    infrastructureConfigurationArn='string',
    description='string',
    instanceTypes=[
        'string',
    ],
    instanceProfileName='string',
    securityGroupIds=[
        'string',
    ],
    subnetId='string',
    logging={
        's3Logs': {
            's3BucketName': 'string',
            's3KeyPrefix': 'string'
        }
    },
    keyPair='string',
    terminateInstanceOnFailure=True|False,
    snsTopicArn='string',
    clientToken='string',
    resourceTags={
        'string': 'string'
    },
    instanceMetadataOptions={
        'httpTokens': 'string',
        'httpPutResponseHopLimit': 123
    }
)
type infrastructureConfigurationArn

string

param infrastructureConfigurationArn

[REQUIRED]

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

type description

string

param description

The description of the infrastructure configuration.

type instanceTypes

list

param instanceTypes

The instance types of the infrastructure configuration. You can specify one or more instance types to use for this build. The service will pick one of these instance types based on availability.

  • (string) --

type instanceProfileName

string

param instanceProfileName

[REQUIRED]

The instance profile to associate with the instance used to customize your Amazon EC2 AMI.

type securityGroupIds

list

param securityGroupIds

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

  • (string) --

type subnetId

string

param subnetId

The subnet ID to place the instance used to customize your Amazon EC2 AMI in.

type logging

dict

param logging

The logging configuration of the infrastructure configuration.

  • s3Logs (dict) --

    The Amazon S3 logging configuration.

    • s3BucketName (string) --

      The Amazon S3 bucket in which to store the logs.

    • s3KeyPrefix (string) --

      The Amazon S3 path in which to store the logs.

type keyPair

string

param keyPair

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

type terminateInstanceOnFailure

boolean

param terminateInstanceOnFailure

The terminate instance on failure setting of the infrastructure configuration. Set to false if you want Image Builder to retain the instance used to configure your AMI if the build or test phase of your workflow fails.

type snsTopicArn

string

param snsTopicArn

The SNS topic on which to send image build events.

type clientToken

string

param clientToken

[REQUIRED]

The idempotency token used to make this request idempotent.

This field is autopopulated if not provided.

type resourceTags

dict

param resourceTags

The tags attached to the resource created by Image Builder.

  • (string) --

    • (string) --

type instanceMetadataOptions

dict

param instanceMetadataOptions

The instance metadata options that you can set for the HTTP requests that pipeline builds use to launch EC2 build and test instances. For more information about instance metadata options, see one of the following links:

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

rtype

dict

returns

Response Syntax

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

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • clientToken (string) --

      The idempotency token used to make this request idempotent.

    • infrastructureConfigurationArn (string) --

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