docs
api
Private Network(UVPC)
CreateNetworkAclEntry

Create ACL Rules - CreateNetworkAclEntry

Overview

Create ACL Rules

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is CreateNetworkAclEntry.Yes
PublicKeystringThe user's public key can be obtained from Console (opens in a new tab)Yes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. See List of Regions and Availability ZonesYes
ProjectIdstringProject ID. If not filled in, the default project is used, and the sub-account must be filled in. Please refer to the GetProjectList interface.No
AclIdstringACL's IDYes
PriorityintThe priority of the Entry, for the same Direction, cannot be repeated.Yes
DirectionstringOutbound or Inbound ("Ingress", "Egress")Yes
IpProtocolstringProtocol Rule DescriptionYes
CidrBlockstringCIDR representation of IPv4 segmentYes
PortRangestringTargeted Port RangeYes
EntryActionstringBehavior of the rule ("Accept", "Reject")Yes
DescriptionstringDescription. The length limit is no more than 32 bytes.No
TargetTypeintApplication target type. 0 represents 'all resources within the subnet', 1 represents 'specified resources within the subnet', default is 0.No
TargetResourceIds.NstringApplication target resource list. It is effective for all resources by default. This value does not need to be filled when TargetType is 0.No

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
EntryIdstringID of the created EntryYes

Example

Request Example

https://api.surfercloud.com/?Action=CreateNetworkAclEntry
&Region=cn-bj
&AclId=netacl-xxxxxx
&ProjectId=org-xxxxx
&Priority=1000
&Direction=Ingress
&IpProtocol=TCP
&CidrBlock=0.0.0.0/0
&PortRange=1-65535
&EntryAction=Accept
&TargetType=2
&TargetResourceIds.n=uhost-xxxxxx
&Description=LpTJGGVz

Response Example

{
  "Action": "CreateNetworkAclEntryResponse",
  "EntryId": "netaclentry_xxxxxx",
  "RetCode": 0
}
  • Company
  • ContactUs
  • Blog
Copyright © 2024 SurferCloud All Rights Reserved