Skip to main content

components

Creates, updates, deletes, gets or lists a components resource.

Overview

Namecomponents
TypeResource
Idaws.greengrassv2.components

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
recipestring (byte)The recipe of the component version.
recipe_output_formatstringThe format of the recipe. (JSON, YAML)
tagsobjectA list of key-value pairs that contain metadata for the resource. For more information, see Tag your resources in the IoT Greengrass V2 Developer Guide.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_componentselectarn, regionrecipeOutputFormatGets the recipe for a version of a component.
list_componentsselectregionscope, maxResults, nextTokenRetrieves a paginated list of component summaries. This list includes components that you have permission to view.
delete_componentdeletearn, regionDeletes a version of a component from IoT Greengrass. This operation deletes the component's recipe and artifacts. As a result, deployments that refer to this component version will fail. If you have deployments that use this component version, you can remove the component from the deployment or update the deployment to use a valid version.
describe_componentexecarn, regionRetrieves metadata for a version of a component.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
arnstringThe ARN of the component version.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of results to be returned per paginated request.
nextTokenstringThe token to be used for the next set of paginated results.
recipeOutputFormatstringThe format of the recipe.
scopestringThe scope of the components to list. Default: PRIVATE

SELECT examples

Gets the recipe for a version of a component.

SELECT
recipe,
recipe_output_format,
tags
FROM aws.greengrassv2.components
WHERE arn = '{{ arn }}' -- required
AND region = '{{ region }}' -- required
AND recipeOutputFormat = '{{ recipeOutputFormat }}'
;

DELETE examples

Deletes a version of a component from IoT Greengrass. This operation deletes the component's recipe and artifacts. As a result, deployments that refer to this component version will fail. If you have deployments that use this component version, you can remove the component from the deployment or update the deployment to use a valid version.

DELETE FROM aws.greengrassv2.components
WHERE arn = '{{ arn }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Retrieves metadata for a version of a component.

EXEC aws.greengrassv2.components.describe_component
@arn='{{ arn }}' --required,
@region='{{ region }}' --required
;