All Products
Search
Document Center

API Gateway:AddAccessControlListEntry

Last Updated:Mar 06, 2025

This feature provides instance-level access control capabilities for dedicated instances. Adds an IP address entry to the access control polocy of an instance.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:
    • For mandatory resource types, indicate with a prefix of * .
    • 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
apigateway:AddAccessControlListEntryupdate
*AccessControlList
acs:apigateway:{#regionId}:{#accountId}:accesscontrollist/{#AclId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
AclIdstringYes

The ID of the access control list (ACL).

acl-bp1ohqkonqybecf4llbrc
AclEntrysstringYes

The ACL settings.

  • entry: the entries that you want to add to the ACL. You can add CIDR blocks. Separate multiple CIDR blocks with commas (,).
  • comment: the description of the ACL.
Note You can add at most 50 IP addresses or CIDR blocks to an ACL in each call. If the IP address or CIDR block that you want to add to an ACL already exists, the IP address or CIDR block is not added. The entries that you add must be CIDR blocks.
[{'entry': '192.168.1.0/24', 'comment': 'test'}]

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

CEB6EC62-B6C7-5082-A45A-45A204724AC2

Examples

Sample success responses

JSONformat

{
  "RequestId": "CEB6EC62-B6C7-5082-A45A-45A204724AC2"
}

Error codes

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

Change history

Change timeSummary of changesOperation
2022-06-24Add OperationView Change Details