2023/11/16 - EC2 Image Builder - 10 new 3 updated api methods
Changes This release adds the Image Lifecycle Management feature to automate the process of deprecating, disabling and deleting outdated images and their associated resources.
Get the lifecycle runtime history for the specified resource.
See also: AWS API Documentation
Request Syntax
client.list_lifecycle_executions( maxResults=123, nextToken='string', resourceArn='string' )
integer
The maximum items to return in a request.
string
A token to specify where to start paginating. This is the nextToken from a previously truncated response.
string
[REQUIRED]
The Amazon Resource Name (ARN) of the resource for which to get a list of lifecycle runtime instances.
dict
Response Syntax
{ 'lifecycleExecutions': [ { 'lifecycleExecutionId': 'string', 'lifecyclePolicyArn': 'string', 'resourcesImpactedSummary': { 'hasImpactedResources': True|False }, 'state': { 'status': 'IN_PROGRESS'|'CANCELLED'|'CANCELLING'|'FAILED'|'SUCCESS', 'reason': 'string' }, 'startTime': datetime(2015, 1, 1), 'endTime': datetime(2015, 1, 1) }, ], 'nextToken': 'string' }
Response Structure
(dict) --
lifecycleExecutions (list) --
A list of lifecycle runtime instances for the specified resource.
(dict) --
Contains metadata from a runtime instance of a lifecycle policy.
lifecycleExecutionId (string) --
Identifies the lifecycle policy runtime instance.
lifecyclePolicyArn (string) --
The Amazon Resource Name (ARN) of the lifecycle policy that ran.
resourcesImpactedSummary (dict) --
Contains information about associated resources that are identified for action by the runtime instance of the lifecycle policy.
hasImpactedResources (boolean) --
Indicates whether an image resource that was identified for a lifecycle action has associated resources that are also impacted.
state (dict) --
Runtime state that reports if the policy action ran successfully, failed, or was skipped.
status (string) --
The runtime status of the lifecycle execution.
reason (string) --
The reason for the current status.
startTime (datetime) --
The timestamp when the lifecycle runtime instance started.
endTime (datetime) --
The timestamp when the lifecycle runtime instance completed.
nextToken (string) --
The next token used for paginated responses. When this field isn't empty, there are additional elements that the service hasn't included in this request. Use this token with the next request to retrieve additional objects.
Begin asynchronous resource state update for lifecycle changes to the specified image resources.
See also: AWS API Documentation
Request Syntax
client.start_resource_state_update( resourceArn='string', state={ 'status': 'AVAILABLE'|'DELETED'|'DEPRECATED'|'DISABLED' }, executionRole='string', includeResources={ 'amis': True|False, 'snapshots': True|False, 'containers': True|False }, exclusionRules={ 'amis': { 'isPublic': True|False, 'regions': [ 'string', ], 'sharedAccounts': [ 'string', ], 'lastLaunched': { 'value': 123, 'unit': 'DAYS'|'WEEKS'|'MONTHS'|'YEARS' }, 'tagMap': { 'string': 'string' } } }, updateAt=datetime(2015, 1, 1), clientToken='string' )
string
[REQUIRED]
The ARN of the Image Builder resource that is updated. The state update might also impact associated resources.
dict
[REQUIRED]
Indicates the lifecycle action to take for this request.
status (string) --
Shows the current lifecycle policy action that was applied to an impacted resource.
string
The name or Amazon Resource Name (ARN) of the IAM role that’s used to update image state.
dict
A list of image resources to update state for.
amis (boolean) --
Specifies whether the lifecycle action should apply to distributed AMIs
snapshots (boolean) --
Specifies whether the lifecycle action should apply to snapshots associated with distributed AMIs.
containers (boolean) --
Specifies whether the lifecycle action should apply to distributed containers.
dict
Skip action on the image resource and associated resources if specified exclusion rules are met.
amis (dict) --
Defines criteria for AMIs that are excluded from lifecycle actions.
isPublic (boolean) --
Configures whether public AMIs are excluded from the lifecycle action.
regions (list) --
Specifies Amazon Web Services accounts whose resources are excluded from the lifecycle action.
(string) --
sharedAccounts (list) --
Specifies configuration details for Image Builder to exclude the most recent resources from lifecycle actions.
(string) --
lastLaunched (dict) --
Configures Amazon Web Services Regions that are excluded from the lifecycle action.
value (integer) -- [REQUIRED]
The integer number of units for the time period. For example 6 (months).
unit (string) -- [REQUIRED]
Defines the unit of time that the lifecycle policy uses to calculate elapsed time since the last instance launched from the AMI. For example: days, weeks, months, or years.
tagMap (dict) --
Lists tags that should be excluded from lifecycle actions for the AMIs that have them.
(string) --
(string) --
datetime
The timestamp that indicates when resources are updated by a lifecycle action.
string
[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
{ 'lifecycleExecutionId': 'string', 'resourceArn': 'string' }
Response Structure
(dict) --
lifecycleExecutionId (string) --
Identifies the lifecycle runtime instance that started the resource state update.
resourceArn (string) --
The requested ARN of the Image Builder resource for the asynchronous update.
Get a list of lifecycle policies in your Amazon Web Services account.
See also: AWS API Documentation
Request Syntax
client.list_lifecycle_policies( filters=[ { 'name': 'string', 'values': [ 'string', ] }, ], maxResults=123, nextToken='string' )
list
Streamline results based on one of the following values: Name , Status .
(dict) --
A filter name and value pair that is used to return a more specific list of results from a list operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.
name (string) --
The name of the filter. Filter names are case-sensitive.
values (list) --
The filter values. Filter values are case-sensitive.
(string) --
integer
The maximum items to return in a request.
string
A token to specify where to start paginating. This is the nextToken from a previously truncated response.
dict
Response Syntax
{ 'lifecyclePolicySummaryList': [ { 'arn': 'string', 'name': 'string', 'description': 'string', 'status': 'DISABLED'|'ENABLED', 'executionRole': 'string', 'resourceType': 'AMI_IMAGE'|'CONTAINER_IMAGE', 'dateCreated': datetime(2015, 1, 1), 'dateUpdated': datetime(2015, 1, 1), 'dateLastRun': datetime(2015, 1, 1), 'tags': { 'string': 'string' } }, ], 'nextToken': 'string' }
Response Structure
(dict) --
lifecyclePolicySummaryList (list) --
A list of lifecycle policies in your Amazon Web Services account that meet the criteria specified in the request.
(dict) --
Contains a summary of lifecycle policy resources.
arn (string) --
The Amazon Resource Name (ARN) of the lifecycle policy summary resource.
name (string) --
The name of the lifecycle policy.
description (string) --
Optional description for the lifecycle policy.
status (string) --
The lifecycle policy resource status.
executionRole (string) --
The name of the IAM role that Image Builder uses to run the lifecycle policy.
resourceType (string) --
The type of resources the lifecycle policy targets.
dateCreated (datetime) --
The timestamp when Image Builder created the lifecycle policy resource.
dateUpdated (datetime) --
The timestamp when Image Builder updated the lifecycle policy resource.
dateLastRun (datetime) --
The timestamp for the last time Image Builder ran the lifecycle policy.
tags (dict) --
To help manage your lifecycle policy resources, you can assign your own metadata to each resource in the form of tags. Each tag consists of a key and an optional value, both of which you define.
(string) --
(string) --
nextToken (string) --
The next token used for paginated responses. When this field isn't empty, there are additional elements that the service hasn't included in this request. Use this token with the next request to retrieve additional objects.
List resources that the runtime instance of the image lifecycle identified for lifecycle actions.
See also: AWS API Documentation
Request Syntax
client.list_lifecycle_execution_resources( lifecycleExecutionId='string', parentResourceId='string', maxResults=123, nextToken='string' )
string
[REQUIRED]
Use the unique identifier for a runtime instance of the lifecycle policy to get runtime details.
string
You can leave this empty to get a list of Image Builder resources that were identified for lifecycle actions.
To get a list of associated resources that are impacted for an individual resource (the parent), specify its Amazon Resource Name (ARN). Associated resources are produced from your image and distributed when you run a build, such as AMIs or container images stored in ECR repositories.
integer
The maximum items to return in a request.
string
A token to specify where to start paginating. This is the nextToken from a previously truncated response.
dict
Response Syntax
{ 'lifecycleExecutionId': 'string', 'lifecycleExecutionState': { 'status': 'IN_PROGRESS'|'CANCELLED'|'CANCELLING'|'FAILED'|'SUCCESS', 'reason': 'string' }, 'resources': [ { 'accountId': 'string', 'resourceId': 'string', 'state': { 'status': 'FAILED'|'IN_PROGRESS'|'SKIPPED'|'SUCCESS', 'reason': 'string' }, 'action': { 'name': 'AVAILABLE'|'DELETE'|'DEPRECATE'|'DISABLE', 'reason': 'string' }, 'region': 'string', 'snapshots': [ { 'snapshotId': 'string', 'state': { 'status': 'FAILED'|'IN_PROGRESS'|'SKIPPED'|'SUCCESS', 'reason': 'string' } }, ], 'imageUris': [ 'string', ] }, ], 'nextToken': 'string' }
Response Structure
(dict) --
lifecycleExecutionId (string) --
Runtime details for the specified runtime instance of the lifecycle policy.
lifecycleExecutionState (dict) --
The current state of the lifecycle runtime instance.
status (string) --
The runtime status of the lifecycle execution.
reason (string) --
The reason for the current status.
resources (list) --
A list of resources that were identified for lifecycle actions.
(dict) --
Contains details for a resource that the runtime instance of the lifecycle policy identified for action.
accountId (string) --
The account that owns the impacted resource.
resourceId (string) --
Identifies the impacted resource. The resource ID depends on the type of resource, as follows.
Image Builder image resources: Amazon Resource Name (ARN)
Distributed AMIs: AMI ID
Container images distributed to an ECR repository: image URI or SHA Digest
state (dict) --
The runtime state for the lifecycle execution.
status (string) --
The runtime status of the lifecycle action taken for the impacted resource.
reason (string) --
Messaging that clarifies the reason for the assigned status.
action (dict) --
The action to take for the identified resource.
name (string) --
The name of the resource that was identified for a lifecycle policy action.
reason (string) --
The reason why the lifecycle policy action is taken.
region (string) --
The Amazon Web Services Region where the lifecycle execution resource is stored.
snapshots (list) --
A list of associated resource snapshots for the impacted resource if it’s an AMI.
(dict) --
Contains the state of an impacted snapshot resource that the runtime instance of the lifecycle policy identified for action.
snapshotId (string) --
Identifies the impacted snapshot resource.
state (dict) --
The runtime status of the lifecycle action taken for the snapshot.
status (string) --
The runtime status of the lifecycle action taken for the impacted resource.
reason (string) --
Messaging that clarifies the reason for the assigned status.
imageUris (list) --
For an impacted container image, this identifies a list of URIs for associated container images distributed to ECR repositories.
(string) --
nextToken (string) --
The next token used for paginated responses. When this field isn't empty, there are additional elements that the service hasn't included in this request. Use this token with the next request to retrieve additional objects.
Create a lifecycle policy resource.
See also: AWS API Documentation
Request Syntax
client.create_lifecycle_policy( name='string', description='string', status='DISABLED'|'ENABLED', executionRole='string', resourceType='AMI_IMAGE'|'CONTAINER_IMAGE', policyDetails=[ { 'action': { 'type': 'DELETE'|'DEPRECATE'|'DISABLE', 'includeResources': { 'amis': True|False, 'snapshots': True|False, 'containers': True|False } }, 'filter': { 'type': 'AGE'|'COUNT', 'value': 123, 'unit': 'DAYS'|'WEEKS'|'MONTHS'|'YEARS', 'retainAtLeast': 123 }, 'exclusionRules': { 'tagMap': { 'string': 'string' }, 'amis': { 'isPublic': True|False, 'regions': [ 'string', ], 'sharedAccounts': [ 'string', ], 'lastLaunched': { 'value': 123, 'unit': 'DAYS'|'WEEKS'|'MONTHS'|'YEARS' }, 'tagMap': { 'string': 'string' } } } }, ], resourceSelection={ 'recipes': [ { 'name': 'string', 'semanticVersion': 'string' }, ], 'tagMap': { 'string': 'string' } }, tags={ 'string': 'string' }, clientToken='string' )
string
[REQUIRED]
The name of the lifecycle policy to create.
string
Optional description for the lifecycle policy.
string
Indicates whether the lifecycle policy resource is enabled.
string
[REQUIRED]
The role name or Amazon Resource Name (ARN) for the IAM role that grants Image Builder access to run lifecycle actions.
string
[REQUIRED]
The type of Image Builder resource that the lifecycle policy applies to.
list
[REQUIRED]
Configuration details for the lifecycle policy rules.
(dict) --
The configuration details for a lifecycle policy resource.
action (dict) -- [REQUIRED]
Configuration details for the policy action.
type (string) -- [REQUIRED]
Specifies the lifecycle action to take.
includeResources (dict) --
Specifies the resources that the lifecycle policy applies to.
amis (boolean) --
Specifies whether the lifecycle action should apply to distributed AMIs.
snapshots (boolean) --
Specifies whether the lifecycle action should apply to snapshots associated with distributed AMIs.
containers (boolean) --
Specifies whether the lifecycle action should apply to distributed containers.
filter (dict) -- [REQUIRED]
Specifies the resources that the lifecycle policy applies to.
type (string) -- [REQUIRED]
Filter resources based on either age or count .
value (integer) -- [REQUIRED]
The number of units for the time period or for the count. For example, a value of 6 might refer to six months or six AMIs.
Note
For count-based filters, this value represents the minimum number of resources to keep on hand. If you have fewer resources than this number, the resource is excluded from lifecycle actions.
unit (string) --
Defines the unit of time that the lifecycle policy uses to determine impacted resources. This is required for age-based rules.
retainAtLeast (integer) --
For age-based filters, this is the number of resources to keep on hand after the lifecycle DELETE action is applied. Impacted resources are only deleted if you have more than this number of resources. If you have fewer resources than this number, the impacted resource is not deleted.
exclusionRules (dict) --
Additional rules to specify resources that should be exempt from policy actions.
tagMap (dict) --
Contains a list of tags that Image Builder uses to skip lifecycle actions for AMIs that have them.
(string) --
(string) --
amis (dict) --
Lists configuration values that apply to AMIs that Image Builder should exclude from the lifecycle action.
isPublic (boolean) --
Configures whether public AMIs are excluded from the lifecycle action.
regions (list) --
Specifies Amazon Web Services accounts whose resources are excluded from the lifecycle action.
(string) --
sharedAccounts (list) --
Specifies configuration details for Image Builder to exclude the most recent resources from lifecycle actions.
(string) --
lastLaunched (dict) --
Configures Amazon Web Services Regions that are excluded from the lifecycle action.
value (integer) -- [REQUIRED]
The integer number of units for the time period. For example 6 (months).
unit (string) -- [REQUIRED]
Defines the unit of time that the lifecycle policy uses to calculate elapsed time since the last instance launched from the AMI. For example: days, weeks, months, or years.
tagMap (dict) --
Lists tags that should be excluded from lifecycle actions for the AMIs that have them.
(string) --
(string) --
dict
[REQUIRED]
Selection criteria for the resources that the lifecycle policy applies to.
recipes (list) --
A list of recipes that are used as selection criteria for the output images that the lifecycle policy applies to.
(dict) --
Specifies an Image Builder recipe that the lifecycle policy uses for resource selection.
name (string) -- [REQUIRED]
The name of an Image Builder recipe that the lifecycle policy uses for resource selection.
semanticVersion (string) -- [REQUIRED]
The version of the Image Builder recipe specified by the name field.
tagMap (dict) --
A list of tags that are used as selection criteria for the resources that the lifecycle policy applies to.
(string) --
(string) --
dict
Tags to apply to the lifecycle policy resource.
(string) --
(string) --
string
[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
{ 'clientToken': 'string', 'lifecyclePolicyArn': 'string' }
Response Structure
(dict) --
clientToken (string) --
The client token that uniquely identifies the request.
lifecyclePolicyArn (string) --
The Amazon Resource Name (ARN) of the lifecycle policy that the request created.
Update the specified lifecycle policy.
See also: AWS API Documentation
Request Syntax
client.update_lifecycle_policy( lifecyclePolicyArn='string', description='string', status='DISABLED'|'ENABLED', executionRole='string', resourceType='AMI_IMAGE'|'CONTAINER_IMAGE', policyDetails=[ { 'action': { 'type': 'DELETE'|'DEPRECATE'|'DISABLE', 'includeResources': { 'amis': True|False, 'snapshots': True|False, 'containers': True|False } }, 'filter': { 'type': 'AGE'|'COUNT', 'value': 123, 'unit': 'DAYS'|'WEEKS'|'MONTHS'|'YEARS', 'retainAtLeast': 123 }, 'exclusionRules': { 'tagMap': { 'string': 'string' }, 'amis': { 'isPublic': True|False, 'regions': [ 'string', ], 'sharedAccounts': [ 'string', ], 'lastLaunched': { 'value': 123, 'unit': 'DAYS'|'WEEKS'|'MONTHS'|'YEARS' }, 'tagMap': { 'string': 'string' } } } }, ], resourceSelection={ 'recipes': [ { 'name': 'string', 'semanticVersion': 'string' }, ], 'tagMap': { 'string': 'string' } }, clientToken='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the lifecycle policy resource.
string
Optional description for the lifecycle policy.
string
Indicates whether the lifecycle policy resource is enabled.
string
[REQUIRED]
The name of the IAM role that Image Builder should use to update the lifecycle policy.
string
[REQUIRED]
The type of image resource that the lifecycle policy applies to.
list
[REQUIRED]
The configuration details for a lifecycle policy resource.
(dict) --
The configuration details for a lifecycle policy resource.
action (dict) -- [REQUIRED]
Configuration details for the policy action.
type (string) -- [REQUIRED]
Specifies the lifecycle action to take.
includeResources (dict) --
Specifies the resources that the lifecycle policy applies to.
amis (boolean) --
Specifies whether the lifecycle action should apply to distributed AMIs.
snapshots (boolean) --
Specifies whether the lifecycle action should apply to snapshots associated with distributed AMIs.
containers (boolean) --
Specifies whether the lifecycle action should apply to distributed containers.
filter (dict) -- [REQUIRED]
Specifies the resources that the lifecycle policy applies to.
type (string) -- [REQUIRED]
Filter resources based on either age or count .
value (integer) -- [REQUIRED]
The number of units for the time period or for the count. For example, a value of 6 might refer to six months or six AMIs.
Note
For count-based filters, this value represents the minimum number of resources to keep on hand. If you have fewer resources than this number, the resource is excluded from lifecycle actions.
unit (string) --
Defines the unit of time that the lifecycle policy uses to determine impacted resources. This is required for age-based rules.
retainAtLeast (integer) --
For age-based filters, this is the number of resources to keep on hand after the lifecycle DELETE action is applied. Impacted resources are only deleted if you have more than this number of resources. If you have fewer resources than this number, the impacted resource is not deleted.
exclusionRules (dict) --
Additional rules to specify resources that should be exempt from policy actions.
tagMap (dict) --
Contains a list of tags that Image Builder uses to skip lifecycle actions for AMIs that have them.
(string) --
(string) --
amis (dict) --
Lists configuration values that apply to AMIs that Image Builder should exclude from the lifecycle action.
isPublic (boolean) --
Configures whether public AMIs are excluded from the lifecycle action.
regions (list) --
Specifies Amazon Web Services accounts whose resources are excluded from the lifecycle action.
(string) --
sharedAccounts (list) --
Specifies configuration details for Image Builder to exclude the most recent resources from lifecycle actions.
(string) --
lastLaunched (dict) --
Configures Amazon Web Services Regions that are excluded from the lifecycle action.
value (integer) -- [REQUIRED]
The integer number of units for the time period. For example 6 (months).
unit (string) -- [REQUIRED]
Defines the unit of time that the lifecycle policy uses to calculate elapsed time since the last instance launched from the AMI. For example: days, weeks, months, or years.
tagMap (dict) --
Lists tags that should be excluded from lifecycle actions for the AMIs that have them.
(string) --
(string) --
dict
[REQUIRED]
Selection criteria for resources that the lifecycle policy applies to.
recipes (list) --
A list of recipes that are used as selection criteria for the output images that the lifecycle policy applies to.
(dict) --
Specifies an Image Builder recipe that the lifecycle policy uses for resource selection.
name (string) -- [REQUIRED]
The name of an Image Builder recipe that the lifecycle policy uses for resource selection.
semanticVersion (string) -- [REQUIRED]
The version of the Image Builder recipe specified by the name field.
tagMap (dict) --
A list of tags that are used as selection criteria for the resources that the lifecycle policy applies to.
(string) --
(string) --
string
[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
{ 'lifecyclePolicyArn': 'string' }
Response Structure
(dict) --
lifecyclePolicyArn (string) --
The ARN of the image lifecycle policy resource that was updated.
Get the runtime information that was logged for a specific runtime instance of the lifecycle policy.
See also: AWS API Documentation
Request Syntax
client.get_lifecycle_execution( lifecycleExecutionId='string' )
string
[REQUIRED]
Use the unique identifier for a runtime instance of the lifecycle policy to get runtime details.
dict
Response Syntax
{ 'lifecycleExecution': { 'lifecycleExecutionId': 'string', 'lifecyclePolicyArn': 'string', 'resourcesImpactedSummary': { 'hasImpactedResources': True|False }, 'state': { 'status': 'IN_PROGRESS'|'CANCELLED'|'CANCELLING'|'FAILED'|'SUCCESS', 'reason': 'string' }, 'startTime': datetime(2015, 1, 1), 'endTime': datetime(2015, 1, 1) } }
Response Structure
(dict) --
lifecycleExecution (dict) --
Runtime details for the specified runtime instance of the lifecycle policy.
lifecycleExecutionId (string) --
Identifies the lifecycle policy runtime instance.
lifecyclePolicyArn (string) --
The Amazon Resource Name (ARN) of the lifecycle policy that ran.
resourcesImpactedSummary (dict) --
Contains information about associated resources that are identified for action by the runtime instance of the lifecycle policy.
hasImpactedResources (boolean) --
Indicates whether an image resource that was identified for a lifecycle action has associated resources that are also impacted.
state (dict) --
Runtime state that reports if the policy action ran successfully, failed, or was skipped.
status (string) --
The runtime status of the lifecycle execution.
reason (string) --
The reason for the current status.
startTime (datetime) --
The timestamp when the lifecycle runtime instance started.
endTime (datetime) --
The timestamp when the lifecycle runtime instance completed.
Cancel a specific image lifecycle policy runtime instance.
See also: AWS API Documentation
Request Syntax
client.cancel_lifecycle_execution( lifecycleExecutionId='string', clientToken='string' )
string
[REQUIRED]
Identifies the specific runtime instance of the image lifecycle to cancel.
string
[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
{ 'lifecycleExecutionId': 'string' }
Response Structure
(dict) --
lifecycleExecutionId (string) --
The unique identifier for the image lifecycle runtime instance that was canceled.
Delete the specified lifecycle policy resource.
See also: AWS API Documentation
Request Syntax
client.delete_lifecycle_policy( lifecyclePolicyArn='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the lifecycle policy resource to delete.
dict
Response Syntax
{ 'lifecyclePolicyArn': 'string' }
Response Structure
(dict) --
lifecyclePolicyArn (string) --
The ARN of the lifecycle policy that was deleted.
Get details for the specified image lifecycle policy.
See also: AWS API Documentation
Request Syntax
client.get_lifecycle_policy( lifecyclePolicyArn='string' )
string
[REQUIRED]
Specifies the Amazon Resource Name (ARN) of the image lifecycle policy resource to get.
dict
Response Syntax
{ 'lifecyclePolicy': { 'arn': 'string', 'name': 'string', 'description': 'string', 'status': 'DISABLED'|'ENABLED', 'executionRole': 'string', 'resourceType': 'AMI_IMAGE'|'CONTAINER_IMAGE', 'policyDetails': [ { 'action': { 'type': 'DELETE'|'DEPRECATE'|'DISABLE', 'includeResources': { 'amis': True|False, 'snapshots': True|False, 'containers': True|False } }, 'filter': { 'type': 'AGE'|'COUNT', 'value': 123, 'unit': 'DAYS'|'WEEKS'|'MONTHS'|'YEARS', 'retainAtLeast': 123 }, 'exclusionRules': { 'tagMap': { 'string': 'string' }, 'amis': { 'isPublic': True|False, 'regions': [ 'string', ], 'sharedAccounts': [ 'string', ], 'lastLaunched': { 'value': 123, 'unit': 'DAYS'|'WEEKS'|'MONTHS'|'YEARS' }, 'tagMap': { 'string': 'string' } } } }, ], 'resourceSelection': { 'recipes': [ { 'name': 'string', 'semanticVersion': 'string' }, ], 'tagMap': { 'string': 'string' } }, 'dateCreated': datetime(2015, 1, 1), 'dateUpdated': datetime(2015, 1, 1), 'dateLastRun': datetime(2015, 1, 1), 'tags': { 'string': 'string' } } }
Response Structure
(dict) --
lifecyclePolicy (dict) --
The ARN of the image lifecycle policy resource that was returned.
arn (string) --
The Amazon Resource Name (ARN) of the lifecycle policy resource.
name (string) --
The name of the lifecycle policy.
description (string) --
Optional description for the lifecycle policy.
status (string) --
Indicates whether the lifecycle policy resource is enabled.
executionRole (string) --
The name of the IAM role that Image Builder uses to run the lifecycle policy. This is a custom role that you create.
resourceType (string) --
The type of resources the lifecycle policy targets.
policyDetails (list) --
The configuration details for a lifecycle policy resource.
(dict) --
The configuration details for a lifecycle policy resource.
action (dict) --
Configuration details for the policy action.
type (string) --
Specifies the lifecycle action to take.
includeResources (dict) --
Specifies the resources that the lifecycle policy applies to.
amis (boolean) --
Specifies whether the lifecycle action should apply to distributed AMIs.
snapshots (boolean) --
Specifies whether the lifecycle action should apply to snapshots associated with distributed AMIs.
containers (boolean) --
Specifies whether the lifecycle action should apply to distributed containers.
filter (dict) --
Specifies the resources that the lifecycle policy applies to.
type (string) --
Filter resources based on either age or count .
value (integer) --
The number of units for the time period or for the count. For example, a value of 6 might refer to six months or six AMIs.
Note
For count-based filters, this value represents the minimum number of resources to keep on hand. If you have fewer resources than this number, the resource is excluded from lifecycle actions.
unit (string) --
Defines the unit of time that the lifecycle policy uses to determine impacted resources. This is required for age-based rules.
retainAtLeast (integer) --
For age-based filters, this is the number of resources to keep on hand after the lifecycle DELETE action is applied. Impacted resources are only deleted if you have more than this number of resources. If you have fewer resources than this number, the impacted resource is not deleted.
exclusionRules (dict) --
Additional rules to specify resources that should be exempt from policy actions.
tagMap (dict) --
Contains a list of tags that Image Builder uses to skip lifecycle actions for AMIs that have them.
(string) --
(string) --
amis (dict) --
Lists configuration values that apply to AMIs that Image Builder should exclude from the lifecycle action.
isPublic (boolean) --
Configures whether public AMIs are excluded from the lifecycle action.
regions (list) --
Specifies Amazon Web Services accounts whose resources are excluded from the lifecycle action.
(string) --
sharedAccounts (list) --
Specifies configuration details for Image Builder to exclude the most recent resources from lifecycle actions.
(string) --
lastLaunched (dict) --
Configures Amazon Web Services Regions that are excluded from the lifecycle action.
value (integer) --
The integer number of units for the time period. For example 6 (months).
unit (string) --
Defines the unit of time that the lifecycle policy uses to calculate elapsed time since the last instance launched from the AMI. For example: days, weeks, months, or years.
tagMap (dict) --
Lists tags that should be excluded from lifecycle actions for the AMIs that have them.
(string) --
(string) --
resourceSelection (dict) --
Resource selection criteria used to run the lifecycle policy.
recipes (list) --
A list of recipes that are used as selection criteria for the output images that the lifecycle policy applies to.
(dict) --
Specifies an Image Builder recipe that the lifecycle policy uses for resource selection.
name (string) --
The name of an Image Builder recipe that the lifecycle policy uses for resource selection.
semanticVersion (string) --
The version of the Image Builder recipe specified by the name field.
tagMap (dict) --
A list of tags that are used as selection criteria for the resources that the lifecycle policy applies to.
(string) --
(string) --
dateCreated (datetime) --
The timestamp when Image Builder created the lifecycle policy resource.
dateUpdated (datetime) --
The timestamp when Image Builder updated the lifecycle policy resource.
dateLastRun (datetime) --
The timestamp for the last time Image Builder ran the lifecycle policy.
tags (dict) --
To help manage your lifecycle policy resources, you can assign your own metadata to each resource in the form of tags. Each tag consists of a key and an optional value, both of which you define.
(string) --
(string) --
{'image': {'deprecationTime': 'timestamp', 'lifecycleExecutionId': 'string', 'outputResources': {'amis': {'state': {'status': {'DISABLED'}}}}, 'state': {'status': {'DISABLED'}}}}
Gets an image.
See also: AWS API Documentation
Request Syntax
client.get_image( imageBuildVersionArn='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the image that you want to get.
dict
Response Syntax
{ 'requestId': 'string', 'image': { 'arn': 'string', 'type': 'AMI'|'DOCKER', 'name': 'string', 'version': 'string', 'platform': 'Windows'|'Linux', 'enhancedImageMetadataEnabled': True|False, 'osVersion': 'string', 'state': { 'status': 'PENDING'|'CREATING'|'BUILDING'|'TESTING'|'DISTRIBUTING'|'INTEGRATING'|'AVAILABLE'|'CANCELLED'|'FAILED'|'DEPRECATED'|'DELETED'|'DISABLED', 'reason': 'string' }, 'imageRecipe': { 'arn': 'string', 'type': 'AMI'|'DOCKER', 'name': 'string', 'description': 'string', 'platform': 'Windows'|'Linux', 'owner': 'string', 'version': 'string', 'components': [ { 'componentArn': 'string', 'parameters': [ { 'name': 'string', 'value': [ 'string', ] }, ] }, ], 'parentImage': 'string', 'blockDeviceMappings': [ { 'deviceName': 'string', 'ebs': { 'encrypted': True|False, 'deleteOnTermination': True|False, 'iops': 123, 'kmsKeyId': 'string', 'snapshotId': 'string', 'volumeSize': 123, 'volumeType': 'standard'|'io1'|'io2'|'gp2'|'gp3'|'sc1'|'st1', 'throughput': 123 }, 'virtualName': 'string', 'noDevice': 'string' }, ], 'dateCreated': 'string', 'tags': { 'string': 'string' }, 'workingDirectory': 'string', 'additionalInstanceConfiguration': { 'systemsManagerAgent': { 'uninstallAfterBuild': True|False }, 'userDataOverride': 'string' } }, 'containerRecipe': { 'arn': 'string', 'containerType': 'DOCKER', 'name': 'string', 'description': 'string', 'platform': 'Windows'|'Linux', 'owner': 'string', 'version': 'string', 'components': [ { 'componentArn': 'string', 'parameters': [ { 'name': 'string', 'value': [ 'string', ] }, ] }, ], 'instanceConfiguration': { 'image': 'string', 'blockDeviceMappings': [ { 'deviceName': 'string', 'ebs': { 'encrypted': True|False, 'deleteOnTermination': True|False, 'iops': 123, 'kmsKeyId': 'string', 'snapshotId': 'string', 'volumeSize': 123, 'volumeType': 'standard'|'io1'|'io2'|'gp2'|'gp3'|'sc1'|'st1', 'throughput': 123 }, 'virtualName': 'string', 'noDevice': 'string' }, ] }, 'dockerfileTemplateData': 'string', 'kmsKeyId': 'string', 'encrypted': True|False, 'parentImage': 'string', 'dateCreated': 'string', 'tags': { 'string': 'string' }, 'workingDirectory': 'string', 'targetRepository': { 'service': 'ECR', 'repositoryName': 'string' } }, 'sourcePipelineName': 'string', 'sourcePipelineArn': 'string', 'infrastructureConfiguration': { 'arn': 'string', 'name': 'string', 'description': 'string', 'instanceTypes': [ 'string', ], 'instanceProfileName': 'string', 'securityGroupIds': [ 'string', ], 'subnetId': 'string', 'logging': { 's3Logs': { 's3BucketName': 'string', 's3KeyPrefix': 'string' } }, 'keyPair': 'string', 'terminateInstanceOnFailure': True|False, 'snsTopicArn': 'string', 'dateCreated': 'string', 'dateUpdated': 'string', 'resourceTags': { 'string': 'string' }, 'instanceMetadataOptions': { 'httpTokens': 'string', 'httpPutResponseHopLimit': 123 }, 'tags': { 'string': 'string' } }, 'distributionConfiguration': { 'arn': 'string', 'name': 'string', 'description': 'string', 'distributions': [ { 'region': 'string', 'amiDistributionConfiguration': { 'name': 'string', 'description': 'string', 'targetAccountIds': [ 'string', ], 'amiTags': { 'string': 'string' }, 'kmsKeyId': 'string', 'launchPermission': { 'userIds': [ 'string', ], 'userGroups': [ 'string', ], 'organizationArns': [ 'string', ], 'organizationalUnitArns': [ 'string', ] } }, 'containerDistributionConfiguration': { 'description': 'string', 'containerTags': [ 'string', ], 'targetRepository': { 'service': 'ECR', 'repositoryName': 'string' } }, 'licenseConfigurationArns': [ 'string', ], 'launchTemplateConfigurations': [ { 'launchTemplateId': 'string', 'accountId': 'string', 'setDefaultVersion': True|False }, ], 's3ExportConfiguration': { 'roleName': 'string', 'diskImageFormat': 'VMDK'|'RAW'|'VHD', 's3Bucket': 'string', 's3Prefix': 'string' }, 'fastLaunchConfigurations': [ { 'enabled': True|False, 'snapshotConfiguration': { 'targetResourceCount': 123 }, 'maxParallelLaunches': 123, 'launchTemplate': { 'launchTemplateId': 'string', 'launchTemplateName': 'string', 'launchTemplateVersion': 'string' }, 'accountId': 'string' }, ] }, ], 'timeoutMinutes': 123, 'dateCreated': 'string', 'dateUpdated': 'string', 'tags': { 'string': 'string' } }, 'imageTestsConfiguration': { 'imageTestsEnabled': True|False, 'timeoutMinutes': 123 }, 'dateCreated': 'string', 'outputResources': { 'amis': [ { 'region': 'string', 'image': 'string', 'name': 'string', 'description': 'string', 'state': { 'status': 'PENDING'|'CREATING'|'BUILDING'|'TESTING'|'DISTRIBUTING'|'INTEGRATING'|'AVAILABLE'|'CANCELLED'|'FAILED'|'DEPRECATED'|'DELETED'|'DISABLED', 'reason': 'string' }, 'accountId': 'string' }, ], 'containers': [ { 'region': 'string', 'imageUris': [ 'string', ] }, ] }, 'tags': { 'string': 'string' }, 'buildType': 'USER_INITIATED'|'SCHEDULED'|'IMPORT', 'imageSource': 'AMAZON_MANAGED'|'AWS_MARKETPLACE'|'IMPORTED'|'CUSTOM', 'scanState': { 'status': 'PENDING'|'SCANNING'|'COLLECTING'|'COMPLETED'|'ABANDONED'|'FAILED'|'TIMED_OUT', 'reason': 'string' }, 'imageScanningConfiguration': { 'imageScanningEnabled': True|False, 'ecrConfiguration': { 'repositoryName': 'string', 'containerTags': [ 'string', ] } }, 'deprecationTime': datetime(2015, 1, 1), 'lifecycleExecutionId': 'string' } }
Response Structure
(dict) --
requestId (string) --
The request ID that uniquely identifies this request.
image (dict) --
The image object.
arn (string) --
The Amazon Resource Name (ARN) of the image.
Note
Semantic versioning is included in each object's Amazon Resource Name (ARN), at the level that applies to that object as follows:
Versionless ARNs and Name ARNs do not include specific values in any of the nodes. The nodes are either left off entirely, or they are specified as wildcards, for example: x.x.x.
Version ARNs have only the first three nodes: <major>.<minor>.<patch>
Build version ARNs have all four nodes, and point to a specific build for a specific version of an object.
type (string) --
Specifies whether this image produces an AMI or a container image.
name (string) --
The name of the image.
version (string) --
The semantic version of the image.
Note
The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign values for the first three, and can filter on all of them.
Assignment: For the first three nodes you can assign any positive integer value, including zero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the build number to the fourth node.
Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as 2021.01.01.
Filtering: With semantic versioning, you have the flexibility to use wildcards (x) to specify the most recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards.
platform (string) --
The image operating system platform, such as Linux or Windows.
enhancedImageMetadataEnabled (boolean) --
Indicates whether Image Builder collects additional information about the image, such as the operating system (OS) version and package list.
osVersion (string) --
The operating system version for instances that launch from this image. For example, Amazon Linux 2, Ubuntu 18, or Microsoft Windows Server 2019.
state (dict) --
The state of the image.
status (string) --
The status of the image.
reason (string) --
The reason for the status of the image.
imageRecipe (dict) --
For images that distribute an AMI, this is the image recipe that Image Builder used to create the image. For container images, this is empty.
arn (string) --
The Amazon Resource Name (ARN) of the image recipe.
type (string) --
Specifies which type of image is created by the recipe - an AMI or a container image.
name (string) --
The name of the image recipe.
description (string) --
The description of the image recipe.
platform (string) --
The platform of the image recipe.
owner (string) --
The owner of the image recipe.
version (string) --
The version of the image recipe.
components (list) --
The components that are included in the image recipe. Recipes require a minimum of one build component, and can have a maximum of 20 build and test components in any combination.
(dict) --
Configuration details of the component.
componentArn (string) --
The Amazon Resource Name (ARN) of the component.
parameters (list) --
A group of parameter settings that Image Builder uses to configure the component for a specific recipe.
(dict) --
Contains a key/value pair that sets the named component parameter.
name (string) --
The name of the component parameter to set.
value (list) --
Sets the value for the named component parameter.
(string) --
parentImage (string) --
The base image of the image recipe.
blockDeviceMappings (list) --
The block device mappings to apply when creating images from this recipe.
(dict) --
Defines block device mappings for the instance used to configure your image.
deviceName (string) --
The device to which these mappings apply.
ebs (dict) --
Use to manage Amazon EBS-specific configuration for this mapping.
encrypted (boolean) --
Use to configure device encryption.
deleteOnTermination (boolean) --
Use to configure delete on termination of the associated device.
iops (integer) --
Use to configure device IOPS.
kmsKeyId (string) --
Use to configure the KMS key to use when encrypting the device.
snapshotId (string) --
The snapshot that defines the device contents.
volumeSize (integer) --
Use to override the device's volume size.
volumeType (string) --
Use to override the device's volume type.
throughput (integer) --
For GP3 volumes only – The throughput in MiB/s that the volume supports.
virtualName (string) --
Use to manage instance ephemeral devices.
noDevice (string) --
Use to remove a mapping from the base image.
dateCreated (string) --
The date on which this image recipe was created.
tags (dict) --
The tags of the image recipe.
(string) --
(string) --
workingDirectory (string) --
The working directory to be used during build and test workflows.
additionalInstanceConfiguration (dict) --
Before you create a new AMI, Image Builder launches temporary Amazon EC2 instances to build and test your image configuration. Instance configuration adds a layer of control over those instances. You can define settings and add scripts to run when an instance is launched from your AMI.
systemsManagerAgent (dict) --
Contains settings for the Systems Manager agent on your build instance.
uninstallAfterBuild (boolean) --
Controls whether the Systems Manager agent is removed from your final build image, prior to creating the new AMI. If this is set to true, then the agent is removed from the final image. If it's set to false, then the agent is left in, so that it is included in the new AMI. The default value is false.
userDataOverride (string) --
Use this property to provide commands or a command script to run when you launch your build instance.
The userDataOverride property replaces any commands that Image Builder might have added to ensure that Systems Manager is installed on your Linux build instance. If you override the user data, make sure that you add commands to install Systems Manager, if it is not pre-installed on your base image.
Note
The user data is always base 64 encoded. For example, the following commands are encoded as IyEvYmluL2Jhc2gKbWtkaXIgLXAgL3Zhci9iYi8KdG91Y2ggL3Zhci$ :
#!/bin/bash
mkdir -p /var/bb/
touch /var
containerRecipe (dict) --
For container images, this is the container recipe that Image Builder used to create the image. For images that distribute an AMI, this is empty.
arn (string) --
The Amazon Resource Name (ARN) of the container recipe.
Note
Semantic versioning is included in each object's Amazon Resource Name (ARN), at the level that applies to that object as follows:
Versionless ARNs and Name ARNs do not include specific values in any of the nodes. The nodes are either left off entirely, or they are specified as wildcards, for example: x.x.x.
Version ARNs have only the first three nodes: <major>.<minor>.<patch>
Build version ARNs have all four nodes, and point to a specific build for a specific version of an object.
containerType (string) --
Specifies the type of container, such as Docker.
name (string) --
The name of the container recipe.
description (string) --
The description of the container recipe.
platform (string) --
The system platform for the container, such as Windows or Linux.
owner (string) --
The owner of the container recipe.
version (string) --
The semantic version of the container recipe.
Note
The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign values for the first three, and can filter on all of them.
Assignment: For the first three nodes you can assign any positive integer value, including zero, with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the build number to the fourth node.
Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as 2021.01.01.
Filtering: With semantic versioning, you have the flexibility to use wildcards (x) to specify the most recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards.
components (list) --
Build and test components that are included in the container recipe. Recipes require a minimum of one build component, and can have a maximum of 20 build and test components in any combination.
(dict) --
Configuration details of the component.
componentArn (string) --
The Amazon Resource Name (ARN) of the component.
parameters (list) --
A group of parameter settings that Image Builder uses to configure the component for a specific recipe.
(dict) --
Contains a key/value pair that sets the named component parameter.
name (string) --
The name of the component parameter to set.
value (list) --
Sets the value for the named component parameter.
(string) --
instanceConfiguration (dict) --
A group of options that can be used to configure an instance for building and testing container images.
image (string) --
The AMI ID to use as the base image for a container build and test instance. If not specified, Image Builder will use the appropriate ECS-optimized AMI as a base image.
blockDeviceMappings (list) --
Defines the block devices to attach for building an instance from this Image Builder AMI.
(dict) --
Defines block device mappings for the instance used to configure your image.
deviceName (string) --
The device to which these mappings apply.
ebs (dict) --
Use to manage Amazon EBS-specific configuration for this mapping.
encrypted (boolean) --
Use to configure device encryption.
deleteOnTermination (boolean) --
Use to configure delete on termination of the associated device.
iops (integer) --
Use to configure device IOPS.
kmsKeyId (string) --
Use to configure the KMS key to use when encrypting the device.
snapshotId (string) --
The snapshot that defines the device contents.
volumeSize (integer) --
Use to override the device's volume size.
volumeType (string) --
Use to override the device's volume type.
throughput (integer) --
For GP3 volumes only – The throughput in MiB/s that the volume supports.
virtualName (string) --
Use to manage instance ephemeral devices.
noDevice (string) --
Use to remove a mapping from the base image.
dockerfileTemplateData (string) --
Dockerfiles are text documents that are used to build Docker containers, and ensure that they contain all of the elements required by the application running inside. The template data consists of contextual variables where Image Builder places build information or scripts, based on your container image recipe.
kmsKeyId (string) --
Identifies which KMS key is used to encrypt the container image for distribution to the target Region.
encrypted (boolean) --
A flag that indicates if the target container is encrypted.
parentImage (string) --
The base image for the container recipe.
dateCreated (string) --
The date when this container recipe was created.
tags (dict) --
Tags that are attached to the container recipe.
(string) --
(string) --
workingDirectory (string) --
The working directory for use during build and test workflows.
targetRepository (dict) --
The destination repository for the container image.
service (string) --
Specifies the service in which this image was registered.
repositoryName (string) --
The name of the container repository where the output container image is stored. This name is prefixed by the repository location.
sourcePipelineName (string) --
The name of the image pipeline that created this image.
sourcePipelineArn (string) --
The Amazon Resource Name (ARN) of the image pipeline that created this image.
infrastructureConfiguration (dict) --
The infrastructure that Image Builder used to create this image.
arn (string) --
The Amazon Resource Name (ARN) of the infrastructure configuration.
name (string) --
The name of the infrastructure configuration.
description (string) --
The description of the infrastructure configuration.
instanceTypes (list) --
The instance types of the infrastructure configuration.
(string) --
instanceProfileName (string) --
The instance profile of the infrastructure configuration.
securityGroupIds (list) --
The security group IDs of the infrastructure configuration.
(string) --
subnetId (string) --
The subnet ID of the infrastructure configuration.
logging (dict) --
The logging configuration of the infrastructure configuration.
s3Logs (dict) --
The Amazon S3 logging configuration.
s3BucketName (string) --
The S3 bucket in which to store the logs.
s3KeyPrefix (string) --
The Amazon S3 path to the bucket where the logs are stored.
keyPair (string) --
The Amazon EC2 key pair of the infrastructure configuration.
terminateInstanceOnFailure (boolean) --
The terminate instance on failure configuration of the infrastructure configuration.
snsTopicArn (string) --
The Amazon Resource Name (ARN) for the SNS topic to which we send image build event notifications.
Note
EC2 Image Builder is unable to send notifications to SNS topics that are encrypted using keys from other accounts. The key that is used to encrypt the SNS topic must reside in the account that the Image Builder service runs under.
dateCreated (string) --
The date on which the infrastructure configuration was created.
dateUpdated (string) --
The date on which the infrastructure configuration was last updated.
resourceTags (dict) --
The tags attached to the resource created by Image Builder.
(string) --
(string) --
instanceMetadataOptions (dict) --
The instance metadata option settings for the infrastructure configuration.
httpTokens (string) --
Indicates whether a signed token header is required for instance metadata retrieval requests. The values affect the response as follows:
required – When you retrieve the IAM role credentials, version 2.0 credentials are returned in all cases.
optional – You can include a signed token header in your request to retrieve instance metadata, or you can leave it out. If you include it, version 2.0 credentials are returned for the IAM role. Otherwise, version 1.0 credentials are returned.
The default setting is optional .
httpPutResponseHopLimit (integer) --
Limit the number of hops that an instance metadata request can traverse to reach its destination. The default is one hop. However, if HTTP tokens are required, container image builds need a minimum of two hops.
tags (dict) --
The tags of the infrastructure configuration.
(string) --
(string) --
distributionConfiguration (dict) --
The distribution configuration that Image Builder used to create this image.
arn (string) --
The Amazon Resource Name (ARN) of the distribution configuration.
name (string) --
The name of the distribution configuration.
description (string) --
The description of the distribution configuration.
distributions (list) --
The distribution objects that apply Region-specific settings for the deployment of the image to targeted Regions.
(dict) --
Defines the settings for a specific Region.
region (string) --
The target Region.
amiDistributionConfiguration (dict) --
The specific AMI settings; for example, launch permissions or AMI tags.
name (string) --
The name of the output AMI.
description (string) --
The description of the AMI distribution configuration. Minimum and maximum length are in characters.
targetAccountIds (list) --
The ID of an account to which you want to distribute an image.
(string) --
amiTags (dict) --
The tags to apply to AMIs distributed to this Region.
(string) --
(string) --
kmsKeyId (string) --
The KMS key identifier used to encrypt the distributed image.
launchPermission (dict) --
Launch permissions can be used to configure which Amazon Web Services accounts can use the AMI to launch instances.
userIds (list) --
The Amazon Web Services account ID.
(string) --
userGroups (list) --
The name of the group.
(string) --
organizationArns (list) --
The ARN for an Amazon Web Services Organization that you want to share your AMI with. For more information, see What is Organizations? .
(string) --
organizationalUnitArns (list) --
The ARN for an Organizations organizational unit (OU) that you want to share your AMI with. For more information about key concepts for Organizations, see Organizations terminology and concepts .
(string) --
containerDistributionConfiguration (dict) --
Container distribution settings for encryption, licensing, and sharing in a specific Region.
description (string) --
The description of the container distribution configuration.
containerTags (list) --
Tags that are attached to the container distribution configuration.
(string) --
targetRepository (dict) --
The destination repository for the container distribution configuration.
service (string) --
Specifies the service in which this image was registered.
repositoryName (string) --
The name of the container repository where the output container image is stored. This name is prefixed by the repository location.
licenseConfigurationArns (list) --
The License Manager Configuration to associate with the AMI in the specified Region.
(string) --
launchTemplateConfigurations (list) --
A group of launchTemplateConfiguration settings that apply to image distribution for specified accounts.
(dict) --
Identifies an Amazon EC2 launch template to use for a specific account.
launchTemplateId (string) --
Identifies the Amazon EC2 launch template to use.
accountId (string) --
The account ID that this configuration applies to.
setDefaultVersion (boolean) --
Set the specified Amazon EC2 launch template as the default launch template for the specified account.
s3ExportConfiguration (dict) --
Configure export settings to deliver disk images created from your image build, using a file format that is compatible with your VMs in that Region.
roleName (string) --
The name of the role that grants VM Import/Export permission to export images to your S3 bucket.
diskImageFormat (string) --
Export the updated image to one of the following supported disk image formats:
Virtual Hard Disk (VHD) – Compatible with Citrix Xen and Microsoft Hyper-V virtualization products.
Stream-optimized ESX Virtual Machine Disk (VMDK) – Compatible with VMware ESX and VMware vSphere versions 4, 5, and 6.
Raw – Raw format.
s3Bucket (string) --
The S3 bucket in which to store the output disk images for your VM.
s3Prefix (string) --
The Amazon S3 path for the bucket where the output disk images for your VM are stored.
fastLaunchConfigurations (list) --
The Windows faster-launching configurations to use for AMI distribution.
(dict) --
Define and configure faster launching for output Windows AMIs.
enabled (boolean) --
A Boolean that represents the current state of faster launching for the Windows AMI. Set to true to start using Windows faster launching, or false to stop using it.
snapshotConfiguration (dict) --
Configuration settings for managing the number of snapshots that are created from pre-provisioned instances for the Windows AMI when faster launching is enabled.
targetResourceCount (integer) --
The number of pre-provisioned snapshots to keep on hand for a fast-launch enabled Windows AMI.
maxParallelLaunches (integer) --
The maximum number of parallel instances that are launched for creating resources.
launchTemplate (dict) --
The launch template that the fast-launch enabled Windows AMI uses when it launches Windows instances to create pre-provisioned snapshots.
launchTemplateId (string) --
The ID of the launch template to use for faster launching for a Windows AMI.
launchTemplateName (string) --
The name of the launch template to use for faster launching for a Windows AMI.
launchTemplateVersion (string) --
The version of the launch template to use for faster launching for a Windows AMI.
accountId (string) --
The owner account ID for the fast-launch enabled Windows AMI.
timeoutMinutes (integer) --
The maximum duration in minutes for this distribution configuration.
dateCreated (string) --
The date on which this distribution configuration was created.
dateUpdated (string) --
The date on which this distribution configuration was last updated.
tags (dict) --
The tags of the distribution configuration.
(string) --
(string) --
imageTestsConfiguration (dict) --
The image tests that ran when that Image Builder created this image.
imageTestsEnabled (boolean) --
Determines if tests should run after building the image. Image Builder defaults to enable tests to run following the image build, before image distribution.
timeoutMinutes (integer) --
The maximum time in minutes that tests are permitted to run.
Note
The timeoutMinutes attribute is not currently active. This value is ignored.
dateCreated (string) --
The date on which Image Builder created this image.
outputResources (dict) --
The output resources that Image Builder produces for this image.
amis (list) --
The Amazon EC2 AMIs created by this image.
(dict) --
Details of an Amazon EC2 AMI.
region (string) --
The Amazon Web Services Region of the Amazon EC2 AMI.
image (string) --
The AMI ID of the Amazon EC2 AMI.
name (string) --
The name of the Amazon EC2 AMI.
description (string) --
The description of the Amazon EC2 AMI. Minimum and maximum length are in characters.
state (dict) --
Image status and the reason for that status.
status (string) --
The status of the image.
reason (string) --
The reason for the status of the image.
accountId (string) --
The account ID of the owner of the AMI.
containers (list) --
Container images that the pipeline has generated and stored in the output repository.
(dict) --
A container encapsulates the runtime environment for an application.
region (string) --
Containers and container images are Region-specific. This is the Region context for the container.
imageUris (list) --
A list of URIs for containers created in the context Region.
(string) --
tags (dict) --
The tags that apply to this image.
(string) --
(string) --
buildType (string) --
Indicates the type of build that created this image. The build can be initiated in the following ways:
USER_INITIATED – A manual pipeline build request.
SCHEDULED – A pipeline build initiated by a cron expression in the Image Builder pipeline, or from EventBridge.
IMPORT – A VM import created the image to use as the base image for the recipe.
imageSource (string) --
The origin of the base image that Image Builder used to build this image.
scanState (dict) --
Contains information about the current state of scans for this image.
status (string) --
The current state of vulnerability scans for the image.
reason (string) --
The reason for the scan status for the image.
imageScanningConfiguration (dict) --
Contains settings for vulnerability scans.
imageScanningEnabled (boolean) --
A setting that indicates whether Image Builder keeps a snapshot of the vulnerability scans that Amazon Inspector runs against the build instance when you create a new image.
ecrConfiguration (dict) --
Contains Amazon ECR settings for vulnerability scans.
repositoryName (string) --
The name of the container repository that Amazon Inspector scans to identify findings for your container images. The name includes the path for the repository location. If you don’t provide this information, Image Builder creates a repository in your account named image-builder-image-scanning-repository for vulnerability scans of your output container images.
containerTags (list) --
Tags for Image Builder to apply to the output container image that &INS; scans. Tags can help you identify and manage your scanned images.
(string) --
deprecationTime (datetime) --
The time when deprecation occurs for an image resource. This can be a past or future date.
lifecycleExecutionId (string) --
Identifies the last runtime instance of the lifecycle policy to take action on the image.
{'imageSummaryList': {'deprecationTime': 'timestamp', 'lifecycleExecutionId': 'string', 'outputResources': {'amis': {'state': {'status': {'DISABLED'}}}}, 'state': {'status': {'DISABLED'}}}}
Returns a list of image build versions.
See also: AWS API Documentation
Request Syntax
client.list_image_build_versions( imageVersionArn='string', filters=[ { 'name': 'string', 'values': [ 'string', ] }, ], maxResults=123, nextToken='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the image whose build versions you want to retrieve.
list
Use the following filters to streamline results:
name
osVersion
platform
type
version
(dict) --
A filter name and value pair that is used to return a more specific list of results from a list operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.
name (string) --
The name of the filter. Filter names are case-sensitive.
values (list) --
The filter values. Filter values are case-sensitive.
(string) --
integer
The maximum items to return in a request.
string
A token to specify where to start paginating. This is the nextToken from a previously truncated response.
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'|'DISABLED', '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'|'DISABLED', 'reason': 'string' }, 'accountId': 'string' }, ], 'containers': [ { 'region': 'string', 'imageUris': [ 'string', ] }, ] }, 'tags': { 'string': 'string' }, 'buildType': 'USER_INITIATED'|'SCHEDULED'|'IMPORT', 'imageSource': 'AMAZON_MANAGED'|'AWS_MARKETPLACE'|'IMPORTED'|'CUSTOM', 'deprecationTime': datetime(2015, 1, 1), 'lifecycleExecutionId': 'string' }, ], 'nextToken': 'string' }
Response Structure
(dict) --
requestId (string) --
The request ID that uniquely identifies this request.
imageSummaryList (list) --
The list of image build versions.
(dict) --
An image summary.
arn (string) --
The Amazon Resource Name (ARN) of the image.
name (string) --
The name of the image.
type (string) --
Specifies whether this 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 status of the image.
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 status and the reason for that status.
status (string) --
The status of the image.
reason (string) --
The reason for the status of the image.
accountId (string) --
The account ID of the owner of the AMI.
containers (list) --
Container images that the pipeline has generated and stored in the output repository.
(dict) --
A container encapsulates the runtime environment for an application.
region (string) --
Containers and container images are Region-specific. This is the Region context for the container.
imageUris (list) --
A list of URIs for containers created in the context Region.
(string) --
tags (dict) --
The tags that apply to this image.
(string) --
(string) --
buildType (string) --
Indicates the type of build that created this image. The build can be initiated in the following ways:
USER_INITIATED – A manual pipeline build request.
SCHEDULED – A pipeline build initiated by a cron expression in the Image Builder pipeline, or from EventBridge.
IMPORT – A VM import created the image to use as the base image for the recipe.
imageSource (string) --
The origin of the base image that Image Builder used to build this image.
deprecationTime (datetime) --
The time when deprecation occurs for an image resource. This can be a past or future date.
lifecycleExecutionId (string) --
Identifies the last runtime instance of the lifecycle policy to take action on the image.
nextToken (string) --
The next token used for paginated responses. When this field isn't empty, there are additional elements that the service hasn't included in this request. Use this token with the next request to retrieve additional objects.
{'imageSummaryList': {'deprecationTime': 'timestamp', 'lifecycleExecutionId': 'string', 'outputResources': {'amis': {'state': {'status': {'DISABLED'}}}}, 'state': {'status': {'DISABLED'}}}}
Returns a list of images created by the specified pipeline.
See also: AWS API Documentation
Request Syntax
client.list_image_pipeline_images( imagePipelineArn='string', filters=[ { 'name': 'string', 'values': [ 'string', ] }, ], maxResults=123, nextToken='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the image pipeline whose images you want to view.
list
Use the following filters to streamline results:
name
version
(dict) --
A filter name and value pair that is used to return a more specific list of results from a list operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.
name (string) --
The name of the filter. Filter names are case-sensitive.
values (list) --
The filter values. Filter values are case-sensitive.
(string) --
integer
The maximum items to return in a request.
string
A token to specify where to start paginating. This is the nextToken from a previously truncated response.
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'|'DISABLED', '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'|'DISABLED', 'reason': 'string' }, 'accountId': 'string' }, ], 'containers': [ { 'region': 'string', 'imageUris': [ 'string', ] }, ] }, 'tags': { 'string': 'string' }, 'buildType': 'USER_INITIATED'|'SCHEDULED'|'IMPORT', 'imageSource': 'AMAZON_MANAGED'|'AWS_MARKETPLACE'|'IMPORTED'|'CUSTOM', 'deprecationTime': datetime(2015, 1, 1), 'lifecycleExecutionId': 'string' }, ], 'nextToken': 'string' }
Response Structure
(dict) --
requestId (string) --
The request ID that uniquely identifies this request.
imageSummaryList (list) --
The list of images built by this pipeline.
(dict) --
An image summary.
arn (string) --
The Amazon Resource Name (ARN) of the image.
name (string) --
The name of the image.
type (string) --
Specifies whether this 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 status of the image.
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 status and the reason for that status.
status (string) --
The status of the image.
reason (string) --
The reason for the status of the image.
accountId (string) --
The account ID of the owner of the AMI.
containers (list) --
Container images that the pipeline has generated and stored in the output repository.
(dict) --
A container encapsulates the runtime environment for an application.
region (string) --
Containers and container images are Region-specific. This is the Region context for the container.
imageUris (list) --
A list of URIs for containers created in the context Region.
(string) --
tags (dict) --
The tags that apply to this image.
(string) --
(string) --
buildType (string) --
Indicates the type of build that created this image. The build can be initiated in the following ways:
USER_INITIATED – A manual pipeline build request.
SCHEDULED – A pipeline build initiated by a cron expression in the Image Builder pipeline, or from EventBridge.
IMPORT – A VM import created the image to use as the base image for the recipe.
imageSource (string) --
The origin of the base image that Image Builder used to build this image.
deprecationTime (datetime) --
The time when deprecation occurs for an image resource. This can be a past or future date.
lifecycleExecutionId (string) --
Identifies the last runtime instance of the lifecycle policy to take action on the image.
nextToken (string) --
The next token used for paginated responses. When this field isn't empty, there are additional elements that the service hasn't included in this request. Use this token with the next request to retrieve additional objects.