Available in VPC
Add an outbound rule to an ACG.
Syntax
The addAccessControlGroupOutboundRule syntax is as follows:
./ncloud vserver addAccessControlGroupOutboundRule \
--vpcNo <vpc-no> \
--accessControlGroupNo <acg-no> \
--accessControlGroupRuleList <rule-config> \
[--regionCode <KR|SGN|JPN>] \
[--output <json|xml>]
Options
This section describes the options available when running addAccessControlGroupOutboundRule.
Required options
The following options are required for addAccessControlGroupOutboundRule.
| Options | Type | Required | Description |
|---|---|---|---|
--vpcNo |
String | Required | VPC number
|
--accessControlGroupNo |
String | Required | ACG number |
--accessControlGroupRuleList |
List | Required | List of ACG outbound rules
|
Common options
For information about the options common to all vserver subcommands, see Server (VPC) options.
Examples
If the request to add an outbound rule to an ACG is successful, the protocol information and destination for each rule are returned.
Command
The command example is as follows:
./ncloud vserver addAccessControlGroupOutboundRule \
--vpcNo 12345678 \
--accessControlGroupNo 67890123 \
--accessControlGroupRuleList "protocolTypeCode='TCP', ipBlock='0.0.0.0/0', portRange='443', accessControlGroupRuleDescription='HTTPS egress'" \
--regionCode KR \
--output json
Output
The output example is as follows:
{
"addAccessControlGroupOutboundRuleResponse": {
"totalRows": 1,
"accessControlGroupRuleList": [
{
"accessControlGroupNo": "67890123",
"protocolType": {
"code": "TCP",
"codeName": "tcp",
"number": 6
},
"ipBlock": "0.0.0.0/0",
"accessControlGroupSequence": "",
"portRange": "443",
"accessControlGroupRuleType": {
"code": "OTBND",
"codeName": "Outbound"
},
"accessControlGroupRuleDescription": "HTTPS egress"
}
],
"requestId": "d4e5f678-9012-3456-def0-456789012345",
"returnCode": "0",
"returnMessage": "success"
}
}