addAccessControlGroupInboundRule

Prev Next

Available in VPC

Overview

Add an inbound rule list of an ACG.

Request

Request parameters

Parameter name Required Type Restrictions Description
regionCode No String - Region code
You can decide the Region of the ACG where the inbound rules will be added
regionCode can be obtained through the getRegionList action
Default: Select the first Region of the getRegionList search results
vpcNo Yes String - VPC number
Determine the VPC of the ACG to which the inbound rule will be added
vpcNo can be obtained through the getVpcList action
accessControlGroupNo Yes String - ACG number
accessControlGroupNo can be obtained through the getAccessControlGroupList action
accessControlGroupRuleList.N.protocolTypeCode Yes String - Protocol type code of the ACG rule
Protocol number is allowed from 1 to 254
Options: TCP | UDP | ICMP | 1-254
accessControlGroupRuleList.N.ipBlock Conditional String - ACG rule's access source IP address block
The access source can be registered as either an IP address block or an ACG number
.e.g., 0.0.0.0/0, 100.10.20.0/24, 192.168.0.10/32
accessControlGroupRuleList.N.accessControlGroupSequence Conditional String - ACG rule's access source ACG number
The access source can be registered as either an IP address block or an ACG number
accessControlGroupNo can be obtained through the getAccessControlGroupList action
accessControlGroupRuleList.N.portRange Conditional String - ACG rule's port range
Example 1. Single port: 22
Example 2. Specifying range: 1-65535
Do not enter a port range unless the protocolTypeCode is TCP (6) or UDP (17)
accessControlGroupRuleList.N.accessControlGroupRuleDescription No String Min: 0, Max: 1000 Bytes Description of ACG rule
responseFormatType No String - Format type of the response result
Options: xml | json
Default: xml

Response

Response data type

  • AccessControlGroupRuleList type
AccessControlGroupRuleList extends CommonResponse
private Integer totalRows;
private List<AccessControlGroupRule> accessControlGroupRuleList = new ArrayList<>();
AccessControlGroupRule
private String accessControlGroupNo;
private ProtocolType protocolType;
private String ipBlock;
private String accessControlGroupSequence;
private String portRange;
private CommonCode accessControlGroupRuleType;
private String accessControlGroupRuleDescription;

Examples

Request example

ncloud vserver addAccessControlGroupInboundRule --regionCode KR --vpcNo ***04 --accessControlGroupNo ***63 --accessControlGroupRuleList "protocolTypeCode='TCP', ipBlock='***.***.0.0/0', portRange='81'" "protocolTypeCode='TCP', ipBlock='***.***.0.0/0', portRange='82'"

Response example

The inbound rule list of the ACG after completing the request

<addAccessControlGroupInboundRuleResponse>
  <requestId>eb6a1733-f4a1-4e04-8c99-cf2d8081a9fb</requestId>
  <returnCode>0</returnCode>
  <returnMessage>success</returnMessage>
  <totalRows>2</totalRows>
  <accessControlGroupRuleList>
    <accessControlGroupRule>
      <accessControlGroupNo>***63</accessControlGroupNo>
      <protocolType>
        <code>TCP</code>
        <codeName>tcp</codeName>
        <number>6</number>
      </protocolType>
      <ipBlock>***.***.0.0/0</ipBlock>
      <accessControlGroupSequence></accessControlGroupSequence>
      <portRange>80</portRange>
      <accessControlGroupRuleType>
        <code>INBND</code>
        <codeName>Inbound</codeName>
      </accessControlGroupRuleType>
      <accessControlGroupRuleDescription></accessControlGroupRuleDescription>
    </accessControlGroupRule>
    <accessControlGroupRule>
      <accessControlGroupNo>***63</accessControlGroupNo>
      <protocolType>
        <code>TCP</code>
        <codeName>tcp</codeName>
        <number>6</number>
      </protocolType>
      <ipBlock>***.***.0.0/0</ipBlock>
      <accessControlGroupSequence></accessControlGroupSequence>
      <portRange>22</portRange>
      <accessControlGroupRuleType>
        <code>INBND</code>
        <codeName>Inbound</codeName>
      </accessControlGroupRuleType>
      <accessControlGroupRuleDescription></accessControlGroupRuleDescription>
    </accessControlGroupRule>
  </accessControlGroupRuleList>
</addAccessControlGroupInboundRuleResponse>