Skip to main content

deployments

Creates, updates, deletes or gets a deployment resource or lists deployments in a region

Overview

Namedeployments
TypeResource
DescriptionResource for Greengrass V2 deployment.
Idaws.greengrassv2.deployments

Fields

NameDatatypeDescription
target_arnstring
parent_target_arnstring
deployment_idstring
deployment_namestring
componentsobject
iot_job_configurationobject
deployment_policiesobject
tagsobject
regionstringAWS region.

Methods

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

SELECT examples

Gets all deployments in a region.

SELECT
region,
target_arn,
parent_target_arn,
deployment_id,
deployment_name,
components,
iot_job_configuration,
deployment_policies,
tags
FROM aws.greengrassv2.deployments
WHERE region = 'us-east-1';

Gets all properties from an individual deployment.

SELECT
region,
target_arn,
parent_target_arn,
deployment_id,
deployment_name,
components,
iot_job_configuration,
deployment_policies,
tags
FROM aws.greengrassv2.deployments
WHERE region = 'us-east-1' AND data__Identifier = '<DeploymentId>';

INSERT example

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

/*+ create */
INSERT INTO aws.greengrassv2.deployments (
TargetArn,
region
)
SELECT
'{{ TargetArn }}',
'{{ region }}';

DELETE example

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

Permissions

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

Create

greengrass:CreateDeployment,
greengrass:GetDeployment,
greengrass:TagResource,
iot:CancelJob,
iot:CreateJob,
iot:DeleteThingShadow,
iot:DescribeJob,
iot:DescribeThing,
iot:DescribeThingGroup,
iot:GetThingShadow,
iot:UpdateJob,
iot:UpdateThingShadow

Read

greengrass:GetDeployment,
iot:DescribeJob,
iot:DescribeThing,
iot:DescribeThingGroup,
iot:GetThingShadow

Update

greengrass:GetDeployment,
greengrass:TagResource,
greengrass:UntagResource,
iot:DescribeJob

Delete

greengrass:DeleteDeployment,
greengrass:CancelDeployment,
iot:CancelJob,
iot:DeleteJob,
iot:DescribeJob

List

greengrass:ListDeployments,
iot:DescribeJob,
iot:DescribeThing,
iot:DescribeThingGroup,
iot:GetThingShadow