Skip to content

[BUG]Azure.ResourceManager.Quota Subscr #51541

@Juliehzl

Description

@Juliehzl

Library name and version

Azure.ResourceManager.Quota 1.1.0

Describe the bug

With the following code, we cannot get valid response which return empty result. But we can get result with rest api call. It seems there is mismatch for Model defineition and raw response.

ResourceIdentifier subscriptionQuotaAllocationsListResourceId = SubscriptionQuotaAllocationsListResource.CreateResourceIdentifier(managementGroupId, subscriptionId, quotaGroupName, Constants.ComputeResourceProviderNamespace, location);
SubscriptionQuotaAllocationsListResource subscriptionQuotaAllocationsList = armClient.GetSubscriptionQuotaAllocationsListResource(subscriptionQuotaAllocationsListResourceId);

SubscriptionQuotaAllocationsListResource allocationResult = await subscriptionQuotaAllocationsList.GetAsync();
return allocationResult.Data;

The response structure is as below which does not have properties in first layer but SDK defined "properties"

{
  "value": [
    {
      "properties": {
        "resourceName": "standarddadsv5family",
        "limit": 2650,
        "name": {
          "value": "standarddadsv5family",
          "localizedValue": "standarddadsv5family"
        },
        "shareableQuota": 0
      }
    }
  ],
  "provisioningState": "Succeeded",
  "id": "/providers/Microsoft.Management/managementGroups/xxx/subscriptionsxxxxx/providers/Microsoft.Quota/groupQuotas/xxx/resourceProviders/Microsoft.Compute/quotaAllocations/centraluseuap",
  "type": "Microsoft.Quota/groupQuotas/quotaAllocations",
  "name": "centraluseuap"
}

Expected behavior

There is correct response returned.

Actual behavior

Null value

Reproduction Steps

Use sdk with the following code:

ResourceIdentifier subscriptionQuotaAllocationsListResourceId = SubscriptionQuotaAllocationsListResource.CreateResourceIdentifier(managementGroupId, subscriptionId, quotaGroupName, Constants.ComputeResourceProviderNamespace, location);
SubscriptionQuotaAllocationsListResource subscriptionQuotaAllocationsList = armClient.GetSubscriptionQuotaAllocationsListResource(subscriptionQuotaAllocationsListResourceId);

SubscriptionQuotaAllocationsListResource allocationResult = await subscriptionQuotaAllocationsList.GetAsync();
return allocationResult.Data;

Environment

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    MgmtThis issue is related to a management package.QuotaQuota ServiceService AttentionWorkflow: This issue is responsible by Azure service team.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions