All Products
Search
Document Center

Server Load Balancer:CreateAccessControlList

Last Updated:Mar 14, 2024

Creates an access control list (ACL).

Operation description

You can create multiple ACLs. Each ACL can contain one or more IP addresses or CIDR blocks. Before you create an ACL, take note of the following limits:

  • An account can have a maximum of 50 ACLs in each region.
  • You can add a maximum of 50 IP addresses or CIDR blocks at a time within an account.
  • Each ACL can contain a maximum of 300 IP addresses or CIDR blocks.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
slb:CreateAccessControlListWRITE
  • acl
    acs:slb:{#regionId}:{#accountId}:acl/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID.

Enumeration Value:
  • cn-beijing: cn-beijing.
cn-hangzhou
AclNamestringYes

The operation that you want to perform. Set the value to CreateAccessControlList.

rule1
AddressIPVersionstringNo

The ID of the region where you want to create the ACL.

Enumeration Value:
  • ipv6: ipv6.
ipv4
ResourceGroupIdstringNo

The name of the ACL. The name must be 1 to 80 characters in length, and can contain letters, digits, periods (.), hyphens (-), forward slashes (/), and underscores (_). The name of the ACL that you create must be unique within each region.

rg-atstuj3rt******
Tagobject []No

The tags.

KeystringNo

The tag key of the bastion host. Valid values of N: 1 to 20. The tag key cannot be an empty string.

The tag key can be at most 64 characters in length, and cannot contain http:// or https://. It must not start with aliyun or acs:.

TestKey
ValuestringNo

The tag value. You can specify at most 20 tag values. The tag value cannot be an empty string.

The tag value must be 1 to 128 characters in length and cannot start with acs: or aliyun. It cannot contain http:// or https://.

TestValue

Response parameters

ParameterTypeDescriptionExample
object
AclIdstring

The IP version. Valid values: ipv4 and ipv6.

acl-rj9xpxzcwxrukois****
RequestIdstring

The ID of the resource group to which the ACL belongs.

988CB45E-1643-48C0-87B4-928DDF77EA49

Examples

Sample success responses

JSONformat

{
  "AclId": "acl-rj9xpxzcwxrukois****",
  "RequestId": "988CB45E-1643-48C0-87B4-928DDF77EA49"
}

Error codes

HTTP status codeError codeError message
400InvalidAction.RegionNotSupportThe region does not support this action.
400AclNumberOverLimitThe Acl number has reached to the max quota limit.
400InvalidResourceGroupId.NotFoundThe specified ResourceGroupId is not found.
400ResourceInConfiguring.AclThe specified resource is configuring, please try again later.
400InvalidParam.TagValue %s.
400InvalidParam.TagKey%s.
400SizeLimitExceeded.Tag%s.
400MissingParam.TagKeyThe param MissingParam.TagKey is missing.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-06-02The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400