# ModifyAccountMapping

## Program ID

MetraPipeline.ModifyAccountMapping.1

## Description

This plugin is used to Add, Update or Delete account mapping.

Action is 0 for Add, 1 for Update and 2 for Delete account mapping.

Internal metratech account id is found for LoginName and NameSpace pair

- If action is Add, a new mapping record is added to t_account_mapper table for NewLoginName, NewNameSpace (it has to exist in t_namespace table) and internal account id above.

- If action is Update, the record for LoginName and NameSpace is deleted from t_account_mapper table and the new one for NewLoginName and NewNameSpace gets added there.

- If action is Delete, then a record for LoginName and NameSpace is deleted from t_account_mapper table. NewLoginName and NewNameSpace are ignored in this case.

## Required Input Properties

Tag name | Value type | Description
Action | String | Mapping Action: 0 = Add 1 = Update 2 = Delete
LoginName | String | Existing Login Name, Used along with NameSpace to look up internal account id.
NameSpace | String | Existing Name Space, Used along with LoginName to look up internal account id.
NewLoginName | String | New Login Name
NewNameSpace | String | New NameSpace

## Required Output Properties

None.

## Additional Configuration Tags

None.

## Configuration Example

<configdata>
<Action>Action</Action>
<LoginName>LoginName</LoginName>
<NameSpace>NameSpace</NameSpace>
<NewLoginName>NewLoginName</NewLoginName>
<NewNameSpace>NewNameSpace</NewNameSpace>
</configdata>