removePolicy

Use the removePolicy command to completely remove an applied policy from the Business Transaction Management system.

Command Syntax

btmcli removePolicy -name PlcyName [-type PlcyType] [-subType PlcySubType]
                    [-version PlcyVersion] [-wait true|false] [-f] 
                    -s sphereUrl -l username:password

To determine the type and subtype of a policy, select Policies in the Navigator. The type and subtype for each policy is displayed in the main pane.

Name Long Name Description
-n -name The name of the policy you want to remove. If this name is unique, you do not need to supply additional type or version information.
-t -type The policy type for the policy you want to remove. Use this flag if the policy name is not unique.
-subType -- The policy subtype for the policy you want to remove.

If the name and type combination is not unique, specify a policy subtype.

-V -version The version associated with the policy you want to remove.

If the name, type, and subtype triple is not unique, specify the version number. Version numbers are automatically appended to policy names to create unique policies.

-wait -- TRUE: Wait for the policy to be removed before executing another script.

The default value is FALSE.

-f -force Remove the policy even if it is marked internally "do not remove."
-s -sphereUrl The URL of the sphere where the policy is applied.

http://hostname:port/btmcentral/sphere/

This flag is not required if you have set the AP_SPHERE_URL environment variable for your sphere.

-l -userLogin The username and password associated with the sphere, in the format: username:password. This set of credentials must belong to a user in the btmadmin role.

See Security Options in Accessing CLI Commands for information on furnishing login credentials.

You can encrypt passwords using the encryptPassword command.


Example

The following example removes the policy myLoggingPolicy from the sphere, and waits until the policy is removed before executing any other command.

btmcli removePolicy -name myLoggingPolicy -wait true 
                    -s http://localhost:8080/btmcentral/sphere/
                    -l admin:abracadabra