Modify Access Control Rule

Last Updated on : 2023-06-21 07:12:56download

Modify the details of the access control rules, including the names and time rules.

API address

PUT: /v1.0/iot-02/access-controls/{access_control_id}

Request parameter

Parameter name Type IN Required Description
access_control_id String uri true The ID of a specified access control rule.

Description of body

Parameter name Type IN Required Description
access_control_name String true The name of a specified access control device, with up to 128 characters.
user_limit Boolean false Specifies whether to restrict the users’ access control permission. Valid values:
  • false: Without restriction, all users have permission.
  • true: indicates that a restriction is made, and only some authorized users have access control permissions.
time_limit Boolean false Specifies whether there is a time limit. Valid values:
  • false: Without a time limit, it is accessible throughout the day.
  • true: With a time limit, it is accessible within the time_ranges.
time_ranges List false The time rule. The accessible period. Maximum value: 5.

Return parameter

Parameter name Type Description
result Boolean Indicates whether the operation is successful.

Request example

PUT: /v1.0/iot-02/access-controls/146304353014959****
{ "access_control_name": "Access Control Rules", "time_limit": true, "user_limit": true, "time_ranges": [ "06:00-9:00", "10:00-19:00", "10:00-19:00", "10:00-19:00" ] }

Return example

{ "result": true, "t": 1637654434519, "success": true }

Error code

For more information, see error code.