⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
doc
/
awscli
/
examples
/
iotsitewise
/
View File Name :
create-access-policy.rst
**Example 1: To grant a user administrative access to a portal** The following ``create-access-policy`` example creates an access policy that grants a user administrative access to a web portal for a wind farm company. :: aws iotsitewise create-access-policy \ --cli-input-json file://create-portal-administrator-access-policy.json Contents of ``create-portal-administrator-access-policy.json``:: { "accessPolicyIdentity": { "user": { "id": "a1b2c3d4e5-a1b2c3d4-5678-90ab-cdef-bbbbbEXAMPLE" } }, "accessPolicyPermission": "ADMINISTRATOR", "accessPolicyResource": { "portal": { "id": "a1b2c3d4-5678-90ab-cdef-aaaaaEXAMPLE" } } } Output:: { "accessPolicyId": "a1b2c3d4-5678-90ab-cdef-cccccEXAMPLE", "accessPolicyArn": "arn:aws:iotsitewise:us-west-2:123456789012:access-policy/a1b2c3d4-5678-90ab-cdef-cccccEXAMPLE" } For more information, see `Adding or removing portal administrators
`__ in the *AWS IoT SiteWise User Guide*. **Example 2: To grant a user read-only access to a project** The following ``create-access-policy`` example creates an access policy that grants a user read-only access to a wind farm project. :: aws iotsitewise create-access-policy \ --cli-input-json file://create-project-viewer-access-policy.json Contents of ``create-project-viewer-access-policy.json``:: { "accessPolicyIdentity": { "user": { "id": "a1b2c3d4e5-a1b2c3d4-5678-90ab-cdef-bbbbbEXAMPLE" } }, "accessPolicyPermission": "VIEWER", "accessPolicyResource": { "project": { "id": "a1b2c3d4-5678-90ab-cdef-eeeeeEXAMPLE" } } } Output:: { "accessPolicyId": "a1b2c3d4-5678-90ab-cdef-dddddEXAMPLE", "accessPolicyArn": "arn:aws:iotsitewise:us-west-2:123456789012:access-policy/a1b2c3d4-5678-90ab-cdef-dddddEXAMPLE" } For more information, see `Assigning project viewers
`__ in the *AWS IoT SiteWise Monitor Application Guide*.