Files
sqltoolsservice/src/Microsoft.SqlTools.ResourceProvider.Core/Authentication/IAzureAuthenticationManager.cs
Charles Gagnon c248400a6c Add linting for copyright and unused usings (#1416)
* Add linting for copyright and unused usings

* Add one more + comment

* Enforce in build and fix errors

* Fix build
2022-03-04 15:17:29 -08:00

45 lines
1.5 KiB
C#

//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Microsoft.SqlTools.ResourceProvider.Core.Authentication
{
/// <summary>
/// Provides functionality to authenticate to Azure and discover associated accounts and subscriptions
/// </summary>
public interface IAzureAuthenticationManager : IAccountManager
{
/// <summary>
/// User accounts associated to the logged in user
/// </summary>
IEnumerable<IAzureUserAccount> UserAccounts
{
get;
}
/// <summary>
/// Azure subscriptions associated to the logged in user
/// </summary>
Task<IEnumerable<IAzureUserAccountSubscriptionContext>> GetSubscriptionsAsync();
/// <summary>
/// Returns user's azure subscriptions
/// </summary>
Task<IEnumerable<IAzureUserAccountSubscriptionContext>> GetSelectedSubscriptionsAsync();
/// <summary>
/// Finds a subscription given subscription id
/// </summary>
bool TryParseSubscriptionIdentifier(string value, out IAzureSubscriptionIdentifier subscription);
/// <summary>
/// Stores the selected subscriptions given the ids
/// </summary>
Task<bool> SetSelectedSubscriptionsAsync(IEnumerable<string> subscriptionIds);
}
}