Amazon cloudformation 云信息模板中的事物类型

Amazon cloudformation 云信息模板中的事物类型,amazon-cloudformation,aws-iot,Amazon Cloudformation,Aws Iot,从中,有一个在AWS IoT中创建东西的语法,但我找不到如何将它连接到东西类型。可以这样写吗 AWSTemplateFormatVersion: "2010-09-09" Resources: MyThing: Type: "AWS::IoT::Thing" Properties: ThingName: "coffeemachine-12" ThingType: "coffeemachine" AttributePayload:

从中,有一个在AWS IoT中创建东西的语法,但我找不到如何将它连接到东西类型。可以这样写吗

AWSTemplateFormatVersion: "2010-09-09"
Resources: 
  MyThing: 
    Type: "AWS::IoT::Thing"
    Properties: 
      ThingName: "coffeemachine-12"
      ThingType: "coffeemachine"
      AttributePayload: 
        Attributes: 
          temp: "celcius"

如何在AWS CloudFormation模板中配置/创建AWS物联网类型?

您是否在询问更新CloudFormation堆栈时如何配置ThingType

如果是这样,您可能希望执行以下操作:

Parameters:
  ThingType:
    Description: 'Description for ThingType'
    Type: String

Resources: 
  MyThing: 
    Type: "AWS::IoT::Thing"
    Properties: 
      ThingName: "coffeemachine-12"
      ThingType: !Ref ThingType
      AttributePayload: 
        Attributes: 
          temp: "celcius"
基本上,您可以将ThingType声明为参数,并在创建资源时添加对此变量的引用


希望这有助于

您目前无法通过CloudFormation管理事物类型。但是,您可以在创建对象时引用现有对象类型

事物类型的语义不适合通过CloudFormation实现自动化。例如:

  • 它们是不变的
  • 删除需要弃用,然后是5分钟的冷却期
这无疑是CloudFormation不支持它们的原因。

AWS::IoT::Thing资源中没有“ThingType”属性。