Skip to main content

deployments

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

Overview

Namedeployments
TypeResource
Idaws.greengrass.deployments

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_atstringThe time, in milliseconds since the epoch, when the deployment was created.
deployment_arnstringThe ARN of the deployment.
deployment_idstringThe ID of the deployment.
deployment_typestringThe type of deployment. When used for ''CreateDeployment'', only ''NewDeployment'' and ''Redeployment'' are valid. (NewDeployment, Redeployment, ResetDeployment, ForceResetDeployment)
group_arnstringThe ARN of the group for this deployment.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_deploymentsselectgroup_id, regionMaxResults, NextTokenReturns a history of deployments for the group.
create_deploymentinsertgroup_id, region, DeploymentTypeX-Amzn-Client-TokenCreates a deployment. ''CreateDeployment'' requests are idempotent with respect to the ''X-Amzn-Client-Token'' token and the request parameters.
reset_deploymentsexecgroup_id, regionX-Amzn-Client-TokenResets a group's deployments.

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
group_idstringThe ID of the Greengrass group.
regionstringAWS region (default: us-east-1)
MaxResultsstringThe maximum number of results to be returned per request.
NextTokenstringThe token for the next set of results, or ''null'' if there are no additional results.
X-Amzn-Client-TokenstringA client token used to correlate requests and responses.

SELECT examples

Returns a history of deployments for the group.

SELECT
created_at,
deployment_arn,
deployment_id,
deployment_type,
group_arn
FROM aws.greengrass.deployments
WHERE group_id = '{{ group_id }}' -- required
AND region = '{{ region }}' -- required
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
;

INSERT examples

Creates a deployment. ''CreateDeployment'' requests are idempotent with respect to the ''X-Amzn-Client-Token'' token and the request parameters.

INSERT INTO aws.greengrass.deployments (
DeploymentId,
DeploymentType,
GroupVersionId,
group_id,
region,
`X-Amzn-Client-Token`
)
SELECT
'{{ DeploymentId }}',
'{{ DeploymentType }}' /* required */,
'{{ GroupVersionId }}',
'{{ group_id }}',
'{{ region }}',
'{{ X-Amzn-Client-Token }}'
RETURNING
deployment_arn,
deployment_id
;

Lifecycle Methods

Resets a group's deployments.

EXEC aws.greengrass.deployments.reset_deployments
@group_id='{{ group_id }}' --required,
@region='{{ region }}' --required,
@X-Amzn-Client-Token='{{ X-Amzn-Client-Token }}'
@@json=
'{
"Force": {{ Force }}
}'
;