![]() |
Consumption Analytics Documentation |
Modifies an existing resource name by adding a prefix or suffix constructed from one or more constants or identifier values. Certain resources can be included or excluded during processing. By default, all resources are processed. Options include specifying a list of explicit resource names to always modify along regular expressions for inclusion or exclusion of matching resources.
A prefix and/or suffix is described by
InputIdentifier
objects that specify existing identifiers along with options for extracting and concatenating. The resulting value is assembled by concatenating the value extracted for each
InputIdentifier
in the order provided. This value is then applied as a prefix or suffix as configured. Each record processed must contain all the specified input identifiers or a transform exception will occur. For more information on how to perform various functions, such as substring and truncation, see Creating new identifiers with InputIdentifier.
<bean class="com.cloudcruiser.batch.transform.ModifyResourceNameFromIdentifier">
<batch:step id="transform" next="charge">
<batch:tasklet>
<bean class="com.cloudcruiser.batch.CCRecordTransformTasklet">
<property name="processors">
<list>
<bean class="com.cloudcruiser.batch.transform.ModifyResourceNameFromIdentifier">
<property name="filter">
<bean class="com.cloudcruiser.batch.filter.IdentifierExistsCondition">
<property name="identifierName" value="vmstate" />
</bean>
</property>
<property name="active" value="true"/>
<property name="resources" value="NetworkBandwidth,IPAddress" />
<property name="resourceIncludes" value="Disk.*,Cpu.*" />
<property name="resourceExcludes" value="Storage.*" />
<property name="exceptionProcessing" value="true" />
<property name="prefixIdentifiers" />
<property name="suffixIdentifiers">
<list>
<bean class="com.cloudcruiser.batch.transform.InputIdentifier">
<property name="name" value="vmstate" />
<property name="prefix" value="_" />
</bean>
</list>
</property>
</bean>
</list>
</property>
</bean>
</batch:tasklet>
</batch:step>
(c) Copyright 2017-2020 Hewlett Packard Enterprise Development LP