调用DescribeNetworkAclAttributes接口查询网络ACL的详细信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
vpc:DescribeNetworkAclAttributes |
get |
*NetworkAcl
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| NetworkAclId |
string |
是 |
网络 ACL 的 ID。 |
nacl-a2do9e413e0spzasx**** |
| RegionId |
string |
是 |
网络 ACL 所在的地域 ID。 您可以通过调用 DescribeRegions 接口获取地域 ID。 |
cn-hangzhou |
| RegionId |
string |
是 |
网络 ACL 所在的地域 ID。 您可以通过调用 DescribeRegions 接口获取地域 ID。 |
cn-hangzhou |
| ClientToken |
string |
否 |
客户端 Token,用于保证请求的幂等性。 从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符。 说明
若您未指定,则系统自动使用 API 请求的 RequestId 作为 ClientToken 标识。每次 API 请求的 RequestId 不一样。 |
123e4567-e89b-12d3-a456-426655440000 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
F5905F9C-0161-4E72-9CB1-1F3F3CF6268A |
| NetworkAclAttribute |
object |
网络 ACL 的详细信息。 |
|
| Status |
string |
关联资源的状态。取值:
|
Available |
| VpcId |
string |
网络 ACL 关联的 VPC 的 ID。 |
vpc-a2d33rfpl72k5defr**** |
| CreationTime |
string |
网络 ACL 创建的时间。 |
2021-12-25 11:33:27 |
| Description |
string |
网络 ACL 的描述信息。 |
This is my NetworkAcl. |
| NetworkAclName |
string |
网络 ACL 的名称。 |
acl-1 |
| NetworkAclId |
string |
网络 ACL 的 ID。 |
nacl-a2do9e413e0spnhmj**** |
| OwnerId |
integer |
网络 ACL 所属的阿里云账号 ID。 重要 该值为 Long 类型,在某些语言中可能存在精度丢失的风险,请小心使用。 |
2546073170691**** |
| RegionId |
string |
网络 ACL 所属的地域 ID。 |
cn-hangzhou |
| IngressAclEntries |
object |
||
| IngressAclEntry |
array<object> |
网络 ACL 入方向规则信息。 |
|
|
object |
网络 ACL 入方向规则信息。 |
||
| NetworkAclEntryId |
string |
入方向规则条目的 ID。 |
nae-a2dk86arlydmevfbg**** |
| EntryType |
string |
规则类型,取值为 custom,表示自定义。 |
custom |
| NetworkAclEntryName |
string |
入方向规则条目的名称。 |
acl-3 |
| Policy |
string |
授权策略,取值:
|
accept |
| Description |
string |
入方向规则的描述信息。 |
This is IngressAclEntries. |
| SourceCidrIp |
string |
源地址的网段。 |
10.0.0.0/24 |
| IpVersion |
string |
实例的 IP 协议版本。取值:
|
IPv4 |
| Protocol |
string |
协议类型,取值:
|
all |
| Port |
string |
入方向规则的目的端口范围。
|
-1/-1 |
| EgressAclEntries |
object |
||
| EgressAclEntry |
array<object> |
网络 ACL 出方向规则信息。 |
|
|
object |
网络 ACL 出方向规则信息。 |
||
| NetworkAclEntryId |
string |
出方向规则条目的 ID。 |
nae-a2d447uw4tillxdcv**** |
| EntryType |
string |
规则类型,取值为 custom,表示自定义。 |
custom |
| NetworkAclEntryName |
string |
出方向规则条目的名称。 |
acl-2 |
| Policy |
string |
授权策略,取值:
|
accept |
| Description |
string |
出方向规则的描述信息。 |
This is EgressAclEntries. |
| Protocol |
string |
协议类型,取值:
|
all |
| DestinationCidrIp |
string |
目标地址段。 |
10.0.0.0/24 |
| IpVersion |
string |
实例的 IP 协议版本。取值:
|
IPv4 |
| Port |
string |
出方向规则的目的端口范围。
|
-1/-1 |
| Resources |
object |
||
| Resource |
array<object> |
关联的资源。 |
|
|
object |
关联的资源。 |
||
| Status |
string |
关联资源的状态。取值:
|
BINDED |
| ResourceType |
string |
关联资源的类型。取值:VSwitch,交换机。 |
VSwitch |
| ResourceId |
string |
关联资源的实例 ID。 |
vsw-bp1de348lntdwxscd**** |
| Tags |
object |
||
| Tag |
array<object> |
标签列表信息。 |
|
|
object |
标签列表信息。 |
||
| Key |
string |
标签键。 |
FinanceDept |
| Value |
string |
标签值。 |
FinanceJoshua |
示例
正常返回示例
JSON格式
{
"RequestId": "F5905F9C-0161-4E72-9CB1-1F3F3CF6268A",
"NetworkAclAttribute": {
"Status": "Available",
"VpcId": "vpc-a2d33rfpl72k5defr****",
"CreationTime": "2021-12-25 11:33:27",
"Description": "This is my NetworkAcl.",
"NetworkAclName": "acl-1",
"NetworkAclId": "nacl-a2do9e413e0spnhmj****",
"OwnerId": 0,
"RegionId": "cn-hangzhou",
"IngressAclEntries": {
"IngressAclEntry": [
{
"NetworkAclEntryId": "nae-a2dk86arlydmevfbg****",
"EntryType": "custom",
"NetworkAclEntryName": "acl-3",
"Policy": "accept",
"Description": "This is IngressAclEntries.",
"SourceCidrIp": "10.0.0.0/24",
"IpVersion": "IPv4",
"Protocol": "all",
"Port": "-1/-1"
}
]
},
"EgressAclEntries": {
"EgressAclEntry": [
{
"NetworkAclEntryId": "nae-a2d447uw4tillxdcv****",
"EntryType": "custom",
"NetworkAclEntryName": "acl-2",
"Policy": "accept",
"Description": "This is EgressAclEntries.",
"Protocol": "all",
"DestinationCidrIp": "10.0.0.0/24",
"IpVersion": "IPv4",
"Port": "-1/-1"
}
]
},
"Resources": {
"Resource": [
{
"Status": "BINDED",
"ResourceType": "VSwitch",
"ResourceId": "vsw-bp1de348lntdwxscd****"
}
]
},
"Tags": {
"Tag": [
{
"Key": "FinanceDept",
"Value": "FinanceJoshua"
}
]
}
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | ParameterMissing.AliUid | ParameterMissing.AliUid | |
| 400 | ParameterMissing.Bid | ParameterMissing.Bid | |
| 400 | ParameterMissing.RegionId | ParameterMissing.RegionId | |
| 400 | ParameterEmpty.RegionId | ParameterEmpty.RegionId | |
| 400 | ParameterMissing.NetworkAclId | ParameterMissing.NetworkAclId | |
| 400 | ParameterEmpty.NetworkAclId | ParameterEmpty.NetworkAclId | |
| 400 | InvalidNetworkAcl.NotFound | The special Network Acl is not found. | 未找到指定的网络Acl |
| 400 | NotSupport.NetworkAcl | Network acl is not support now. | |
| 500 | InternalError | The request processing has failed due to some unknown error. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。