Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 13.23 KB | None | 0 0
  1. {
  2.     "Resources": {
  3.         "exoDevicePolicy": {
  4.             "Properties": {
  5.                 "PolicyDocument": {
  6.                     "Statement": [
  7.                         {
  8.                             "Action": [
  9.                                 "iot:Connect"
  10.                             ],
  11.                             "Effect": "Allow",
  12.                             "Resources": [
  13.                                 {
  14.                                     "Fn::Join": [
  15.                                         "",
  16.                                         [
  17.                                             "arn:aws:iot:",
  18.                                             {
  19.                                                 "Ref": "AWS::Region"
  20.                                             },
  21.                                             ":",
  22.                                             {
  23.                                                 "Ref": "AWS::AccountId"
  24.                                             },
  25.                                             ":",
  26.                                             "topic/$aws/things/${iot:Connection.Thing.ThingName}/shadow/update"
  27.                                         ]
  28.                                     ]
  29.                                 },
  30.                                 {
  31.                                     "Fn::Join": [
  32.                                         "",
  33.                                         [
  34.                                             "arn:aws:iot:",
  35.                                             {
  36.                                                 "Ref": "AWS::Region"
  37.                                             },
  38.                                             ":",
  39.                                             {
  40.                                                 "Ref": "AWS::AccountId"
  41.                                             },
  42.                                             ":",
  43.                                             "topic/$aws/things/${iot:Connection.Thing.ThingName}/shadow/get"
  44.                                         ]
  45.                                     ]
  46.                                 },
  47.                                 {
  48.                                     "Fn::Join": [
  49.                                         "",
  50.                                         [
  51.                                             "arn:aws:iot:",
  52.                                             {
  53.                                                 "Ref": "AWS::Region"
  54.                                             },
  55.                                             ":",
  56.                                             {
  57.                                                 "Ref": "AWS::AccountId"
  58.                                             },
  59.                                             ":",
  60.                                             "topic/_vShadowPub/${iot:Connection.Thing.ThingName}/subshadow/*"
  61.                                         ]
  62.                                     ]
  63.                                 },
  64.                                 {
  65.                                     "Fn::Join": [
  66.                                         "",
  67.                                         [
  68.                                             "arn:aws:iot:",
  69.                                             {
  70.                                                 "Ref": "AWS::Region"
  71.                                             },
  72.                                             ":",
  73.                                             {
  74.                                                 "Ref": "AWS::AccountId"
  75.                                             },
  76.                                             ":",
  77.                                             "topic//download/control/*"
  78.                                         ]
  79.                                     ]
  80.                                 },
  81.                                 {
  82.                                     "Fn::Join": [
  83.                                         "",
  84.                                         [
  85.                                             "arn:aws:iot:",
  86.                                             {
  87.                                                 "Ref": "AWS::Region"
  88.                                             },
  89.                                             ":",
  90.                                             {
  91.                                                 "Ref": "AWS::AccountId"
  92.                                             },
  93.                                             ":",
  94.                                             "topic/error/iaqualink/*"
  95.                                         ]
  96.                                     ]
  97.                                 },
  98.                                 {
  99.                                     "Fn::Join": [
  100.                                         "",
  101.                                         [
  102.                                             "arn:aws:iot:",
  103.                                             {
  104.                                                 "Ref": "AWS::Region"
  105.                                             },
  106.                                             ":",
  107.                                             {
  108.                                                 "Ref": "AWS::AccountId"
  109.                                             },
  110.                                             ":",
  111.                                             "topic/data/iaqualink/*\n"
  112.                                         ]
  113.                                     ]
  114.                                 }
  115.                             ]
  116.                         },
  117.                         {
  118.                             "Action": [
  119.                                 "iot:Publish"
  120.                             ],
  121.                             "Effect": "Allow",
  122.                             "Resources": [
  123.                                 {
  124.                                     "Fn::Join": [
  125.                                         "",
  126.                                         [
  127.                                             "arn:aws:iot:",
  128.                                             {
  129.                                                 "Ref": "AWS::Region"
  130.                                             },
  131.                                             ":",
  132.                                             {
  133.                                                 "Ref": "AWS::AccountId"
  134.                                             },
  135.                                             ":",
  136.                                             "topic/$aws/things/${iot:Connection.Thing.ThingName}/shadow/update"
  137.                                         ]
  138.                                     ]
  139.                                 },
  140.                                 {
  141.                                     "Fn::Join": [
  142.                                         "",
  143.                                         [
  144.                                             "arn:aws:iot:",
  145.                                             {
  146.                                                 "Ref": "AWS::Region"
  147.                                             },
  148.                                             ":",
  149.                                             {
  150.                                                 "Ref": "AWS::AccountId"
  151.                                             },
  152.                                             ":",
  153.                                             "topic/$aws/things/${iot:Connection.Thing.ThingName}/shadow/get"
  154.                                         ]
  155.                                     ]
  156.                                 },
  157.                                 {
  158.                                     "Fn::Join": [
  159.                                         "",
  160.                                         [
  161.                                             "arn:aws:iot:",
  162.                                             {
  163.                                                 "Ref": "AWS::Region"
  164.                                             },
  165.                                             ":",
  166.                                             {
  167.                                                 "Ref": "AWS::AccountId"
  168.                                             },
  169.                                             ":",
  170.                                             "topic/_vShadowPub/${iot:Connection.Thing.ThingName}/subshadow/*"
  171.                                         ]
  172.                                     ]
  173.                                 },
  174.                                 {
  175.                                     "Fn::Join": [
  176.                                         "",
  177.                                         [
  178.                                             "arn:aws:iot:",
  179.                                             {
  180.                                                 "Ref": "AWS::Region"
  181.                                             },
  182.                                             ":",
  183.                                             {
  184.                                                 "Ref": "AWS::AccountId"
  185.                                             },
  186.                                             ":",
  187.                                             "topic//download/control/*"
  188.                                         ]
  189.                                     ]
  190.                                 },
  191.                                 {
  192.                                     "Fn::Join": [
  193.                                         "",
  194.                                         [
  195.                                             "arn:aws:iot:",
  196.                                             {
  197.                                                 "Ref": "AWS::Region"
  198.                                             },
  199.                                             ":",
  200.                                             {
  201.                                                 "Ref": "AWS::AccountId"
  202.                                             },
  203.                                             ":",
  204.                                             "topic/error/iaqualink/*"
  205.                                         ]
  206.                                     ]
  207.                                 },
  208.                                 {
  209.                                     "Fn::Join": [
  210.                                         "",
  211.                                         [
  212.                                             "arn:aws:iot:",
  213.                                             {
  214.                                                 "Ref": "AWS::Region"
  215.                                             },
  216.                                             ":",
  217.                                             {
  218.                                                 "Ref": "AWS::AccountId"
  219.                                             },
  220.                                             ":",
  221.                                             "topic/data/iaqualink/*\n"
  222.                                         ]
  223.                                     ]
  224.                                 }
  225.                             ]
  226.                         },
  227.                         {
  228.                             "Action": [
  229.                                 "iot:Receive"
  230.                             ],
  231.                             "Effect": "Allow",
  232.                             "Resources": [
  233.                                 {
  234.                                     "Fn::Join": [
  235.                                         "",
  236.                                         [
  237.                                             "arn:aws:iot:",
  238.                                             {
  239.                                                 "Ref": "AWS::Region"
  240.                                             },
  241.                                             ":",
  242.                                             {
  243.                                                 "Ref": "AWS::AccountId"
  244.                                             },
  245.                                             ":",
  246.                                             "topic/$aws/things/${iot:Connection.Thing.ThingName}/shadow/*"
  247.                                         ]
  248.                                     ]
  249.                                 },
  250.                                 {
  251.                                     "Fn::Join": [
  252.                                         "",
  253.                                         [
  254.                                             "arn:aws:iot:",
  255.                                             {
  256.                                                 "Ref": "AWS::Region"
  257.                                             },
  258.                                             ":",
  259.                                             {
  260.                                                 "Ref": "AWS::AccountId"
  261.                                             },
  262.                                             ":",
  263.                                             "topic//download/chunk/*\n"
  264.                                         ]
  265.                                     ]
  266.                                 }
  267.                             ]
  268.                         }
  269.                     ],
  270.                     "Version": "2012-10-17"
  271.                 },
  272.                 "PolicyName": "exoDevicePolicy"
  273.             },
  274.             "Type": "AWS::IoT::Policy"
  275.         }
  276.     }
  277. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement