Creates an access control list (ACL).
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | CreateACL | The operation that you want to perform. Set the value to CreateACL. |
| RegionId | String | Yes | cn-shanghai | The ID of the region where you want to create the ACL. You can call the DescribeRegions operation to query the most recent region list. |
| Name | String | Yes | username | The name of the ACL. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter. |
| AclType | String | No | acl-hardware | The type of SAG instance to be associated with the ACL. Valid values:
|
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | EE837E9F-BD50-4C2B-9E47-260F9D848480 | The ID of the request. |
| AclId | String | acl-o6yol7zowii5n2**** | The ID of the ACL. |
| ResourceGroupId | String | rg-acfm2iu4fnc**** | The ID of the resource group to which the ACL belongs. |
| AclType | String | acl-hardware | The type of SAG instance to be associated with the ACL. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=CreateACL
&RegionId=cn-shanghai
&Name=username
&AclType=acl-hardware
&Common request parameters
Sample responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateACLResponse>
<RequestId>EE837E9F-BD50-4C2B-9E47-260F9D848480</RequestId>
<AclId>acl-o6yol7zowii5n2****</AclId>
<ResourceGroupId>rg-acfm2iu4fnc****</ResourceGroupId>
<AclType>acl-hardware</AclType>
</CreateACLResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "EE837E9F-BD50-4C2B-9E47-260F9D848480",
"AclId" : "acl-o6yol7zowii5n2****",
"ResourceGroupId" : "rg-acfm2iu4fnc****",
"AclType" : "acl-hardware"
}
Error codes
| HttpCode | Error code | Error message | Description |
|---|---|---|---|
| 403 | Forbidden | User not authorized to operate on the specified resource. | The error message returned because you do not have the permissions to manage the specified resource. |
| 403 | MissingParameter | The input parameter is missing, please check your input. | The error message returned because one or more required parameters are empty. Check whether you have configured all required parameters. |
| 403 | InvalidName | Name not valid. | The error message returned because the name of the ACL is invalid. |
| 403 | AclAmountLimit | No more ACL can be created. You can open a ticket to increase the quota of ACLs. | The error message returned because the number of ACLs has reached the upper limit. To increase the quota, submit a ticket. |
| 403 | InternalError | An internal server error occurred. | The error message returned because an internal server error occurred. |
For a list of error codes, see Service error codes.