Updating the Authorization Mode
Function
This API is used to modify the authorization mode and permission configuration information of a specified resource or function. This API is used when system administrators can use this API to adjust the access permission of resources. Developers can use this API to update authorization policies to meet new service requirements. Security auditors can use this API to modify authorization configurations to comply with new security specifications. Before using this API, ensure that you have the update permission and the authorization mode of the target resource or function exists. After the API is called, the API updates the authorization mode of the target resource and returns the updated authorization mode information. If you do not have the permission to access this API or the authorization mode of the target resource does not exist, the API will return an error message.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
PUT /v1/auth-mode
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition: Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this parameter is mandatory and must be set to a user token. For details, see Obtaining a User Token. Constraints: N/A Range: N/A Default Value: N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
mode |
Yes |
String |
Definition: Update mode type. Range
|
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
domain_id |
String |
Definition: Account domain ID. Range: N/A |
|
mode |
String |
Definition: Authorization mode. Range
|
Example Requests
Update to strict mode.
POST https://{endpoint}/v1/auth-mode
{
"mode" : "strict"
}
Example Responses
Status code: 200
Response body for querying the authorization mode.
{
"domain_id" : "06024304b180d5090fbac00141b6cae0",
"mode" : "strict"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Response body for querying the authorization mode. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot