DescribeNetworkAcls
呼叫DescribeNetworkAcls介面查看網路ACL列表。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
vpc:DescribeNetworkAcls |
list |
*NetworkAcl
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| NetworkAclId |
string |
否 |
網路 ACL 的 ID。 |
nacl-bp1lhl0taikrbgnh**** |
| NetworkAclName |
string |
否 |
網路 ACL 的名稱。 名稱長度為 1~128 個字元,不能以 |
acl-1 |
| VpcId |
string |
否 |
網路 ACL 關聯的 VPC 的 ID。 |
vpc-m5ebpc2xh64mqm27e**** |
| ResourceType |
string |
否 |
關聯執行個體的類型。取值:VSwitch,交換機。 ResourceType 和 ResourceId 參數需要同時指定才生效。 |
VSwitch |
| ResourceId |
string |
否 |
關聯執行個體的 ID。 |
vsw-bp1de348lntdwnhbg**** |
| PageNumber |
integer |
否 |
列表的頁碼。預設值:1。 |
1 |
| PageSize |
integer |
否 |
分頁查詢時每頁的行數。最大值:50。預設值:10。 |
10 |
| RegionId |
string |
是 |
網路 ACL 所屬的地域 ID。 您可以透過呼叫 DescribeRegions 介面取得地域 ID。 |
cn-hangzhou |
| Tags |
array<object> |
否 |
標籤列表。 |
|
|
object |
否 |
標籤列表。 |
||
| Key |
string |
否 |
資源的標籤鍵。最多支援輸入 20 個標籤鍵。如需傳入該值,則不能輸入空字串。 一個標籤鍵最多支援 128 個字元,不能以 |
FinanceDept |
| Value |
string |
否 |
資源的標籤值。最多支援輸入 20 個標籤值。如需傳入該值,可以輸入空字串。 最多支援 128 個字元,不能以 |
FinanceJoshua |
| RegionId |
string |
是 |
網路 ACL 所屬的地域 ID。 您可以透過呼叫 DescribeRegions 介面取得地域 ID。 |
cn-hangzhou |
| ClientToken |
string |
否 |
用戶端 Token,用於保證請求的冪等性。 從您的用戶端產生一個參數值,確保不同請求間該參數值唯一。ClientToken 只支援 ASCII 字元。 說明
若您未指定,則系統自動使用 API 請求的 RequestId 作為 ClientToken 標識。每次 API 請求的 RequestId 不一樣。 |
123e4567-e89b-12d3-a456-426655440000 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| PageSize |
string |
分頁查詢時每頁的行數。 |
10 |
| RequestId |
string |
請求 ID。 |
F7DDDC17-FA06-4AC2-8F35-59D2470FCFC1 |
| PageNumber |
string |
列表的頁碼。 |
1 |
| TotalCount |
string |
列表包含的 ACL 數。 |
2 |
| NetworkAcls |
object |
||
| NetworkAcl |
array<object> |
網路 ACL 的詳細資訊。 |
|
|
array<object> |
網路 ACL 的詳細資訊。 |
||
| Status |
string |
網路 ACL 的狀態。取值:
|
Available |
| VpcId |
string |
關聯的 VPC 的 ID。 |
vpc-m5ebpc2xh64mqm27e**** |
| CreationTime |
string |
網路 ACL 的建立時間。 |
2021-12-25 11:44:17 |
| Description |
string |
網路 ACL 的描述資訊。 |
This is my NetworkAcl. |
| NetworkAclName |
string |
網路 ACL 的名稱。 |
acl-1 |
| NetworkAclId |
string |
網路 ACL 的 ID。 |
nacl-a2do9e413e0spxscd**** |
| OwnerId |
integer |
網路 ACL 所屬阿里雲帳號 ID。 |
253460731706911258 |
| RegionId |
string |
網路 ACL 所屬的地區 ID。 |
cn-hangzhou |
| IngressAclEntries |
object |
||
| IngressAclEntry |
array<object> |
入方向規則資訊。 |
|
|
object |
入方向規則資訊。 |
||
| NetworkAclEntryId |
string |
入方向規則條目的 ID。 |
nae-a2dk86arlydmezasw**** |
| 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> |
出方向規則資訊。 |
|
|
object |
|||
| NetworkAclEntryId |
string |
出方向規則條目的 ID。 |
nae-a2d447uw4tillfvgb**** |
| 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 |
| ResourceId |
string |
關聯資源的 ID。 |
vsw-bp1de348lntdwcdf**** |
| Tags |
object |
||
| Tag |
array<object> |
標籤列表資訊。 |
|
|
object |
標籤列表資訊。 |
||
| Key |
string |
標籤鍵。 |
FinanceDept |
| Value |
string |
標籤值。 |
FinanceJoshua |
樣本
正常返回樣本
JSON格式
{
"PageSize": "10",
"RequestId": "F7DDDC17-FA06-4AC2-8F35-59D2470FCFC1",
"PageNumber": "1",
"TotalCount": "2",
"NetworkAcls": {
"NetworkAcl": [
{
"Status": "Available",
"VpcId": "vpc-m5ebpc2xh64mqm27e****",
"CreationTime": "2021-12-25 11:44:17",
"Description": "This is my NetworkAcl.",
"NetworkAclName": "acl-1",
"NetworkAclId": "nacl-a2do9e413e0spxscd****",
"OwnerId": 253460731706911260,
"RegionId": "cn-hangzhou",
"IngressAclEntries": {
"IngressAclEntry": [
{
"NetworkAclEntryId": "nae-a2dk86arlydmezasw****",
"EntryType": "custom",
"NetworkAclEntryName": "acl-3\t",
"Policy": "accept",
"Description": "This is IngressAclEntries.",
"SourceCidrIp": "10.0.0.0/24\t",
"IpVersion": "IPv4",
"Protocol": "all",
"Port": "-1/-1\t"
}
]
},
"EgressAclEntries": {
"EgressAclEntry": [
{
"NetworkAclEntryId": "nae-a2d447uw4tillfvgb****",
"EntryType": "custom",
"NetworkAclEntryName": "acl-2\t",
"Policy": "accept",
"Description": "This is EgressAclEntries.",
"Protocol": "all",
"DestinationCidrIp": "10.0.0.0/24\t",
"IpVersion": "IPv4",
"Port": "-1/-1\t"
}
]
},
"Resources": {
"Resource": [
{
"Status": "BINDED",
"ResourceType": "VSwitch",
"ResourceId": "vsw-bp1de348lntdwcdf****"
}
]
},
"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 | NotSupport.NetworkAcl | Network acl is not support now. | |
| 500 | InternalError | The request processing has failed due to some unknown error. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。