You need to enable JavaScript to run this app.
导航

AddAclEntries

最近更新时间2024.02.29 14:48:17

首次发布时间2022.05.20 22:36:04

API 说明

API 名称:AddAclEntries。
API 域名:open.volcengineapi.com
API 描述:为指定访问控制策略组添加 IP 条目。每个访问控制策略组中最多可添加300个IP条目。调用一次接口添加 IP 条目上限为50个。

使用限制

节流限制:每秒最多提交 5 个 API 请求。

快速调试

URI 参数

在使用该部分 API 提交请求时必须包含以下 URI 参数。

除了 URI 参数,该 API 请求还需要包含签名参数。关于更多签名参数的信息,参见公共请求参数

名称类型是否必选格式说明
Action
string
[a-zA-Z]+
API 名称,如 AddAclEntries。
VersionstringYYYY-MM-DDAPI 版本信息。该参数的取值是 2020-04-01 。
X-Expiresint900表示签名的有效时间,单位是秒,默认值是900。

请求正文

在使用该 API 提交请求时,请求正文中可以包含的参数如下。

参数类型是否必选参数说明示例值
AclId
String
要增加acl规则的访问控制策略组ID。
acl-3cj44nv0jhhxc6c6rrtet****
AclEntriesArrayIP条目的地址段和描述,具体参数参见 AclEntries-

AclEntries

参数类型是否必选参数说明示例值
AclEntries.N.Entry

List of Struct

IP条目的地址段,只支持CIDR地址。

  • - N:表示IP条目的序号,数量上限为50个。
  • 多个IP条目间使用“&”分隔。 添加时,会自动忽略重复的IP条目或者已存在的IP条目。
AclEntries.1.Entry=1.0.0.0/8&AclEntries.2.Entry=192.1.0.0/16
AclEntries.N.Description

List of Struct

IP条目的描述。

  • 不能以http://或https://开头。
  • 必须以字母或中文开头,可包含数字、英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、短横线(-)、中文逗号(,)、中文句号(。) 。
  • 长度限制为1 ~ 255个字符。
  • 不填默认为空字符串。
AclEntries.1.Description=entry1&AclEntries.2.Description=entry2

响应正文

参数类型参数说明示例值
RequestId
String
请求ID 。
20210811152539010225146063030****

示例

请求示例

GET /?Action=AddAclEntries&AclId=acl-33txelibucdfk57uhwmviq46o&AclEntries.1.Entry=1.0.0.0/8&AclEntries.1.Description=acl-rule-1&AclEntries.2.Entry=12.1.0.0/16&AclEntries.2.Description=acl-rule-2&Version=2020-04-01 HTTP/1.1
Host: open.volcengineapi.com
Region: cn-beijing
ServiceName: alb

响应示例

{
    "ResponseMetadata": {
        "RequestId": "20210816184245010****46063050B4001",
        "Action": "AddAclEntries",
        "Version": "2020-04-01",
        "Service": "alb",
        "Region": "cn-beijing"
    },
    "Result": {
        "RequestId": "20210816184245****25146063050B4001"
    }
}

错误码

如果响应正文包含 Error 字段,则表示 API 请求失败。此处仅展示当前 API 的错误码,更多错误码请参见公共错误码

HTTP Code错误码错误信息错误描述

400

MissingParameter

The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request; for example, 'AclEntries'.

该请求缺少必要参数。请确保发起请求已提供全部必要参数,比如: AclEntries。

400

LimitExceed.AclEntry

You've reached the limit on the number of ACL entries that you can operate at a time.

已达到单次可操作的 IP 条目的数量上限。

400

InvalidIndexOrder.Malformed

The specified index order is malformed.

指定的索引顺序参数格式不合法。

400

InvalidAclEntries.Entry.Malformed

The specified AclEntries.Entry is malformed.

指定的 AclEntries.Entry 参数格式不合法。

409InvalidAclEntries.Entry.ConflictThe specified AclEntries.Entry already exists.指定的 IP 条目已存在。

400

InvalidAclEntries.Entry.Duplicated

The specified AclEntries.Entry is duplicated.

指定的 AclEntries.Entry 重复。

400

InvalidAclEntries.Description.Malformed

The specified AclEntries.Description is malformed.

指定的 AclEntries.Description 参数格式不合法。

400

InvalidAcl.InvalidStatus

The specified ACL is not in the correct status for the request.

指定的 ACL 所处状态无法响应该请求。

400QuotaExceed.IPPerAclYou've reached the limit on the number of IPs per ACL you can add in, resource xxx, usage xx/xx.已达到每个 ACL 可添加的 IP 条目的数量上限。资源是xxx,目前已使用xxx,配额为xxx。
404InvalidAcl.NotFoundThe specified ACL does not exist.指定的 ACL 不存在。