2017/09/20 - AWS Greengrass - 1 new 3 updated api methods
Changes Reset Deployments feature allows you to clean-up the cloud resource so you can delete the group. It also cleans up the core so that it goes back to the pre-deployment state.
Resets a group's deployments.
See also: AWS API Documentation
Request Syntax
client.reset_deployments( AmznClientToken='string', Force=True|False, GroupId='string' )
string
The client token used to request idempotent operations.
boolean
When set to true, perform a best-effort only core reset.
string
[REQUIRED] The unique Id of the AWS Greengrass Group
dict
Response Syntax
{ 'DeploymentArn': 'string', 'DeploymentId': 'string' }
Response Structure
(dict) -- Success. The group's deployments were reset.
DeploymentArn (string) -- The arn of the reset deployment.
DeploymentId (string) -- The id of the reset deployment.
{'DeploymentType': ['ResetDeployment', 'ForceResetDeployment']}
Creates a deployment.
See also: AWS API Documentation
Request Syntax
client.create_deployment( AmznClientToken='string', DeploymentId='string', DeploymentType='NewDeployment'|'Redeployment'|'ResetDeployment'|'ForceResetDeployment', GroupId='string', GroupVersionId='string' )
string
The client token used to request idempotent operations.
string
Id of the deployment if you wish to redeploy a previous deployment.
string
Type of deployment. When used in CreateDeployment, only NewDeployment and Redeployment are valid.
string
[REQUIRED] The unique Id of the AWS Greengrass Group
string
Group Version you wish to deploy.
dict
Response Syntax
{ 'DeploymentArn': 'string', 'DeploymentId': 'string' }
Response Structure
(dict) -- Successfully deployed the given group
DeploymentArn (string) -- The arn of the deployment.
DeploymentId (string) -- The id of the deployment.
{'DeploymentType': 'NewDeployment | Redeployment | ResetDeployment | ' 'ForceResetDeployment', 'ErrorDetails': [{'DetailedErrorCode': 'string', 'DetailedErrorMessage': 'string'}]}
Returns the status of a deployment.
See also: AWS API Documentation
Request Syntax
client.get_deployment_status( DeploymentId='string', GroupId='string' )
string
[REQUIRED] the deployment Id
string
[REQUIRED] The unique Id of the AWS Greengrass Group
dict
Response Syntax
{ 'DeploymentStatus': 'string', 'DeploymentType': 'NewDeployment'|'Redeployment'|'ResetDeployment'|'ForceResetDeployment', 'ErrorDetails': [ { 'DetailedErrorCode': 'string', 'DetailedErrorMessage': 'string' }, ], 'ErrorMessage': 'string', 'UpdatedAt': 'string' }
Response Structure
(dict) -- The response body contains the status of a deployment for a group.
DeploymentStatus (string) -- Status of the deployment.
DeploymentType (string) -- The type of the deployment.
ErrorDetails (list) -- The error Details
(dict) -- ErrorDetail
DetailedErrorCode (string) -- Detailed Error Code
DetailedErrorMessage (string) -- Detailed Error Message
ErrorMessage (string) -- Error Message
UpdatedAt (string) -- Last time the deployment status was updated.
{'Deployments': {'DeploymentType': 'NewDeployment | Redeployment | ' 'ResetDeployment | ForceResetDeployment'}}
Returns a history of deployments for the group.
See also: AWS API Documentation
Request Syntax
client.list_deployments( GroupId='string', MaxResults='string', NextToken='string' )
string
[REQUIRED] The unique Id of the AWS Greengrass Group
string
Specifies the maximum number of list results to be returned in this page
string
Specifies the pagination token used when iterating through a paginated request
dict
Response Syntax
{ 'Deployments': [ { 'CreatedAt': 'string', 'DeploymentArn': 'string', 'DeploymentId': 'string', 'DeploymentType': 'NewDeployment'|'Redeployment'|'ResetDeployment'|'ForceResetDeployment', 'GroupArn': 'string' }, ], 'NextToken': 'string' }
Response Structure
(dict) -- The response body contains the list of deployments for the given group Id
Deployments (list) -- List of deployments for the requested groups
(dict) -- Information on the deployment
CreatedAt (string) -- Timestamp when the deployment was created.
DeploymentArn (string) -- Arn of the deployment.
DeploymentId (string) -- Id of the deployment.
DeploymentType (string) -- The type of deployment.
GroupArn (string) -- Arn of the group for this deployment.
NextToken (string) -- The token for the next set of results, or ''null'' if there are no additional results.