Edit Auto-Import Rule

To edit an auto-import rule, use the following request:

1
2
PUT /settings/hypervisors/:hypervisor_id/auto_import_rules/:rule_id.xml
PUT /settings/hypervisors/:hypervisor_id/auto_import_rules/:rule_id.json

XML Request Example

1
curl -i -X PUT http://onapp.test/settings/hypervisors/12/auto_import_rules/3.xml -d '<auto_import_rule><label>Test auto import label EDITED</label><source_type>VCenter::Cluster</source_type><source_id type="integer">1</source_id><target_type>User</target_type><target_id type="integer">1</target_id></auto_import_rule>' -u user:userpass -H 'Accept: application/xml' -H 'Content-type: application/xml'

JSON Request Example

1
curl -i -X PUT http://onapp.test/settings/hypervisors/12/auto_import_rules/3.json -d '{"label": "Test auto import label EDITED", "source_type": "VCenter::Cluster", "source_id": 1, "target_type": "User", "target_id": 1}' -u user:userpass -H 'Accept: application/json' -H 'Content-type: application/json'

Where:

label - the label of auto-import rule specified by the user

source_type - the type of vCenter source

source_id - the ID of the vCenter source

target_type - the type of target user

target_id - the ID of the user