AWS Greengrass

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.

ResetDeployments (new) Link ¶

Resets a group's deployments.

See also: AWS API Documentation

Request Syntax

client.reset_deployments(
    AmznClientToken='string',
    Force=True|False,
    GroupId='string'
)
type AmznClientToken

string

param AmznClientToken

The client token used to request idempotent operations.

type Force

boolean

param Force

When set to true, perform a best-effort only core reset.

type GroupId

string

param GroupId

[REQUIRED] The unique Id of the AWS Greengrass Group

rtype

dict

returns

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.

CreateDeployment (updated) Link ¶
Changes (request)
{'DeploymentType': {'ForceResetDeployment', 'ResetDeployment'}}

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'
)
type AmznClientToken

string

param AmznClientToken

The client token used to request idempotent operations.

type DeploymentId

string

param DeploymentId

Id of the deployment if you wish to redeploy a previous deployment.

type DeploymentType

string

param DeploymentType

Type of deployment. When used in CreateDeployment, only NewDeployment and Redeployment are valid.

type GroupId

string

param GroupId

[REQUIRED] The unique Id of the AWS Greengrass Group

type GroupVersionId

string

param GroupVersionId

Group Version you wish to deploy.

rtype

dict

returns

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.

GetDeploymentStatus (updated) Link ¶
Changes (response)
{'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'
)
type DeploymentId

string

param DeploymentId

[REQUIRED] the deployment Id

type GroupId

string

param GroupId

[REQUIRED] The unique Id of the AWS Greengrass Group

rtype

dict

returns

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.

ListDeployments (updated) Link ¶
Changes (response)
{'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'
)
type GroupId

string

param GroupId

[REQUIRED] The unique Id of the AWS Greengrass Group

type MaxResults

string

param MaxResults

Specifies the maximum number of list results to be returned in this page

type NextToken

string

param NextToken

Specifies the pagination token used when iterating through a paginated request

rtype

dict

returns

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.