mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-15 09:17: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",
|
||||
"Statement": [
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"iot:Connect"
|
||||
],
|
||||
"Resource": "*"
|
||||
},
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"iot:Publish",
|
||||
"iot:Receive"
|
||||
],
|
||||
"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/provisioning-templates/<template-name>/provision/*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": "iot:Subscribe",
|
||||
"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/provisioning-templates/<template-name>/provision/*"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"iot:Connect"
|
||||
],
|
||||
"Resource": "*"
|
||||
},
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"iot:Publish",
|
||||
"iot:Receive"
|
||||
],
|
||||
"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/provisioning-templates/<template-name>/provision/*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": "iot:Subscribe",
|
||||
"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/provisioning-templates/<template-name>/provision/*"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,54 +1,54 @@
|
|||
{
|
||||
"Parameters": {
|
||||
"SerialNumber": {
|
||||
"Type": "String"
|
||||
},
|
||||
"AWS::IoT::Certificate::Id": {
|
||||
"Type": "String"
|
||||
}
|
||||
},
|
||||
"Resources": {
|
||||
"certificate": {
|
||||
"Properties": {
|
||||
"CertificateId": {
|
||||
"Ref": "AWS::IoT::Certificate::Id"
|
||||
},
|
||||
"Status": "Active"
|
||||
},
|
||||
"Type": "AWS::IoT::Certificate"
|
||||
},
|
||||
"policy": {
|
||||
"Properties": {
|
||||
"PolicyName": "<provisioned-thing-policy>"
|
||||
},
|
||||
"Type": "AWS::IoT::Policy"
|
||||
},
|
||||
"thing": {
|
||||
"OverrideSettings": {
|
||||
"AttributePayload": "MERGE",
|
||||
"ThingGroups": "DO_NOTHING",
|
||||
"ThingTypeName": "REPLACE"
|
||||
},
|
||||
"Properties": {
|
||||
"AttributePayload": {},
|
||||
"ThingGroups": [],
|
||||
"ThingName": {
|
||||
"Fn::Join": [
|
||||
"",
|
||||
[
|
||||
"fp_demo_",
|
||||
{
|
||||
"Ref": "SerialNumber"
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"ThingTypeName": "fp_demo_things"
|
||||
},
|
||||
"Type": "AWS::IoT::Thing"
|
||||
}
|
||||
},
|
||||
"DeviceConfiguration": {
|
||||
"Foo": "Bar"
|
||||
}
|
||||
}
|
||||
{
|
||||
"Parameters": {
|
||||
"SerialNumber": {
|
||||
"Type": "String"
|
||||
},
|
||||
"AWS::IoT::Certificate::Id": {
|
||||
"Type": "String"
|
||||
}
|
||||
},
|
||||
"Resources": {
|
||||
"certificate": {
|
||||
"Properties": {
|
||||
"CertificateId": {
|
||||
"Ref": "AWS::IoT::Certificate::Id"
|
||||
},
|
||||
"Status": "Active"
|
||||
},
|
||||
"Type": "AWS::IoT::Certificate"
|
||||
},
|
||||
"policy": {
|
||||
"Properties": {
|
||||
"PolicyName": "<provisioned-thing-policy>"
|
||||
},
|
||||
"Type": "AWS::IoT::Policy"
|
||||
},
|
||||
"thing": {
|
||||
"OverrideSettings": {
|
||||
"AttributePayload": "MERGE",
|
||||
"ThingGroups": "DO_NOTHING",
|
||||
"ThingTypeName": "REPLACE"
|
||||
},
|
||||
"Properties": {
|
||||
"AttributePayload": {},
|
||||
"ThingGroups": [],
|
||||
"ThingName": {
|
||||
"Fn::Join": [
|
||||
"",
|
||||
[
|
||||
"fp_demo_",
|
||||
{
|
||||
"Ref": "SerialNumber"
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"ThingTypeName": "fp_demo_things"
|
||||
},
|
||||
"Type": "AWS::IoT::Thing"
|
||||
}
|
||||
},
|
||||
"DeviceConfiguration": {
|
||||
"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