Skip to main content

component_versions

Creates, updates, deletes or gets a component_version resource or lists component_versions in a region

Overview

Namecomponent_versions
TypeResource
DescriptionResource for Greengrass component version.
Idaws.greengrassv2.component_versions

Fields

NameDatatypeDescription
arnstring
component_namestring
component_versionstring
inline_recipestring
lambda_functionobject
tagsobject
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTregion
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all component_versions in a region.

SELECT
region,
arn,
component_name,
component_version,
inline_recipe,
lambda_function,
tags
FROM aws.greengrassv2.component_versions
WHERE region = 'us-east-1';

Gets all properties from an individual component_version.

SELECT
region,
arn,
component_name,
component_version,
inline_recipe,
lambda_function,
tags
FROM aws.greengrassv2.component_versions
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';

INSERT example

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

/*+ create */
INSERT INTO aws.greengrassv2.component_versions (
InlineRecipe,
LambdaFunction,
Tags,
region
)
SELECT
'{{ InlineRecipe }}',
'{{ LambdaFunction }}',
'{{ Tags }}',
'{{ region }}';

DELETE example

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

Permissions

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

Create

greengrass:CreateComponentVersion,
greengrass:DescribeComponent,
greengrass:ListTagsForResource,
greengrass:TagResource,
lambda:GetFunction,
s3:GetObject

Read

greengrass:DescribeComponent,
greengrass:ListTagsForResource

Update

greengrass:DescribeComponent,
greengrass:ListTagsForResource,
greengrass:TagResource,
greengrass:UntagResource

Delete

greengrass:DeleteComponent

List

greengrass:ListComponentVersions