Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(aws-iot): Support for Thing Groups and Thing Types #18872

Open
2 tasks
NapalmCodes opened this issue Feb 8, 2022 · 4 comments
Open
2 tasks

(aws-iot): Support for Thing Groups and Thing Types #18872

NapalmCodes opened this issue Feb 8, 2022 · 4 comments
Labels
@aws-cdk/aws-iot Related to AWS IoT effort/large Large work item – several weeks of effort feature/new-construct A request for a new L2 construct feature-request A feature should be added or improved. p2

Comments

@NapalmCodes
Copy link

Description

Support for IoT thing groups and thing types in the CDK.

Use Case

To provision thing groups and thing types in our environment with IaC.

Proposed Solution

Implement APIs to create the aforementioned resources.

Other information

No response

Acknowledge

  • I may be able to implement this feature request
  • This feature might incur a breaking change
@NapalmCodes NapalmCodes added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Feb 8, 2022
@github-actions github-actions bot added the @aws-cdk/aws-iot Related to AWS IoT label Feb 8, 2022
@skinny85 skinny85 added p2 effort/large Large work item – several weeks of effort feature/new-construct A request for a new L2 construct and removed needs-triage This issue or PR still needs to be triaged. labels May 5, 2022
@skinny85 skinny85 removed their assignment May 5, 2022
@skinny85 skinny85 changed the title (aws-iot-alpha): Support for Thing Groups and Thing Types (aws-iot): Support for Thing Groups and Thing Types May 5, 2022
@yamatatsu
Copy link
Contributor

I'll try it.

@yamatatsu
Copy link
Contributor

yamatatsu commented Nov 3, 2022

Usage example

Thing, Thing Type, Thing Group

import * as iot from "aws-cdk-lib/aws-iot";

const thingType = new iot.ThingType(this, "ThingType", {
  thingTypeName: "example-thingTypeName",
  thingTypeDescription: "example-thingTypeDescription",
  searchableAttributes: ["xxx", "yyy"],
});

const thingGroup = new iot.ThingGroup(this, "ThingGroup", {
  thingGroupName: "example-thingGroupName",
  thingGroupDescription: "example-thingGroupDescription",
  attributes: {
    location: "xxxx",
  },
  mergeAttributes: true,
});

const thing = new iot.Thing(this, "Thing", {
  thingName: "example-thingName",
  attributes: {
    location: "xxxx",
  },
  thingType,
  thingGroup,
});

Add thing to thing group

import * as iot from "aws-cdk-lib/aws-iot";

const thingGroup = new iot.Thing(this, "ThingGroup", {
  thingGroupName: "example-thingGroupName",
});

const thing = new iot.Thing(this, "Thing", {
  thingName: "example-thingName",
});

thing.addToGroup(thingGroup);

Nested Group

import * as iot from "aws-cdk-lib/aws-iot";

const thingGroupL1 = new iot.Thing(this, "ThingGroupLayer1", {
  thingGroupName: "example-thingGroupName",
});

const thingGroupL2 = new iot.Thing(this, "ThingGroupLayer2", {
  thingGroupName: "example-thingGroupName",
  parentGroup: thingGroupL1,
});

Concern

CloudFormation support

CloudFormation don't have ThingGroup and ThingType resource type. So we should create ThingGroup and ThingType L2 constructs with custom resource.

Deleting a ThingType

Deleting a ThingType is a bit difficult. Because when the ThingType is not statue deprecated, it cannot be deleted. And we can delete it 5 minutes after it is deprecated.

@LMtx
Copy link

LMtx commented Nov 24, 2022

CDK support for the Thing Groups would be very helpful.

@github-actions github-actions bot added p1 and removed p2 labels Apr 23, 2023
@github-actions
Copy link

This issue has received a significant amount of attention so we are automatically upgrading its priority. A member of the community will see the re-prioritization and provide an update on the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-iot Related to AWS IoT effort/large Large work item – several weeks of effort feature/new-construct A request for a new L2 construct feature-request A feature should be added or improved. p2
Projects
None yet
Development

No branches or pull requests

5 participants