imagebuilder

Client

class imagebuilder.Client

A low-level client representing EC2 Image Builder (imagebuilder)

EC2 Image Builder is a fully managed Amazon Web Services service that makes it easier to automate the creation, management, and deployment of customized, secure, and up-to-date "golden" server images that are pre-installed and pre-configured with software and settings to meet specific IT standards.

client = session.create_client('imagebuilder')

These are the available methods:

can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
cancel_image_creation(**kwargs)

CancelImageCreation cancels the creation of Image. This operation can only be used on images in a non-terminal state.

See also: AWS API Documentation

Request Syntax

response = client.cancel_image_creation(
    imageBuildVersionArn='string',
    clientToken='string'
)
Parameters
  • imageBuildVersionArn (string) --

    [REQUIRED]

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

  • clientToken (string) --

    [REQUIRED]

    The idempotency token used to make this request idempotent.

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

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

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • clientToken (string) --

      The idempotency token used to make this request idempotent.

    • imageBuildVersionArn (string) --

      The Amazon Resource Name (ARN) of the image whose creation has been cancelled.

Exceptions

create_component(**kwargs)

Creates a new component that can be used to build, validate, test, and assess your image.

See also: AWS API Documentation

Request Syntax

response = client.create_component(
    name='string',
    semanticVersion='string',
    description='string',
    changeDescription='string',
    platform='Windows'|'Linux',
    supportedOsVersions=[
        'string',
    ],
    data='string',
    uri='string',
    kmsKeyId='string',
    tags={
        'string': 'string'
    },
    clientToken='string'
)
Parameters
  • name (string) --

    [REQUIRED]

    The name of the component.

  • semanticVersion (string) --

    [REQUIRED]

    The semantic version of the component. 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, and that is not open for updates.

    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.

  • description (string) -- The description of the component. Describes the contents of the component.
  • changeDescription (string) -- The change description of the component. Describes what change has been made in this version, or what makes this version different from other versions of this component.
  • platform (string) --

    [REQUIRED]

    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) --
  • data (string) -- The data of the component. Used to specify the data inline. Either data or uri can be used to specify the data within the component.
  • uri (string) -- The uri of the component. Must be an Amazon S3 URL and the requester must have permission to access the Amazon S3 bucket. If you use Amazon S3, you can specify component content up to your service quota. Either data or uri can be used to specify the data within the component.
  • kmsKeyId (string) -- The ID of the KMS key that should be used to encrypt this component.
  • tags (dict) --

    The tags of the component.

    • (string) --
      • (string) --
  • clientToken (string) --

    [REQUIRED]

    The idempotency token of the component.

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

{
    'requestId': 'string',
    'clientToken': 'string',
    'componentBuildVersionArn': '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.

    • componentBuildVersionArn (string) --

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

Exceptions

create_container_recipe(**kwargs)

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

See also: AWS API Documentation

Request Syntax

response = 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'
                },
                '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'
)
Parameters
  • containerType (string) --

    [REQUIRED]

    The type of container to create.

  • name (string) --

    [REQUIRED]

    The name of the container recipe.

  • description (string) -- The description of the container recipe.
  • semanticVersion (string) --

    [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, and that is not open for updates.

    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.

  • components (list) --

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

        • virtualName (string) --

          Use to manage instance ephemeral devices.

        • noDevice (string) --

          Use to remove a mapping from the parent image.

  • dockerfileTemplateData (string) -- The Dockerfile template used to build your image as an inline data blob.
  • dockerfileTemplateUri (string) -- The Amazon S3 URI for the Dockerfile that will be used to build your container image.
  • platformOverride (string) -- Specifies the operating system platform when you use a custom source image.
  • imageOsVersionOverride (string) -- Specifies the operating system version for the source image.
  • parentImage (string) --

    [REQUIRED]

    The source image for the container recipe.

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

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

  • kmsKeyId (string) -- Identifies which KMS key is used to encrypt the container image.
  • clientToken (string) --

    [REQUIRED]

    The client token used to make this request idempotent.

    This field is autopopulated if not provided.

Return type

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.

Exceptions

create_distribution_configuration(**kwargs)

Creates a new distribution configuration. Distribution configurations define and configure the outputs of your pipeline.

See also: AWS API Documentation

Request Syntax

response = client.create_distribution_configuration(
    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
                },
            ]
        },
    ],
    tags={
        'string': 'string'
    },
    clientToken='string'
)
Parameters
  • name (string) --

    [REQUIRED]

    The name of the distribution configuration.

  • description (string) -- The description of the distribution configuration.
  • distributions (list) --

    [REQUIRED]

    The distributions of the distribution configuration.

    • (dict) --

      Defines the settings for a specific Region.

      • region (string) -- [REQUIRED]

        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 accounts can use the AMI to launch instances.

          • userIds (list) --

            The 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) -- [REQUIRED]

          The destination repository for the container distribution configuration.

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

      • 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) -- [REQUIRED]

            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.

  • tags (dict) --

    The tags of the distribution configuration.

    • (string) --
      • (string) --
  • clientToken (string) --

    [REQUIRED]

    The idempotency token of the distribution configuration.

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

{
    'requestId': 'string',
    'clientToken': 'string',
    'distributionConfigurationArn': '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.

    • distributionConfigurationArn (string) --

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

Exceptions

create_image(**kwargs)

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

See also: AWS API Documentation

Request Syntax

response = client.create_image(
    imageRecipeArn='string',
    containerRecipeArn='string',
    distributionConfigurationArn='string',
    infrastructureConfigurationArn='string',
    imageTestsConfiguration={
        'imageTestsEnabled': True|False,
        'timeoutMinutes': 123
    },
    enhancedImageMetadataEnabled=True|False,
    tags={
        'string': 'string'
    },
    clientToken='string'
)
Parameters
  • imageRecipeArn (string) -- The Amazon Resource Name (ARN) of the image recipe that defines how images are configured, tested, and assessed.
  • containerRecipeArn (string) -- The Amazon Resource Name (ARN) of the container recipe that defines how images are configured and tested.
  • distributionConfigurationArn (string) -- The Amazon Resource Name (ARN) of the distribution configuration that defines and configures the outputs of your pipeline.
  • infrastructureConfigurationArn (string) --

    [REQUIRED]

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

  • imageTestsConfiguration (dict) --

    The image tests configuration of the 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.

  • 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.
  • tags (dict) --

    The tags of the image.

    • (string) --
      • (string) --
  • clientToken (string) --

    [REQUIRED]

    The idempotency token used to make this request idempotent.

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

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

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • clientToken (string) --

      The idempotency token used to make this request idempotent.

    • imageBuildVersionArn (string) --

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

Exceptions

create_image_pipeline(**kwargs)

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

See also: AWS API Documentation

Request Syntax

response = client.create_image_pipeline(
    name='string',
    description='string',
    imageRecipeArn='string',
    containerRecipeArn='string',
    infrastructureConfigurationArn='string',
    distributionConfigurationArn='string',
    imageTestsConfiguration={
        'imageTestsEnabled': True|False,
        'timeoutMinutes': 123
    },
    enhancedImageMetadataEnabled=True|False,
    schedule={
        'scheduleExpression': 'string',
        'timezone': 'string',
        'pipelineExecutionStartCondition': 'EXPRESSION_MATCH_ONLY'|'EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE'
    },
    status='DISABLED'|'ENABLED',
    tags={
        'string': 'string'
    },
    clientToken='string'
)
Parameters
  • name (string) --

    [REQUIRED]

    The name of the image pipeline.

  • description (string) -- The description of the image pipeline.
  • imageRecipeArn (string) -- The Amazon Resource Name (ARN) of the image recipe that will be used to configure images created by this image pipeline.
  • containerRecipeArn (string) -- The Amazon Resource Name (ARN) of the container recipe that is used to configure images created by this container pipeline.
  • infrastructureConfigurationArn (string) --

    [REQUIRED]

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

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

    The image test configuration of the image pipeline.

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

  • 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.
  • schedule (dict) --

    The schedule of the image pipeline.

    • scheduleExpression (string) --

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

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

    • timezone (string) --

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

    • pipelineExecutionStartCondition (string) --

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

  • status (string) -- The status of the image pipeline.
  • tags (dict) --

    The tags of the image pipeline.

    • (string) --
      • (string) --
  • clientToken (string) --

    [REQUIRED]

    The idempotency token used to make this request idempotent.

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

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

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • clientToken (string) --

      The idempotency token used to make this request idempotent.

    • imagePipelineArn (string) --

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

Exceptions

create_image_recipe(**kwargs)

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

See also: AWS API Documentation

Request Syntax

response = 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'
            },
            'virtualName': 'string',
            'noDevice': 'string'
        },
    ],
    tags={
        'string': 'string'
    },
    workingDirectory='string',
    additionalInstanceConfiguration={
        'systemsManagerAgent': {
            'uninstallAfterBuild': True|False
        },
        'userDataOverride': 'string'
    },
    clientToken='string'
)
Parameters
  • name (string) --

    [REQUIRED]

    The name of the image recipe.

  • description (string) -- The description of the image recipe.
  • semanticVersion (string) --

    [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, and that is not open for updates.

    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.

  • components (list) --

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

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

  • blockDeviceMappings (list) --

    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.

      • virtualName (string) --

        Use to manage instance ephemeral devices.

      • noDevice (string) --

        Use to remove a mapping from the parent image.

  • tags (dict) --

    The tags of the image recipe.

    • (string) --
      • (string) --
  • workingDirectory (string) -- The working directory used during build and test workflows.
  • additionalInstanceConfiguration (dict) --

    Specify additional settings and launch scripts for your build instances.

    • systemsManagerAgent (dict) --

      Contains settings for the SSM agent on your build instance.

      • uninstallAfterBuild (boolean) --

        Controls whether the SSM 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 SSM is installed on your Linux build instance. If you override the user data, make sure that you add commands to install SSM, if it is not pre-installed on your source image.

  • clientToken (string) --

    [REQUIRED]

    The idempotency token used to make this request idempotent.

    This field is autopopulated if not provided.

Return type

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.

Exceptions

create_infrastructure_configuration(**kwargs)

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

response = 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'
    },
    tags={
        'string': 'string'
    },
    clientToken='string'
)
Parameters
  • name (string) --

    [REQUIRED]

    The name of the infrastructure configuration.

  • description (string) -- The description of the infrastructure configuration.
  • instanceTypes (list) --

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

    [REQUIRED]

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

  • securityGroupIds (list) --

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

    • (string) --
  • subnetId (string) -- The subnet ID in which to place the instance used to customize your Amazon EC2 AMI.
  • 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 key pair of the infrastructure configuration. This can be used to log on to and debug the instance used to create your image.
  • terminateInstanceOnFailure (boolean) -- 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.
  • snsTopicArn (string) -- The SNS topic on which to send image build events.
  • resourceTags (dict) --

    The tags attached to the resource created by Image Builder.

    • (string) --
      • (string) --
  • tags (dict) --

    The tags of the infrastructure configuration.

    • (string) --
      • (string) --
  • clientToken (string) --

    [REQUIRED]

    The idempotency token used to make this request idempotent.

    This field is autopopulated if not provided.

Return type

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.

Exceptions

delete_component(**kwargs)

Deletes a component build version.

See also: AWS API Documentation

Request Syntax

response = client.delete_component(
    componentBuildVersionArn='string'
)
Parameters
componentBuildVersionArn (string) --

[REQUIRED]

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

Return type
dict
Returns
Response Syntax
{
    'requestId': 'string',
    'componentBuildVersionArn': 'string'
}

Response Structure

  • (dict) --
    • requestId (string) --

      The request ID that uniquely identifies this request.

    • componentBuildVersionArn (string) --

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

Exceptions

delete_container_recipe(**kwargs)

Deletes a container recipe.

See also: AWS API Documentation

Request Syntax

response = client.delete_container_recipe(
    containerRecipeArn='string'
)
Parameters
containerRecipeArn (string) --

[REQUIRED]

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

Return type
dict
Returns
Response Syntax
{
    'requestId': 'string',
    'containerRecipeArn': 'string'
}

Response Structure

  • (dict) --
    • requestId (string) --

      The request ID that uniquely identifies this request.

    • containerRecipeArn (string) --

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

Exceptions

delete_distribution_configuration(**kwargs)

Deletes a distribution configuration.

See also: AWS API Documentation

Request Syntax

response = client.delete_distribution_configuration(
    distributionConfigurationArn='string'
)
Parameters
distributionConfigurationArn (string) --

[REQUIRED]

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

Return type
dict
Returns
Response Syntax
{
    'requestId': 'string',
    'distributionConfigurationArn': 'string'
}

Response Structure

  • (dict) --
    • requestId (string) --

      The request ID that uniquely identifies this request.

    • distributionConfigurationArn (string) --

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

Exceptions

delete_image(**kwargs)

Deletes an image.

See also: AWS API Documentation

Request Syntax

response = client.delete_image(
    imageBuildVersionArn='string'
)
Parameters
imageBuildVersionArn (string) --

[REQUIRED]

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

Return type
dict
Returns
Response Syntax
{
    'requestId': 'string',
    'imageBuildVersionArn': 'string'
}

Response Structure

  • (dict) --
    • requestId (string) --

      The request ID that uniquely identifies this request.

    • imageBuildVersionArn (string) --

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

Exceptions

delete_image_pipeline(**kwargs)

Deletes an image pipeline.

See also: AWS API Documentation

Request Syntax

response = client.delete_image_pipeline(
    imagePipelineArn='string'
)
Parameters
imagePipelineArn (string) --

[REQUIRED]

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

Return type
dict
Returns
Response Syntax
{
    'requestId': 'string',
    'imagePipelineArn': 'string'
}

Response Structure

  • (dict) --
    • requestId (string) --

      The request ID that uniquely identifies this request.

    • imagePipelineArn (string) --

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

Exceptions

delete_image_recipe(**kwargs)

Deletes an image recipe.

See also: AWS API Documentation

Request Syntax

response = client.delete_image_recipe(
    imageRecipeArn='string'
)
Parameters
imageRecipeArn (string) --

[REQUIRED]

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

Return type
dict
Returns
Response Syntax
{
    'requestId': 'string',
    'imageRecipeArn': 'string'
}

Response Structure

  • (dict) --
    • requestId (string) --

      The request ID that uniquely identifies this request.

    • imageRecipeArn (string) --

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

Exceptions

delete_infrastructure_configuration(**kwargs)

Deletes an infrastructure configuration.

See also: AWS API Documentation

Request Syntax

response = client.delete_infrastructure_configuration(
    infrastructureConfigurationArn='string'
)
Parameters
infrastructureConfigurationArn (string) --

[REQUIRED]

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

Return type
dict
Returns
Response Syntax
{
    'requestId': 'string',
    'infrastructureConfigurationArn': 'string'
}

Response Structure

  • (dict) --
    • requestId (string) --

      The request ID that uniquely identifies this request.

    • infrastructureConfigurationArn (string) --

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

Exceptions

generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)

Generate a presigned url given a client, its method, and arguments

Parameters
  • ClientMethod (string) -- The client method to presign for
  • Params (dict) -- The parameters normally passed to ClientMethod.
  • ExpiresIn (int) -- The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds)
  • HttpMethod (string) -- The http method to use on the generated url. By default, the http method is whatever is used in the method's model.
Returns

The presigned url

get_component(**kwargs)

Gets a component object.

See also: AWS API Documentation

Request Syntax

response = client.get_component(
    componentBuildVersionArn='string'
)
Parameters
componentBuildVersionArn (string) --

[REQUIRED]

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

Return type
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',
        ],
        '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) --
      • 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) --

Exceptions

get_component_policy(**kwargs)

Gets a component policy.

See also: AWS API Documentation

Request Syntax

response = client.get_component_policy(
    componentArn='string'
)
Parameters
componentArn (string) --

[REQUIRED]

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

Return type
dict
Returns
Response Syntax
{
    'requestId': 'string',
    'policy': 'string'
}

Response Structure

  • (dict) --
    • requestId (string) --

      The request ID that uniquely identifies this request.

    • policy (string) --

      The component policy.

Exceptions

get_container_recipe(**kwargs)

Retrieves a container recipe.

See also: AWS API Documentation

Request Syntax

response = client.get_container_recipe(
    containerRecipeArn='string'
)
Parameters
containerRecipeArn (string) --

[REQUIRED]

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

Return type
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'
                    },
                    '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, and that is not open for updates.

        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: When you retrieve or reference a resource with a semantic version, you can use wildcards (x) to filter your results. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards. For example, specifying "1.2.x", or "1.x.x" works to filter list results, but neither "1.x.2", nor "x.2.x" will work. You do not have to specify the build - Image Builder automatically uses a wildcard for that, if applicable.

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

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

Exceptions

get_container_recipe_policy(**kwargs)

Retrieves the policy for a container recipe.

See also: AWS API Documentation

Request Syntax

response = client.get_container_recipe_policy(
    containerRecipeArn='string'
)
Parameters
containerRecipeArn (string) --

[REQUIRED]

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

Return type
dict
Returns
Response Syntax
{
    'requestId': 'string',
    'policy': 'string'
}

Response Structure

  • (dict) --
    • requestId (string) --

      The request ID that uniquely identifies this request.

    • policy (string) --

      The container recipe policy object that is returned.

Exceptions

get_distribution_configuration(**kwargs)

Gets a distribution configuration.

See also: AWS API Documentation

Request Syntax

response = client.get_distribution_configuration(
    distributionConfigurationArn='string'
)
Parameters
distributionConfigurationArn (string) --

[REQUIRED]

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

Return type
dict
Returns
Response Syntax
{
    'requestId': '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'
        }
    }
}

Response Structure

  • (dict) --
    • requestId (string) --

      The request ID that uniquely identifies this request.

    • distributionConfiguration (dict) --

      The distribution configuration object.

      • 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 accounts can use the AMI to launch instances.

              • userIds (list) --

                The 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) --

Exceptions

get_image(**kwargs)

Gets an image.

See also: AWS API Documentation

Request Syntax

response = client.get_image(
    imageBuildVersionArn='string'
)
Parameters
imageBuildVersionArn (string) --

[REQUIRED]

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

Return type
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'
                    },
                    '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'
                        },
                        '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'
            },
            '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, and that is not open for updates.

        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: When you retrieve or reference a resource with a semantic version, you can use wildcards (x) to filter your results. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards. For example, specifying "1.2.x", or "1.x.x" works to filter list results, but neither "1.x.2", nor "x.2.x" will work. You do not have to specify the build - Image Builder automatically uses a wildcard for that, if applicable.

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

            • 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 SSM agent on your build instance.

            • uninstallAfterBuild (boolean) --

              Controls whether the SSM 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 SSM is installed on your Linux build instance. If you override the user data, make sure that you add commands to install SSM, 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, and that is not open for updates.

          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: When you retrieve or reference a resource with a semantic version, you can use wildcards (x) to filter your results. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards. For example, specifying "1.2.x", or "1.x.x" works to filter list results, but neither "1.x.2", nor "x.2.x" will work. You do not have to specify the build - Image Builder automatically uses a wildcard for that, if applicable.

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

              • 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) --
        • 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 accounts can use the AMI to launch instances.

                • userIds (list) --

                  The 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 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) --

Exceptions

get_image_pipeline(**kwargs)

Gets 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',
        'enhancedImageMetadataEnabled': True|False,
        'imageRecipeArn': 'string',
        'containerRecipeArn': 'string',
        'infrastructureConfigurationArn': 'string',
        'distributionConfigurationArn': 'string',
        'imageTestsConfiguration': {
            'imageTestsEnabled': True|False,
            'timeoutMinutes': 123
        },
        'schedule': {
            'scheduleExpression': 'string',
            'timezone': 'string',
            'pipelineExecutionStartCondition': 'EXPRESSION_MATCH_ONLY'|'EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE'
        },
        'status': 'DISABLED'|'ENABLED',
        'dateCreated': 'string',
        'dateUpdated': 'string',
        'dateLastRun': 'string',
        'dateNextRun': 'string',
        'tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --
    • requestId (string) --

      The request ID that uniquely identifies this request.

    • imagePipeline (dict) --

      The image pipeline object.

      • arn (string) --

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

      • name (string) --

        The name of the image pipeline.

      • description (string) --

        The description of the image pipeline.

      • platform (string) --

        The platform of the image pipeline.

      • enhancedImageMetadataEnabled (boolean) --

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

      • imageRecipeArn (string) --

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

      • containerRecipeArn (string) --

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

      • infrastructureConfigurationArn (string) --

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

      • distributionConfigurationArn (string) --

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

      • imageTestsConfiguration (dict) --

        The image tests configuration of the image pipeline.

        • imageTestsEnabled (boolean) --

          Defines if tests should be executed when building this image.

        • timeoutMinutes (integer) --

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

      • schedule (dict) --

        The schedule of the image pipeline.

        • scheduleExpression (string) --

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

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

        • timezone (string) --

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

        • pipelineExecutionStartCondition (string) --

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

      • status (string) --

        The status of the image pipeline.

      • dateCreated (string) --

        The date on which this image pipeline was created.

      • dateUpdated (string) --

        The date on which this image pipeline was last updated.

      • dateLastRun (string) --

        The date on which this image pipeline was last run.

      • dateNextRun (string) --

        The date on which this image pipeline will next be run.

      • tags (dict) --

        The tags of this image pipeline.

        • (string) --
          • (string) --

Exceptions

get_image_policy(**kwargs)

Gets an image policy.

See also: AWS API Documentation

Request Syntax

response = client.get_image_policy(
    imageArn='string'
)
Parameters
imageArn (string) --

[REQUIRED]

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

Return type
dict
Returns
Response Syntax
{
    'requestId': 'string',
    'policy': 'string'
}

Response Structure

  • (dict) --
    • requestId (string) --

      The request ID that uniquely identifies this request.

    • policy (string) --

      The image policy object.

Exceptions

get_image_recipe(**kwargs)

Gets an image recipe.

See also: AWS API Documentation

Request Syntax

response = client.get_image_recipe(
    imageRecipeArn='string'
)
Parameters
imageRecipeArn (string) --

[REQUIRED]

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

Return type
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'
                },
                '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.

          • 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 SSM agent on your build instance.

          • uninstallAfterBuild (boolean) --

            Controls whether the SSM 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 SSM is installed on your Linux build instance. If you override the user data, make sure that you add commands to install SSM, if it is not pre-installed on your source image.

Exceptions

get_image_recipe_policy(**kwargs)

Gets an image recipe policy.

See also: AWS API Documentation

Request Syntax

response = client.get_image_recipe_policy(
    imageRecipeArn='string'
)
Parameters
imageRecipeArn (string) --

[REQUIRED]

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

Return type
dict
Returns
Response Syntax
{
    'requestId': 'string',
    'policy': 'string'
}

Response Structure

  • (dict) --
    • requestId (string) --

      The request ID that uniquely identifies this request.

    • policy (string) --

      The image recipe policy object.

Exceptions

get_infrastructure_configuration(**kwargs)

Gets an infrastructure configuration.

See also: AWS API Documentation

Request Syntax

response = client.get_infrastructure_configuration(
    infrastructureConfigurationArn='string'
)
Parameters
infrastructureConfigurationArn (string) --

[REQUIRED]

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

Return type
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'
        },
        '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) --
      • tags (dict) --

        The tags of the infrastructure configuration.

        • (string) --
          • (string) --

Exceptions

get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_waiter(waiter_name)

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
botocore.waiter.Waiter
import_component(**kwargs)

Imports a component and transforms its data into a component document.

See also: AWS API Documentation

Request Syntax

response = client.import_component(
    name='string',
    semanticVersion='string',
    description='string',
    changeDescription='string',
    type='BUILD'|'TEST',
    format='SHELL',
    platform='Windows'|'Linux',
    data='string',
    uri='string',
    kmsKeyId='string',
    tags={
        'string': 'string'
    },
    clientToken='string'
)
Parameters
  • name (string) --

    [REQUIRED]

    The name of the component.

  • semanticVersion (string) --

    [REQUIRED]

    The semantic version of the component. 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.

    Filtering: When you retrieve or reference a resource with a semantic version, you can use wildcards (x) to filter your results. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards. For example, specifying "1.2.x", or "1.x.x" works to filter list results, but neither "1.x.2", nor "x.2.x" will work. You do not have to specify the build - Image Builder automatically uses a wildcard for that, if applicable.
  • description (string) -- The description of the component. Describes the contents of the component.
  • changeDescription (string) -- The change description of the component. Describes what change has been made in this version, or what makes this version different from other versions of this component.
  • type (string) --

    [REQUIRED]

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

  • format (string) --

    [REQUIRED]

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

  • platform (string) --

    [REQUIRED]

    The platform of the component.

  • data (string) -- The data of the component. Used to specify the data inline. Either data or uri can be used to specify the data within the component.
  • uri (string) -- The uri of the component. Must be an Amazon S3 URL and the requester must have permission to access the Amazon S3 bucket. If you use Amazon S3, you can specify component content up to your service quota. Either data or uri can be used to specify the data within the component.
  • kmsKeyId (string) -- The ID of the KMS key that should be used to encrypt this component.
  • tags (dict) --

    The tags of the component.

    • (string) --
      • (string) --
  • clientToken (string) --

    [REQUIRED]

    The idempotency token of the component.

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

{
    'requestId': 'string',
    'clientToken': 'string',
    'componentBuildVersionArn': '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.

    • componentBuildVersionArn (string) --

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

Exceptions

list_component_build_versions(**kwargs)

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: When you retrieve or reference a resource with a semantic version, you can use wildcards (x) to filter your results. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards. For example, specifying "1.2.x", or "1.x.x" works to filter list results, but neither "1.x.2", nor "x.2.x" will work. You do not have to specify the build - Image Builder automatically uses a wildcard for that, if applicable.

See also: AWS API Documentation

Request Syntax

response = client.list_component_build_versions(
    componentVersionArn='string',
    maxResults=123,
    nextToken='string'
)
Parameters
  • componentVersionArn (string) --

    [REQUIRED]

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

  • maxResults (integer) -- The maximum items to return in a request.
  • nextToken (string) -- A token to specify where to start paginating. This is the NextToken from a previously truncated response.
Return type

dict

Returns

Response Syntax

{
    'requestId': 'string',
    'componentSummaryList': [
        {
            'arn': 'string',
            'name': 'string',
            'version': 'string',
            'platform': 'Windows'|'Linux',
            'supportedOsVersions': [
                '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) --
        • 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.

Exceptions

list_components(**kwargs)

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: When you retrieve or reference a resource with a semantic version, you can use wildcards (x) to filter your results. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards. For example, specifying "1.2.x", or "1.x.x" works to filter list results, but neither "1.x.2", nor "x.2.x" will work. You do not have to specify the build - Image Builder automatically uses a wildcard for that, if applicable.

See also: AWS API Documentation

Request Syntax

response = client.list_components(
    owner='Self'|'Shared'|'Amazon',
    filters=[
        {
            'name': 'string',
            'values': [
                'string',
            ]
        },
    ],
    byName=True|False,
    maxResults=123,
    nextToken='string'
)
Parameters
  • owner (string) -- The owner defines which components you want to list. By default, this request will only show components owned by your account. You can use this field to specify if you want to view components owned by yourself, by Amazon, or those components that have been shared with you by other customers.
  • filters (list) --

    The filters.

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a list operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      • name (string) --

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

      • values (list) --

        The filter values. Filter values are case-sensitive.

        • (string) --
  • byName (boolean) -- Returns the list of component build versions for the specified name.
  • maxResults (integer) -- The maximum items to return in a request.
  • nextToken (string) -- A token to specify where to start paginating. This is the NextToken from a previously truncated response.
Return type

dict

Returns

Response Syntax

{
    'requestId': 'string',
    'componentVersionList': [
        {
            'arn': 'string',
            'name': 'string',
            'version': 'string',
            'description': 'string',
            'platform': 'Windows'|'Linux',
            'supportedOsVersions': [
                'string',
            ],
            'type': 'BUILD'|'TEST',
            'owner': 'string',
            'dateCreated': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • componentVersionList (list) --

      The list of component semantic versions.

      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.

      • (dict) --

        The defining characteristics of a specific version of an TOE component.

        • arn (string) --

          The Amazon Resource Name (ARN) of the component.

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

          The name of the component.

        • version (string) --

          The semantic version of the component.

          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, and that is not open for updates.

          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: When you retrieve or reference a resource with a semantic version, you can use wildcards (x) to filter your results. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards. For example, specifying "1.2.x", or "1.x.x" works to filter list results, but neither "1.x.2", nor "x.2.x" will work. You do not have to specify the build - Image Builder automatically uses a wildcard for that, if applicable.

        • description (string) --

          The description of the component.

        • platform (string) --

          The platform of the component.

        • supportedOsVersions (list) --

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

        • dateCreated (string) --

          The date that the component was created.

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

Exceptions

list_container_recipes(**kwargs)

Returns a list of container recipes.

See also: AWS API Documentation

Request Syntax

response = client.list_container_recipes(
    owner='Self'|'Shared'|'Amazon',
    filters=[
        {
            'name': 'string',
            'values': [
                'string',
            ]
        },
    ],
    maxResults=123,
    nextToken='string'
)
Parameters
  • owner (string) -- Returns container recipes belonging to the specified owner, that have been shared with you. You can omit this field to return container recipes belonging to your account.
  • filters (list) --

    Request filters that are used to narrow the list of container images that are returned.

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a list operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      • name (string) --

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

      • values (list) --

        The filter values. Filter values are case-sensitive.

        • (string) --
  • maxResults (integer) -- The maximum number of results to return in the list.
  • nextToken (string) -- Provides a token for pagination, which determines where to begin the next set of results when the current set reaches the maximum for one request.
Return type

dict

Returns

Response Syntax

{
    'requestId': 'string',
    'containerRecipeSummaryList': [
        {
            'arn': 'string',
            'containerType': 'DOCKER',
            'name': 'string',
            'platform': 'Windows'|'Linux',
            'owner': 'string',
            'parentImage': 'string',
            'dateCreated': 'string',
            'tags': {
                'string': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • containerRecipeSummaryList (list) --

      The list of container recipes returned for the request.

      • (dict) --

        A summary of a container recipe

        • arn (string) --

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

        • containerType (string) --

          Specifies the type of container, such as "Docker".

        • name (string) --

          The name 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.

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

      The next token field is used for paginated responses. When this is not empty, there are additional container recipes that the service has not included in this response. Use this token with the next request to retrieve additional list items.

Exceptions

list_distribution_configurations(**kwargs)

Returns a list of distribution configurations.

See also: AWS API Documentation

Request Syntax

response = client.list_distribution_configurations(
    filters=[
        {
            'name': 'string',
            'values': [
                'string',
            ]
        },
    ],
    maxResults=123,
    nextToken='string'
)
Parameters
  • filters (list) --

    The filters.

    • name - The name of this distribution configuration.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a list operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      • name (string) --

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

      • values (list) --

        The filter values. Filter values are case-sensitive.

        • (string) --
  • maxResults (integer) -- The maximum items to return in a request.
  • nextToken (string) -- A token to specify where to start paginating. This is the NextToken from a previously truncated response.
Return type

dict

Returns

Response Syntax

{
    'requestId': 'string',
    'distributionConfigurationSummaryList': [
        {
            'arn': 'string',
            'name': 'string',
            'description': 'string',
            'dateCreated': 'string',
            'dateUpdated': 'string',
            'tags': {
                'string': 'string'
            },
            'regions': [
                'string',
            ]
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • distributionConfigurationSummaryList (list) --

      The list of distributions.

      • (dict) --

        A high-level overview of a distribution configuration.

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

        • dateCreated (string) --

          The date on which the distribution configuration was created.

        • dateUpdated (string) --

          The date on which the distribution configuration was updated.

        • tags (dict) --

          The tags associated with the distribution configuration.

          • (string) --
            • (string) --
        • regions (list) --

          A list of Regions where the container image is distributed to.

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

Exceptions

list_image_build_versions(**kwargs)

Returns a list of image build versions.

See also: AWS API Documentation

Request Syntax

response = client.list_image_build_versions(
    imageVersionArn='string',
    filters=[
        {
            'name': 'string',
            'values': [
                'string',
            ]
        },
    ],
    maxResults=123,
    nextToken='string'
)
Parameters
  • imageVersionArn (string) --

    [REQUIRED]

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

  • filters (list) --

    The filters.

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a list operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      • name (string) --

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

      • values (list) --

        The filter values. Filter values are case-sensitive.

        • (string) --
  • maxResults (integer) -- The maximum items to return in a request.
  • nextToken (string) -- A token to specify where to start paginating. This is the NextToken from a previously truncated response.
Return type

dict

Returns

Response Syntax

{
    'requestId': 'string',
    'imageSummaryList': [
        {
            'arn': 'string',
            'name': 'string',
            'type': 'AMI'|'DOCKER',
            'version': 'string',
            'platform': 'Windows'|'Linux',
            'osVersion': 'string',
            'state': {
                'status': 'PENDING'|'CREATING'|'BUILDING'|'TESTING'|'DISTRIBUTING'|'INTEGRATING'|'AVAILABLE'|'CANCELLED'|'FAILED'|'DEPRECATED'|'DELETED',
                'reason': 'string'
            },
            'owner': 'string',
            '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'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • imageSummaryList (list) --

      The list of image build versions.

      • (dict) --

        An image summary.

        • arn (string) --

          The Amazon Resource Name (ARN) of the image.

        • name (string) --

          The name of the image.

        • type (string) --

          Specifies whether this is an AMI or container image.

        • version (string) --

          The version of the image.

        • platform (string) --

          The platform of the image.

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

        • owner (string) --

          The owner of the image.

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

Exceptions

list_image_packages(**kwargs)

List the Packages that are associated with an Image Build Version, as determined by Amazon EC2 Systems Manager Inventory at build time.

See also: AWS API Documentation

Request Syntax

response = client.list_image_packages(
    imageBuildVersionArn='string',
    maxResults=123,
    nextToken='string'
)
Parameters
  • imageBuildVersionArn (string) --

    [REQUIRED]

    Filter results for the ListImagePackages request by the Image Build Version ARN

  • maxResults (integer) -- The maxiumum number of results to return from the ListImagePackages request.
  • nextToken (string) -- A token to specify where to start paginating. This is the NextToken from a previously truncated response.
Return type

dict

Returns

Response Syntax

{
    'requestId': 'string',
    'imagePackageList': [
        {
            'packageName': 'string',
            'packageVersion': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • imagePackageList (list) --

      The list of Image Packages returned in the response.

      • (dict) --

        Represents a package installed on an Image Builder image.

        • packageName (string) --

          The name of the package as reported to the operating system package manager.

        • packageVersion (string) --

          The version of the package as reported to the operating system package manager.

    • nextToken (string) --

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

Exceptions

list_image_pipeline_images(**kwargs)

Returns a list of images created by the specified pipeline.

See also: AWS API Documentation

Request Syntax

response = client.list_image_pipeline_images(
    imagePipelineArn='string',
    filters=[
        {
            'name': 'string',
            'values': [
                'string',
            ]
        },
    ],
    maxResults=123,
    nextToken='string'
)
Parameters
  • imagePipelineArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the image pipeline whose images you want to view.

  • filters (list) --

    The filters.

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a list operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      • name (string) --

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

      • values (list) --

        The filter values. Filter values are case-sensitive.

        • (string) --
  • maxResults (integer) -- The maximum items to return in a request.
  • nextToken (string) -- A token to specify where to start paginating. This is the NextToken from a previously truncated response.
Return type

dict

Returns

Response Syntax

{
    'requestId': 'string',
    'imageSummaryList': [
        {
            'arn': 'string',
            'name': 'string',
            'type': 'AMI'|'DOCKER',
            'version': 'string',
            'platform': 'Windows'|'Linux',
            'osVersion': 'string',
            'state': {
                'status': 'PENDING'|'CREATING'|'BUILDING'|'TESTING'|'DISTRIBUTING'|'INTEGRATING'|'AVAILABLE'|'CANCELLED'|'FAILED'|'DEPRECATED'|'DELETED',
                'reason': 'string'
            },
            'owner': 'string',
            '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'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • imageSummaryList (list) --

      The list of images built by this pipeline.

      • (dict) --

        An image summary.

        • arn (string) --

          The Amazon Resource Name (ARN) of the image.

        • name (string) --

          The name of the image.

        • type (string) --

          Specifies whether this is an AMI or container image.

        • version (string) --

          The version of the image.

        • platform (string) --

          The platform of the image.

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

        • owner (string) --

          The owner of the image.

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

Exceptions

list_image_pipelines(**kwargs)

Returns a list of image pipelines.

See also: AWS API Documentation

Request Syntax

response = client.list_image_pipelines(
    filters=[
        {
            'name': 'string',
            'values': [
                'string',
            ]
        },
    ],
    maxResults=123,
    nextToken='string'
)
Parameters
  • filters (list) --

    The filters.

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a list operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      • name (string) --

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

      • values (list) --

        The filter values. Filter values are case-sensitive.

        • (string) --
  • maxResults (integer) -- The maximum items to return in a request.
  • nextToken (string) -- A token to specify where to start paginating. This is the NextToken from a previously truncated response.
Return type

dict

Returns

Response Syntax

{
    'requestId': 'string',
    'imagePipelineList': [
        {
            'arn': 'string',
            'name': 'string',
            'description': 'string',
            'platform': 'Windows'|'Linux',
            'enhancedImageMetadataEnabled': True|False,
            'imageRecipeArn': 'string',
            'containerRecipeArn': 'string',
            'infrastructureConfigurationArn': 'string',
            'distributionConfigurationArn': 'string',
            'imageTestsConfiguration': {
                'imageTestsEnabled': True|False,
                'timeoutMinutes': 123
            },
            'schedule': {
                'scheduleExpression': 'string',
                'timezone': 'string',
                'pipelineExecutionStartCondition': 'EXPRESSION_MATCH_ONLY'|'EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE'
            },
            'status': 'DISABLED'|'ENABLED',
            'dateCreated': 'string',
            'dateUpdated': 'string',
            'dateLastRun': 'string',
            'dateNextRun': 'string',
            'tags': {
                'string': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • imagePipelineList (list) --

      The list of image pipelines.

      • (dict) --

        Details of an image pipeline.

        • arn (string) --

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

        • name (string) --

          The name of the image pipeline.

        • description (string) --

          The description of the image pipeline.

        • platform (string) --

          The platform of the image pipeline.

        • enhancedImageMetadataEnabled (boolean) --

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

        • imageRecipeArn (string) --

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

        • containerRecipeArn (string) --

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

        • infrastructureConfigurationArn (string) --

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

        • distributionConfigurationArn (string) --

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

        • imageTestsConfiguration (dict) --

          The image tests configuration of the image pipeline.

          • imageTestsEnabled (boolean) --

            Defines if tests should be executed when building this image.

          • timeoutMinutes (integer) --

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

        • schedule (dict) --

          The schedule of the image pipeline.

          • scheduleExpression (string) --

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

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

          • timezone (string) --

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

          • pipelineExecutionStartCondition (string) --

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

        • status (string) --

          The status of the image pipeline.

        • dateCreated (string) --

          The date on which this image pipeline was created.

        • dateUpdated (string) --

          The date on which this image pipeline was last updated.

        • dateLastRun (string) --

          The date on which this image pipeline was last run.

        • dateNextRun (string) --

          The date on which this image pipeline will next be run.

        • tags (dict) --

          The tags of this image pipeline.

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

Exceptions

list_image_recipes(**kwargs)

Returns a list of image recipes.

See also: AWS API Documentation

Request Syntax

response = client.list_image_recipes(
    owner='Self'|'Shared'|'Amazon',
    filters=[
        {
            'name': 'string',
            'values': [
                'string',
            ]
        },
    ],
    maxResults=123,
    nextToken='string'
)
Parameters
  • owner (string) -- The owner defines which image recipes you want to list. By default, this request will only show image recipes owned by your account. You can use this field to specify if you want to view image recipes owned by yourself, by Amazon, or those image recipes that have been shared with you by other customers.
  • filters (list) --

    The filters.

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a list operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      • name (string) --

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

      • values (list) --

        The filter values. Filter values are case-sensitive.

        • (string) --
  • maxResults (integer) -- The maximum items to return in a request.
  • nextToken (string) -- A token to specify where to start paginating. This is the NextToken from a previously truncated response.
Return type

dict

Returns

Response Syntax

{
    'requestId': 'string',
    'imageRecipeSummaryList': [
        {
            'arn': 'string',
            'name': 'string',
            'platform': 'Windows'|'Linux',
            'owner': 'string',
            'parentImage': 'string',
            'dateCreated': 'string',
            'tags': {
                'string': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • imageRecipeSummaryList (list) --

      The list of image pipelines.

      • (dict) --

        A summary of an image recipe.

        • arn (string) --

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

        • name (string) --

          The name of the image recipe.

        • platform (string) --

          The platform of the image recipe.

        • owner (string) --

          The owner of the image recipe.

        • parentImage (string) --

          The parent image of the image recipe.

        • dateCreated (string) --

          The date on which this image recipe was created.

        • tags (dict) --

          The tags of the image recipe.

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

Exceptions

list_images(**kwargs)

Returns the list of images that you have access to.

See also: AWS API Documentation

Request Syntax

response = client.list_images(
    owner='Self'|'Shared'|'Amazon',
    filters=[
        {
            'name': 'string',
            'values': [
                'string',
            ]
        },
    ],
    byName=True|False,
    maxResults=123,
    nextToken='string',
    includeDeprecated=True|False
)
Parameters
  • owner (string) -- The owner defines which images you want to list. By default, this request will only show images owned by your account. You can use this field to specify if you want to view images owned by yourself, by Amazon, or those images that have been shared with you by other customers.
  • filters (list) --

    The filters.

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a list operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      • name (string) --

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

      • values (list) --

        The filter values. Filter values are case-sensitive.

        • (string) --
  • byName (boolean) -- Requests a list of images with a specific recipe name.
  • maxResults (integer) -- The maximum items to return in a request.
  • nextToken (string) -- A token to specify where to start paginating. This is the NextToken from a previously truncated response.
  • includeDeprecated (boolean) -- Includes deprecated images in the response list.
Return type

dict

Returns

Response Syntax

{
    'requestId': 'string',
    'imageVersionList': [
        {
            'arn': 'string',
            'name': 'string',
            'type': 'AMI'|'DOCKER',
            'version': 'string',
            'platform': 'Windows'|'Linux',
            'osVersion': 'string',
            'owner': 'string',
            'dateCreated': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • imageVersionList (list) --

      The list of image semantic versions.

      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: When you retrieve or reference a resource with a semantic version, you can use wildcards (x) to filter your results. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards. For example, specifying "1.2.x", or "1.x.x" works to filter list results, but neither "1.x.2", nor "x.2.x" will work. You do not have to specify the build - Image Builder automatically uses a wildcard for that, if applicable.

      • (dict) --

        The defining characteristics of a specific version of an Image Builder image.

        • arn (string) --

          The Amazon Resource Name (ARN) of a specific version of an Image Builder 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.
        • name (string) --

          The name of this specific version of an Image Builder image.

        • type (string) --

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

        • version (string) --

          Details for a specific version of an Image Builder image. 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, and that is not open for updates.

          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: When you retrieve or reference a resource with a semantic version, you can use wildcards (x) to filter your results. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards. For example, specifying "1.2.x", or "1.x.x" works to filter list results, but neither "1.x.2", nor "x.2.x" will work. You do not have to specify the build - Image Builder automatically uses a wildcard for that, if applicable.

        • platform (string) --

          The platform of the image version, for example "Windows" or "Linux".

        • osVersion (string) --

          The operating system version of the Amazon EC2 build instance. For example, Amazon Linux 2, Ubuntu 18, or Microsoft Windows Server 2019.

        • owner (string) --

          The owner of the image version.

        • dateCreated (string) --

          The date on which this specific version of the Image Builder image was created.

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

Exceptions

list_infrastructure_configurations(**kwargs)

Returns a list of infrastructure configurations.

See also: AWS API Documentation

Request Syntax

response = client.list_infrastructure_configurations(
    filters=[
        {
            'name': 'string',
            'values': [
                'string',
            ]
        },
    ],
    maxResults=123,
    nextToken='string'
)
Parameters
  • filters (list) --

    The filters.

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a list operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      • name (string) --

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

      • values (list) --

        The filter values. Filter values are case-sensitive.

        • (string) --
  • maxResults (integer) -- The maximum items to return in a request.
  • nextToken (string) -- A token to specify where to start paginating. This is the NextToken from a previously truncated response.
Return type

dict

Returns

Response Syntax

{
    'requestId': 'string',
    'infrastructureConfigurationSummaryList': [
        {
            'arn': 'string',
            'name': 'string',
            'description': 'string',
            'dateCreated': 'string',
            'dateUpdated': 'string',
            'resourceTags': {
                'string': 'string'
            },
            'tags': {
                'string': 'string'
            },
            'instanceTypes': [
                'string',
            ],
            'instanceProfileName': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • infrastructureConfigurationSummaryList (list) --

      The list of infrastructure configurations.

      • (dict) --

        The infrastructure used when building Amazon EC2 AMIs.

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

        • 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 image created by Image Builder.

          • (string) --
            • (string) --
        • tags (dict) --

          The tags of the infrastructure configuration.

          • (string) --
            • (string) --
        • instanceTypes (list) --

          The instance types of the infrastructure configuration.

          • (string) --
        • instanceProfileName (string) --

          The instance profile of the infrastructure configuration.

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

Exceptions

list_tags_for_resource(**kwargs)

Returns the list of tags for the specified resource.

See also: AWS API Documentation

Request Syntax

response = client.list_tags_for_resource(
    resourceArn='string'
)
Parameters
resourceArn (string) --

[REQUIRED]

The Amazon Resource Name (ARN) of the resource whose tags you want to retrieve.

Return type
dict
Returns
Response Syntax
{
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --
    • tags (dict) --

      The tags for the specified resource.

      • (string) --
        • (string) --

Exceptions

put_component_policy(**kwargs)

Applies a policy to a component. We recommend that you call the RAM API CreateResourceShare to share resources. If you call the Image Builder API PutComponentPolicy , you must also call the RAM API PromoteResourceShareCreatedFromPolicy in order for the resource to be visible to all principals with whom the resource is shared.

See also: AWS API Documentation

Request Syntax

response = client.put_component_policy(
    componentArn='string',
    policy='string'
)
Parameters
  • componentArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the component that this policy should be applied to.

  • policy (string) --

    [REQUIRED]

    The policy to apply.

Return type

dict

Returns

Response Syntax

{
    'requestId': 'string',
    'componentArn': 'string'
}

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • componentArn (string) --

      The Amazon Resource Name (ARN) of the component that this policy was applied to.

Exceptions

put_container_recipe_policy(**kwargs)

Applies a policy to a container image. We recommend that you call the RAM API CreateResourceShare (https://docs.aws.amazon.com/ram/latest/APIReference/API_CreateResourceShare.html) to share resources. If you call the Image Builder API PutContainerImagePolicy , you must also call the RAM API PromoteResourceShareCreatedFromPolicy (https://docs.aws.amazon.com/ram/latest/APIReference/API_PromoteResourceShareCreatedFromPolicy.html) in order for the resource to be visible to all principals with whom the resource is shared.

See also: AWS API Documentation

Request Syntax

response = client.put_container_recipe_policy(
    containerRecipeArn='string',
    policy='string'
)
Parameters
  • containerRecipeArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the container recipe that this policy should be applied to.

  • policy (string) --

    [REQUIRED]

    The policy to apply to the container recipe.

Return type

dict

Returns

Response Syntax

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

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • containerRecipeArn (string) --

      The Amazon Resource Name (ARN) of the container recipe that this policy was applied to.

Exceptions

put_image_policy(**kwargs)

Applies a policy to an image. We recommend that you call the RAM API CreateResourceShare to share resources. If you call the Image Builder API PutImagePolicy , you must also call the RAM API PromoteResourceShareCreatedFromPolicy in order for the resource to be visible to all principals with whom the resource is shared.

See also: AWS API Documentation

Request Syntax

response = client.put_image_policy(
    imageArn='string',
    policy='string'
)
Parameters
  • imageArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the image that this policy should be applied to.

  • policy (string) --

    [REQUIRED]

    The policy to apply.

Return type

dict

Returns

Response Syntax

{
    'requestId': 'string',
    'imageArn': 'string'
}

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • imageArn (string) --

      The Amazon Resource Name (ARN) of the image that this policy was applied to.

Exceptions

put_image_recipe_policy(**kwargs)

Applies a policy to an image recipe. We recommend that you call the RAM API CreateResourceShare to share resources. If you call the Image Builder API PutImageRecipePolicy , you must also call the RAM API PromoteResourceShareCreatedFromPolicy in order for the resource to be visible to all principals with whom the resource is shared.

See also: AWS API Documentation

Request Syntax

response = client.put_image_recipe_policy(
    imageRecipeArn='string',
    policy='string'
)
Parameters
  • imageRecipeArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the image recipe that this policy should be applied to.

  • policy (string) --

    [REQUIRED]

    The policy to apply.

Return type

dict

Returns

Response Syntax

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

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • imageRecipeArn (string) --

      The Amazon Resource Name (ARN) of the image recipe that this policy was applied to.

Exceptions

start_image_pipeline_execution(**kwargs)

Manually triggers a pipeline to create an image.

See also: AWS API Documentation

Request Syntax

response = client.start_image_pipeline_execution(
    imagePipelineArn='string',
    clientToken='string'
)
Parameters
  • imagePipelineArn (string) --

    [REQUIRED]

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

  • clientToken (string) --

    [REQUIRED]

    The idempotency token used to make this request idempotent.

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

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

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • clientToken (string) --

      The idempotency token used to make this request idempotent.

    • imageBuildVersionArn (string) --

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

Exceptions

tag_resource(**kwargs)

Adds a tag to a resource.

See also: AWS API Documentation

Request Syntax

response = client.tag_resource(
    resourceArn='string',
    tags={
        'string': 'string'
    }
)
Parameters
  • resourceArn (string) --

    [REQUIRED]

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

  • tags (dict) --

    [REQUIRED]

    The tags to apply to the resource.

    • (string) --
      • (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

untag_resource(**kwargs)

Removes a tag from a resource.

See also: AWS API Documentation

Request Syntax

response = client.untag_resource(
    resourceArn='string',
    tagKeys=[
        'string',
    ]
)
Parameters
  • resourceArn (string) --

    [REQUIRED]

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

  • tagKeys (list) --

    [REQUIRED]

    The tag keys to remove from the resource.

    • (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

update_distribution_configuration(**kwargs)

Updates a new distribution configuration. Distribution configurations define and configure the outputs of your pipeline.

See also: AWS API Documentation

Request Syntax

response = client.update_distribution_configuration(
    distributionConfigurationArn='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
                },
            ]
        },
    ],
    clientToken='string'
)
Parameters
  • distributionConfigurationArn (string) --

    [REQUIRED]

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

  • description (string) -- The description of the distribution configuration.
  • distributions (list) --

    [REQUIRED]

    The distributions of the distribution configuration.

    • (dict) --

      Defines the settings for a specific Region.

      • region (string) -- [REQUIRED]

        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 accounts can use the AMI to launch instances.

          • userIds (list) --

            The 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) -- [REQUIRED]

          The destination repository for the container distribution configuration.

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

      • 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) -- [REQUIRED]

            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.

  • clientToken (string) --

    [REQUIRED]

    The idempotency token of the distribution configuration.

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

{
    'requestId': 'string',
    'clientToken': 'string',
    'distributionConfigurationArn': '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.

    • distributionConfigurationArn (string) --

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

Exceptions

update_image_pipeline(**kwargs)

Updates an image pipeline. Image pipelines enable you to automate the creation and distribution of images.

Note

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

See also: AWS API Documentation

Request Syntax

response = client.update_image_pipeline(
    imagePipelineArn='string',
    description='string',
    imageRecipeArn='string',
    containerRecipeArn='string',
    infrastructureConfigurationArn='string',
    distributionConfigurationArn='string',
    imageTestsConfiguration={
        'imageTestsEnabled': True|False,
        'timeoutMinutes': 123
    },
    enhancedImageMetadataEnabled=True|False,
    schedule={
        'scheduleExpression': 'string',
        'timezone': 'string',
        'pipelineExecutionStartCondition': 'EXPRESSION_MATCH_ONLY'|'EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE'
    },
    status='DISABLED'|'ENABLED',
    clientToken='string'
)
Parameters
  • imagePipelineArn (string) --

    [REQUIRED]

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

  • description (string) -- The description of the image pipeline.
  • imageRecipeArn (string) -- The Amazon Resource Name (ARN) of the image recipe that will be used to configure images updated by this image pipeline.
  • containerRecipeArn (string) -- The Amazon Resource Name (ARN) of the container pipeline to update.
  • infrastructureConfigurationArn (string) --

    [REQUIRED]

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

  • distributionConfigurationArn (string) -- The Amazon Resource Name (ARN) of the distribution configuration that will be used to configure and distribute images updated by this image pipeline.
  • imageTestsConfiguration (dict) --

    The image test configuration of the image pipeline.

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

  • 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.
  • schedule (dict) --

    The schedule of the image pipeline.

    • scheduleExpression (string) --

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

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

    • timezone (string) --

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

    • pipelineExecutionStartCondition (string) --

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

  • status (string) -- The status of the image pipeline.
  • clientToken (string) --

    [REQUIRED]

    The idempotency token used to make this request idempotent.

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

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

Response Structure

  • (dict) --

    • requestId (string) --

      The request ID that uniquely identifies this request.

    • clientToken (string) --

      The idempotency token used to make this request idempotent.

    • imagePipelineArn (string) --

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

Exceptions

update_infrastructure_configuration(**kwargs)

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

response = 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'
    }
)
Parameters
  • infrastructureConfigurationArn (string) --

    [REQUIRED]

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

  • description (string) -- The description of the infrastructure configuration.
  • instanceTypes (list) --

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

    [REQUIRED]

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

  • securityGroupIds (list) --

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

    • (string) --
  • subnetId (string) -- The subnet ID to place the instance used to customize your Amazon EC2 AMI in.
  • 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 key pair of the infrastructure configuration. This can be used to log on to and debug the instance used to create your image.
  • terminateInstanceOnFailure (boolean) -- 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.
  • snsTopicArn (string) -- The SNS topic on which to send image build events.
  • clientToken (string) --

    [REQUIRED]

    The idempotency token used to make this request idempotent.

    This field is autopopulated if not provided.

  • resourceTags (dict) --

    The tags attached to the resource created by Image Builder.

    • (string) --
      • (string) --
Return type

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.

Exceptions

Client Exceptions

Client exceptions are available on a client instance via the exceptions property. For more detailed instructions and examples on the exact usage of client exceptions, see the error handling user guide.

The available client exceptions are:

class imagebuilder.Client.exceptions.CallRateLimitExceededException

You have exceeded the permitted request rate for the specific operation.

Example

try:
  ...
except client.exceptions.CallRateLimitExceededException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    You have exceeded the permitted request rate for the specific operation.

    • message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class imagebuilder.Client.exceptions.ClientException

These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an invalid resource identifier.

Example

try:
  ...
except client.exceptions.ClientException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    These errors are usually caused by a client action, such as using an action or resource on behalf of a user that doesn't have permissions to use the action or resource, or specifying an invalid resource identifier.

    • message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class imagebuilder.Client.exceptions.ForbiddenException

You are not authorized to perform the requested operation.

Example

try:
  ...
except client.exceptions.ForbiddenException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    You are not authorized to perform the requested operation.

    • message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class imagebuilder.Client.exceptions.IdempotentParameterMismatchException

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

Example

try:
  ...
except client.exceptions.IdempotentParameterMismatchException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

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

    • message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class imagebuilder.Client.exceptions.InvalidPaginationTokenException

You have provided an invalid pagination token in your request.

Example

try:
  ...
except client.exceptions.InvalidPaginationTokenException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    You have provided an invalid pagination token in your request.

    • message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class imagebuilder.Client.exceptions.InvalidParameterCombinationException

You have specified two or more mutually exclusive parameters. Review the error message for details.

Example

try:
  ...
except client.exceptions.InvalidParameterCombinationException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    You have specified two or more mutually exclusive parameters. Review the error message for details.

    • message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class imagebuilder.Client.exceptions.InvalidParameterException

The specified parameter is invalid. Review the available parameters for the API request.

Example

try:
  ...
except client.exceptions.InvalidParameterException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    The specified parameter is invalid. Review the available parameters for the API request.

    • message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class imagebuilder.Client.exceptions.InvalidParameterValueException

The value that you provided for the specified parameter is invalid.

Example

try:
  ...
except client.exceptions.InvalidParameterValueException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    The value that you provided for the specified parameter is invalid.

    • message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class imagebuilder.Client.exceptions.InvalidRequestException

You have made a request for an action that is not supported by the service.

Example

try:
  ...
except client.exceptions.InvalidRequestException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    You have made a request for an action that is not supported by the service.

    • message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class imagebuilder.Client.exceptions.InvalidVersionNumberException

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

Example

try:
  ...
except client.exceptions.InvalidVersionNumberException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

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

    • message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class imagebuilder.Client.exceptions.ResourceAlreadyExistsException

The resource that you are trying to create already exists.

Example

try:
  ...
except client.exceptions.ResourceAlreadyExistsException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    The resource that you are trying to create already exists.

    • message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class imagebuilder.Client.exceptions.ResourceDependencyException

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

Example

try:
  ...
except client.exceptions.ResourceDependencyException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

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

    • message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class imagebuilder.Client.exceptions.ResourceInUseException

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

Example

try:
  ...
except client.exceptions.ResourceInUseException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

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

    • message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class imagebuilder.Client.exceptions.ResourceNotFoundException

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

Example

try:
  ...
except client.exceptions.ResourceNotFoundException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

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

    • message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class imagebuilder.Client.exceptions.ServiceException

This exception is thrown when the service encounters an unrecoverable exception.

Example

try:
  ...
except client.exceptions.ServiceException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

    This exception is thrown when the service encounters an unrecoverable exception.

    • message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class imagebuilder.Client.exceptions.ServiceQuotaExceededException

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

Example

try:
  ...
except client.exceptions.ServiceQuotaExceededException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

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

    • message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.
class imagebuilder.Client.exceptions.ServiceUnavailableException

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

Example

try:
  ...
except client.exceptions.ServiceUnavailableException as e:
  print(e.response)
response

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) --

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

    • message (string) --
    • Error (dict) -- Normalized access to common exception attributes.
      • Code (string) -- An identifier specifying the exception type.
      • Message (string) -- A descriptive message explaining why the exception occured.

Paginators

The available paginators are: