Information
Unsupported content This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

TemplatePart - addExcludeByDBKey


TemplatePart - addExcludeByDBKey

Description :

This command adds an exclude to a template part. You must provide the DBKey of a template, the name and type of the template part, and the path to the server objects you want to exclude.

For a complete list of the model types you can exclude, see the TemplatePart addExcludeByName command.

Return type : DBKey

Command Input :

Variable Name

Variable Type

Description

templateKey

DBKey

Handle to the existing template.

templatePartName

String

Path to the template part to be modified. Note that if you set templatePartType to CUSTOM_OBJECT, then you must set templatePartName to the class name of the custom object as specified in model.xml.

templatePartType

String

Type of template part to be excluded (see description above).

excludePath

String

Path to be excluded.

Example

The following example shows how to exclude all .txt files from a directory in a template with a known template handle TEMPLATE_DBKEY:

Script





ASSET_TYPE="DIRECTORY"

ASSET_PATH="/C"

EXCLUDE_FILES="*.txt"

RESULT=`blcli TemplatePart addExcludeByDBKey $TEMPLATE_DBKEY $ASSET_PATH' $ASSET_TYPE '$EXCLUDE_FILES' `



 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Server Automation Command Line Interface 8.5