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 | awscc.imagebuilder.components |
Fields
- get (all properties)
- list (identifiers only)
| 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. |
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the component. |
region | string | AWS region. |
For more information, see AWS::ImageBuilder::Component.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | components | INSERT | Name, Platform, Version, region |
delete_resource | components | DELETE | Identifier, region |
update_resource | components | UPDATE | Identifier, PatchDocument, region |
list_resources | components_list_only | SELECT | region |
get_resource | components | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 awscc.imagebuilder.components
WHERE
region = 'us-east-1' AND
Identifier = '{{ arn }}';
Lists all components in a region.
SELECT
region,
arn
FROM awscc.imagebuilder.components_list_only
WHERE
region = 'us-east-1';
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 awscc.imagebuilder.components (
Name,
Version,
Platform,
region
)
SELECT
'{{ name }}',
'{{ version }}',
'{{ platform }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.imagebuilder.components (
Name,
Version,
Description,
ChangeDescription,
Platform,
Data,
KmsKeyId,
Tags,
Uri,
SupportedOsVersions,
region
)
SELECT
'{{ name }}',
'{{ version }}',
'{{ description }}',
'{{ change_description }}',
'{{ platform }}',
'{{ data }}',
'{{ kms_key_id }}',
'{{ tags }}',
'{{ uri }}',
'{{ supported_os_versions }}',
'{{ 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: change_description
value: '{{ change_description }}'
- name: platform
value: '{{ platform }}'
- name: data
value: '{{ data }}'
- name: kms_key_id
value: '{{ kms_key_id }}'
- name: tags
value: {}
- name: uri
value: '{{ uri }}'
- name: supported_os_versions
value:
- '{{ supported_os_versions[0] }}'
UPDATE example
Use the following StackQL query and manifest file to update a component resource, using stack-deploy.
/*+ update */
UPDATE awscc.imagebuilder.components
SET PatchDocument = string('{{ {
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';
DELETE example
/*+ delete */
DELETE FROM awscc.imagebuilder.components
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';
Permissions
To operate on the components resource, the following permissions are required:
- Create
- Update
- Read
- Delete
- List
iam:CreateServiceLinkedRole,
iam:GetRole,
kms:GenerateDataKey,
kms:GenerateDataKeyPair,
kms:GenerateDataKeyPairWithoutPlaintext,
kms:GenerateDataKeyWithoutPlaintext,
kms:Encrypt,
kms:Decrypt,
s3:GetObject,
s3:HeadBucket,
s3:GetBucketLocation,
imagebuilder:TagResource,
imagebuilder:GetComponent,
imagebuilder:CreateComponent
imagebuilder:TagResource,
imagebuilder:UntagResource
imagebuilder:GetComponent,
kms:Decrypt
imagebuilder:GetComponent,
imagebuilder:UntagResource,
imagebuilder:DeleteComponent
imagebuilder:ListComponents,
imagebuilder:ListComponentBuildVersions