components
Creates, updates, deletes or gets a component
resource or lists components
in a region
Overview
Name | components |
Type | Resource |
Description | Resource schema for AWS::ImageBuilder::Component |
Id | aws.imagebuilder.components |
Fields
Name | Datatype | Description |
---|---|---|
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. |
change_description | string | The change description of the component. |
type | string | The type of the component denotes whether the component is used to build the image or only to test it. |
platform | string | The platform of the component. |
data | string | The data of the component. |
kms_key_id | string | The KMS key identifier used to encrypt the component. |
encrypted | boolean | The encryption status of the component. |
tags | object | The tags associated with the component. |
uri | string | The uri of the component. |
supported_os_versions | array | The operating system (OS) version supported by the component. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, Platform, Version, region |
delete_resource | DELETE | data__Identifier, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.imagebuilder.components (
Name,
Version,
Platform,
region
)
SELECT
'{{ Name }}',
'{{ Version }}',
'{{ Platform }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.imagebuilder.components (
Name,
Version,
Description,
ChangeDescription,
Platform,
Data,
KmsKeyId,
Tags,
Uri,
SupportedOsVersions,
region
)
SELECT
'{{ Name }}',
'{{ Version }}',
'{{ Description }}',
'{{ ChangeDescription }}',
'{{ Platform }}',
'{{ Data }}',
'{{ KmsKeyId }}',
'{{ Tags }}',
'{{ Uri }}',
'{{ SupportedOsVersions }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: component
props:
- name: Name
value: '{{ Name }}'
- name: Version
value: '{{ Version }}'
- name: Description
value: '{{ Description }}'
- name: ChangeDescription
value: '{{ ChangeDescription }}'
- name: Platform
value: '{{ Platform }}'
- name: Data
value: '{{ Data }}'
- name: KmsKeyId
value: '{{ KmsKeyId }}'
- name: Tags
value: {}
- name: Uri
value: '{{ Uri }}'
- name: SupportedOsVersions
value:
- '{{ SupportedOsVersions[0] }}'
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