/// <summary> /// Creates a new user or updates an existing user's information on a Data Box /// Edge/Data Box Gateway device. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='name'> /// The user name. /// </param> /// <param name='user'> /// The user details. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <User> BeginCreateOrUpdateAsync(this IUsersOperations operations, string deviceName, string name, User user, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(deviceName, name, user, resourceGroupName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates a new user or updates an existing user's information on a data box /// edge/gateway device. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='name'> /// The user name. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='encryptedPassword'> /// The password details. /// </param> /// <param name='shareAccessRights'> /// List of shares that the user has rights on. This field should not be /// specified during user creation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <User> BeginCreateOrUpdateAsync(this IUsersOperations operations, string deviceName, string name, string resourceGroupName, AsymmetricEncryptedSecret encryptedPassword = default(AsymmetricEncryptedSecret), IList <ShareAccessRight> shareAccessRights = default(IList <ShareAccessRight>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(deviceName, name, resourceGroupName, encryptedPassword, shareAccessRights, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }