Skip to main content

CreateNetworkAcl

Description

call the CreateNetworkAcl interface to create a network ACL.

Request Method

POST

Request Path

/apsara/route/Vpc/CreateNetworkAcl

Request Parameters Common Parameters

NameLocationTypeRequiredSample valueDescription
DescriptionBODYstringNoThis 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://.
VpcIdBODYstringYesvpc-dsfd34356vdf****the ID of the VPC to which the network ACL belongs.
regionIdBODYstringYesNo sample value for this parameter.region id
NetworkAclNameBODYstringNoacl-1the 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.
RegionIdBODYstringYescn-qingdao-env17-d01the region ID where the network ACL is located. You can obtain the region ID by calling the DescribeRegions interface.
ClientTokenBODYstringNo0c593ea1-3bea-11e9-b96b-88e9fe637760Ensure 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.
versionBODYstringNo2016-01-01version of api

Return data

NameTypeSample valueDescription
Policystringacceptauthorization policy, value: accept: allowed. drop: reject.
IngressAclEntriesarray of ingressaclentryNo sample value for this parameter.direction rule.
DescriptionstringThis is IngressAclEntries.description information of the entry direction rule.
Portstring-1/-1source port range.
NetworkAclAttributestructNo sample value for this parameter.attributes of network ACL.
EgressAclEntriesarray of egressaclentryNo sample value for this parameter.exit direction rule.
IngressAclEntryNo sample value for this parameter.No description for this parameter.
SourceCidrIpstring10.0.0.0/24source address segment.
Protocolstringalltransport 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
StatusstringModifyingstatus of network ACL. Available: available. Modifying: under configuration.
DestinationCidrIpstring10.0.0.0/24destination address segment.
NetworkAclIdstringnacl-a2do9e413e0spzasx****ID of network ACL.
RequestIdstring0ED8D006-F706-4D23-88ED-E11ED28DCAC0request ID.
ResourceNo sample value for this parameter.No description for this parameter.
ResourceTypestringVSwitchthe type of associated resource.
EgressAclEntryNo sample value for this parameter.No description for this parameter.
NetworkAclEntryNamestringacl-3The name of the entry direction rule.
EntryTypestringcustomrule type, value: custom: custom. system: system.
VpcIdstringvpc-a2d33rfpl72k5xsscd****ID of VPC associated with network ACL.
ResourceIdstringvsw-bp1de348lntdwgthy****the instance ID of the associated resource.
CreationTimestring2019-04-25 11:33:27the time when the network ACL was created.
NetworkAclNamestringacl-1the name of the network ACL.
RegionIdstringcn-qingdao-env17-d01the region ID to which the network ACL belongs.
Resourcesarray of resourceNo sample value for this parameter.associated resource.
NetworkAclEntryIdstringnae-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
}

}