Skip to main content

components

Creates, updates, deletes or gets a component resource or lists components in a region

Overview

Namecomponents
TypeResource
DescriptionResource schema for AWS::ImageBuilder::Component
Idaws.imagebuilder.components

Fields

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) of the component.
namestringThe name of the component.
versionstringThe version of the component.
descriptionstringThe description of the component.
change_descriptionstringThe change description of the component.
typestringThe type of the component denotes whether the component is used to build the image or only to test it.
platformstringThe platform of the component.
datastringThe data of the component.
kms_key_idstringThe KMS key identifier used to encrypt the component.
encryptedbooleanThe encryption status of the component.
tagsobjectThe tags associated with the component.
uristringThe uri of the component.
supported_os_versionsarrayThe operating system (OS) version supported by the component.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTName, Platform, Version, region
delete_resourceDELETEdata__Identifier, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all components in a region.

SELECT
region,
arn,
name,
version,
description,
change_description,
type,
platform,
data,
kms_key_id,
encrypted,
tags,
uri,
supported_os_versions
FROM aws.imagebuilder.components
WHERE region = 'us-east-1';

Gets all properties from an individual component.

SELECT
region,
arn,
name,
version,
description,
change_description,
type,
platform,
data,
kms_key_id,
encrypted,
tags,
uri,
supported_os_versions
FROM aws.imagebuilder.components
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';

INSERT example

Use the following StackQL query and manifest file to create a new component resource, using stack-deploy.

/*+ create */
INSERT INTO aws.imagebuilder.components (
Name,
Version,
Platform,
region
)
SELECT
'{{ Name }}',
'{{ Version }}',
'{{ Platform }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.imagebuilder.components
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';

Permissions

To operate on the components resource, the following permissions are required:

Create

iam:CreateServiceLinkedRole,
iam:GetRole,
kms:GenerateDataKey*,
kms:Encrypt,
kms:Decrypt,
s3:GetObject,
s3:HeadBucket,
s3:GetBucketLocation,
imagebuilder:TagResource,
imagebuilder:GetComponent,
imagebuilder:CreateComponent

Read

imagebuilder:GetComponent

Delete

imagebuilder:GetComponent,
imagebuilder:UnTagResource,
imagebuilder:DeleteComponent

List

imagebuilder:ListComponents