azure-sdk-for-python icon indicating copy to clipboard operation
azure-sdk-for-python copied to clipboard

Not able to get Kind = Modern usage details

Open dejan-shuki opened this issue 5 years ago • 6 comments

  • Package Name:

  • Package Name: azure.mgmt.consumption

  • Operating System: Win 10

  • Python Version: 3.9

Describe the bug

  1. Usage details for scope = Enrolment returns only data for one subscription.
  2. We are not able to get columns that listed in kind = Modern (we got list from REST API page and from Portal).

To Reproduce Steps to reproduce the behavior: SCOPE = '/providers/Microsoft.Billing/enrollmentAccounts/{}/providers/Microsoft.Billing/billingPeriods/{}'.format(BILLING_ACC_ID, BILLING_PERIOD) bill_consumption = consumption_client.usage_details.list(SCOPE)

Expected behavior When we specify Enrollment as scope we expect to receive data for all subscriptions. We expect more columns:

BillingPeriodEndDate | BillingProfileId | BillingProfileName | AccountOwnerId | AccountName | SubscriptionId | SubscriptionName | Date | Product | PartNumber | MeterId | ServiceFamily | MeterCategory | MeterSubCategory | MeterRegion | MeterName | Quantity | EffectivePrice | Cost | UnitPrice | BillingCurrency | ResourceLocation | AvailabilityZone | ConsumedService | ResourceId | ResourceName | ServiceInfo1 | ServiceInfo2 | AdditionalInfo | Tags | InvoiceSectionId | InvoiceSection | CostCenter | UnitOfMeasure | ResourceGroup | ReservationId | ReservationName | ProductOrderId | ProductOrderName | OfferId | IsAzureCreditEligible | Term | PublisherName | PlanName | ChargeType | Frequency | PublisherType | PayGPrice | PricingModel

received cols:

type | tags | billing_period_id | usage_start | usage_end | instance_name | instance_id | instance_location | currency | usage_quantity | pretax_cost | is_estimated | meter_id | subscription_guid | subscription_name | account_name | department_name | product | consumed_service | cost_center

dejan-shuki avatar Jun 03 '21 19:06 dejan-shuki

Thanks for the report @dejan-shuki! Adding @msyyc to take a look :)

annatisch avatar Jun 04 '21 21:06 annatisch

hi @dejan-shuki Could you provide a more detailed example about it?

RAY-316 avatar Jun 17 '21 09:06 RAY-316

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @TiagoCrewGitHubIssues.

Issue Details
  • Package Name:

  • Package Name: azure.mgmt.consumption

  • Operating System: Win 10

  • Python Version: 3.9

Describe the bug

  1. Usage details for scope = Enrolment returns only data for one subscription.
  2. We are not able to get columns that listed in kind = Modern (we got list from REST API page and from Portal).

To Reproduce Steps to reproduce the behavior: SCOPE = '/providers/Microsoft.Billing/enrollmentAccounts/{}/providers/Microsoft.Billing/billingPeriods/{}'.format(BILLING_ACC_ID, BILLING_PERIOD) bill_consumption = consumption_client.usage_details.list(SCOPE)

Expected behavior When we specify Enrollment as scope we expect to receive data for all subscriptions. We expect more columns:

BillingPeriodEndDate | BillingProfileId | BillingProfileName | AccountOwnerId | AccountName | SubscriptionId | SubscriptionName | Date | Product | PartNumber | MeterId | ServiceFamily | MeterCategory | MeterSubCategory | MeterRegion | MeterName | Quantity | EffectivePrice | Cost | UnitPrice | BillingCurrency | ResourceLocation | AvailabilityZone | ConsumedService | ResourceId | ResourceName | ServiceInfo1 | ServiceInfo2 | AdditionalInfo | Tags | InvoiceSectionId | InvoiceSection | CostCenter | UnitOfMeasure | ResourceGroup | ReservationId | ReservationName | ProductOrderId | ProductOrderName | OfferId | IsAzureCreditEligible | Term | PublisherName | PlanName | ChargeType | Frequency | PublisherType | PayGPrice | PricingModel

received cols:

type | tags | billing_period_id | usage_start | usage_end | instance_name | instance_id | instance_location | currency | usage_quantity | pretax_cost | is_estimated | meter_id | subscription_guid | subscription_name | account_name | department_name | product | consumed_service | cost_center

Author: dejan-shuki
Assignees: RAY-316
Labels:

Consumption-UsageDetailsandExport, Mgmt, Service Attention, customer-reported, question

Milestone: -

ghost avatar Jul 08 '21 00:07 ghost

@dejan-shuki I apologize for the confusion here. We have two types of usage details records, "legacy" and "modern". The kind of record is related to the agreement you have signed with Microsoft. Since you have an Enterprise Agreement, your usage details records will always come in the legacy format. Only customers who have signed a Microsoft Customer Agreement will receive usage details of kind "modern".

adwise3 avatar Sep 09 '21 18:09 adwise3

@dejan-shuki We are closing this issue now as it has been > 1 week since my last reply here. If you are still having issues you can reopen as needed.

adwise3 avatar Oct 12 '21 22:10 adwise3

Closing this based on above comment from @adwise3 . @dejan-shuki we will be happy to help if above guidance does not work. Please free free to re-open the thread if more help is needed.

ShilpiGautam avatar Oct 12 '21 23:10 ShilpiGautam