[{"label":"Latest (v37.2)","version":"latest"},{"version":"v37.1"},{"version":"v37.0"},{"version":"v36.3"},{"version":"v36.2"},{"version":"v36.1"},{"version":"v36.0"},{"link":"https://developer.vmware.com/apis/1046/vmware-cloud-director","version":"v35.0"}]
vmware-cloud-director
Update DFW Rules
DescriptionUpdates all the firewall rules for a given DFW security policy. If a rule with the ruleId is not already present, a new rule will be created. If it already exists, the rule will be updated. Any existing rule that is not specified in the update payload will be deleted. The order of rules in payload will define the actual order in which this rules will be applied.
Request
URLURL
https://{api_host}/cloudapi/1.0.0/vdcGroups/{vdcGroupId}/dfwPolicies/{policyId}/rules
Path Parameters
Path Parameters
string
vdcGroupId
Required
string
policyId
Required
Request Body
Request Body
DfwRules
of type(s) application/json
Required
{
"values": [
{
"action": "enum",
"actionValue": "string",
"applicationPortProfiles": [
{
"id": "string",
"name": "string"
}
],
"appliedTo": {
"id": "string",
"name": "string"
},
"comments": "string",
"description": "string",
"destinationFirewallGroups": [
{
"id": "string",
"name": "string"
}
],
"destinationGroupsExcluded": false,
"direction": "enum",
"enabled": false,
"id": "string",
"ipProtocol": "enum",
"logging": false,
"name": "string",
"networkContextProfiles": [
{
"id": "string",
"name": "string"
}
],
"sourceFirewallGroups": [
{
"id": "string",
"name": "string"
}
],
"sourceGroupsExcluded": false,
"version": {
"version": 0
}
}
]
}
Authentication
This operation uses the following authentication methods.
Errors
Error
400
Invalid configuration.
Error
404
The specified resource was not found
Code Samples
cURL Command
curl -X PUT -H "Content-Type: application/json" -d '{"values":[{"action":"enum","actionValue":"string","applicationPortProfiles":[{"id":"string","name":"string"}],"appliedTo":{"id":"string","name":"string"},"comments":"string","description":"string","destinationFirewallGroups":[{"id":"string","name":"string"}],"destinationGroupsExcluded":false,"direction":"enum","enabled":false,"id":"string","ipProtocol":"enum","logging":false,"name":"string","networkContextProfiles":[{"id":"string","name":"string"}],"sourceFirewallGroups":[{"id":"string","name":"string"}],"sourceGroupsExcluded":false,"version":{"version":0}}]}' https://{api_host}/cloudapi/1.0.0/vdcGroups/{vdcGroupId}/dfwPolicies/{policyId}/rules
[{"label":"Latest (v37.2)","version":"latest"},{"version":"v37.1"},{"version":"v37.0"},{"version":"v36.3"},{"version":"v36.2"},{"version":"v36.1"},{"version":"v36.0"},{"link":"https://developer.vmware.com/apis/1046/vmware-cloud-director","version":"v35.0"}]
vmware-cloud-director
Availability
Added in 35.0
On This Page
DFW Policy Operations
delete
delete
get
get
get
put
put