Deleting a Resource Template

You can delete a resource template from the resource list in the GUI. If resource instances created from the template exist, you cannot delete the template.

Procedure

  1. Select Shared Objects > Resource Templates.
  2. Select one or more resource templates from the list.
    You can use the Type and Scope to filter the list of resource templates.
  3. Click Delete.
    If resource instances created from the template exist an error dialog is displayed. Otherwise, the templates are deleted from the database.

CLI

You can delete a resource template using the command-line utility.

Procedure

  1. In the data file, specify the type of the resource template in the xsi:type attribute.
    <amxdata_base:Enterprise
    
    	<ResourceTemplate xsi:type="amxdata:JdbcResourceTemplate"  name="appJDBC1"
    	...
    	</ResourceTemplate>
    										
    		<Environment xsi:type="amxdata:Environment" name="DevEnvironment" >
    		...
    			<ResourceTemplate xsi:type="amxdata:JdbcResourceTemplate"  name="appJDBC1"
    										...
    			</ResourceTemplate>
    													
    			<Application xsi:type="amxdata:Application" name="nestedTestApp" resourceTemplatesScope="Application">
    			...		
    				<ResourceTemplate xsi:type="amxdata:JdbcResourceTemplate"  name="appJDBC1"
    				...
    				</ResourceTemplate>
    			</Application>
    
    		</Environment>
    </amxdata_base:Enterprise>
  2. In the AMXAdminTask element, set the action attribute to delete and the objectSelector attribute ResourceTemplate|Environment/ResourceTemplate|Environment/Application/ResourceTemplate.
    <AMXAdminTask action="delete" 
    objectSelector="ResourceTemplate|Environment/ResourceTemplate|Environment/ Application/ResourceTemplate"/>