Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUERY] How to get all possible AppServicePlan configurations from an Azure subscription? #47644

Open
wbarisch opened this issue Dec 23, 2024 · 2 comments
Assignees
Labels
App Services customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@wbarisch
Copy link

Library name and version

Azure.ResourceManager.AppService 1.3.0

Query/Question

I want to get a List with all possible AppService Hosting Plan configuration settings of my Azure subscription(Location, Tier, Size,...). Possibly through skus.

  • It should be done using Azure SDK for .NET.
  • I already have a SubscriptionResource object to work with. Every sample and code here will assume "subscription" variable to be that object.

Here is an example of code and how the output is expected:

        List<HostingPlanSku> hostingPlanSkus = subscription.GetSkusAsync();

        if (hostingPlanSkus != null)
        {
            Console.WriteLine("Available App Service SKUs:");
            foreach (var sku in hostingPlanSkus)
            {
                Console.WriteLine($"Tier: {sku.Tier}, Name: {sku.Name}, Size: {sku.Size}, Family: {sku.Family}");
            }
        }
Available App Service SKUs:
Tier: Free, Name: Free, Size: F1, Family: F
Tier: Basic, Name: Basic1, Size: B1, Family: B
Tier: Standard, Name: Standard1, Size: S1, Family: S
Tier: PremiumV2, Name: PremiumV2_1, Size: P1v2, Family: Pv2

What have I tried?

  • Using GetSkusAsync() returns null every-time. I've tried with different subscriptions and result is the same.
var skus = await AppServiceExtensions.GetSkusAsync(subscription);
foreach (var sku in skus.Value.Skus)
{
        Console.WriteLine($"- Tier: {sku.Tier}, Size: {sku.Size}, Name: {sku.Name}");
}
  • I thought maybe was that the SubscriptionResource could not just get the hosting plan configuration plans like in Azure portal because the SubscriptionResource is used to create,store,modify already the resources. So I looked to try with MockableAppServiceSubscriptionResource. But I could't get an object out of it that would make me be able to call the function in the first try(GetSkusAsync).

If you know how to get possible hosting plan configuration. Please do share your knowledge. And if it not currently possible with Azure sdk for .net, I would also appreciate the info.

Thank you and best regards,
Wesley

Environment

.Net 8.0 Console Application

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Dec 23, 2024
@jsquire jsquire added App Services Mgmt This issue is related to a management-plane library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Dec 23, 2024
@jsquire
Copy link
Member

jsquire commented Dec 23, 2024

Thank you for your feedback. Tagging and routing to the team member best able to assist.

@ArthurMa1978
Copy link
Member

Thank you for your feedback @wbarisch , @HarveyLink please look into this issue.

@welovej welovej assigned welovej and unassigned HarveyLink Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App Services customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

5 participants