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 | awscc.greengrassv2.deployments |
Fields
- get (all properties)
- list (identifiers only)
| 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. |
| Name | Datatype | Description |
|---|---|---|
deployment_id | string | |
region | string | AWS region. |
For more information, see AWS::GreengrassV2::Deployment.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | deployments | INSERT | TargetArn, region |
delete_resource | deployments | DELETE | Identifier, region |
update_resource | deployments | UPDATE | Identifier, PatchDocument, region |
list_resources | deployments_list_only | SELECT | region |
get_resource | deployments | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 awscc.greengrassv2.deployments
WHERE
region = 'us-east-1' AND
Identifier = '{{ deployment_id }}';
Lists all deployments in a region.
SELECT
region,
deployment_id
FROM awscc.greengrassv2.deployments_list_only
WHERE
region = 'us-east-1';
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 awscc.greengrassv2.deployments (
TargetArn,
region
)
SELECT
'{{ target_arn }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.greengrassv2.deployments (
TargetArn,
ParentTargetArn,
DeploymentName,
Components,
IotJobConfiguration,
DeploymentPolicies,
Tags,
region
)
SELECT
'{{ target_arn }}',
'{{ parent_target_arn }}',
'{{ deployment_name }}',
'{{ components }}',
'{{ iot_job_configuration }}',
'{{ deployment_policies }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: deployment
props:
- name: target_arn
value: '{{ target_arn }}'
- name: parent_target_arn
value: '{{ parent_target_arn }}'
- name: deployment_name
value: '{{ deployment_name }}'
- name: components
value: {}
- name: iot_job_configuration
value:
job_executions_rollout_config:
exponential_rate:
base_rate_per_minute: '{{ base_rate_per_minute }}'
increment_factor: null
rate_increase_criteria: {}
maximum_per_minute: '{{ maximum_per_minute }}'
abort_config:
criteria_list:
- failure_type: '{{ failure_type }}'
action: '{{ action }}'
threshold_percentage: null
min_number_of_executed_things: '{{ min_number_of_executed_things }}'
timeout_config:
in_progress_timeout_in_minutes: '{{ in_progress_timeout_in_minutes }}'
- name: deployment_policies
value:
failure_handling_policy: '{{ failure_handling_policy }}'
component_update_policy:
timeout_in_seconds: '{{ timeout_in_seconds }}'
action: '{{ action }}'
configuration_validation_policy:
timeout_in_seconds: '{{ timeout_in_seconds }}'
- name: tags
value: {}
UPDATE example
Use the following StackQL query and manifest file to update a deployment resource, using stack-deploy.
/*+ update */
UPDATE awscc.greengrassv2.deployments
SET PatchDocument = string('{{ {
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ deployment_id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.greengrassv2.deployments
WHERE
Identifier = '{{ deployment_id }}' AND
region = 'us-east-1';
Permissions
To operate on the deployments resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
greengrass:CreateDeployment,
greengrass:GetDeployment,
greengrass:TagResource,
iot:CancelJob,
iot:CreateJob,
iot:DeleteThingShadow,
iot:DescribeJob,
iot:DescribeThing,
iot:DescribeThingGroup,
iot:GetThingShadow,
iot:UpdateJob,
iot:UpdateThingShadow
greengrass:GetDeployment,
iot:DescribeJob,
iot:DescribeThing,
iot:DescribeThingGroup,
iot:GetThingShadow
greengrass:GetDeployment,
greengrass:TagResource,
greengrass:UntagResource,
iot:DescribeJob
greengrass:DeleteDeployment,
greengrass:CancelDeployment,
iot:CancelJob,
iot:DeleteJob,
iot:DescribeJob
greengrass:ListDeployments,
iot:DescribeJob,
iot:DescribeThing,
iot:DescribeThingGroup,
iot:GetThingShadow