mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-16 09:47:44 -04:00
Create example IoT Thing policy (#731)
* Create example claim policy and update formatting on previous examples * Add trailing linebreak
This commit is contained in:
parent
4610b37ade
commit
a727061dc2
3 changed files with 95 additions and 85 deletions
|
@ -1,31 +1,31 @@
|
||||||
{
|
{
|
||||||
"Version": "2012-10-17",
|
"Version": "2012-10-17",
|
||||||
"Statement": [
|
"Statement": [
|
||||||
{
|
{
|
||||||
"Effect": "Allow",
|
"Effect": "Allow",
|
||||||
"Action": [
|
"Action": [
|
||||||
"iot:Connect"
|
"iot:Connect"
|
||||||
],
|
],
|
||||||
"Resource": "*"
|
"Resource": "*"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Effect": "Allow",
|
"Effect": "Allow",
|
||||||
"Action": [
|
"Action": [
|
||||||
"iot:Publish",
|
"iot:Publish",
|
||||||
"iot:Receive"
|
"iot:Receive"
|
||||||
],
|
],
|
||||||
"Resource": [
|
"Resource": [
|
||||||
"arn:aws:iot:<aws-region>:<aws-account-id>:topic/$aws/certificates/create-from-csr/*",
|
"arn:aws:iot:<aws-region>:<aws-account-id>:topic/$aws/certificates/create-from-csr/*",
|
||||||
"arn:aws:iot:<aws-region>:<aws-account-id>:topic/$aws/provisioning-templates/<template-name>/provision/*"
|
"arn:aws:iot:<aws-region>:<aws-account-id>:topic/$aws/provisioning-templates/<template-name>/provision/*"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Effect": "Allow",
|
"Effect": "Allow",
|
||||||
"Action": "iot:Subscribe",
|
"Action": "iot:Subscribe",
|
||||||
"Resource": [
|
"Resource": [
|
||||||
"arn:aws:iot:<aws-region>:<aws-account-id>:topicfilter/$aws/certificates/create-from-csr/*",
|
"arn:aws:iot:<aws-region>:<aws-account-id>:topicfilter/$aws/certificates/create-from-csr/*",
|
||||||
"arn:aws:iot:<aws-region>:<aws-account-id>:topicfilter/$aws/provisioning-templates/<template-name>/provision/*"
|
"arn:aws:iot:<aws-region>:<aws-account-id>:topicfilter/$aws/provisioning-templates/<template-name>/provision/*"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,54 +1,54 @@
|
||||||
{
|
{
|
||||||
"Parameters": {
|
"Parameters": {
|
||||||
"SerialNumber": {
|
"SerialNumber": {
|
||||||
"Type": "String"
|
"Type": "String"
|
||||||
},
|
},
|
||||||
"AWS::IoT::Certificate::Id": {
|
"AWS::IoT::Certificate::Id": {
|
||||||
"Type": "String"
|
"Type": "String"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Resources": {
|
"Resources": {
|
||||||
"certificate": {
|
"certificate": {
|
||||||
"Properties": {
|
"Properties": {
|
||||||
"CertificateId": {
|
"CertificateId": {
|
||||||
"Ref": "AWS::IoT::Certificate::Id"
|
"Ref": "AWS::IoT::Certificate::Id"
|
||||||
},
|
},
|
||||||
"Status": "Active"
|
"Status": "Active"
|
||||||
},
|
},
|
||||||
"Type": "AWS::IoT::Certificate"
|
"Type": "AWS::IoT::Certificate"
|
||||||
},
|
},
|
||||||
"policy": {
|
"policy": {
|
||||||
"Properties": {
|
"Properties": {
|
||||||
"PolicyName": "<provisioned-thing-policy>"
|
"PolicyName": "<provisioned-thing-policy>"
|
||||||
},
|
},
|
||||||
"Type": "AWS::IoT::Policy"
|
"Type": "AWS::IoT::Policy"
|
||||||
},
|
},
|
||||||
"thing": {
|
"thing": {
|
||||||
"OverrideSettings": {
|
"OverrideSettings": {
|
||||||
"AttributePayload": "MERGE",
|
"AttributePayload": "MERGE",
|
||||||
"ThingGroups": "DO_NOTHING",
|
"ThingGroups": "DO_NOTHING",
|
||||||
"ThingTypeName": "REPLACE"
|
"ThingTypeName": "REPLACE"
|
||||||
},
|
},
|
||||||
"Properties": {
|
"Properties": {
|
||||||
"AttributePayload": {},
|
"AttributePayload": {},
|
||||||
"ThingGroups": [],
|
"ThingGroups": [],
|
||||||
"ThingName": {
|
"ThingName": {
|
||||||
"Fn::Join": [
|
"Fn::Join": [
|
||||||
"",
|
"",
|
||||||
[
|
[
|
||||||
"fp_demo_",
|
"fp_demo_",
|
||||||
{
|
{
|
||||||
"Ref": "SerialNumber"
|
"Ref": "SerialNumber"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"ThingTypeName": "fp_demo_things"
|
"ThingTypeName": "fp_demo_things"
|
||||||
},
|
},
|
||||||
"Type": "AWS::IoT::Thing"
|
"Type": "AWS::IoT::Thing"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"DeviceConfiguration": {
|
"DeviceConfiguration": {
|
||||||
"Foo": "Bar"
|
"Foo": "Bar"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"Version": "2012-10-17",
|
||||||
|
"Statement": [
|
||||||
|
{
|
||||||
|
"Effect": "Allow",
|
||||||
|
"Action": "iot:Connect",
|
||||||
|
"Resource": "arn:aws:iot:<aws-region>:<aws-account-id>:*"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue