AWS IoT 1-Click Projects Service

2019/03/22 - AWS IoT 1-Click Projects Service - 3 new 3 updated api methods

Changes  This release adds tagging support for AWS IoT 1-Click Project resources. Use these APIs to add, remove, or list tags on Projects, and leverage the tags for various authorization and billing scenarios. This release also adds the ARN property to projects for DescribeProject and ListProject responses.

UntagResource (new) Link ¶

Removes one or more tags (metadata key/value pairs) from a resource.

See also: AWS API Documentation

Request Syntax

client.untag_resource(
    resourceArn='string',
    tagKeys=[
        'string',
    ]
)
type resourceArn

string

param resourceArn

[REQUIRED]

The ARN of the resource whose tag you want to remove.

type tagKeys

list

param tagKeys

[REQUIRED]

The keys of those tags which you want to remove.

  • (string) --

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

TagResource (new) Link ¶

Creates or modifies tags for a resource. Tags are key/value pairs (metadata) that can be used to manage a resource. For more information, see AWS Tagging Strategies.

See also: AWS API Documentation

Request Syntax

client.tag_resource(
    resourceArn='string',
    tags={
        'string': 'string'
    }
)
type resourceArn

string

param resourceArn

[REQUIRED]

The ARN of the resouce for which tag(s) should be added or modified.

type tags

dict

param tags

[REQUIRED]

The new or modifying tag(s) for the resource. See AWS IoT 1-Click Service Limits for the maximum number of tags allowed per resource.

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

ListTagsForResource (new) Link ¶

Lists the tags (metadata key/value pairs) which you have assigned to the resource.

See also: AWS API Documentation

Request Syntax

client.list_tags_for_resource(
    resourceArn='string'
)
type resourceArn

string

param resourceArn

[REQUIRED]

The ARN of the resource whose tags you want to list.

rtype

dict

returns

Response Syntax

{
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • tags (dict) --

      The tags (metadata key/value pairs) which you have assigned to the resource.

      • (string) --

        • (string) --

CreateProject (updated) Link ¶
Changes (request)
{'tags': {'string': 'string'}}

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'
                }
            }
        }
    },
    tags={
        '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) --

type tags

dict

param tags

Optional tags (metadata key/value pairs) to be associated with the project. For example, { {"key1": "value1", "key2": "value2"} } . For more information, see AWS Tagging Strategies.

  • (string) --

    • (string) --

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

DescribeProject (updated) Link ¶
Changes (response)
{'project': {'arn': 'string', 'tags': {'string': 'string'}}}

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': {
        'arn': 'string',
        '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'
                    }
                }
            }
        },
        'tags': {
            'string': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • project (dict) --

      An object describing the project.

      • arn (string) --

        The ARN of 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) --

      • tags (dict) --

        The tags (metadata key/value pairs) associated with the project.

        • (string) --

          • (string) --

ListProjects (updated) Link ¶
Changes (response)
{'projects': {'arn': 'string', 'tags': {'string': 'string'}}}

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': [
        {
            'arn': 'string',
            'projectName': 'string',
            'createdDate': datetime(2015, 1, 1),
            'updatedDate': datetime(2015, 1, 1),
            'tags': {
                'string': 'string'
            }
        },
    ],
    '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.

        • arn (string) --

          The ARN of the project.

        • 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.

        • tags (dict) --

          The tags (metadata key/value pairs) associated with the project.

          • (string) --

            • (string) --

    • nextToken (string) --

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