最近更新时间:2024.03.28 17:09:33
首次发布时间:2024.03.28 17:09:33
创建VPC边界流量控制网关访问控制策略
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | AddVpcFirewallAclRule | 要执行的操作,取值:AddVpcFirewallAclRule |
Version | String | 是 | 2021-09-06 | API的版本,取值:2021-09-06 |
VpcFirewallId | String | 是 | vfw-**** | vpc边界防火墙实例id |
Prio | Integer | 否 | 1 | 访问控制策略优先级:
|
Source | String | 是 | 192.168.0.1/32 | 访问控制策略中的源地址:
|
SourceType | String | 是 | net | 访问控制策略中的源地址类型:
|
Destination | String | 是 | 192.168.0.2/32 | 访问控制策略中的目的地址:
|
DestinationType | String | 是 | net | 访问控制策略中的目的地址类型:
|
DestPort | String | 否 | 22/22 | 访问控制策略中的目的端口。格式为单个端口22/22,端口范围100/200:
|
DestPortType | String | 否 | port | 访问控制策略的目的端口类型:
|
Proto | String | 是 | TCP | 访问控制策略中的协议类型。当DestinationType为domain时,Proto只能是TCP。可选值:ICMP;TCP;UDP;ANY:(任何协议) |
Action | String | 是 | accept | 访问控制策略的动作:
|
Status | Boolean | 否 | false | 访问控制策略的开关状态。默认为false,不开启:
|
Description | String | 否 | 测试 | 访问控制策略的描述信息 |
下表仅列出本接口特有的返回参数。更多信息请参见返回结构
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
RuleId | String | f04ac7ce-628b-4cb7-be61-310222b7**** | 添加成功后返回访问控制策略的唯一标识 |
POST /AddVpcFirewallAclRule HTTP/1.1 { "Action": "accept", "VpcFirewallId": "vfw-*****", "Source": "192.168.1.1/32", "SourceType": "net", "Destination": "192.168.2.1/32", "DestinationType": "net", "Proto": "TCP", "DestPort": "22", "DestPortType": "port" }
{ "ResponseMetadata": { "RequestID": "2023**********", "Service": "", "Region": "", "Action": "AddVpcFirewallAclRule", "Version": "2021-09-06" }, "Result": { "RuleId": "0bf18ab6-**********" } }
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。
状态码 | 错误码 | 错误信息 | 说明 |
---|---|---|---|
400 | InvalidParameter | Invalid Parameter | 无效的参数 |
400 | QueryDbFailed | Query configuration failed | 查询数据库失败 |
400 | UpdateDbFailed | Update configuration failed | 更新配置错误 |
400 | BadRequest | The http request is bad due to some reason: %s. | 由于某些原因,http请求不正确 |
400 | MissingParameter | The required parameter %s is missing. | 缺少所需的参数 |
400 | NotFound.VpcFirewall | The specified Vpc Firewall does not exist. | 指定vpc防火墙不存在 |
400 | InvalidStatus.VpcFirewall | The specified Vpc Firewall is not in the correct status for the request. | 指定的vpc防火墙状态不正常 |
400 | InvalidParameter.Source | The Source parameter is invalid. | Source参数无效 |
400 | InvalidParameter.SourceType | The SourceType parameter is invalid. | SourceType参数无效 |
400 | InvalidParameter.Destination | The Destination parameter is invalid. | Destination参数无效 |
400 | InvalidParameter.Proto | The Proto parameter is invalid. | Proto参数无效 |
400 | InvalidParameter.DestinationGroupType | The DestinationGroupType parameter is invalid. | DestinationGroupType参数无效 |
400 | InvalidParameter.DestinationType | The DestinationType parameter is invalid. | DestinationType参数无效 |
400 | InvalidParameter.DestPortType | The DestPortType parameter is invalid. | DestPortType参数无效 |
400 | InvalidParameter.DestPort | The DestPort parameter is invalid. | DestPort参数无效 |
400 | NotFound.AddressBook | The specified AddressBook does not exist. | 指定地址簿不存在 |
400 | NotMatch.AddressBookType | The specified Address Book type not match. | 指定地址簿类型不匹配 |
400 | Exceed.AclExtendCount | 【当前访问控制策略条数已达当前版本规格上限,为保证可以添加更多策略,请对当前版本进行升级,去购买】去购买跳转至升级页面 | 当前访问控制策略条数已达当前版本规格上限,为保证可以添加更多策略,请对当前版本进行升级,去购买】去购买跳转至升级页面 |
500 | InternalError | Internal service error. %s | 内部服务错误 |