deployments
Creates, updates, deletes or gets a deployment
resource or lists deployments
in a region
Overview
Name | deployments |
Type | Resource |
Description | Resource for Greengrass V2 deployment. |
Id | aws.greengrassv2.deployments |
Fields
Name | Datatype | Description |
---|---|---|
target_arn | string | |
parent_target_arn | string | |
deployment_id | string | |
deployment_name | string | |
components | object | |
iot_job_configuration | object | |
deployment_policies | object | |
tags | object | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | TargetArn, 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 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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.greengrassv2.deployments (
TargetArn,
region
)
SELECT
'{{ TargetArn }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.greengrassv2.deployments (
TargetArn,
ParentTargetArn,
DeploymentName,
Components,
IotJobConfiguration,
DeploymentPolicies,
Tags,
region
)
SELECT
'{{ TargetArn }}',
'{{ ParentTargetArn }}',
'{{ DeploymentName }}',
'{{ Components }}',
'{{ IotJobConfiguration }}',
'{{ DeploymentPolicies }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: deployment
props:
- name: TargetArn
value: '{{ TargetArn }}'
- name: ParentTargetArn
value: '{{ ParentTargetArn }}'
- name: DeploymentName
value: '{{ DeploymentName }}'
- name: Components
value: {}
- name: IotJobConfiguration
value:
JobExecutionsRolloutConfig:
ExponentialRate:
BaseRatePerMinute: '{{ BaseRatePerMinute }}'
IncrementFactor: null
RateIncreaseCriteria: {}
MaximumPerMinute: '{{ MaximumPerMinute }}'
AbortConfig:
CriteriaList:
- FailureType: '{{ FailureType }}'
Action: '{{ Action }}'
ThresholdPercentage: null
MinNumberOfExecutedThings: '{{ MinNumberOfExecutedThings }}'
TimeoutConfig:
InProgressTimeoutInMinutes: '{{ InProgressTimeoutInMinutes }}'
- name: DeploymentPolicies
value:
FailureHandlingPolicy: '{{ FailureHandlingPolicy }}'
ComponentUpdatePolicy:
TimeoutInSeconds: '{{ TimeoutInSeconds }}'
Action: '{{ Action }}'
ConfigurationValidationPolicy:
TimeoutInSeconds: '{{ TimeoutInSeconds }}'
- name: Tags
value: {}
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