components
Creates, updates, deletes, gets or lists a components resource.
Overview
| Name | components |
| Type | Resource |
| Id | aws.greengrassv2.components |
Fields
The following fields are returned by SELECT queries:
- get_component
- list_components
| Name | Datatype | Description |
|---|---|---|
recipe | string (byte) | The recipe of the component version. |
recipe_output_format | string | The format of the recipe. (JSON, YAML) |
tags | object | A 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. |
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN of the component version. (pattern: <code>arn:[^:]:greengrass:[^:]:(aws|[0-9]+):components:[^:]+</code>) |
component_name | string | The name of the component. |
latest_version | object | The latest version of the component and its details. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_component | select | arn, region | recipeOutputFormat | Gets the recipe for a version of a component. |
list_components | select | region | scope, maxResults, nextToken | Retrieves a paginated list of component summaries. This list includes components that you have permission to view. |
delete_component | delete | arn, region | 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. | |
describe_component | exec | arn, region | Retrieves 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.
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN of the component version. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The maximum number of results to be returned per paginated request. |
nextToken | string | The token to be used for the next set of paginated results. |
recipeOutputFormat | string | The format of the recipe. |
scope | string | The scope of the components to list. Default: PRIVATE |
SELECT examples
- get_component
- list_components
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 }}'
;
Retrieves a paginated list of component summaries. This list includes components that you have permission to view.
SELECT
arn,
component_name,
latest_version
FROM aws.greengrassv2.components
WHERE region = '{{ region }}' -- required
AND scope = '{{ scope }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
DELETE examples
- delete_component
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
- describe_component
Retrieves metadata for a version of a component.
EXEC aws.greengrassv2.components.describe_component
@arn='{{ arn }}' --required,
@region='{{ region }}' --required
;