Skip to main content

components

Creates, updates, deletes, gets or lists a components resource.

Overview

Namecomponents
TypeResource
Idaws.imagebuilder.components

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
componentobjectThe component object specified in the request.
latest_version_referencesobjectThe resource ARNs with different wildcard variations of semantic versioning.
request_idstringThe request ID that uniquely identifies this request.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_componentselectcomponentBuildVersionArn, regionGets a component object.
list_componentsselectregionReturns 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. The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign values for the first three, and can filter on all of them. Filtering: With semantic versioning, you have the flexibility to use wildcards (x) to specify the most recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in any node, all nodes to the right of the first wildcard must also be wildcards.
create_componentinsertregion, name, semanticVersion, platform, clientTokenCreates a new component that can be used to build, validate, test, and assess your image. The component is based on a YAML document that you specify using exactly one of the following methods: Inline, using the data property in the request body. A URL that points to a YAML document file stored in Amazon S3, using the uri property in the request body.
delete_componentdeletecomponentBuildVersionArn, regionDeletes a component build version.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
componentBuildVersionArnstringThe Amazon Resource Name (ARN) of the component build version to delete.
regionstringAWS region (default: us-east-1)

SELECT examples

Gets a component object.

SELECT
component,
latest_version_references,
request_id
FROM aws.imagebuilder.components
WHERE componentBuildVersionArn = '{{ componentBuildVersionArn }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a new component that can be used to build, validate, test, and assess your image. The component is based on a YAML document that you specify using exactly one of the following methods: Inline, using the data property in the request body. A URL that points to a YAML document file stored in Amazon S3, using the uri property in the request body.

INSERT INTO aws.imagebuilder.components (
name,
semanticVersion,
description,
changeDescription,
platform,
supportedOsVersions,
data,
uri,
kmsKeyId,
tags,
clientToken,
dryRun,
region
)
SELECT
'{{ name }}' /* required */,
'{{ semanticVersion }}' /* required */,
'{{ description }}',
'{{ changeDescription }}',
'{{ platform }}' /* required */,
'{{ supportedOsVersions }}',
'{{ data }}',
'{{ uri }}',
'{{ kmsKeyId }}',
'{{ tags }}',
'{{ clientToken }}' /* required */,
{{ dryRun }},
'{{ region }}'
RETURNING
client_token,
component_build_version_arn,
latest_version_references,
request_id
;

DELETE examples

Deletes a component build version.

DELETE FROM aws.imagebuilder.components
WHERE componentBuildVersionArn = '{{ componentBuildVersionArn }}' --required
AND region = '{{ region }}' --required
;