A JSON Attribute Mapping is used for a destination JSON attribute whose JSON field values are constructed by defining JSON Attribute Mapping Field configuration objects.
This is simpler than defining a Constructed Attribute Mapping that constructs JSON since it is more concise and handles missing attributes.
If any field value cannot be constructed (either the required source attributes are not present or the resulting value is invalid), then that field will be omitted from the JSON attribute. If no field values can be constructed, then the JSON attribute will not be present on the entry rather than having an empty JSON object.
If any additional, pre-existing fields of the destination JSON attribute must be preserved, then a JSON Attribute configuration object must be created for the Sync Class.
The JSON Attribute Mapping component inherits from the Attribute Mapping
The following components have a direct composition relation from JSON Attribute Mappings:
The properties supported by this managed object are as follows:
Basic Properties: | Advanced Properties: |
---|---|
to-attribute | also-depends-on-src-attribute |
description | sync-on-every-update |
exclude-value |
Description | Specifies the name of the attribute whose values are constructed by this attribute mapping. |
Default Value | None |
Allowed Values | The name of the destination attribute |
Multi-Valued | No |
Required | Yes |
Admin Action Required | None. Modification requires no further action |
Description | A description for this Attribute Mapping |
Default Value | None |
Allowed Values | A string |
Multi-Valued | No |
Required | No |
Admin Action Required | None. Modification requires no further action |
Description | Specifies a list of values that will be excluded from the destination attribute after applying any other mapping or transformation. |
Default Value | None |
Allowed Values | A string |
Multi-Valued | Yes |
Required | No |
Admin Action Required | None. Modification requires no further action |
also-depends-on-src-attribute (Advanced Property)
Description | Changes to the specified source attribute will trigger an update to the destination attribute independent of any changes to the attributes that this mapping directly depends on. This property is very rarely needed. Any change detected at the source to the specified attribute will force the attribute value to be recomputed and updated at the destination (if it was out-of-sync). This property is only needed when the Data Sync Server cannot directly detect changes to an attribute. For instance in some environments, a Directory Server plugin might introduce attribute changes that do not show up in the LDAP change log, so a separate attribute is watched for changes even though its value does not directly contribute to the synchronized value. This property does not need to be set except in very unusual situations. |
Default Value | None |
Allowed Values | A string |
Multi-Valued | Yes |
Required | No |
Admin Action Required | None. Modification requires no further action |
sync-on-every-update (Advanced Property)
Description | This property will cause the attribute specified in this mapping (the 'to-attribute') to get synchronized on any detected change of any attribute. This is useful when an attribute may change without any indication in the changelog. This property is very rarely needed. Any change detected at the source to any attribute will force this attribute value to be recomputed and updated at the destination (if it was out-of-sync). This property is only needed when the Data Sync Server cannot directly detect changes to an attribute. For instance in some environments, a Directory Server plugin might introduce attribute changes that do not show up in the LDAP change log. This property does not need to be set except in very unusual situations. |
Default Value | false |
Allowed Values | true false |
Multi-Valued | No |
Required | No |
Admin Action Required | None. Modification requires no further action |
To list the configured Attribute Mappings:
dsconfig list-attribute-mappings [--property {propertyName}] ...
To view the configuration for an existing Attribute Mapping:
dsconfig get-attribute-mapping-prop --mapping-name {name} --map-name {name} [--tab-delimited] [--script-friendly] [--property {propertyName}] ...
To update the configuration for an existing Attribute Mapping:
dsconfig set-attribute-mapping-prop --mapping-name {name} --map-name {name} (--set|--add|--remove) {propertyName}:{propertyValue} [(--set|--add|--remove) {propertyName}:{propertyValue}] ...
To create a new JSON Attribute Mapping:
dsconfig create-attribute-mapping --mapping-name {name} --map-name {name} --type json [--set {propertyName}:{propertyValue}] ...
To delete an existing Attribute Mapping:
dsconfig delete-attribute-mapping --mapping-name {name} --map-name {name}