component_versions
Creates, updates, deletes or gets a component_version
resource or lists component_versions
in a region
Overview
Name | component_versions |
Type | Resource |
Description | Resource for Greengrass component version. |
Id | aws.greengrassv2.component_versions |
Fields
Name | Datatype | Description |
---|---|---|
arn | string | |
component_name | string | |
component_version | string | |
inline_recipe | string | |
lambda_function | object | |
tags | object | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.greengrassv2.component_versions (
InlineRecipe,
LambdaFunction,
Tags,
region
)
SELECT
'{{ InlineRecipe }}',
'{{ LambdaFunction }}',
'{{ Tags }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.greengrassv2.component_versions (
InlineRecipe,
LambdaFunction,
Tags,
region
)
SELECT
'{{ InlineRecipe }}',
'{{ LambdaFunction }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: component_version
props:
- name: InlineRecipe
value: '{{ InlineRecipe }}'
- name: LambdaFunction
value:
LambdaArn: '{{ LambdaArn }}'
ComponentName: '{{ ComponentName }}'
ComponentVersion: '{{ ComponentVersion }}'
ComponentPlatforms:
- Name: '{{ Name }}'
Attributes: {}
ComponentDependencies: {}
ComponentLambdaParameters:
EventSources:
- Topic: '{{ Topic }}'
Type: '{{ Type }}'
MaxQueueSize: '{{ MaxQueueSize }}'
MaxInstancesCount: '{{ MaxInstancesCount }}'
MaxIdleTimeInSeconds: '{{ MaxIdleTimeInSeconds }}'
TimeoutInSeconds: '{{ TimeoutInSeconds }}'
StatusTimeoutInSeconds: '{{ StatusTimeoutInSeconds }}'
Pinned: '{{ Pinned }}'
InputPayloadEncodingType: '{{ InputPayloadEncodingType }}'
ExecArgs:
- '{{ ExecArgs[0] }}'
EnvironmentVariables: {}
LinuxProcessParams:
IsolationMode: '{{ IsolationMode }}'
ContainerParams:
MemorySizeInKB: '{{ MemorySizeInKB }}'
MountROSysfs: '{{ MountROSysfs }}'
Volumes:
- SourcePath: '{{ SourcePath }}'
DestinationPath: null
Permission: '{{ Permission }}'
AddGroupOwner: '{{ AddGroupOwner }}'
Devices:
- Path: null
Permission: null
AddGroupOwner: null
- name: Tags
value: {}
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