EditDashboardDeviceInfo
EditDashboardDeviceInfo is used to modify the device name, custom fields, policy set, and storage quota. You should limit the number of edited devices in a single call to 1000. Requests larger than 1000 should use successive calls to the web service. The equivalent option in the dashboard is the Edit device button on the Device details tab for a device.
See EditDashboardDeviceInfo for an example PowerShell script.
Signature
ServiceResponse EditDashboardDeviceInfo (CallingContext callingContext, EditDashboardDeviceInfoInput input, out EditDashboardDeviceInfoResult result);
Data structure
The input to EditDashboardDeviceInfo is an array of EditableDashboardDeviceInfo structures which contain the information on a device which can be edited.
[DataContract]
public class EditDashboardDeviceInfoInput
{
[DataMember]
public EditableDashboardDeviceInfo[] DeviceInfo;
}
[DataContract]
public struct EditableDashboardDeviceInfo
{
[DataMember]
public Guid DeviceId;
[DataMember]
public string DeviceName;
[DataMember]
public string Custom1;
[DataMember]
public string Custom2;
[DataMember]
public string Custom3;
[DataMember]
public Guid ExplicitPolicySetId;
[DataMember]
public bool InheritPolicySet;
[DataMember]
public int StorageQuotaGB;
[DataMember]
public bool ChangeQuickCacheConfiguration;
[DataMember]
public Guid AllocatedQuickCacheId;
}
You can change one or more fields in EditDashboardDeviceInfo.
- DeviceId— Specify the device to edit. This is a required field.
- DeviceName—Specify the device name. Pass null if you do not want to change the name. An empty string will cause an error because the name cannot be blank.
- Custom—Optionally, specify any of the three fields for storing custom strings, for example an internal ID for the device. Pass null if you do not want to change the field. An empty string will leave the field blank.
- ExplicitPolicySetId—Specify the policy set the device uses. Pass an empty GUID (all zeros) if you do not want to change the policy set. This field is ignored if InheritPolicySet is true.
- InheritPolicySet—When true, this field sets the policy set to the inherited policy set and disregards the ExplicitPolicySetId. When false, this field uses the ExplicitPolicySetId specified.
- StorageQuotaGB—Specify the device's storage quota. The value must conform to the rules for the policy set the device is using. Pass zero or a negative number if you do not want to change the field. You cannot pass null because the value must be an integer.
- ChangeQuickCacheConfiguration—When true, this field uses the AllocatedQuickCacheId to identify the QuickCache the device uses. When false, this device will not use a QuickCache and AllocatedQuickCacheId will be ignored.
- AllocatedQuickCacheId—Specify the ID of the QuickCache the device uses. This value is only used if ChangeQuickCacheconfguration is true. Pass an empty GUID (all zeros) if you want to remove an allocated QuickCache.
Result
In addition to the BaseServiceResult described in General API structure, EditDashboardDeviceInfoResult is an array of EditDashboardDeviceInfoInput structures containing the deviceId and an EditResult with the outcome of the edit attempt on that deviceId. If you get a partial failure in the OverallStatus field, you can verify which device edits passed and which failed.
[DataContract]
public class EditDashboardDeviceInfoInput
{
public EditDashboardDeviceInfoInput()
{
}
[DataMember]
public EditableDashboardDeviceInfo[] DeviceInfo;
}
DataContract]
public struct EditInfoResultDetails
{
[DataMember]
public Guid DeviceId;
[DataMember]
public EntityActionResult EditResult;
[DataMember]
public string AdditionalInfo;
}
public enum EntityActionResult
{
Unknown,
Success,
Failure,
DuplicateNameNotAllowed,
OptimisticConcurrencyFailure,
ValidationError,
AccessDeniedError,
NoChangesToSave,
NoDataDeletionPolicy,
UnknownEntity
}