AWS IoT 1-Click Projects Service

2018/05/14 - AWS IoT 1-Click Projects Service - 13 new api methods

Changes  Update iot1click-projects client to latest version

DisassociateDeviceFromPlacement (new) Link ¶

Removes a physical device from a placement.

See also: AWS API Documentation

Request Syntax

client.disassociate_device_from_placement(
    projectName='string',
    placementName='string',
    deviceTemplateName='string'
)
type projectName:

string

param projectName:

[REQUIRED]

The name of the project that contains the placement.

type placementName:

string

param placementName:

[REQUIRED]

The name of the placement that the device should be removed from.

type deviceTemplateName:

string

param deviceTemplateName:

[REQUIRED]

The device ID that should be removed from the placement.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

UpdatePlacement (new) Link ¶

Updates a placement with the given attributes. To clear an attribute, pass an empty value (i.e., "").

See also: AWS API Documentation

Request Syntax

client.update_placement(
    placementName='string',
    projectName='string',
    attributes={
        'string': 'string'
    }
)
type placementName:

string

param placementName:

[REQUIRED]

The name of the placement to update.

type projectName:

string

param projectName:

[REQUIRED]

The name of the project containing the placement to be updated.

type attributes:

dict

param attributes:

The user-defined object of attributes used to update the placement. The maximum number of key/value pairs is 50.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

DeleteProject (new) Link ¶

Deletes a project. To delete a project, it must not have any placements associated with it.

See also: AWS API Documentation

Request Syntax

client.delete_project(
    projectName='string'
)
type projectName:

string

param projectName:

[REQUIRED]

The name of the empty project to delete.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

ListProjects (new) Link ¶

Lists the AWS IoT 1-Click project(s) associated with your AWS account and region.

See also: AWS API Documentation

Request Syntax

client.list_projects(
    nextToken='string',
    maxResults=123
)
type nextToken:

string

param nextToken:

The token to retrieve the next set of results.

type maxResults:

integer

param maxResults:

The maximum number of results to return per request. If not set, a default value of 100 is used.

rtype:

dict

returns:

Response Syntax

{
    'projects': [
        {
            'projectName': 'string',
            'createdDate': datetime(2015, 1, 1),
            'updatedDate': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • projects (list) --

      An object containing the list of projects.

      • (dict) --

        An object providing summary information for a particular project for an associated AWS account and region.

        • projectName (string) --

          The name of the project being summarized.

        • createdDate (datetime) --

          The date when the project was originally created, in UNIX epoch time format.

        • updatedDate (datetime) --

          The date when the project was last updated, in UNIX epoch time format. If the project was not updated, then createdDate and updatedDate are the same.

    • nextToken (string) --

      The token used to retrieve the next set of results - will be effectively empty if there are no further results.

DeletePlacement (new) Link ¶

Deletes a placement. To delete a placement, it must not have any devices associated with it.

See also: AWS API Documentation

Request Syntax

client.delete_placement(
    placementName='string',
    projectName='string'
)
type placementName:

string

param placementName:

[REQUIRED]

The name of the empty placement to delete.

type projectName:

string

param projectName:

[REQUIRED]

The project containing the empty placement to delete.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

AssociateDeviceWithPlacement (new) Link ¶

Associates a physical device with a placement.

See also: AWS API Documentation

Request Syntax

client.associate_device_with_placement(
    projectName='string',
    placementName='string',
    deviceId='string',
    deviceTemplateName='string'
)
type projectName:

string

param projectName:

[REQUIRED]

The name of the project containing the placement in which to associate the device.

type placementName:

string

param placementName:

[REQUIRED]

The name of the placement in which to associate the device.

type deviceId:

string

param deviceId:

[REQUIRED]

The ID of the physical device to be associated with the given placement in the project. Note that a mandatory 4 character prefix is required for all deviceId values.

type deviceTemplateName:

string

param deviceTemplateName:

[REQUIRED]

The device template name to associate with the device ID.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

ListPlacements (new) Link ¶

Lists the placement(s) of a project.

See also: AWS API Documentation

Request Syntax

client.list_placements(
    projectName='string',
    nextToken='string',
    maxResults=123
)
type projectName:

string

param projectName:

[REQUIRED]

The project containing the placements to be listed.

type nextToken:

string

param nextToken:

The token to retrieve the next set of results.

type maxResults:

integer

param maxResults:

The maximum number of results to return per request. If not set, a default value of 100 is used.

rtype:

dict

returns:

Response Syntax

{
    'placements': [
        {
            'projectName': 'string',
            'placementName': 'string',
            'createdDate': datetime(2015, 1, 1),
            'updatedDate': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • placements (list) --

      An object listing the requested placements.

      • (dict) --

        An object providing summary information for a particular placement.

        • projectName (string) --

          The name of the project containing the placement.

        • placementName (string) --

          The name of the placement being summarized.

        • createdDate (datetime) --

          The date when the placement was originally created, in UNIX epoch time format.

        • updatedDate (datetime) --

          The date when the placement was last updated, in UNIX epoch time format. If the placement was not updated, then createdDate and updatedDate are the same.

    • nextToken (string) --

      The token used to retrieve the next set of results - will be effectively empty if there are no further results.

UpdateProject (new) Link ¶

Updates a project associated with your AWS account and region. With the exception of device template names, you can pass just the values that need to be updated because the update request will change only the values that are provided. To clear a value, pass the empty string (i.e., "").

See also: AWS API Documentation

Request Syntax

client.update_project(
    projectName='string',
    description='string',
    placementTemplate={
        'defaultAttributes': {
            'string': 'string'
        },
        'deviceTemplates': {
            'string': {
                'deviceType': 'string',
                'callbackOverrides': {
                    'string': 'string'
                }
            }
        }
    }
)
type projectName:

string

param projectName:

[REQUIRED]

The name of the project to be updated.

type description:

string

param description:

An optional user-defined description for the project.

type placementTemplate:

dict

param placementTemplate:

An object defining the project update. Once a project has been created, you cannot add device template names to the project. However, for a given placementTemplate, you can update the associated callbackOverrides for the device definition using this API.

  • defaultAttributes (dict) --

    The default attributes (key/value pairs) to be applied to all placements using this template.

    • (string) --

      • (string) --

  • deviceTemplates (dict) --

    An object specifying the DeviceTemplate for all placements using this ( PlacementTemplate) template.

    • (string) --

      • (dict) --

        An object representing a device for a placement template (see PlacementTemplate).

        • deviceType (string) --

          The device type, which currently must be "button".

        • callbackOverrides (dict) --

          An optional Lambda function to invoke instead of the default Lambda function provided by the placement template.

          • (string) --

            • (string) --

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

DescribePlacement (new) Link ¶

Describes a placement in a project.

See also: AWS API Documentation

Request Syntax

client.describe_placement(
    placementName='string',
    projectName='string'
)
type placementName:

string

param placementName:

[REQUIRED]

The name of the placement within a project.

type projectName:

string

param projectName:

[REQUIRED]

The project containing the placement to be described.

rtype:

dict

returns:

Response Syntax

{
    'placement': {
        'projectName': 'string',
        'placementName': 'string',
        'attributes': {
            'string': 'string'
        },
        'createdDate': datetime(2015, 1, 1),
        'updatedDate': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • placement (dict) --

      An object describing the placement.

      • projectName (string) --

        The name of the project containing the placement.

      • placementName (string) --

        The name of the placement.

      • attributes (dict) --

        The user-defined attributes associated with the placement.

        • (string) --

          • (string) --

      • createdDate (datetime) --

        The date when the placement was initially created, in UNIX epoch time format.

      • updatedDate (datetime) --

        The date when the placement was last updated, in UNIX epoch time format. If the placement was not updated, then createdDate and updatedDate are the same.

DescribeProject (new) Link ¶

Returns an object describing a project.

See also: AWS API Documentation

Request Syntax

client.describe_project(
    projectName='string'
)
type projectName:

string

param projectName:

[REQUIRED]

The name of the project to be described.

rtype:

dict

returns:

Response Syntax

{
    'project': {
        'projectName': 'string',
        'description': 'string',
        'createdDate': datetime(2015, 1, 1),
        'updatedDate': datetime(2015, 1, 1),
        'placementTemplate': {
            'defaultAttributes': {
                'string': 'string'
            },
            'deviceTemplates': {
                'string': {
                    'deviceType': 'string',
                    'callbackOverrides': {
                        'string': 'string'
                    }
                }
            }
        }
    }
}

Response Structure

  • (dict) --

    • project (dict) --

      An object describing the project.

      • projectName (string) --

        The name of the project for which to obtain information from.

      • description (string) --

        The description of the project.

      • createdDate (datetime) --

        The date when the project was originally created, in UNIX epoch time format.

      • updatedDate (datetime) --

        The date when the project was last updated, in UNIX epoch time format. If the project was not updated, then createdDate and updatedDate are the same.

      • placementTemplate (dict) --

        An object describing the project's placement specifications.

        • defaultAttributes (dict) --

          The default attributes (key/value pairs) to be applied to all placements using this template.

          • (string) --

            • (string) --

        • deviceTemplates (dict) --

          An object specifying the DeviceTemplate for all placements using this ( PlacementTemplate) template.

          • (string) --

            • (dict) --

              An object representing a device for a placement template (see PlacementTemplate).

              • deviceType (string) --

                The device type, which currently must be "button".

              • callbackOverrides (dict) --

                An optional Lambda function to invoke instead of the default Lambda function provided by the placement template.

                • (string) --

                  • (string) --

CreateProject (new) Link ¶

Creates an empty project with a placement template. A project contains zero or more placements that adhere to the placement template defined in the project.

See also: AWS API Documentation

Request Syntax

client.create_project(
    projectName='string',
    description='string',
    placementTemplate={
        'defaultAttributes': {
            'string': 'string'
        },
        'deviceTemplates': {
            'string': {
                'deviceType': 'string',
                'callbackOverrides': {
                    'string': 'string'
                }
            }
        }
    }
)
type projectName:

string

param projectName:

[REQUIRED]

The name of the project to create.

type description:

string

param description:

An optional description for the project.

type placementTemplate:

dict

param placementTemplate:

The schema defining the placement to be created. A placement template defines placement default attributes and device templates. You cannot add or remove device templates after the project has been created. However, you can update callbackOverrides for the device templates using the UpdateProject API.

  • defaultAttributes (dict) --

    The default attributes (key/value pairs) to be applied to all placements using this template.

    • (string) --

      • (string) --

  • deviceTemplates (dict) --

    An object specifying the DeviceTemplate for all placements using this ( PlacementTemplate) template.

    • (string) --

      • (dict) --

        An object representing a device for a placement template (see PlacementTemplate).

        • deviceType (string) --

          The device type, which currently must be "button".

        • callbackOverrides (dict) --

          An optional Lambda function to invoke instead of the default Lambda function provided by the placement template.

          • (string) --

            • (string) --

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

CreatePlacement (new) Link ¶

Creates an empty placement.

See also: AWS API Documentation

Request Syntax

client.create_placement(
    placementName='string',
    projectName='string',
    attributes={
        'string': 'string'
    }
)
type placementName:

string

param placementName:

[REQUIRED]

The name of the placement to be created.

type projectName:

string

param projectName:

[REQUIRED]

The name of the project in which to create the placement.

type attributes:

dict

param attributes:

Optional user-defined key/value pairs providing contextual data (such as location or function) for the placement.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --

GetDevicesInPlacement (new) Link ¶

Returns an object enumerating the devices in a placement.

See also: AWS API Documentation

Request Syntax

client.get_devices_in_placement(
    projectName='string',
    placementName='string'
)
type projectName:

string

param projectName:

[REQUIRED]

The name of the project containing the placement.

type placementName:

string

param placementName:

[REQUIRED]

The name of the placement to get the devices from.

rtype:

dict

returns:

Response Syntax

{
    'devices': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • devices (dict) --

      An object containing the devices (zero or more) within the placement.

      • (string) --

        • (string) --