2024/12/02 - EC2 Image Builder - 1 new7 updated api methods
Changes Added support for EC2 Image Builder's integration with AWS Marketplace for Marketplace components.
Verify the subscription and perform resource dependency checks on the requested Amazon Web Services Marketplace resource. For Amazon Web Services Marketplace components, the response contains fields to download the components and their artifacts.
See also: AWS API Documentation
Request Syntax
client.get_marketplace_resource( resourceType='COMPONENT_DATA'|'COMPONENT_ARTIFACT', resourceArn='string', resourceLocation='string' )
string
[REQUIRED]
Specifies which type of Amazon Web Services Marketplace resource Image Builder retrieves.
string
[REQUIRED]
The Amazon Resource Name (ARN) that uniquely identifies an Amazon Web Services Marketplace resource.
string
The bucket path that you can specify to download the resource from Amazon S3.
dict
Response Syntax
{ 'resourceArn': 'string', 'url': 'string', 'data': 'string' }
Response Structure
(dict) --
resourceArn (string) --
The Amazon Resource Name (ARN) for the Amazon Web Services Marketplace resource that was requested.
url (string) --
The obfuscated S3 URL to download the component artifact from.
data (string) --
Returns obfuscated data that contains the YAML content of the component.
{'component': {'productCodes': [{'productCodeId': 'string', 'productCodeType': 'marketplace'}], 'state': {'status': {'DISABLED', 'ACTIVE'}}}}
Gets a component object.
See also: AWS API Documentation
Request Syntax
client.get_component( componentBuildVersionArn='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the component that you want to get. Regex requires the suffix /\d+$.
dict
Response Syntax
{ 'requestId': 'string', 'component': { 'arn': 'string', 'name': 'string', 'version': 'string', 'description': 'string', 'changeDescription': 'string', 'type': 'BUILD'|'TEST', 'platform': 'Windows'|'Linux'|'macOS', 'supportedOsVersions': [ 'string', ], 'state': { 'status': 'DEPRECATED'|'DISABLED'|'ACTIVE', '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, 'productCodes': [ { 'productCodeId': 'string', 'productCodeType': 'marketplace' }, ] } }
Response Structure
(dict) --
requestId (string) --
The request ID that uniquely identifies this request.
component (dict) --
The component object specified in the request.
arn (string) --
The Amazon Resource Name (ARN) of the component.
name (string) --
The name of the component.
version (string) --
The version of the component.
description (string) --
The description of the component.
changeDescription (string) --
Describes what change has been made in this version of the component, or what makes this version different from other versions of the component.
type (string) --
The component type specifies whether Image Builder uses the component to build the image or only to test it.
platform (string) --
The operating system platform of the component.
supportedOsVersions (list) --
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.
(string) --
state (dict) --
Describes the current status of the component.
status (string) --
The current state of the component.
reason (string) --
Describes how or why the component changed state.
parameters (list) --
Contains parameter details for each of the parameters that the component document defined for the component.
(dict) --
Defines a parameter that is used to provide configuration details for the component.
name (string) --
The name of this input parameter.
type (string) --
The type of input this parameter provides. The currently supported value is "string".
defaultValue (list) --
The default value of this parameter if no input is provided.
(string) --
description (string) --
Describes this parameter.
owner (string) --
The owner of the component.
data (string) --
Component data contains the YAML document content for the component.
kmsKeyId (string) --
The KMS key identifier used to encrypt the component.
encrypted (boolean) --
The encryption status of the component.
dateCreated (string) --
The date that Image Builder created the component.
tags (dict) --
The tags that apply to the component.
(string) --
(string) --
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.
productCodes (list) --
Contains product codes that are used for billing purposes for Amazon Web Services Marketplace components.
(dict) --
Information about a single product code.
productCodeId (string) --
For Amazon Web Services Marketplace components, this contains the product code ID that can be stamped onto an EC2 AMI to ensure that components are billed correctly. If this property is empty, it might mean that the component is not published.
productCodeType (string) --
The owner of the product code that's billed. If this property is empty, it might mean that the component is not published.
{'componentSummaryList': {'state': {'status': {'DISABLED', 'ACTIVE'}}}}
Returns the list of component build versions for the specified component version Amazon Resource Name (ARN).
See also: AWS API Documentation
Request Syntax
client.list_component_build_versions( componentVersionArn='string', maxResults=123, nextToken='string' )
string
[REQUIRED]
The component version Amazon Resource Name (ARN) whose versions you want to list.
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', 'componentSummaryList': [ { 'arn': 'string', 'name': 'string', 'version': 'string', 'platform': 'Windows'|'Linux'|'macOS', 'supportedOsVersions': [ 'string', ], 'state': { 'status': 'DEPRECATED'|'DISABLED'|'ACTIVE', '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.
(string) --
state (dict) --
Describes the current status of the component.
status (string) --
The current state of the component.
reason (string) --
Describes how or why the component changed state.
type (string) --
The 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.
(string) --
(string) --
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 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.
{'owner': {'AWSMarketplace'}}Response
{'componentVersionList': {'productCodes': [{'productCodeId': 'string', 'productCodeType': 'marketplace'}], 'status': 'DEPRECATED | DISABLED | ACTIVE'}}
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.
See also: AWS API Documentation
Request Syntax
client.list_components( owner='Self'|'Shared'|'Amazon'|'ThirdParty'|'AWSMarketplace', filters=[ { 'name': 'string', 'values': [ 'string', ] }, ], byName=True|False, maxResults=123, nextToken='string' )
string
Filters results based on the type of owner for the component. By default, this request returns a list of components that your account owns. To see results for other types of owners, you can specify components that Amazon manages, third party components, or components that other accounts have shared with you.
list
Use the following filters to streamline results:
description
name
platform
supportedOsVersion
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) --
boolean
Returns the list of components for the specified name.
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', 'componentVersionList': [ { 'arn': 'string', 'name': 'string', 'version': 'string', 'description': 'string', 'platform': 'Windows'|'Linux'|'macOS', 'supportedOsVersions': [ 'string', ], 'type': 'BUILD'|'TEST', 'owner': 'string', 'dateCreated': 'string', 'status': 'DEPRECATED'|'DISABLED'|'ACTIVE', 'productCodes': [ { 'productCodeId': 'string', 'productCodeType': 'marketplace' }, ] }, ], 'nextToken': 'string' }
Response Structure
(dict) --
requestId (string) --
The request ID that uniquely identifies this request.
componentVersionList (list) --
The list of component semantic versions.
(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.
name (string) --
The name of the component.
version (string) --
The semantic version of the component.
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.
(string) --
type (string) --
The type of the component denotes whether the component is used to build the image or only to test it.
owner (string) --
The owner of the component.
dateCreated (string) --
The date that the component was created.
status (string) --
Describes the current status of the component version.
productCodes (list) --
Contains product codes that are used for billing purposes for Amazon Web Services Marketplace components.
(dict) --
Information about a single product code.
productCodeId (string) --
For Amazon Web Services Marketplace components, this contains the product code ID that can be stamped onto an EC2 AMI to ensure that components are billed correctly. If this property is empty, it might mean that the component is not published.
productCodeType (string) --
The owner of the product code that's billed. If this property is empty, it might mean that the component is not published.
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.
{'owner': {'AWSMarketplace'}}
Returns a list of container recipes.
See also: AWS API Documentation
Request Syntax
client.list_container_recipes( owner='Self'|'Shared'|'Amazon'|'ThirdParty'|'AWSMarketplace', filters=[ { 'name': 'string', 'values': [ 'string', ] }, ], maxResults=123, nextToken='string' )
string
Returns container recipes belonging to the specified owner, that have been shared with you. You can omit this field to return container recipes belonging to your account.
list
Use the following filters to streamline results:
containerType
name
parentImage
platform
(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', 'containerRecipeSummaryList': [ { 'arn': 'string', 'containerType': 'DOCKER', 'name': 'string', 'platform': 'Windows'|'Linux'|'macOS', '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.
(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.
{'owner': {'AWSMarketplace'}}
Returns a list of image recipes.
See also: AWS API Documentation
Request Syntax
client.list_image_recipes( owner='Self'|'Shared'|'Amazon'|'ThirdParty'|'AWSMarketplace', filters=[ { 'name': 'string', 'values': [ 'string', ] }, ], maxResults=123, nextToken='string' )
string
The owner defines which image recipes you want to list. By default, this request will only show image recipes owned by your account. You can use this field to specify if you want to view image recipes owned by yourself, by Amazon, or those image recipes that have been shared with you by other customers.
list
Use the following filters to streamline results:
name
parentImage
platform
(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', 'imageRecipeSummaryList': [ { 'arn': 'string', 'name': 'string', 'platform': 'Windows'|'Linux'|'macOS', '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.
(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.
{'owner': {'AWSMarketplace'}}
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
client.list_images( owner='Self'|'Shared'|'Amazon'|'ThirdParty'|'AWSMarketplace', filters=[ { 'name': 'string', 'values': [ 'string', ] }, ], byName=True|False, maxResults=123, nextToken='string', includeDeprecated=True|False )
string
The owner defines which images you want to list. By default, this request will only show images owned by your account. You can use this field to specify if you want to view images owned by yourself, by Amazon, or those images that have been shared with you by other customers.
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) --
boolean
Requests a list of images with a specific recipe name.
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.
boolean
Includes deprecated images in the response list.
dict
Response Syntax
{ 'requestId': 'string', 'imageVersionList': [ { 'arn': 'string', 'name': 'string', 'type': 'AMI'|'DOCKER', 'version': 'string', 'platform': 'Windows'|'Linux'|'macOS', '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.
(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.
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.
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:
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.
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.
{'owner': {'AWSMarketplace'}}
Lists workflow build versions based on filtering parameters.
See also: AWS API Documentation
Request Syntax
client.list_workflows( owner='Self'|'Shared'|'Amazon'|'ThirdParty'|'AWSMarketplace', filters=[ { 'name': 'string', 'values': [ 'string', ] }, ], byName=True|False, maxResults=123, nextToken='string' )
string
Used to get a list of workflow build version filtered by the identity of the creator.
list
Used to streamline search results.
(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) --
boolean
Specify all or part of the workflow name to streamline results.
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
{ 'workflowVersionList': [ { 'arn': 'string', 'name': 'string', 'version': 'string', 'description': 'string', 'type': 'BUILD'|'TEST'|'DISTRIBUTION', 'owner': 'string', 'dateCreated': 'string' }, ], 'nextToken': 'string' }
Response Structure
(dict) --
workflowVersionList (list) --
A list of workflow build versions that match the request criteria.
(dict) --
Contains details about this version of the workflow.
arn (string) --
The Amazon Resource Name (ARN) of the workflow resource.
name (string) --
The name of the workflow.
version (string) --
The semantic version of the workflow resource. The format includes three nodes: <major>.<minor>.<patch>.
description (string) --
Describes the workflow.
type (string) --
The image creation stage that this workflow applies to. Image Builder currently supports build and test stage workflows.
owner (string) --
The owner of the workflow resource.
dateCreated (string) --
The timestamp when Image Builder created the workflow version.
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.