Available in Classic
Edit a firewall policy to be applied to Secure Zone.
Request
The following describes the request format for the endpoint. The request format is as follows:
Method | URI |
---|---|
POST | /{type}/{zone}/updatePolicy |
Request headers
For headers common to Secure Zone APIs, see Secure Zone request headers.
Request path parameters
The following describes the parameters.
Field | Type | Required | Description |
---|---|---|---|
type |
String | Required | firewall type provided by Secure Zone
|
zone |
String | Required | Zone in which Secure Zone is configured
|
Request body
The following describes the request body.
Field | Type | Required | Description |
---|---|---|---|
newPolicyName |
String | Optional | Policy name to edit
|
action |
String | Required | Allow/deny
|
description |
String | Optional | Policy description |
destinationAddressGroupList[] |
Array | Required | Information for the address group you want to target as a destination
|
destinationAddressGroupList[].memberNo |
String | Required | User's NAVER Cloud Platform member ID
|
destinationAddressGroupList[].instanceNo |
String | Required | Contract number assigned when creating the instance
|
destinationAddressGroupList[].addressGroupNo |
Integer | Required | Unique number assigned to the address group |
destinationAddressGroupList[].addressGroupName |
String | Required | Destination address group name |
destinationAddressGroupList[].addressList[] |
Array | Optional | Information about addresses that belong to the address group |
destinationAddressGroupList[].addressList[].memberNo |
String | Optional | User's NAVER Cloud Platform member ID
|
destinationAddressGroupList[].addressList[].instanceNo |
String | Optional | Contract number assigned when creating the instance
|
destinationAddressGroupList[].addressList[].addressNo |
Integer | Required | Unique number assigned to the address |
destinationAddressGroupList[].addressList[].addressZone |
String | Required | Information for the zone the address belongs to
|
destinationAddressGroupList[].addressList[].fqdn |
String | Conditional | Full domain name (FQDN)
|
destinationAddressGroupList[].addressList[].ip |
String | Conditional | IP address
|
destinationAddressGroupList[].addressList[].maskBit |
Integer | Optional | Subnet mask bit value
|
destinationAddressGroupList[].addressList[].name |
String | Required | Destination address name |
destinationAddressGroupList[].addressList[].port |
String | Optional | Port number
|
destinationAddressGroupList[].addressList[].type |
String | Optional | Address type information
|
destinationAddressGroupList[].addressZone |
String | Required | Information about the zone the destination address group belongs to |
destinationAddressGroupList[].description |
String | Optional | Destination address group description |
destinationAddressGroupList[].objectStorage |
Boolean | Optional | Whether to use Object Storage
|
destinationAddressList[] |
Array | Required | Information for the individual addresses you want to target as destinations
|
destinationAddressList[].memberNo |
String | Optional | User's NAVER Cloud Platform member ID
|
destinationAddressList[].instanceNo |
String | Optional | Contract number assigned when creating the instance
|
destinationAddressList[].addressNo |
Integer | Optional | Unique number assigned to the address |
destinationAddressList[].addressZone |
String | Required | Information for the zone the address belongs to
|
destinationAddressList[].fqdn |
String | Conditional | Full domain name (FQDN)
|
destinationAddressList[].ip |
String | Conditional | IP address
|
destinationAddressList[].maskBit |
Integer | Optional | Subnet mask bit value
|
destinationAddressList[].name |
String | Required | Destination address name |
destinationAddressList[].port |
String | Optional | Port number
|
destinationAddressList[].type |
String | Optional | Address type information
|
destinationAddressZone |
String | Optional | Information about the zone to which the address belongs
|
memberNo |
String | Required | User's NAVER Cloud Platform member ID
|
instanceNo |
String | Required | Contract number assigned when creating the instance
|
policyNo |
String | Required | Unique number assigned to the policy
|
policyName |
String | Required | Existing policy name |
port |
String | Optional | Firewall service port number |
protocol |
String | Required | Firewall service protocol |
sourceAddressGroupList[] |
Array | Required | Information for the address group you want to target as an origin
|
sourceAddressGroupList[].memberNo |
String | Required | User's NAVER Cloud Platform member ID
|
sourceAddressGroupList[].instanceNo |
String | Required | Contract number assigned when creating the instance
|
sourceAddressGroupList[].addressGroupNo |
Integer | Required | Unique number assigned to the address group |
sourceAddressGroupList[].addressGroupName |
String | Required | Origin address group name |
sourceAddressGroupList[].addressList[] |
Array | Optional | Information about addresses that belong to the address group |
sourceAddressGroupList[].addressList[].memberNo |
String | Optional | User's NAVER Cloud Platform member ID
|
sourceAddressGroupList[].addressList[].instanceNo |
String | Optional | Contract number assigned when creating the instance
|
sourceAddressGroupList[].addressList[].addressNo |
Integer | Required | Unique number assigned to the address |
sourceAddressGroupList[].addressList[].addressZone |
String | Required | Information for the zone the address belongs to
|
sourceAddressGroupList[].addressList[].fqdn |
String | Conditional | Full domain name (FQDN)
|
sourceAddressGroupList[].addressList[].ip |
String | Conditional | IP address
|
sourceAddressGroupList[].addressList[].maskBit |
Integer | Optional | Subnet mask bit value
|
sourceAddressGroupList[].addressList[].name |
String | Required | Origin address name |
sourceAddressGroupList[].addressList[].port |
String | Optional | Port number
|
sourceAddressGroupList[].addressList[].type |
String | Optional | Address type information
|
sourceAddressGroupList[].addressZone |
String | Required | Information about the zone the origin address group belongs to |
sourceAddressGroupList[].description |
String | Optional | Origin address group description |
sourceAddressGroupList[].objectStorage |
Boolean | Optional | Whether to use Object Storage
|
sourceAddressList[] |
Array | Required | Information for the individual addresses you want to target as origins
|
sourceAddressList[].memberNo |
String | Optional | User's NAVER Cloud Platform member ID
|
sourceAddressList[].instanceNo |
String | Optional | Contract number assigned when creating the instance
|
sourceAddressList[].addressNo |
Integer | Optional | Unique number assigned to the address |
sourceAddressList[].addressZone |
String | Required | Information for the zone the address belongs to
|
sourceAddressList[].fqdn |
String | Conditional | Full domain name (FQDN)
|
sourceAddressList[].ip |
String | Conditional | IP address
|
sourceAddressList[].maskBit |
Integer | Optional | Subnet mask bit value
|
sourceAddressList[].name |
String | Required | Origin address name |
sourceAddressList[].port |
String | Optional | Port number
|
sourceAddressList[].type |
String | Optional | Address type information
|
sourceAddressZone |
String | Optional | Information about the zone to which the address belongs
|
Request example
The following is a sample request.
curl --location --request POST 'https://securezonefirewall.apigw.ntruss.com/api/v2/szfw/kr2/updatePolicy'
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'x-ncp-mbr_no: {User number}' \
--header 'Content-Type: application/json' \
--data '{
"newPolicyName": "testpolicy",
"action": "deny",
"description": "policy2",
"destinationAddressGroupList": [
{
"addressGroupName": "Object Storage",
"addressGroupNo": 5441,
"description": "",
"addressList": [],
"addressZone": "vm",
"objectStorage": true
}
],
"destinationAddressList": [],
"destinationAddressZone": "os",
"policyName": "pol2",
"port": "443",
"protocol": "TCP",
"sourceAddressGroupList": [],
"sourceAddressList": [
{
"addressNo": 3644,
"addressZone": "sz",
"ip": "***.***.***.***",
"name": "s1906cf93f79",
"type": "ipmask"
}
],
"sourceAddressZone": "sz"
}'
Response
The following describes the response format.
Response body
The following describes the response body.
Field | Type | Required | Description |
---|---|---|---|
action |
String | - | Request type |
returnCode |
Integer | - | Response code |
returnMessage |
String | - | Response message |
Response status codes
For response status codes common to NAVER Cloud Platform, see Ncloud API response status codes.
Response example
The following is a sample example.
{
"action": "updatePolicy",
"returnCode": 0,
"returnMessage": "success"
}