Table of Contents
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.
import boto3
client = boto3.client('imagebuilder')
These are the available methods:
can_paginate()
cancel_image_creation()
close()
create_component()
create_container_recipe()
create_distribution_configuration()
create_image()
create_image_pipeline()
create_image_recipe()
create_infrastructure_configuration()
delete_component()
delete_container_recipe()
delete_distribution_configuration()
delete_image()
delete_image_pipeline()
delete_image_recipe()
delete_infrastructure_configuration()
get_component()
get_component_policy()
get_container_recipe()
get_container_recipe_policy()
get_distribution_configuration()
get_image()
get_image_pipeline()
get_image_policy()
get_image_recipe()
get_image_recipe_policy()
get_infrastructure_configuration()
get_paginator()
get_waiter()
import_component()
import_vm_image()
list_component_build_versions()
list_components()
list_container_recipes()
list_distribution_configurations()
list_image_build_versions()
list_image_packages()
list_image_pipeline_images()
list_image_pipelines()
list_image_recipes()
list_images()
list_infrastructure_configurations()
list_tags_for_resource()
put_component_policy()
put_container_recipe_policy()
put_image_policy()
put_image_recipe_policy()
start_image_pipeline_execution()
tag_resource()
untag_resource()
update_distribution_configuration()
update_image_pipeline()
update_infrastructure_configuration()
can_paginate
(operation_name)¶Check if an operation can be paginated.
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")
.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'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the image whose creation you want to cancel.
[REQUIRED]
Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see Ensuring idempotency in the Amazon EC2 API Reference .
This field is autopopulated if not provided.
dict
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 that was used for this request.
imageBuildVersionArn (string) --
The Amazon Resource Name (ARN) of the image whose creation has been cancelled.
Exceptions
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.IdempotentParameterMismatchException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
imagebuilder.Client.exceptions.ResourceInUseException
close
()¶Closes underlying endpoint connections.
create_component
(**kwargs)¶Creates a new component that can be used to build, validate, test, and assess your image. The component is based on a YAML document that you specify using exactly one of the following methods:
data
property in the request body.uri
property in the request body.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'
)
[REQUIRED]
The name of the component.
[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 to the fourth node.Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as 2021.01.01.
[REQUIRED]
The operating system platform of the component.
The operating system (OS) version supported by the component. If the OS information is available, a prefix match is performed against the base image OS version during image recipe creation.
data
contains inline YAML document content for the component. Alternatively, you can specify the uri
of a YAML document file stored in Amazon S3. However, you cannot specify both properties.The uri
of a YAML component document file. This must be an S3 URL ( s3://bucket/key
), and the requester must have permission to access the S3 bucket it points to. If you use Amazon S3, you can specify component content up to your service quota.
Alternatively, you can specify the YAML document inline, using the component data
property. You cannot specify both properties.
The tags that apply to the component.
[REQUIRED]
The idempotency token of the component.
This field is autopopulated if not provided.
dict
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
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.IdempotentParameterMismatchException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
imagebuilder.Client.exceptions.InvalidVersionNumberException
imagebuilder.Client.exceptions.ResourceInUseException
imagebuilder.Client.exceptions.InvalidParameterCombinationException
imagebuilder.Client.exceptions.ServiceQuotaExceededException
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',
'throughput': 123
},
'virtualName': 'string',
'noDevice': 'string'
},
]
},
dockerfileTemplateData='string',
dockerfileTemplateUri='string',
platformOverride='Windows'|'Linux',
imageOsVersionOverride='string',
parentImage='string',
tags={
'string': 'string'
},
workingDirectory='string',
targetRepository={
'service': 'ECR',
'repositoryName': 'string'
},
kmsKeyId='string',
clientToken='string'
)
[REQUIRED]
The type of container to create.
[REQUIRED]
The name of the container recipe.
[REQUIRED]
The semantic version of the container recipe. This version follows the semantic version syntax.
Note
The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign values for the first three, and can filter on all of them.
Assignment: For the first three nodes you can assign any positive integer value, including zero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the build number to the fourth node.Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as 2021.01.01.
[REQUIRED]
Components for build and test that are included in the container recipe. Recipes require a minimum of one build component, and can have a maximum of 20 build and test components in any combination.
Configuration details of the component.
The Amazon Resource Name (ARN) of the component.
A group of parameter settings that Image Builder uses to configure the component for a specific recipe.
Contains a key/value pair that sets the named component parameter.
The name of the component parameter to set.
Sets the value for the named component parameter.
A group of options that can be used to configure an instance for building and testing container images.
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.
Defines the block devices to attach for building an instance from this Image Builder AMI.
Defines block device mappings for the instance used to configure your image.
The device to which these mappings apply.
Use to manage Amazon EBS-specific configuration for this mapping.
Use to configure device encryption.
Use to configure delete on termination of the associated device.
Use to configure device IOPS.
Use to configure the KMS key to use when encrypting the device.
The snapshot that defines the device contents.
Use to override the device's volume size.
Use to override the device's volume type.
For GP3 volumes only – The throughput in MiB/s that the volume supports.
Use to manage instance ephemeral devices.
Use to remove a mapping from the base image.
[REQUIRED]
The base image for the container recipe.
Tags that are attached to the container recipe.
[REQUIRED]
The destination repository for the container image.
Specifies the service in which this image was registered.
The name of the container repository where the output container image is stored. This name is prefixed by the repository location.
[REQUIRED]
The client token used to make this request idempotent.
This field is autopopulated if not provided.
dict
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
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.IdempotentParameterMismatchException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
imagebuilder.Client.exceptions.InvalidVersionNumberException
imagebuilder.Client.exceptions.ResourceInUseException
imagebuilder.Client.exceptions.ResourceAlreadyExistsException
imagebuilder.Client.exceptions.ServiceQuotaExceededException
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',
],
'organizationArns': [
'string',
],
'organizationalUnitArns': [
'string',
]
}
},
'containerDistributionConfiguration': {
'description': 'string',
'containerTags': [
'string',
],
'targetRepository': {
'service': 'ECR',
'repositoryName': 'string'
}
},
'licenseConfigurationArns': [
'string',
],
'launchTemplateConfigurations': [
{
'launchTemplateId': 'string',
'accountId': 'string',
'setDefaultVersion': True|False
},
],
's3ExportConfiguration': {
'roleName': 'string',
'diskImageFormat': 'VMDK'|'RAW'|'VHD',
's3Bucket': 'string',
's3Prefix': 'string'
},
'fastLaunchConfigurations': [
{
'enabled': True|False,
'snapshotConfiguration': {
'targetResourceCount': 123
},
'maxParallelLaunches': 123,
'launchTemplate': {
'launchTemplateId': 'string',
'launchTemplateName': 'string',
'launchTemplateVersion': 'string'
},
'accountId': 'string'
},
]
},
],
tags={
'string': 'string'
},
clientToken='string'
)
[REQUIRED]
The name of the distribution configuration.
[REQUIRED]
The distributions of the distribution configuration.
Defines the settings for a specific Region.
The target Region.
The specific AMI settings; for example, launch permissions or AMI tags.
The name of the output AMI.
The description of the AMI distribution configuration. Minimum and maximum length are in characters.
The ID of an account to which you want to distribute an image.
The tags to apply to AMIs distributed to this Region.
The KMS key identifier used to encrypt the distributed image.
Launch permissions can be used to configure which Amazon Web Services accounts can use the AMI to launch instances.
The Amazon Web Services account ID.
The name of the group.
The ARN for an Amazon Web Services Organization that you want to share your AMI with. For more information, see What is Organizations?.
The ARN for an Organizations organizational unit (OU) that you want to share your AMI with. For more information about key concepts for Organizations, see Organizations terminology and concepts.
Container distribution settings for encryption, licensing, and sharing in a specific Region.
The description of the container distribution configuration.
Tags that are attached to the container distribution configuration.
The destination repository for the container distribution configuration.
Specifies the service in which this image was registered.
The name of the container repository where the output container image is stored. This name is prefixed by the repository location.
The License Manager Configuration to associate with the AMI in the specified Region.
A group of launchTemplateConfiguration settings that apply to image distribution for specified accounts.
Identifies an Amazon EC2 launch template to use for a specific account.
Identifies the Amazon EC2 launch template to use.
The account ID that this configuration applies to.
Set the specified Amazon EC2 launch template as the default launch template for the specified account.
Configure export settings to deliver disk images created from your image build, using a file format that is compatible with your VMs in that Region.
The name of the role that grants VM Import/Export permission to export images to your S3 bucket.
Export the updated image to one of the following supported disk image formats:
The S3 bucket in which to store the output disk images for your VM.
The Amazon S3 path for the bucket where the output disk images for your VM are stored.
The Windows faster-launching configurations to use for AMI distribution.
Define and configure faster launching for output Windows AMIs.
A Boolean that represents the current state of faster launching for the Windows AMI. Set to true
to start using Windows faster launching, or false
to stop using it.
Configuration settings for managing the number of snapshots that are created from pre-provisioned instances for the Windows AMI when faster launching is enabled.
The number of pre-provisioned snapshots to keep on hand for a fast-launch enabled Windows AMI.
The maximum number of parallel instances that are launched for creating resources.
The launch template that the fast-launch enabled Windows AMI uses when it launches Windows instances to create pre-provisioned snapshots.
The ID of the launch template to use for faster launching for a Windows AMI.
The name of the launch template to use for faster launching for a Windows AMI.
The version of the launch template to use for faster launching for a Windows AMI.
The owner account ID for the fast-launch enabled Windows AMI.
The tags of the distribution configuration.
[REQUIRED]
The idempotency token of the distribution configuration.
This field is autopopulated if not provided.
dict
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
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.IdempotentParameterMismatchException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
imagebuilder.Client.exceptions.ResourceInUseException
imagebuilder.Client.exceptions.ResourceAlreadyExistsException
imagebuilder.Client.exceptions.InvalidParameterCombinationException
imagebuilder.Client.exceptions.ServiceQuotaExceededException
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'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the infrastructure configuration that defines the environment in which your image will be built and tested.
The image tests configuration of the image.
Determines if tests should run after building the image. Image Builder defaults to enable tests to run following the image build, before image distribution.
The maximum time in minutes that tests are permitted to run.
Note
The timeoutMinutes attribute is not currently active. This value is ignored.
The tags of the image.
[REQUIRED]
The idempotency token used to make this request idempotent.
This field is autopopulated if not provided.
dict
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
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.IdempotentParameterMismatchException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
imagebuilder.Client.exceptions.ResourceInUseException
imagebuilder.Client.exceptions.ServiceQuotaExceededException
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'
)
[REQUIRED]
The name of the image pipeline.
[REQUIRED]
The Amazon Resource Name (ARN) of the infrastructure configuration that will be used to build images created by this image pipeline.
The image test configuration of the image pipeline.
Determines if tests should run after building the image. Image Builder defaults to enable tests to run following the image build, before image distribution.
The maximum time in minutes that tests are permitted to run.
Note
The timeoutMinutes attribute is not currently active. This value is ignored.
The schedule of the image pipeline.
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.
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.
The condition configures when the pipeline should trigger a new image build. When the pipelineExecutionStartCondition
is set to EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE
, and you use semantic version filters on the base image or components in your image recipe, EC2 Image Builder will build a new image only when there are new versions of the image or components in your recipe that match the semantic version filter. When it is set to EXPRESSION_MATCH_ONLY
, it will build a new image every time the CRON expression matches the current time. For semantic version syntax, see CreateComponent in the EC2 Image Builder API Reference .
The tags of the image pipeline.
[REQUIRED]
The idempotency token used to make this request idempotent.
This field is autopopulated if not provided.
dict
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
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.IdempotentParameterMismatchException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
imagebuilder.Client.exceptions.ResourceInUseException
imagebuilder.Client.exceptions.ResourceAlreadyExistsException
imagebuilder.Client.exceptions.ServiceQuotaExceededException
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',
'throughput': 123
},
'virtualName': 'string',
'noDevice': 'string'
},
],
tags={
'string': 'string'
},
workingDirectory='string',
additionalInstanceConfiguration={
'systemsManagerAgent': {
'uninstallAfterBuild': True|False
},
'userDataOverride': 'string'
},
clientToken='string'
)
[REQUIRED]
The name of the image recipe.
[REQUIRED]
The semantic version of the image recipe. This version follows the semantic version syntax.
Note
The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign values for the first three, and can filter on all of them.
Assignment: For the first three nodes you can assign any positive integer value, including zero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the build number to the fourth node.Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as 2021.01.01.
[REQUIRED]
The components included in the image recipe.
Configuration details of the component.
The Amazon Resource Name (ARN) of the component.
A group of parameter settings that Image Builder uses to configure the component for a specific recipe.
Contains a key/value pair that sets the named component parameter.
The name of the component parameter to set.
Sets the value for the named component parameter.
[REQUIRED]
The base image of the image recipe. The value of the string can be the ARN of the base 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.
The block device mappings of the image recipe.
Defines block device mappings for the instance used to configure your image.
The device to which these mappings apply.
Use to manage Amazon EBS-specific configuration for this mapping.
Use to configure device encryption.
Use to configure delete on termination of the associated device.
Use to configure device IOPS.
Use to configure the KMS key to use when encrypting the device.
The snapshot that defines the device contents.
Use to override the device's volume size.
Use to override the device's volume type.
For GP3 volumes only – The throughput in MiB/s that the volume supports.
Use to manage instance ephemeral devices.
Use to remove a mapping from the base image.
The tags of the image recipe.
Specify additional settings and launch scripts for your build instances.
Contains settings for the Systems Manager agent on your build instance.
Controls whether the Systems Manager agent is removed from your final build image, prior to creating the new AMI. If this is set to true, then the agent is removed from the final image. If it's set to false, then the agent is left in, so that it is included in the new AMI. The default value is false.
Use this property to provide commands or a command script to run when you launch your build instance.
The userDataOverride property replaces any commands that Image Builder might have added to ensure that Systems Manager is installed on your Linux build instance. If you override the user data, make sure that you add commands to install Systems Manager, if it is not pre-installed on your base image.
Note
The user data is always base 64 encoded. For example, the following commands are encoded as IyEvYmluL2Jhc2gKbWtkaXIgLXAgL3Zhci9iYi8KdG91Y2ggL3Zhci$
:
#!/bin/bash
mkdir -p /var/bb/
touch /var
[REQUIRED]
The idempotency token used to make this request idempotent.
This field is autopopulated if not provided.
dict
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
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.IdempotentParameterMismatchException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
imagebuilder.Client.exceptions.InvalidVersionNumberException
imagebuilder.Client.exceptions.ResourceInUseException
imagebuilder.Client.exceptions.ResourceAlreadyExistsException
imagebuilder.Client.exceptions.ServiceQuotaExceededException
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'
},
instanceMetadataOptions={
'httpTokens': 'string',
'httpPutResponseHopLimit': 123
},
tags={
'string': 'string'
},
clientToken='string'
)
[REQUIRED]
The name of the infrastructure configuration.
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.
[REQUIRED]
The instance profile to associate with the instance used to customize your Amazon EC2 AMI.
The security group IDs to associate with the instance used to customize your Amazon EC2 AMI.
The logging configuration of the infrastructure configuration.
The Amazon S3 logging configuration.
The S3 bucket in which to store the logs.
The Amazon S3 path to the bucket where the logs are stored.
The Amazon Resource Name (ARN) for the SNS topic to which we send image build event notifications.
Note
EC2 Image Builder is unable to send notifications to SNS topics that are encrypted using keys from other accounts. The key that is used to encrypt the SNS topic must reside in the account that the Image Builder service runs under.
The tags attached to the resource created by Image Builder.
The instance metadata options that you can set for the HTTP requests that pipeline builds use to launch EC2 build and test instances.
Indicates whether a signed token header is required for instance metadata retrieval requests. The values affect the response as follows:
The default setting is optional .
Limit the number of hops that an instance metadata request can traverse to reach its destination. The default is one hop. However, if HTTP tokens are required, container image builds need a minimum of two hops.
The tags of the infrastructure configuration.
[REQUIRED]
The idempotency token used to make this request idempotent.
This field is autopopulated if not provided.
dict
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
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.IdempotentParameterMismatchException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
imagebuilder.Client.exceptions.ResourceInUseException
imagebuilder.Client.exceptions.ResourceAlreadyExistsException
imagebuilder.Client.exceptions.ServiceQuotaExceededException
delete_component
(**kwargs)¶Deletes a component build version.
See also: AWS API Documentation
Request Syntax
response = client.delete_component(
componentBuildVersionArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the component build version to delete.
{
'requestId': 'string',
'componentBuildVersionArn': 'string'
}
Response Structure
The request ID that uniquely identifies this request.
The Amazon Resource Name (ARN) of the component build version that was deleted.
Exceptions
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
imagebuilder.Client.exceptions.ResourceDependencyException
delete_container_recipe
(**kwargs)¶Deletes a container recipe.
See also: AWS API Documentation
Request Syntax
response = client.delete_container_recipe(
containerRecipeArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the container recipe to delete.
{
'requestId': 'string',
'containerRecipeArn': 'string'
}
Response Structure
The request ID that uniquely identifies this request.
The Amazon Resource Name (ARN) of the container recipe that was deleted.
Exceptions
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
imagebuilder.Client.exceptions.ResourceDependencyException
delete_distribution_configuration
(**kwargs)¶Deletes a distribution configuration.
See also: AWS API Documentation
Request Syntax
response = client.delete_distribution_configuration(
distributionConfigurationArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the distribution configuration to delete.
{
'requestId': 'string',
'distributionConfigurationArn': 'string'
}
Response Structure
The request ID that uniquely identifies this request.
The Amazon Resource Name (ARN) of the distribution configuration that was deleted.
Exceptions
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
imagebuilder.Client.exceptions.ResourceDependencyException
delete_image
(**kwargs)¶Deletes an Image Builder image resource. This does not delete any EC2 AMIs or ECR container images that are created during the image build process. You must clean those up separately, using the appropriate Amazon EC2 or Amazon ECR console actions, or API or CLI commands.
See also: AWS API Documentation
Request Syntax
response = client.delete_image(
imageBuildVersionArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the Image Builder image resource to delete.
{
'requestId': 'string',
'imageBuildVersionArn': 'string'
}
Response Structure
The request ID that uniquely identifies this request.
The Amazon Resource Name (ARN) of the Image Builder image resource that was deleted.
Exceptions
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
imagebuilder.Client.exceptions.ResourceDependencyException
delete_image_pipeline
(**kwargs)¶Deletes an image pipeline.
See also: AWS API Documentation
Request Syntax
response = client.delete_image_pipeline(
imagePipelineArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the image pipeline to delete.
{
'requestId': 'string',
'imagePipelineArn': 'string'
}
Response Structure
The request ID that uniquely identifies this request.
The Amazon Resource Name (ARN) of the image pipeline that was deleted.
Exceptions
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
imagebuilder.Client.exceptions.ResourceDependencyException
delete_image_recipe
(**kwargs)¶Deletes an image recipe.
See also: AWS API Documentation
Request Syntax
response = client.delete_image_recipe(
imageRecipeArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the image recipe to delete.
{
'requestId': 'string',
'imageRecipeArn': 'string'
}
Response Structure
The request ID that uniquely identifies this request.
The Amazon Resource Name (ARN) of the image recipe that was deleted.
Exceptions
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
imagebuilder.Client.exceptions.ResourceDependencyException
delete_infrastructure_configuration
(**kwargs)¶Deletes an infrastructure configuration.
See also: AWS API Documentation
Request Syntax
response = client.delete_infrastructure_configuration(
infrastructureConfigurationArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the infrastructure configuration to delete.
{
'requestId': 'string',
'infrastructureConfigurationArn': 'string'
}
Response Structure
The request ID that uniquely identifies this request.
The Amazon Resource Name (ARN) of the infrastructure configuration that was deleted.
Exceptions
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
imagebuilder.Client.exceptions.ResourceDependencyException
get_component
(**kwargs)¶Gets a component object.
See also: AWS API Documentation
Request Syntax
response = client.get_component(
componentBuildVersionArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the component that you want to retrieve. Regex requires "/d+$" suffix.
{
'requestId': 'string',
'component': {
'arn': 'string',
'name': 'string',
'version': 'string',
'description': 'string',
'changeDescription': 'string',
'type': 'BUILD'|'TEST',
'platform': 'Windows'|'Linux',
'supportedOsVersions': [
'string',
],
'state': {
'status': 'DEPRECATED',
'reason': 'string'
},
'parameters': [
{
'name': 'string',
'type': 'string',
'defaultValue': [
'string',
],
'description': 'string'
},
],
'owner': 'string',
'data': 'string',
'kmsKeyId': 'string',
'encrypted': True|False,
'dateCreated': 'string',
'tags': {
'string': 'string'
},
'publisher': 'string',
'obfuscate': True|False
}
}
Response Structure
The request ID that uniquely identifies this request.
The component object associated with the specified ARN.
The Amazon Resource Name (ARN) of the component.
The name of the component.
The version of the component.
The description of the component.
The change description of the component.
The component type specifies whether Image Builder uses the component to build the image or only to test it.
The operating system platform of the component.
The operating system (OS) version supported by the component. If the OS information is available, Image Builder performs a prefix match against the base image OS version during image recipe creation.
Describes the current status of the component. This is used for components that are no longer active.
The current state of the component.
Describes how or why the component changed state.
Contains parameter details for each of the parameters that the component document defined for the component.
Defines a parameter that is used to provide configuration details for the component.
The name of this input parameter.
The type of input this parameter provides. The currently supported value is "string".
The default value of this parameter if no input is provided.
Describes this parameter.
The owner of the component.
Component data contains the YAML document content for the component.
The KMS key identifier used to encrypt the component.
The encryption status of the component.
The date that Image Builder created the component.
The tags that apply to the component.
Contains the name of the publisher if this is a third-party component. Otherwise, this property is empty.
Indicates whether component source is hidden from view in the console, and from component detail results for API, CLI, or SDK operations.
Exceptions
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
get_component_policy
(**kwargs)¶Gets a component policy.
See also: AWS API Documentation
Request Syntax
response = client.get_component_policy(
componentArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the component whose policy you want to retrieve.
{
'requestId': 'string',
'policy': 'string'
}
Response Structure
The request ID that uniquely identifies this request.
The component policy.
Exceptions
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.ResourceNotFoundException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
get_container_recipe
(**kwargs)¶Retrieves a container recipe.
See also: AWS API Documentation
Request Syntax
response = client.get_container_recipe(
containerRecipeArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the container recipe to retrieve.
{
'requestId': 'string',
'containerRecipe': {
'arn': 'string',
'containerType': 'DOCKER',
'name': 'string',
'description': 'string',
'platform': 'Windows'|'Linux',
'owner': 'string',
'version': 'string',
'components': [
{
'componentArn': 'string',
'parameters': [
{
'name': 'string',
'value': [
'string',
]
},
]
},
],
'instanceConfiguration': {
'image': 'string',
'blockDeviceMappings': [
{
'deviceName': 'string',
'ebs': {
'encrypted': True|False,
'deleteOnTermination': True|False,
'iops': 123,
'kmsKeyId': 'string',
'snapshotId': 'string',
'volumeSize': 123,
'volumeType': 'standard'|'io1'|'io2'|'gp2'|'gp3'|'sc1'|'st1',
'throughput': 123
},
'virtualName': 'string',
'noDevice': 'string'
},
]
},
'dockerfileTemplateData': 'string',
'kmsKeyId': 'string',
'encrypted': True|False,
'parentImage': 'string',
'dateCreated': 'string',
'tags': {
'string': 'string'
},
'workingDirectory': 'string',
'targetRepository': {
'service': 'ECR',
'repositoryName': 'string'
}
}
}
Response Structure
The request ID that uniquely identifies this request.
The container recipe object that is returned.
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:
Specifies the type of container, such as Docker.
The name of the container recipe.
The description of the container recipe.
The system platform for the container, such as Windows or Linux.
The owner of the container recipe.
The semantic version of the container recipe.
Note
The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign values for the first three, and can filter on all of them.
Assignment: For the first three nodes you can assign any positive integer value, including zero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the build number to the fourth node.Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as 2021.01.01.
Filtering: With semantic versioning, you have the flexibility to use wildcards (x) to specify the most recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards.
Build and test components that are included in the container recipe. Recipes require a minimum of one build component, and can have a maximum of 20 build and test components in any combination.
Configuration details of the component.
The Amazon Resource Name (ARN) of the component.
A group of parameter settings that Image Builder uses to configure the component for a specific recipe.
Contains a key/value pair that sets the named component parameter.
The name of the component parameter to set.
Sets the value for the named component parameter.
A group of options that can be used to configure an instance for building and testing container images.
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.
Defines the block devices to attach for building an instance from this Image Builder AMI.
Defines block device mappings for the instance used to configure your image.
The device to which these mappings apply.
Use to manage Amazon EBS-specific configuration for this mapping.
Use to configure device encryption.
Use to configure delete on termination of the associated device.
Use to configure device IOPS.
Use to configure the KMS key to use when encrypting the device.
The snapshot that defines the device contents.
Use to override the device's volume size.
Use to override the device's volume type.
For GP3 volumes only – The throughput in MiB/s that the volume supports.
Use to manage instance ephemeral devices.
Use to remove a mapping from the base image.
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.
Identifies which KMS key is used to encrypt the container image for distribution to the target Region.
A flag that indicates if the target container is encrypted.
The base image for the container recipe.
The date when this container recipe was created.
Tags that are attached to the container recipe.
The working directory for use during build and test workflows.
The destination repository for the container image.
Specifies the service in which this image was registered.
The name of the container repository where the output container image is stored. This name is prefixed by the repository location.
Exceptions
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
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'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the container recipe for the policy being requested.
{
'requestId': 'string',
'policy': 'string'
}
Response Structure
The request ID that uniquely identifies this request.
The container recipe policy object that is returned.
Exceptions
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.ResourceNotFoundException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
get_distribution_configuration
(**kwargs)¶Gets a distribution configuration.
See also: AWS API Documentation
Request Syntax
response = client.get_distribution_configuration(
distributionConfigurationArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the distribution configuration that you want to retrieve.
{
'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',
],
'organizationArns': [
'string',
],
'organizationalUnitArns': [
'string',
]
}
},
'containerDistributionConfiguration': {
'description': 'string',
'containerTags': [
'string',
],
'targetRepository': {
'service': 'ECR',
'repositoryName': 'string'
}
},
'licenseConfigurationArns': [
'string',
],
'launchTemplateConfigurations': [
{
'launchTemplateId': 'string',
'accountId': 'string',
'setDefaultVersion': True|False
},
],
's3ExportConfiguration': {
'roleName': 'string',
'diskImageFormat': 'VMDK'|'RAW'|'VHD',
's3Bucket': 'string',
's3Prefix': 'string'
},
'fastLaunchConfigurations': [
{
'enabled': True|False,
'snapshotConfiguration': {
'targetResourceCount': 123
},
'maxParallelLaunches': 123,
'launchTemplate': {
'launchTemplateId': 'string',
'launchTemplateName': 'string',
'launchTemplateVersion': 'string'
},
'accountId': 'string'
},
]
},
],
'timeoutMinutes': 123,
'dateCreated': 'string',
'dateUpdated': 'string',
'tags': {
'string': 'string'
}
}
}
Response Structure
The request ID that uniquely identifies this request.
The distribution configuration object.
The Amazon Resource Name (ARN) of the distribution configuration.
The name of the distribution configuration.
The description of the distribution configuration.
The distribution objects that apply Region-specific settings for the deployment of the image to targeted Regions.
Defines the settings for a specific Region.
The target Region.
The specific AMI settings; for example, launch permissions or AMI tags.
The name of the output AMI.
The description of the AMI distribution configuration. Minimum and maximum length are in characters.
The ID of an account to which you want to distribute an image.
The tags to apply to AMIs distributed to this Region.
The KMS key identifier used to encrypt the distributed image.
Launch permissions can be used to configure which Amazon Web Services accounts can use the AMI to launch instances.
The Amazon Web Services account ID.
The name of the group.
The ARN for an Amazon Web Services Organization that you want to share your AMI with. For more information, see What is Organizations?.
The ARN for an Organizations organizational unit (OU) that you want to share your AMI with. For more information about key concepts for Organizations, see Organizations terminology and concepts.
Container distribution settings for encryption, licensing, and sharing in a specific Region.
The description of the container distribution configuration.
Tags that are attached to the container distribution configuration.
The destination repository for the container distribution configuration.
Specifies the service in which this image was registered.
The name of the container repository where the output container image is stored. This name is prefixed by the repository location.
The License Manager Configuration to associate with the AMI in the specified Region.
A group of launchTemplateConfiguration settings that apply to image distribution for specified accounts.
Identifies an Amazon EC2 launch template to use for a specific account.
Identifies the Amazon EC2 launch template to use.
The account ID that this configuration applies to.
Set the specified Amazon EC2 launch template as the default launch template for the specified account.
Configure export settings to deliver disk images created from your image build, using a file format that is compatible with your VMs in that Region.
The name of the role that grants VM Import/Export permission to export images to your S3 bucket.
Export the updated image to one of the following supported disk image formats:
The S3 bucket in which to store the output disk images for your VM.
The Amazon S3 path for the bucket where the output disk images for your VM are stored.
The Windows faster-launching configurations to use for AMI distribution.
Define and configure faster launching for output Windows AMIs.
A Boolean that represents the current state of faster launching for the Windows AMI. Set to true
to start using Windows faster launching, or false
to stop using it.
Configuration settings for managing the number of snapshots that are created from pre-provisioned instances for the Windows AMI when faster launching is enabled.
The number of pre-provisioned snapshots to keep on hand for a fast-launch enabled Windows AMI.
The maximum number of parallel instances that are launched for creating resources.
The launch template that the fast-launch enabled Windows AMI uses when it launches Windows instances to create pre-provisioned snapshots.
The ID of the launch template to use for faster launching for a Windows AMI.
The name of the launch template to use for faster launching for a Windows AMI.
The version of the launch template to use for faster launching for a Windows AMI.
The owner account ID for the fast-launch enabled Windows AMI.
The maximum duration in minutes for this distribution configuration.
The date on which this distribution configuration was created.
The date on which this distribution configuration was last updated.
The tags of the distribution configuration.
Exceptions
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
get_image
(**kwargs)¶Gets an image.
See also: AWS API Documentation
Request Syntax
response = client.get_image(
imageBuildVersionArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the image that you want to retrieve.
{
'requestId': 'string',
'image': {
'arn': 'string',
'type': 'AMI'|'DOCKER',
'name': 'string',
'version': 'string',
'platform': 'Windows'|'Linux',
'enhancedImageMetadataEnabled': True|False,
'osVersion': 'string',
'state': {
'status': 'PENDING'|'CREATING'|'BUILDING'|'TESTING'|'DISTRIBUTING'|'INTEGRATING'|'AVAILABLE'|'CANCELLED'|'FAILED'|'DEPRECATED'|'DELETED',
'reason': 'string'
},
'imageRecipe': {
'arn': 'string',
'type': 'AMI'|'DOCKER',
'name': 'string',
'description': 'string',
'platform': 'Windows'|'Linux',
'owner': 'string',
'version': 'string',
'components': [
{
'componentArn': 'string',
'parameters': [
{
'name': 'string',
'value': [
'string',
]
},
]
},
],
'parentImage': 'string',
'blockDeviceMappings': [
{
'deviceName': 'string',
'ebs': {
'encrypted': True|False,
'deleteOnTermination': True|False,
'iops': 123,
'kmsKeyId': 'string',
'snapshotId': 'string',
'volumeSize': 123,
'volumeType': 'standard'|'io1'|'io2'|'gp2'|'gp3'|'sc1'|'st1',
'throughput': 123
},
'virtualName': 'string',
'noDevice': 'string'
},
],
'dateCreated': 'string',
'tags': {
'string': 'string'
},
'workingDirectory': 'string',
'additionalInstanceConfiguration': {
'systemsManagerAgent': {
'uninstallAfterBuild': True|False
},
'userDataOverride': 'string'
}
},
'containerRecipe': {
'arn': 'string',
'containerType': 'DOCKER',
'name': 'string',
'description': 'string',
'platform': 'Windows'|'Linux',
'owner': 'string',
'version': 'string',
'components': [
{
'componentArn': 'string',
'parameters': [
{
'name': 'string',
'value': [
'string',
]
},
]
},
],
'instanceConfiguration': {
'image': 'string',
'blockDeviceMappings': [
{
'deviceName': 'string',
'ebs': {
'encrypted': True|False,
'deleteOnTermination': True|False,
'iops': 123,
'kmsKeyId': 'string',
'snapshotId': 'string',
'volumeSize': 123,
'volumeType': 'standard'|'io1'|'io2'|'gp2'|'gp3'|'sc1'|'st1',
'throughput': 123
},
'virtualName': 'string',
'noDevice': 'string'
},
]
},
'dockerfileTemplateData': 'string',
'kmsKeyId': 'string',
'encrypted': True|False,
'parentImage': 'string',
'dateCreated': 'string',
'tags': {
'string': 'string'
},
'workingDirectory': 'string',
'targetRepository': {
'service': 'ECR',
'repositoryName': 'string'
}
},
'sourcePipelineName': 'string',
'sourcePipelineArn': 'string',
'infrastructureConfiguration': {
'arn': 'string',
'name': 'string',
'description': 'string',
'instanceTypes': [
'string',
],
'instanceProfileName': 'string',
'securityGroupIds': [
'string',
],
'subnetId': 'string',
'logging': {
's3Logs': {
's3BucketName': 'string',
's3KeyPrefix': 'string'
}
},
'keyPair': 'string',
'terminateInstanceOnFailure': True|False,
'snsTopicArn': 'string',
'dateCreated': 'string',
'dateUpdated': 'string',
'resourceTags': {
'string': 'string'
},
'instanceMetadataOptions': {
'httpTokens': 'string',
'httpPutResponseHopLimit': 123
},
'tags': {
'string': 'string'
}
},
'distributionConfiguration': {
'arn': 'string',
'name': 'string',
'description': 'string',
'distributions': [
{
'region': 'string',
'amiDistributionConfiguration': {
'name': 'string',
'description': 'string',
'targetAccountIds': [
'string',
],
'amiTags': {
'string': 'string'
},
'kmsKeyId': 'string',
'launchPermission': {
'userIds': [
'string',
],
'userGroups': [
'string',
],
'organizationArns': [
'string',
],
'organizationalUnitArns': [
'string',
]
}
},
'containerDistributionConfiguration': {
'description': 'string',
'containerTags': [
'string',
],
'targetRepository': {
'service': 'ECR',
'repositoryName': 'string'
}
},
'licenseConfigurationArns': [
'string',
],
'launchTemplateConfigurations': [
{
'launchTemplateId': 'string',
'accountId': 'string',
'setDefaultVersion': True|False
},
],
's3ExportConfiguration': {
'roleName': 'string',
'diskImageFormat': 'VMDK'|'RAW'|'VHD',
's3Bucket': 'string',
's3Prefix': 'string'
},
'fastLaunchConfigurations': [
{
'enabled': True|False,
'snapshotConfiguration': {
'targetResourceCount': 123
},
'maxParallelLaunches': 123,
'launchTemplate': {
'launchTemplateId': 'string',
'launchTemplateName': 'string',
'launchTemplateVersion': 'string'
},
'accountId': 'string'
},
]
},
],
'timeoutMinutes': 123,
'dateCreated': 'string',
'dateUpdated': 'string',
'tags': {
'string': 'string'
}
},
'imageTestsConfiguration': {
'imageTestsEnabled': True|False,
'timeoutMinutes': 123
},
'dateCreated': 'string',
'outputResources': {
'amis': [
{
'region': 'string',
'image': 'string',
'name': 'string',
'description': 'string',
'state': {
'status': 'PENDING'|'CREATING'|'BUILDING'|'TESTING'|'DISTRIBUTING'|'INTEGRATING'|'AVAILABLE'|'CANCELLED'|'FAILED'|'DEPRECATED'|'DELETED',
'reason': 'string'
},
'accountId': 'string'
},
],
'containers': [
{
'region': 'string',
'imageUris': [
'string',
]
},
]
},
'tags': {
'string': 'string'
},
'buildType': 'USER_INITIATED'|'SCHEDULED'|'IMPORT',
'imageSource': 'AMAZON_MANAGED'|'AWS_MARKETPLACE'|'IMPORTED'|'CUSTOM'
}
}
Response Structure
The request ID that uniquely identifies this request.
The image object.
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:
Specifies whether this image produces an AMI or a container image.
The name of the image.
The semantic version of the image.
Note
The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign values for the first three, and can filter on all of them.
Assignment: For the first three nodes you can assign any positive integer value, including zero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the build number to the fourth node.Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as 2021.01.01.
Filtering: With semantic versioning, you have the flexibility to use wildcards (x) to specify the most recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards.
The image operating system platform, such as Linux or Windows.
Indicates whether Image Builder collects additional information about the image, such as the operating system (OS) version and package list.
The operating system version for instances that launch from this image. For example, Amazon Linux 2, Ubuntu 18, or Microsoft Windows Server 2019.
The state of the image.
The status of the image.
The reason for the image's status.
For images that distribute an AMI, this is the image recipe that Image Builder used to create the image. For container images, this is empty.
The Amazon Resource Name (ARN) of the image recipe.
Specifies which type of image is created by the recipe - an AMI or a container image.
The name of the image recipe.
The description of the image recipe.
The platform of the image recipe.
The owner of the image recipe.
The version of the image recipe.
The components that are included in the image recipe. Recipes require a minimum of one build component, and can have a maximum of 20 build and test components in any combination.
Configuration details of the component.
The Amazon Resource Name (ARN) of the component.
A group of parameter settings that Image Builder uses to configure the component for a specific recipe.
Contains a key/value pair that sets the named component parameter.
The name of the component parameter to set.
Sets the value for the named component parameter.
The base image of the image recipe.
The block device mappings to apply when creating images from this recipe.
Defines block device mappings for the instance used to configure your image.
The device to which these mappings apply.
Use to manage Amazon EBS-specific configuration for this mapping.
Use to configure device encryption.
Use to configure delete on termination of the associated device.
Use to configure device IOPS.
Use to configure the KMS key to use when encrypting the device.
The snapshot that defines the device contents.
Use to override the device's volume size.
Use to override the device's volume type.
For GP3 volumes only – The throughput in MiB/s that the volume supports.
Use to manage instance ephemeral devices.
Use to remove a mapping from the base image.
The date on which this image recipe was created.
The tags of the image recipe.
The working directory to be used during build and test workflows.
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.
Contains settings for the Systems Manager agent on your build instance.
Controls whether the Systems Manager agent is removed from your final build image, prior to creating the new AMI. If this is set to true, then the agent is removed from the final image. If it's set to false, then the agent is left in, so that it is included in the new AMI. The default value is false.
Use this property to provide commands or a command script to run when you launch your build instance.
The userDataOverride property replaces any commands that Image Builder might have added to ensure that Systems Manager is installed on your Linux build instance. If you override the user data, make sure that you add commands to install Systems Manager, if it is not pre-installed on your base image.
Note
The user data is always base 64 encoded. For example, the following commands are encoded as IyEvYmluL2Jhc2gKbWtkaXIgLXAgL3Zhci9iYi8KdG91Y2ggL3Zhci$
:
#!/bin/bash
mkdir -p /var/bb/
touch /var
For container images, this is the container recipe that Image Builder used to create the image. For images that distribute an AMI, this is empty.
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:
Specifies the type of container, such as Docker.
The name of the container recipe.
The description of the container recipe.
The system platform for the container, such as Windows or Linux.
The owner of the container recipe.
The semantic version of the container recipe.
Note
The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign values for the first three, and can filter on all of them.
Assignment: For the first three nodes you can assign any positive integer value, including zero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the build number to the fourth node.Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as 2021.01.01.
Filtering: With semantic versioning, you have the flexibility to use wildcards (x) to specify the most recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards.
Build and test components that are included in the container recipe. Recipes require a minimum of one build component, and can have a maximum of 20 build and test components in any combination.
Configuration details of the component.
The Amazon Resource Name (ARN) of the component.
A group of parameter settings that Image Builder uses to configure the component for a specific recipe.
Contains a key/value pair that sets the named component parameter.
The name of the component parameter to set.
Sets the value for the named component parameter.
A group of options that can be used to configure an instance for building and testing container images.
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.
Defines the block devices to attach for building an instance from this Image Builder AMI.
Defines block device mappings for the instance used to configure your image.
The device to which these mappings apply.
Use to manage Amazon EBS-specific configuration for this mapping.
Use to configure device encryption.
Use to configure delete on termination of the associated device.
Use to configure device IOPS.
Use to configure the KMS key to use when encrypting the device.
The snapshot that defines the device contents.
Use to override the device's volume size.
Use to override the device's volume type.
For GP3 volumes only – The throughput in MiB/s that the volume supports.
Use to manage instance ephemeral devices.
Use to remove a mapping from the base image.
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.
Identifies which KMS key is used to encrypt the container image for distribution to the target Region.
A flag that indicates if the target container is encrypted.
The base image for the container recipe.
The date when this container recipe was created.
Tags that are attached to the container recipe.
The working directory for use during build and test workflows.
The destination repository for the container image.
Specifies the service in which this image was registered.
The name of the container repository where the output container image is stored. This name is prefixed by the repository location.
The name of the image pipeline that created this image.
The Amazon Resource Name (ARN) of the image pipeline that created this image.
The infrastructure that Image Builder used to create this image.
The Amazon Resource Name (ARN) of the infrastructure configuration.
The name of the infrastructure configuration.
The description of the infrastructure configuration.
The instance types of the infrastructure configuration.
The instance profile of the infrastructure configuration.
The security group IDs of the infrastructure configuration.
The subnet ID of the infrastructure configuration.
The logging configuration of the infrastructure configuration.
The Amazon S3 logging configuration.
The S3 bucket in which to store the logs.
The Amazon S3 path to the bucket where the logs are stored.
The Amazon EC2 key pair of the infrastructure configuration.
The terminate instance on failure configuration of the infrastructure configuration.
The Amazon Resource Name (ARN) for the SNS topic to which we send image build event notifications.
Note
EC2 Image Builder is unable to send notifications to SNS topics that are encrypted using keys from other accounts. The key that is used to encrypt the SNS topic must reside in the account that the Image Builder service runs under.
The date on which the infrastructure configuration was created.
The date on which the infrastructure configuration was last updated.
The tags attached to the resource created by Image Builder.
The instance metadata option settings for the infrastructure configuration.
Indicates whether a signed token header is required for instance metadata retrieval requests. The values affect the response as follows:
The default setting is optional .
Limit the number of hops that an instance metadata request can traverse to reach its destination. The default is one hop. However, if HTTP tokens are required, container image builds need a minimum of two hops.
The tags of the infrastructure configuration.
The distribution configuration that Image Builder used to create this image.
The Amazon Resource Name (ARN) of the distribution configuration.
The name of the distribution configuration.
The description of the distribution configuration.
The distribution objects that apply Region-specific settings for the deployment of the image to targeted Regions.
Defines the settings for a specific Region.
The target Region.
The specific AMI settings; for example, launch permissions or AMI tags.
The name of the output AMI.
The description of the AMI distribution configuration. Minimum and maximum length are in characters.
The ID of an account to which you want to distribute an image.
The tags to apply to AMIs distributed to this Region.
The KMS key identifier used to encrypt the distributed image.
Launch permissions can be used to configure which Amazon Web Services accounts can use the AMI to launch instances.
The Amazon Web Services account ID.
The name of the group.
The ARN for an Amazon Web Services Organization that you want to share your AMI with. For more information, see What is Organizations?.
The ARN for an Organizations organizational unit (OU) that you want to share your AMI with. For more information about key concepts for Organizations, see Organizations terminology and concepts.
Container distribution settings for encryption, licensing, and sharing in a specific Region.
The description of the container distribution configuration.
Tags that are attached to the container distribution configuration.
The destination repository for the container distribution configuration.
Specifies the service in which this image was registered.
The name of the container repository where the output container image is stored. This name is prefixed by the repository location.
The License Manager Configuration to associate with the AMI in the specified Region.
A group of launchTemplateConfiguration settings that apply to image distribution for specified accounts.
Identifies an Amazon EC2 launch template to use for a specific account.
Identifies the Amazon EC2 launch template to use.
The account ID that this configuration applies to.
Set the specified Amazon EC2 launch template as the default launch template for the specified account.
Configure export settings to deliver disk images created from your image build, using a file format that is compatible with your VMs in that Region.
The name of the role that grants VM Import/Export permission to export images to your S3 bucket.
Export the updated image to one of the following supported disk image formats:
The S3 bucket in which to store the output disk images for your VM.
The Amazon S3 path for the bucket where the output disk images for your VM are stored.
The Windows faster-launching configurations to use for AMI distribution.
Define and configure faster launching for output Windows AMIs.
A Boolean that represents the current state of faster launching for the Windows AMI. Set to true
to start using Windows faster launching, or false
to stop using it.
Configuration settings for managing the number of snapshots that are created from pre-provisioned instances for the Windows AMI when faster launching is enabled.
The number of pre-provisioned snapshots to keep on hand for a fast-launch enabled Windows AMI.
The maximum number of parallel instances that are launched for creating resources.
The launch template that the fast-launch enabled Windows AMI uses when it launches Windows instances to create pre-provisioned snapshots.
The ID of the launch template to use for faster launching for a Windows AMI.
The name of the launch template to use for faster launching for a Windows AMI.
The version of the launch template to use for faster launching for a Windows AMI.
The owner account ID for the fast-launch enabled Windows AMI.
The maximum duration in minutes for this distribution configuration.
The date on which this distribution configuration was created.
The date on which this distribution configuration was last updated.
The tags of the distribution configuration.
The image tests that ran when that Image Builder created this image.
Determines if tests should run after building the image. Image Builder defaults to enable tests to run following the image build, before image distribution.
The maximum time in minutes that tests are permitted to run.
Note
The timeoutMinutes attribute is not currently active. This value is ignored.
The date on which Image Builder created this image.
The output resources that Image Builder produces for this image.
The Amazon EC2 AMIs created by this image.
Details of an Amazon EC2 AMI.
The Amazon Web Services Region of the Amazon EC2 AMI.
The AMI ID of the Amazon EC2 AMI.
The name of the Amazon EC2 AMI.
The description of the Amazon EC2 AMI. Minimum and maximum length are in characters.
Image state shows the image status and the reason for that status.
The status of the image.
The reason for the image's status.
The account ID of the owner of the AMI.
Container images that the pipeline has generated and stored in the output repository.
A container encapsulates the runtime environment for an application.
Containers and container images are Region-specific. This is the Region context for the container.
A list of URIs for containers created in the context Region.
The tags that apply to this image.
Indicates the type of build that created this image. The build can be initiated in the following ways:
The origin of the base image that Image Builder used to build this image.
Exceptions
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
get_image_pipeline
(**kwargs)¶Gets an image pipeline.
See also: AWS API Documentation
Request Syntax
response = client.get_image_pipeline(
imagePipelineArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the image pipeline that you want to retrieve.
{
'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
The request ID that uniquely identifies this request.
The image pipeline object.
The Amazon Resource Name (ARN) of the image pipeline.
The name of the image pipeline.
The description of the image pipeline.
The platform of the image pipeline.
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.
The Amazon Resource Name (ARN) of the image recipe associated with this image pipeline.
The Amazon Resource Name (ARN) of the container recipe that is used for this pipeline.
The Amazon Resource Name (ARN) of the infrastructure configuration associated with this image pipeline.
The Amazon Resource Name (ARN) of the distribution configuration associated with this image pipeline.
The image tests configuration of the image pipeline.
Determines if tests should run after building the image. Image Builder defaults to enable tests to run following the image build, before image distribution.
The maximum time in minutes that tests are permitted to run.
Note
The timeoutMinutes attribute is not currently active. This value is ignored.
The schedule of the image pipeline.
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.
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.
The condition configures when the pipeline should trigger a new image build. When the pipelineExecutionStartCondition
is set to EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE
, and you use semantic version filters on the base image or components in your image recipe, EC2 Image Builder will build a new image only when there are new versions of the image or components in your recipe that match the semantic version filter. When it is set to EXPRESSION_MATCH_ONLY
, it will build a new image every time the CRON expression matches the current time. For semantic version syntax, see CreateComponent in the EC2 Image Builder API Reference .
The status of the image pipeline.
The date on which this image pipeline was created.
The date on which this image pipeline was last updated.
This is no longer supported, and does not return a value.
This is no longer supported, and does not return a value.
The tags of this image pipeline.
Exceptions
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
get_image_policy
(**kwargs)¶Gets an image policy.
See also: AWS API Documentation
Request Syntax
response = client.get_image_policy(
imageArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the image whose policy you want to retrieve.
{
'requestId': 'string',
'policy': 'string'
}
Response Structure
The request ID that uniquely identifies this request.
The image policy object.
Exceptions
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.ResourceNotFoundException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
get_image_recipe
(**kwargs)¶Gets an image recipe.
See also: AWS API Documentation
Request Syntax
response = client.get_image_recipe(
imageRecipeArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the image recipe that you want to retrieve.
{
'requestId': 'string',
'imageRecipe': {
'arn': 'string',
'type': 'AMI'|'DOCKER',
'name': 'string',
'description': 'string',
'platform': 'Windows'|'Linux',
'owner': 'string',
'version': 'string',
'components': [
{
'componentArn': 'string',
'parameters': [
{
'name': 'string',
'value': [
'string',
]
},
]
},
],
'parentImage': 'string',
'blockDeviceMappings': [
{
'deviceName': 'string',
'ebs': {
'encrypted': True|False,
'deleteOnTermination': True|False,
'iops': 123,
'kmsKeyId': 'string',
'snapshotId': 'string',
'volumeSize': 123,
'volumeType': 'standard'|'io1'|'io2'|'gp2'|'gp3'|'sc1'|'st1',
'throughput': 123
},
'virtualName': 'string',
'noDevice': 'string'
},
],
'dateCreated': 'string',
'tags': {
'string': 'string'
},
'workingDirectory': 'string',
'additionalInstanceConfiguration': {
'systemsManagerAgent': {
'uninstallAfterBuild': True|False
},
'userDataOverride': 'string'
}
}
}
Response Structure
The request ID that uniquely identifies this request.
The image recipe object.
The Amazon Resource Name (ARN) of the image recipe.
Specifies which type of image is created by the recipe - an AMI or a container image.
The name of the image recipe.
The description of the image recipe.
The platform of the image recipe.
The owner of the image recipe.
The version of the image recipe.
The components that are included in the image recipe. Recipes require a minimum of one build component, and can have a maximum of 20 build and test components in any combination.
Configuration details of the component.
The Amazon Resource Name (ARN) of the component.
A group of parameter settings that Image Builder uses to configure the component for a specific recipe.
Contains a key/value pair that sets the named component parameter.
The name of the component parameter to set.
Sets the value for the named component parameter.
The base image of the image recipe.
The block device mappings to apply when creating images from this recipe.
Defines block device mappings for the instance used to configure your image.
The device to which these mappings apply.
Use to manage Amazon EBS-specific configuration for this mapping.
Use to configure device encryption.
Use to configure delete on termination of the associated device.
Use to configure device IOPS.
Use to configure the KMS key to use when encrypting the device.
The snapshot that defines the device contents.
Use to override the device's volume size.
Use to override the device's volume type.
For GP3 volumes only – The throughput in MiB/s that the volume supports.
Use to manage instance ephemeral devices.
Use to remove a mapping from the base image.
The date on which this image recipe was created.
The tags of the image recipe.
The working directory to be used during build and test workflows.
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.
Contains settings for the Systems Manager agent on your build instance.
Controls whether the Systems Manager agent is removed from your final build image, prior to creating the new AMI. If this is set to true, then the agent is removed from the final image. If it's set to false, then the agent is left in, so that it is included in the new AMI. The default value is false.
Use this property to provide commands or a command script to run when you launch your build instance.
The userDataOverride property replaces any commands that Image Builder might have added to ensure that Systems Manager is installed on your Linux build instance. If you override the user data, make sure that you add commands to install Systems Manager, if it is not pre-installed on your base image.
Note
The user data is always base 64 encoded. For example, the following commands are encoded as IyEvYmluL2Jhc2gKbWtkaXIgLXAgL3Zhci9iYi8KdG91Y2ggL3Zhci$
:
#!/bin/bash
mkdir -p /var/bb/
touch /var
Exceptions
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
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'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the image recipe whose policy you want to retrieve.
{
'requestId': 'string',
'policy': 'string'
}
Response Structure
The request ID that uniquely identifies this request.
The image recipe policy object.
Exceptions
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.ResourceNotFoundException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
get_infrastructure_configuration
(**kwargs)¶Gets an infrastructure configuration.
See also: AWS API Documentation
Request Syntax
response = client.get_infrastructure_configuration(
infrastructureConfigurationArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the infrastructure configuration that you want to retrieve.
{
'requestId': 'string',
'infrastructureConfiguration': {
'arn': 'string',
'name': 'string',
'description': 'string',
'instanceTypes': [
'string',
],
'instanceProfileName': 'string',
'securityGroupIds': [
'string',
],
'subnetId': 'string',
'logging': {
's3Logs': {
's3BucketName': 'string',
's3KeyPrefix': 'string'
}
},
'keyPair': 'string',
'terminateInstanceOnFailure': True|False,
'snsTopicArn': 'string',
'dateCreated': 'string',
'dateUpdated': 'string',
'resourceTags': {
'string': 'string'
},
'instanceMetadataOptions': {
'httpTokens': 'string',
'httpPutResponseHopLimit': 123
},
'tags': {
'string': 'string'
}
}
}
Response Structure
GetInfrastructureConfiguration response object.
The request ID that uniquely identifies this request.
The infrastructure configuration object.
The Amazon Resource Name (ARN) of the infrastructure configuration.
The name of the infrastructure configuration.
The description of the infrastructure configuration.
The instance types of the infrastructure configuration.
The instance profile of the infrastructure configuration.
The security group IDs of the infrastructure configuration.
The subnet ID of the infrastructure configuration.
The logging configuration of the infrastructure configuration.
The Amazon S3 logging configuration.
The S3 bucket in which to store the logs.
The Amazon S3 path to the bucket where the logs are stored.
The Amazon EC2 key pair of the infrastructure configuration.
The terminate instance on failure configuration of the infrastructure configuration.
The Amazon Resource Name (ARN) for the SNS topic to which we send image build event notifications.
Note
EC2 Image Builder is unable to send notifications to SNS topics that are encrypted using keys from other accounts. The key that is used to encrypt the SNS topic must reside in the account that the Image Builder service runs under.
The date on which the infrastructure configuration was created.
The date on which the infrastructure configuration was last updated.
The tags attached to the resource created by Image Builder.
The instance metadata option settings for the infrastructure configuration.
Indicates whether a signed token header is required for instance metadata retrieval requests. The values affect the response as follows:
The default setting is optional .
Limit the number of hops that an instance metadata request can traverse to reach its destination. The default is one hop. However, if HTTP tokens are required, container image builds need a minimum of two hops.
The tags of the infrastructure configuration.
Exceptions
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
get_paginator
(operation_name)¶Create a paginator for an operation.
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")
.client.can_paginate
method to
check if an operation is pageable.get_waiter
(waiter_name)¶Returns an object that can wait for some condition.
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'
)
[REQUIRED]
The name of the component.
[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: With semantic versioning, you have the flexibility to use wildcards (x) to specify the most recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards.
[REQUIRED]
The type of the component denotes whether the component is used to build the image, or only to test it.
[REQUIRED]
The format of the resource that you want to import as a component.
[REQUIRED]
The platform of the component.
data
or uri
can be used to specify the data within the component.data
or uri
can be used to specify the data within the component.The tags of the component.
[REQUIRED]
The idempotency token of the component.
This field is autopopulated if not provided.
dict
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
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.IdempotentParameterMismatchException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
imagebuilder.Client.exceptions.InvalidVersionNumberException
imagebuilder.Client.exceptions.ResourceInUseException
imagebuilder.Client.exceptions.InvalidParameterCombinationException
import_vm_image
(**kwargs)¶When you export your virtual machine (VM) from its virtualization environment, that process creates a set of one or more disk container files that act as snapshots of your VM’s environment, settings, and data. The Amazon EC2 API ImportImage action uses those files to import your VM and create an AMI. To import using the CLI command, see import-image
You can reference the task ID from the VM import to pull in the AMI that the import created as the base image for your Image Builder recipe.
See also: AWS API Documentation
Request Syntax
response = client.import_vm_image(
name='string',
semanticVersion='string',
description='string',
platform='Windows'|'Linux',
osVersion='string',
vmImportTaskId='string',
tags={
'string': 'string'
},
clientToken='string'
)
[REQUIRED]
The name of the base image that is created by the import process.
[REQUIRED]
The semantic version to attach to the base image that was created during the import process. This version follows the semantic version syntax.
Note
The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign values for the first three, and can filter on all of them.
Assignment: For the first three nodes you can assign any positive integer value, including zero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the build number to the fourth node.Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as 2021.01.01.
[REQUIRED]
The operating system platform for the imported VM.
[REQUIRED]
The importTaskId
(API) or ImportTaskId
(CLI) from the Amazon EC2 VM import process. Image Builder retrieves information from the import process to pull in the AMI that is created from the VM source as the base image for your recipe.
Tags that are attached to the import resources.
[REQUIRED]
Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see Ensuring idempotency in the Amazon EC2 API Reference .
This field is autopopulated if not provided.
dict
Response Syntax
{
'requestId': 'string',
'imageArn': 'string',
'clientToken': 'string'
}
Response Structure
(dict) --
requestId (string) --
The request ID that uniquely identifies this request.
imageArn (string) --
The Amazon Resource Name (ARN) of the AMI that was created during the VM import process. This AMI is used as the base image for the recipe that imported the VM.
clientToken (string) --
The idempotency token that was used for this request.
Exceptions
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
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: With semantic versioning, you have the flexibility to use wildcards (x) to specify the most recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards.
See also: AWS API Documentation
Request Syntax
response = client.list_component_build_versions(
componentVersionArn='string',
maxResults=123,
nextToken='string'
)
[REQUIRED]
The component version Amazon Resource Name (ARN) whose versions you want to list.
dict
Response Syntax
{
'requestId': 'string',
'componentSummaryList': [
{
'arn': 'string',
'name': 'string',
'version': 'string',
'platform': 'Windows'|'Linux',
'supportedOsVersions': [
'string',
],
'state': {
'status': 'DEPRECATED',
'reason': 'string'
},
'type': 'BUILD'|'TEST',
'owner': 'string',
'description': 'string',
'changeDescription': 'string',
'dateCreated': 'string',
'tags': {
'string': 'string'
},
'publisher': 'string',
'obfuscate': True|False
},
],
'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 operating system platform of the component.
supportedOsVersions (list) --
The operating system (OS) version that the component supports. If the OS information is available, Image Builder performs a prefix match against the base image OS version during image recipe creation.
state (dict) --
Describes the current status of the component.
status (string) --
The current state of the component.
reason (string) --
Describes how or why the component changed state.
type (string) --
The component type specifies whether Image Builder uses the component 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 for the current version of the component.
dateCreated (string) --
The original creation date of the component.
tags (dict) --
The tags that apply to the component.
publisher (string) --
Contains the name of the publisher if this is a third-party component. Otherwise, this property is empty.
obfuscate (boolean) --
Indicates whether component source is hidden from view in the console, and from component detail results for API, CLI, or SDK operations.
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
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.InvalidPaginationTokenException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
list_components
(**kwargs)¶Returns the list of components that can be filtered by name, or by using the listed filters
to streamline results. Newly created components can take up to two minutes to appear in the ListComponents API Results.
Note
The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign values for the first three, and can filter on all of them.
Filtering: With semantic versioning, you have the flexibility to use wildcards (x) to specify the most recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards.
See also: AWS API Documentation
Request Syntax
response = client.list_components(
owner='Self'|'Shared'|'Amazon'|'ThirdParty',
filters=[
{
'name': 'string',
'values': [
'string',
]
},
],
byName=True|False,
maxResults=123,
nextToken='string'
)
Use the following filters to streamline results:
description
name
platform
supportedOsVersion
type
version
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.
The name of the filter. Filter names are case-sensitive.
The filter values. Filter values are case-sensitive.
dict
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 Amazon Web Services 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:
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 to the fourth node.
Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as 2021.01.01.
Filtering: With semantic versioning, you have the flexibility to use wildcards (x) to specify the most recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards.
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 base image OS version during image recipe creation.
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
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.InvalidPaginationTokenException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
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'|'ThirdParty',
filters=[
{
'name': 'string',
'values': [
'string',
]
},
],
maxResults=123,
nextToken='string'
)
Use the following filters to streamline results:
containerType
name
parentImage
platform
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.
The name of the filter. Filter names are case-sensitive.
The filter values. Filter values are case-sensitive.
dict
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 base image for the container recipe.
dateCreated (string) --
The date when this container recipe was created.
tags (dict) --
Tags that are attached to the container recipe.
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
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.InvalidPaginationTokenException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
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'
)
You can filter on name
to streamline results.
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.
The name of the filter. Filter names are case-sensitive.
The filter values. Filter values are case-sensitive.
dict
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.
regions (list) --
A list of Regions where the container image is distributed to.
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
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.InvalidPaginationTokenException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
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'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the image whose build versions you want to retrieve.
Use the following filters to streamline results:
name
osVersion
platform
type
version
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.
The name of the filter. Filter names are case-sensitive.
The filter values. Filter values are case-sensitive.
dict
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'
},
'buildType': 'USER_INITIATED'|'SCHEDULED'|'IMPORT',
'imageSource': 'AMAZON_MANAGED'|'AWS_MARKETPLACE'|'IMPORTED'|'CUSTOM'
},
],
'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 image produces an AMI or a container image.
version (string) --
The version of the image.
platform (string) --
The image operating system platform, such as Linux or Windows.
osVersion (string) --
The operating system version of the instances that launch from this image. For example, Amazon Linux 2, Ubuntu 18, or Microsoft Windows Server 2019.
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 Image Builder created this image.
outputResources (dict) --
The output resources that Image Builder produced when it created this image.
amis (list) --
The Amazon EC2 AMIs created by this image.
(dict) --
Details of an Amazon EC2 AMI.
region (string) --
The Amazon Web Services Region of the Amazon EC2 AMI.
image (string) --
The AMI ID of the Amazon EC2 AMI.
name (string) --
The name of the Amazon EC2 AMI.
description (string) --
The description of the Amazon EC2 AMI. Minimum and maximum length are in characters.
state (dict) --
Image state shows the image status and the reason for that status.
status (string) --
The status of the image.
reason (string) --
The reason for the image's status.
accountId (string) --
The account ID of the owner of the AMI.
containers (list) --
Container images that the pipeline has generated and stored in the output repository.
(dict) --
A container encapsulates the runtime environment for an application.
region (string) --
Containers and container images are Region-specific. This is the Region context for the container.
imageUris (list) --
A list of URIs for containers created in the context Region.
tags (dict) --
The tags that apply to this image.
buildType (string) --
Indicates the type of build that created this image. The build can be initiated in the following ways:
imageSource (string) --
The origin of the base image that Image Builder used to build this image.
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
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.InvalidPaginationTokenException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
list_image_packages
(**kwargs)¶List the Packages that are associated with an Image Build Version, as determined by Amazon Web Services Systems Manager Inventory at build time.
See also: AWS API Documentation
Request Syntax
response = client.list_image_packages(
imageBuildVersionArn='string',
maxResults=123,
nextToken='string'
)
[REQUIRED]
Filter results for the ListImagePackages request by the Image Build Version ARN
dict
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
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.InvalidPaginationTokenException
imagebuilder.Client.exceptions.ResourceNotFoundException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
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'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the image pipeline whose images you want to view.
Use the following filters to streamline results:
name
version
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.
The name of the filter. Filter names are case-sensitive.
The filter values. Filter values are case-sensitive.
dict
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'
},
'buildType': 'USER_INITIATED'|'SCHEDULED'|'IMPORT',
'imageSource': 'AMAZON_MANAGED'|'AWS_MARKETPLACE'|'IMPORTED'|'CUSTOM'
},
],
'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 image produces an AMI or a container image.
version (string) --
The version of the image.
platform (string) --
The image operating system platform, such as Linux or Windows.
osVersion (string) --
The operating system version of the instances that launch from this image. For example, Amazon Linux 2, Ubuntu 18, or Microsoft Windows Server 2019.
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 Image Builder created this image.
outputResources (dict) --
The output resources that Image Builder produced when it created this image.
amis (list) --
The Amazon EC2 AMIs created by this image.
(dict) --
Details of an Amazon EC2 AMI.
region (string) --
The Amazon Web Services Region of the Amazon EC2 AMI.
image (string) --
The AMI ID of the Amazon EC2 AMI.
name (string) --
The name of the Amazon EC2 AMI.
description (string) --
The description of the Amazon EC2 AMI. Minimum and maximum length are in characters.
state (dict) --
Image state shows the image status and the reason for that status.
status (string) --
The status of the image.
reason (string) --
The reason for the image's status.
accountId (string) --
The account ID of the owner of the AMI.
containers (list) --
Container images that the pipeline has generated and stored in the output repository.
(dict) --
A container encapsulates the runtime environment for an application.
region (string) --
Containers and container images are Region-specific. This is the Region context for the container.
imageUris (list) --
A list of URIs for containers created in the context Region.
tags (dict) --
The tags that apply to this image.
buildType (string) --
Indicates the type of build that created this image. The build can be initiated in the following ways:
imageSource (string) --
The origin of the base image that Image Builder used to build this image.
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
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.InvalidPaginationTokenException
imagebuilder.Client.exceptions.ResourceNotFoundException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
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'
)
Use the following filters to streamline results:
description
distributionConfigurationArn
imageRecipeArn
infrastructureConfigurationArn
name
status
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.
The name of the filter. Filter names are case-sensitive.
The filter values. Filter values are case-sensitive.
dict
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) --
Determines if tests should run after building the image. Image Builder defaults to enable tests to run following the image build, before image distribution.
timeoutMinutes (integer) --
The maximum time in minutes that tests are permitted to run.
Note
The timeoutMinutes attribute is not currently active. This value is ignored.
schedule (dict) --
The schedule of the image pipeline.
scheduleExpression (string) --
The cron expression determines how often EC2 Image Builder evaluates your pipelineExecutionStartCondition
.
For information on how to format a cron expression in Image Builder, see Use cron expressions in EC2 Image Builder.
timezone (string) --
The timezone that applies to the scheduling expression. For example, "Etc/UTC", "America/Los_Angeles" in the IANA timezone format. If not specified this defaults to UTC.
pipelineExecutionStartCondition (string) --
The condition configures when the pipeline should trigger a new image build. When the pipelineExecutionStartCondition
is set to EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE
, and you use semantic version filters on the base image or components in your image recipe, EC2 Image Builder will build a new image only when there are new versions of the image or components in your recipe that match the semantic version filter. When it is set to EXPRESSION_MATCH_ONLY
, it will build a new image every time the CRON expression matches the current time. For semantic version syntax, see CreateComponent in the EC2 Image Builder API Reference .
status (string) --
The status of the image pipeline.
dateCreated (string) --
The date on which this image pipeline was created.
dateUpdated (string) --
The date on which this image pipeline was last updated.
dateLastRun (string) --
This is no longer supported, and does not return a value.
dateNextRun (string) --
This is no longer supported, and does not return a value.
tags (dict) --
The tags of this image pipeline.
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
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.InvalidPaginationTokenException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
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'|'ThirdParty',
filters=[
{
'name': 'string',
'values': [
'string',
]
},
],
maxResults=123,
nextToken='string'
)
Use the following filters to streamline results:
name
parentImage
platform
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.
The name of the filter. Filter names are case-sensitive.
The filter values. Filter values are case-sensitive.
dict
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 base image of the image recipe.
dateCreated (string) --
The date on which this image recipe was created.
tags (dict) --
The tags of the image recipe.
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
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.InvalidPaginationTokenException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
list_images
(**kwargs)¶Returns the list of images that you have access to. Newly created images can take up to two minutes to appear in the ListImages API Results.
See also: AWS API Documentation
Request Syntax
response = client.list_images(
owner='Self'|'Shared'|'Amazon'|'ThirdParty',
filters=[
{
'name': 'string',
'values': [
'string',
]
},
],
byName=True|False,
maxResults=123,
nextToken='string',
includeDeprecated=True|False
)
Use the following filters to streamline results:
name
osVersion
platform
type
version
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.
The name of the filter. Filter names are case-sensitive.
The filter values. Filter values are case-sensitive.
dict
Response Syntax
{
'requestId': 'string',
'imageVersionList': [
{
'arn': 'string',
'name': 'string',
'type': 'AMI'|'DOCKER',
'version': 'string',
'platform': 'Windows'|'Linux',
'osVersion': 'string',
'owner': 'string',
'dateCreated': 'string',
'buildType': 'USER_INITIATED'|'SCHEDULED'|'IMPORT',
'imageSource': 'AMAZON_MANAGED'|'AWS_MARKETPLACE'|'IMPORTED'|'CUSTOM'
},
],
'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: With semantic versioning, you have the flexibility to use wildcards (x) to specify the most recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards.
(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:
name (string) --
The name of this specific version of an Image Builder image.
type (string) --
Specifies whether this image produces 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 to the fourth node.
Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as 2021.01.01.
Filtering: With semantic versioning, you have the flexibility to use wildcards (x) to specify the most recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards.
platform (string) --
The operating system 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.
buildType (string) --
Indicates the type of build that created this image. The build can be initiated in the following ways:
imageSource (string) --
The origin of the base image that Image Builder used to build this image.
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
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.InvalidPaginationTokenException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
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'
)
You can filter on name
to streamline results.
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.
The name of the filter. Filter names are case-sensitive.
The filter values. Filter values are case-sensitive.
dict
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.
tags (dict) --
The tags of the infrastructure configuration.
instanceTypes (list) --
The instance types of the infrastructure configuration.
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
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.InvalidPaginationTokenException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
Returns the list of tags for the specified resource.
See also: AWS API Documentation
Request Syntax
response = client.list_tags_for_resource(
resourceArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource whose tags you want to retrieve.
{
'tags': {
'string': 'string'
}
}
Response Structure
The tags for the specified resource.
Exceptions
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.InvalidParameterException
imagebuilder.Client.exceptions.ResourceNotFoundException
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'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the component that this policy should be applied to.
[REQUIRED]
The policy to apply.
dict
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
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.InvalidParameterValueException
imagebuilder.Client.exceptions.ResourceNotFoundException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
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'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the container recipe that this policy should be applied to.
[REQUIRED]
The policy to apply to the container recipe.
dict
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
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.InvalidParameterValueException
imagebuilder.Client.exceptions.ResourceNotFoundException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
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'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the image that this policy should be applied to.
[REQUIRED]
The policy to apply.
dict
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
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.InvalidParameterValueException
imagebuilder.Client.exceptions.ResourceNotFoundException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
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'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the image recipe that this policy should be applied to.
[REQUIRED]
The policy to apply.
dict
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
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.InvalidParameterValueException
imagebuilder.Client.exceptions.ResourceNotFoundException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
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'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the image pipeline that you want to manually invoke.
[REQUIRED]
The idempotency token used to make this request idempotent.
This field is autopopulated if not provided.
dict
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
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.ResourceNotFoundException
imagebuilder.Client.exceptions.IdempotentParameterMismatchException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
imagebuilder.Client.exceptions.ResourceInUseException
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'
}
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource that you want to tag.
[REQUIRED]
The tags to apply to the resource.
dict
Response Syntax
{}
Response Structure
Exceptions
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.InvalidParameterException
imagebuilder.Client.exceptions.ResourceNotFoundException
untag_resource
(**kwargs)¶Removes a tag from a resource.
See also: AWS API Documentation
Request Syntax
response = client.untag_resource(
resourceArn='string',
tagKeys=[
'string',
]
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource that you want to untag.
[REQUIRED]
The tag keys to remove from the resource.
dict
Response Syntax
{}
Response Structure
Exceptions
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.InvalidParameterException
imagebuilder.Client.exceptions.ResourceNotFoundException
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',
],
'organizationArns': [
'string',
],
'organizationalUnitArns': [
'string',
]
}
},
'containerDistributionConfiguration': {
'description': 'string',
'containerTags': [
'string',
],
'targetRepository': {
'service': 'ECR',
'repositoryName': 'string'
}
},
'licenseConfigurationArns': [
'string',
],
'launchTemplateConfigurations': [
{
'launchTemplateId': 'string',
'accountId': 'string',
'setDefaultVersion': True|False
},
],
's3ExportConfiguration': {
'roleName': 'string',
'diskImageFormat': 'VMDK'|'RAW'|'VHD',
's3Bucket': 'string',
's3Prefix': 'string'
},
'fastLaunchConfigurations': [
{
'enabled': True|False,
'snapshotConfiguration': {
'targetResourceCount': 123
},
'maxParallelLaunches': 123,
'launchTemplate': {
'launchTemplateId': 'string',
'launchTemplateName': 'string',
'launchTemplateVersion': 'string'
},
'accountId': 'string'
},
]
},
],
clientToken='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the distribution configuration that you want to update.
[REQUIRED]
The distributions of the distribution configuration.
Defines the settings for a specific Region.
The target Region.
The specific AMI settings; for example, launch permissions or AMI tags.
The name of the output AMI.
The description of the AMI distribution configuration. Minimum and maximum length are in characters.
The ID of an account to which you want to distribute an image.
The tags to apply to AMIs distributed to this Region.
The KMS key identifier used to encrypt the distributed image.
Launch permissions can be used to configure which Amazon Web Services accounts can use the AMI to launch instances.
The Amazon Web Services account ID.
The name of the group.
The ARN for an Amazon Web Services Organization that you want to share your AMI with. For more information, see What is Organizations?.
The ARN for an Organizations organizational unit (OU) that you want to share your AMI with. For more information about key concepts for Organizations, see Organizations terminology and concepts.
Container distribution settings for encryption, licensing, and sharing in a specific Region.
The description of the container distribution configuration.
Tags that are attached to the container distribution configuration.
The destination repository for the container distribution configuration.
Specifies the service in which this image was registered.
The name of the container repository where the output container image is stored. This name is prefixed by the repository location.
The License Manager Configuration to associate with the AMI in the specified Region.
A group of launchTemplateConfiguration settings that apply to image distribution for specified accounts.
Identifies an Amazon EC2 launch template to use for a specific account.
Identifies the Amazon EC2 launch template to use.
The account ID that this configuration applies to.
Set the specified Amazon EC2 launch template as the default launch template for the specified account.
Configure export settings to deliver disk images created from your image build, using a file format that is compatible with your VMs in that Region.
The name of the role that grants VM Import/Export permission to export images to your S3 bucket.
Export the updated image to one of the following supported disk image formats:
The S3 bucket in which to store the output disk images for your VM.
The Amazon S3 path for the bucket where the output disk images for your VM are stored.
The Windows faster-launching configurations to use for AMI distribution.
Define and configure faster launching for output Windows AMIs.
A Boolean that represents the current state of faster launching for the Windows AMI. Set to true
to start using Windows faster launching, or false
to stop using it.
Configuration settings for managing the number of snapshots that are created from pre-provisioned instances for the Windows AMI when faster launching is enabled.
The number of pre-provisioned snapshots to keep on hand for a fast-launch enabled Windows AMI.
The maximum number of parallel instances that are launched for creating resources.
The launch template that the fast-launch enabled Windows AMI uses when it launches Windows instances to create pre-provisioned snapshots.
The ID of the launch template to use for faster launching for a Windows AMI.
The name of the launch template to use for faster launching for a Windows AMI.
The version of the launch template to use for faster launching for a Windows AMI.
The owner account ID for the fast-launch enabled Windows AMI.
[REQUIRED]
The idempotency token of the distribution configuration.
This field is autopopulated if not provided.
dict
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
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.IdempotentParameterMismatchException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
imagebuilder.Client.exceptions.ResourceInUseException
imagebuilder.Client.exceptions.InvalidParameterCombinationException
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'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the image pipeline that you want to update.
[REQUIRED]
The Amazon Resource Name (ARN) of the infrastructure configuration that will be used to build images updated by this image pipeline.
The image test configuration of the image pipeline.
Determines if tests should run after building the image. Image Builder defaults to enable tests to run following the image build, before image distribution.
The maximum time in minutes that tests are permitted to run.
Note
The timeoutMinutes attribute is not currently active. This value is ignored.
The schedule of the image pipeline.
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.
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.
The condition configures when the pipeline should trigger a new image build. When the pipelineExecutionStartCondition
is set to EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE
, and you use semantic version filters on the base image or components in your image recipe, EC2 Image Builder will build a new image only when there are new versions of the image or components in your recipe that match the semantic version filter. When it is set to EXPRESSION_MATCH_ONLY
, it will build a new image every time the CRON expression matches the current time. For semantic version syntax, see CreateComponent in the EC2 Image Builder API Reference .
[REQUIRED]
The idempotency token used to make this request idempotent.
This field is autopopulated if not provided.
dict
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
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.IdempotentParameterMismatchException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
imagebuilder.Client.exceptions.ResourceInUseException
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'
},
instanceMetadataOptions={
'httpTokens': 'string',
'httpPutResponseHopLimit': 123
}
)
[REQUIRED]
The Amazon Resource Name (ARN) of the infrastructure configuration that you want to update.
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.
[REQUIRED]
The instance profile to associate with the instance used to customize your Amazon EC2 AMI.
The security group IDs to associate with the instance used to customize your Amazon EC2 AMI.
The logging configuration of the infrastructure configuration.
The Amazon S3 logging configuration.
The S3 bucket in which to store the logs.
The Amazon S3 path to the bucket where the logs are stored.
The Amazon Resource Name (ARN) for the SNS topic to which we send image build event notifications.
Note
EC2 Image Builder is unable to send notifications to SNS topics that are encrypted using keys from other accounts. The key that is used to encrypt the SNS topic must reside in the account that the Image Builder service runs under.
[REQUIRED]
The idempotency token used to make this request idempotent.
This field is autopopulated if not provided.
The tags attached to the resource created by Image Builder.
The instance metadata options that you can set for the HTTP requests that pipeline builds use to launch EC2 build and test instances. For more information about instance metadata options, see one of the following links:
Indicates whether a signed token header is required for instance metadata retrieval requests. The values affect the response as follows:
The default setting is optional .
Limit the number of hops that an instance metadata request can traverse to reach its destination. The default is one hop. However, if HTTP tokens are required, container image builds need a minimum of two hops.
dict
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
imagebuilder.Client.exceptions.ServiceException
imagebuilder.Client.exceptions.ClientException
imagebuilder.Client.exceptions.ServiceUnavailableException
imagebuilder.Client.exceptions.InvalidRequestException
imagebuilder.Client.exceptions.IdempotentParameterMismatchException
imagebuilder.Client.exceptions.ForbiddenException
imagebuilder.Client.exceptions.CallRateLimitExceededException
imagebuilder.Client.exceptions.ResourceInUseException
The available paginators are: