CreateNetworkAcl
Description
call the CreateNetworkAcl interface to create a network ACL.
Request Method
POST
Request Path
/apsara/route/Vpc/CreateNetworkAcl
Request Parameters Common Parameters
Name | Location | Type | Required | Sample value | Description |
---|---|---|---|---|---|
Description | BODY | string | No | This is my NetworkAcl. | description information of network ACL. is 2 to 256 characters in length and must start with letters or Chinese, but cannot be http:// or https://. |
VpcId | BODY | string | Yes | vpc-dsfd34356vdf**** | the ID of the VPC to which the network ACL belongs. |
regionId | BODY | string | Yes | No sample value for this parameter. | region id |
NetworkAclName | BODY | string | No | acl-1 | the name of the network ACL. /p> is 2 to 128 characters in length and must start with a letter or Chinese, and can contain numbers, underscores (_) and hyphens (-), but you cannot use http:// or https:// start. |
RegionId | BODY | string | Yes | cn-qingdao-env17-d01 | the region ID where the network ACL is located. You can obtain the region ID by calling the DescribeRegions interface. |
ClientToken | BODY | string | No | 0c593ea1-3bea-11e9-b96b-88e9fe637760 | Ensure request idempotence. Generate a parameter value from your client to ensure that the parameter value is unique between different requests. ClientToken only supports ASCII characters and cannot exceed 64 characters. |
version | BODY | string | No | 2016-01-01 | version of api |
Return data
Name | Type | Sample value | Description |
---|---|---|---|
Policy | string | accept | authorization policy, value: accept: allowed. drop: reject. |
IngressAclEntries | array of ingressaclentry | No sample value for this parameter. | direction rule. |
Description | string | This is IngressAclEntries. | description information of the entry direction rule. |
Port | string | -1/-1 | source port range. |
NetworkAclAttribute | struct | No sample value for this parameter. | attributes of network ACL. |
EgressAclEntries | array of egressaclentry | No sample value for this parameter. | exit direction rule. |
IngressAclEntry | No sample value for this parameter. | No description for this parameter. | |
SourceCidrIp | string | 10.0.0.0/24 | source address segment. |
Protocol | string | all | transport layer protocol, value: < B data-tag=" B "class=" B ">icmp < B data-tag=" B "class=" B ">gre < B data-tag=" B "class=" B ">tcp < B data-tag=" B "class=" B ">udp all: all protocols are supported |
Status | string | Modifying | status of network ACL. Available: available. Modifying: under configuration. |
DestinationCidrIp | string | 10.0.0.0/24 | destination address segment. |
NetworkAclId | string | nacl-a2do9e413e0spzasx**** | ID of network ACL. |
RequestId | string | 0ED8D006-F706-4D23-88ED-E11ED28DCAC0 | request ID. |
Resource | No sample value for this parameter. | No description for this parameter. | |
ResourceType | string | VSwitch | the type of associated resource. |
EgressAclEntry | No sample value for this parameter. | No description for this parameter. | |
NetworkAclEntryName | string | acl-3 | The name of the entry direction rule. |
EntryType | string | custom | rule type, value: custom: custom. system: system. |
VpcId | string | vpc-a2d33rfpl72k5xsscd**** | ID of VPC associated with network ACL. |
ResourceId | string | vsw-bp1de348lntdwgthy**** | the instance ID of the associated resource. |
CreationTime | string | 2019-04-25 11:33:27 | the time when the network ACL was created. |
NetworkAclName | string | acl-1 | the name of the network ACL. |
RegionId | string | cn-qingdao-env17-d01 | the region ID to which the network ACL belongs. |
Resources | array of resource | No sample value for this parameter. | associated resource. |
NetworkAclEntryId | string | nae-a2dk86arlydmexscd**** | ID of the entry direction rule entry. |
Example
Successful Response example
{
"Policy":"accept",
"IngressAclEntries":"",
"Description":"This is IngressAclEntries.",
"Port":"-1/-1",
"NetworkAclAttribute":"",
"EgressAclEntries":"",
"IngressAclEntry":"",
"SourceCidrIp":"10.0.0.0/24",
"Protocol":"all",
"Status":"Modifying",
"DestinationCidrIp":"10.0.0.0/24",
"NetworkAclId":"nacl-a2do9e413e0spzasx****",
"RequestId":"0ED8D006-F706-4D23-88ED-E11ED28DCAC0",
"Resource":"",
"ResourceType":"VSwitch",
"EgressAclEntry":"",
"NetworkAclEntryName":"acl-3",
"EntryType":"custom",
"VpcId":"vpc-a2d33rfpl72k5xsscd****",
"ResourceId":"vsw-bp1de348lntdwgthy****",
"CreationTime":"2019-04-25 11:33:27",
"NetworkAclName":"acl-1",
"RegionId":"cn-qingdao-env17-d01",
"Resources":"",
"NetworkAclEntryId":"nae-a2dk86arlydmexscd****"
}
Failed Response example
{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}
}