Creating a Resource Template
You can create a resource template from the GUI or by using the CLI.
CLI
Procedure
-
You can either manually specify the scope of a resource template or import while creating an application.
- Manual
In the data file, specify the type of the resource template in the xsi:type attribute. The resource templates can be nested under Enterprise, or Environment, or Application to create them in the corresponding scope:
<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>
In the AMXAdminTask element, set the action attribute to add and the objectSelector attribute to ResourceTemplate or Environment/ResoureceTemplate or Environment/Applicaiton/ResoureceTemplate:
<AMXAdminTask action="add" objectSelector="ResourceTemplate|Environment/ResourceTemplate|Environment/ Application/ResourceTemplate"/>
See AMX AdminTask for more information.
- Import
When you create an application, it can import the resource templates from the DAA file.
-
Set the attribute ImportResourceTemplateNames="true"to import all resource templates from the application template.
- To import select resource templates from the application template, specify each resource template separately in <ImportResourceTemplateName>
- You can specify a scope to the resource template in resourceTemplatesScope. If no scope is mentioned, default scope is global.
<Application xsi:type="amxdata:Application" name="app" importResourceTemplates="true" resourceTemplatesScope="Global/Environment/Application"> <ApplicationTemplate xsi:type="amxdata_reference:ApplicationTemplate_reference" name="appTemplate"/> <ImportResourceTemplateName>Httpclient_RT</ImportResourceTemplateNames> <ImportResourceTemplateName>JDBC_RT</ImportResourceTemplateNames> </Application>
In the AMXAdminTask element, set the action attribute to add and the objectSelector attribute to ResourceTemplate|Environment/ResourceTemplate|Environment/Application/ResourceTemplate
-
- Manual