13.3. delConfig
¶
delConfig
deletes DataPower objects. Similar to export, it uses regular expression patterns, which match class names and object names, to determine what to delete.
It is often desirable to delete all objects related to a particular DataPower service, e.g., when deleting a Web services proxy, it may be necessary to delete the policy and the rules used by the proxy. You can accomplish this by deleting all objects prefixed with the name of the service, as this is the naming convention used by DataPower when creating services. In case there are dependencies between objects (e.g., a rule might be referenced by a policy and so the policy can be deleted only after the rule is deleted), delConfig
will attempt to run the delete request multiple times until all matching objects are deleted.
Run this command in the “dry-run” mode first to see what objects will be deleted, to avoid deleting items by accident.
You can specify objects to delete using classPattern/namePattern attributes and/or using the nested object
element.
13.3.1. Attributes/Options¶
Attribute | Description | Required |
---|---|---|
classPattern | Regular expression defining what classes (types) are to be deleted. | No |
namePattern | Regular expression defining object names to be deleted. | No |
quiet | If set to Defaults to |
No |
dryRun | If set to Defaults to |
No |
13.3.2. object
Nested Element¶
Attribute | Description | Required |
---|---|---|
class | Regular expression defining what classes (types) to be deleted. | Yes, unless name was provided. |
name | Regular expression defining object names to be deleted. | Yes, unless class was provided. |
13.3.3. Examples¶
This example deletes the Web services proxies with the name starting with “test”. If no such proxy exists, the task will complete successfully because of the “quiet” setting.
dpbuddy delConfig -quiet -classPattern WSGateway -namePattern "test.*"
<dp:delConfig quiet="true" dryRun="true">
<object class="WSGateway" name="test. *"/>
</dp:delConfig>
You can find more examples under samples
in your distribution or online.