components
Creates, updates, deletes, gets or lists a components resource.
Overview
| Name | components |
| Type | Resource |
| Id | aws.imagebuilder.components |
Fields
The following fields are returned by SELECT queries:
- get_component
- list_components
| Name | Datatype | Description |
|---|---|---|
component | object | The component object specified in the request. |
latest_version_references | object | The resource ARNs with different wildcard variations of semantic versioning. |
request_id | string | The request ID that uniquely identifies this request. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the component. (pattern: <code>^[-_A-Za-z-0-9][-_A-Za-z0-9 ]{1,126}[-_A-Za-z-0-9]$</code>) |
arn | string | The Amazon Resource Name (ARN) of the component. 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. (pattern: <code>^arn:aws[^:]*:imagebuilder:[^:]+:(?:[0-9]{12}|aws(?:-[a-z-]+)?):(?:image-recipe|container-recipe|infrastructure-configuration|distribution-configuration|component|image|image-pipeline|lifecycle-policy|workflow/(?:build|test|distribution))/[a-z0-9-_]+(?:/(?:(?:x|[0-9]+).(?:x|[0-9]+).(?:x|[0-9]+))(?:/[0-9]+)?)?$</code>) |
date_created | string | The date that the component was created. |
description | string | The description of the component. |
owner | string | The owner of the component. |
platform | string | The platform of the component. (Windows, Linux, macOS) |
product_codes | array | Contains product codes that are used for billing purposes for Amazon Web Services Marketplace components. |
status | string | Describes the current status of the component version. (DEPRECATED, DISABLED, ACTIVE) |
supported_os_versions | array | he operating system (OS) version supported by the component. If the OS information is available, a prefix match is performed against the base image OS version during image recipe creation. |
type_ | string | The type of the component denotes whether the component is used to build the image or only to test it. (BUILD, TEST) |
version | string | The semantic version of the component. 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. (pattern: <code>^[0-9]+.[0-9]+.[0-9]+$</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_component | select | componentBuildVersionArn, region | Gets a component object. | |
list_components | select | region | 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. 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_component | insert | region, name, semanticVersion, platform, clientToken | 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. | |
delete_component | delete | componentBuildVersionArn, region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
componentBuildVersionArn | string | The Amazon Resource Name (ARN) of the component build version to delete. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_component
- list_components
Gets a component object.
SELECT
component,
latest_version_references,
request_id
FROM aws.imagebuilder.components
WHERE componentBuildVersionArn = '{{ componentBuildVersionArn }}' -- required
AND region = '{{ region }}' -- required
;
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. 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.
SELECT
name,
arn,
date_created,
description,
owner,
platform,
product_codes,
status,
supported_os_versions,
type_,
version
FROM aws.imagebuilder.components
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_component
- Manifest
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
;
# Description fields are for documentation purposes
- name: components
props:
- name: region
value: "{{ region }}"
description: Required parameter for the components resource.
- name: name
value: "{{ name }}"
- name: semanticVersion
value: "{{ semanticVersion }}"
- name: description
value: "{{ description }}"
- name: changeDescription
value: "{{ changeDescription }}"
- name: platform
value: "{{ platform }}"
valid_values: ['Windows', 'Linux', 'macOS']
- name: supportedOsVersions
value:
- "{{ supportedOsVersions }}"
- name: data
value: "{{ data }}"
- name: uri
value: "{{ uri }}"
- name: kmsKeyId
value: "{{ kmsKeyId }}"
- name: tags
value: "{{ tags }}"
- name: clientToken
value: "{{ clientToken }}"
- name: dryRun
value: {{ dryRun }}
DELETE examples
- delete_component
Deletes a component build version.
DELETE FROM aws.imagebuilder.components
WHERE componentBuildVersionArn = '{{ componentBuildVersionArn }}' --required
AND region = '{{ region }}' --required
;