MENU
      addNetworkAclInboundRule
        • PDF

        addNetworkAclInboundRule

        • PDF

        記事の要約

        VPC環境で利用できます。

        概要

        ネットワークACLのインバウンドルールリストを追加します。

        リクエスト

        リクエストパラメータ

        パラメータ名要否タイプ制約事項説明
        regionCodeNoString- リージョンコード
        インバウンドルールが追加されるネットワークACLのリージョン(Region)を決定できる
        regionCodeは、getRegionListアクションを通じて取得可能
        デフォルト:getRegionList照会結果の最初のリージョンを選択
        networkAclNoYesString- ネットワークACL番号
        networkAclNoは、getNetworkAclListアクションを通じて取得可能
        networkAclRuleList.N.priorityYesInteger最小: 0, 最大: 199- ネットワークACLルールの優先順位
        他のインバウンドルールの優先順位と重複不可
        networkAclRuleList.N.protocolTypeCodeYesString- ネットワークACLルールのプロトコルタイプコード
        オプション: TCP | UDP | ICMP
        networkAclRuleList.N.ipBlockConditionalString- ネットワークACLルールのアクセスソースIPアドレスブロック
        例) 0.0.0.0/0, 100.10.20.0/24, 192.168.0.10/32
        networkAclRuleList.N.denyAllowGroupNoConditionalString- ネットワークACLルールのアクセスソースのDeny-Allowグループ番号
        アクセスソースとしてIPアドレスブロックの代わりにDeny-Allowグループを指定できる
        denyAllowGroupNoは、getNetworkAclDenyAllowGroupListアクションを通じて取得可能
        networkAclRuleList.N.portRangeConditionalString- ネットワークACLルールのポート範囲
        例1) 単一ポート:22
        例2) 範囲を指定:1-65535
        protocolTypeCodeがICMPの場合は入力しない
        networkAclRuleList.N.ruleActionCodeYesString- ネットワークACLルールのルールアクションコード
        オプション: ALLOW | DROP
        networkAclRuleList.N.networkAclRuleDescriptionNoString最小: 0, 最大: 1000 BytesネットワークACLルールの説明
        responseFormatTypeNoString- レスポンス結果のフォーマットタイプ
        オプション: xml | json
        デフォルト: xml

        レスポンス

        レスポンスデータのタイプ

        • NetworkAclRuleListタイプ
        NetworkAclRuleList extends CommonResponse
        private Integer totalRows;
        private List networkAclRuleList = new ArrayList<>();
        NetworkAclRule
        private String networkAclNo;
        private Integer priority;
        private CommonCode protocolType;
        private String portRange;
        private CommonCode ruleAction;
        private Date createDate;
        private String ipBlock;
        private String denyAllowGroupNo;
        private CommonCode networkAclRuleType;
        private String networkAclRuleDescription;

        リクエスト例

        ncloud vpc addNetworkAclInboundRule --regionCode KR --networkAclNo ***31 --networkAclRuleList "priority='0', protocolTypeCode='TCP', ipBlock='***.***.0.0/0', portRange='22-23', ruleActionCode='ALLOW'" "priority='1', protocolTypeCode='TCP', ipBlock='***.***.0.0/0', portRange='24-25', ruleActionCode='ALLOW'"
        Plain text

        レスポンス例

        リクエストの実行後、そのネットワークACLのインバウンドルールリスト

        <addNetworkAclInboundRuleResponse>
          <requestId>189b16ac-26a0-472e-b3a9-47b80cdf7dfe</requestId>
          <returnCode>0</returnCode>
          <returnMessage>success</returnMessage>
          <totalRows>1</totalRows>
          <networkAclRuleList>
            <networkAclRule>
              <networkAclNo>***31</networkAclNo>
              <priority>0</priority>
              <protocolType>
                <code>TCP</code>
                <codeName>tcp</codeName>
              </protocolType>
              <portRange>22-23</portRange>
              <ruleAction>
                <code>ALLOW</code>
                <codeName>Allow</codeName>
              </ruleAction>
              <createDate>2020-08-05T19:56:35+0900</createDate>
              <ipBlock>***.***.0.0/0</ipBlock>
              <denyAllowGroupNo/>
              <networkAclRuleType>
                <code>INBND</code>
                <codeName>Inbound</codeName>
              </networkAclRuleType>
              <networkAclRuleDescription></networkAclRuleDescription>
            </networkAclRule>
          </networkAclRuleList>
        </addNetworkAclInboundRuleResponse>
        XML

        この記事は役に立ちましたか?

        Changing your password will log you out immediately. Use the new password to log back in.
        First name must have atleast 2 characters. Numbers and special characters are not allowed.
        Last name must have atleast 1 characters. Numbers and special characters are not allowed.
        Enter a valid email
        Enter a valid password
        Your profile has been successfully updated.