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

Add eTag field for consumption API #15303

Closed
stephybun opened this issue Aug 17, 2021 · 6 comments
Closed

Add eTag field for consumption API #15303

stephybun opened this issue Aug 17, 2021 · 6 comments
Assignees
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. feature-request This issue requires a new behavior in the product in order be resolved. 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

Comments

@stephybun
Copy link

stephybun commented Aug 17, 2021

Feature Request

Hello, we're using this sdk to perform CRUD operations on budgets on subscription and resource group level. In order to update certain fields in a budget the eTag of the budget needs to be sent in the update request. Unfortunately the current consumption API version from 2019-10-01 does not have support for the eTag yet - as an example see BudgetProperties below.

type BudgetProperties struct {
	// Category - The category of the budget, whether the budget tracks cost or usage.
	Category *string `json:"category,omitempty"`
	// Amount - The total amount of cost to track with the budget
	Amount *decimal.Decimal `json:"amount,omitempty"`
	// TimeGrain - The time covered by a budget. Tracking of the amount will be reset based on the time grain. BillingMonth, BillingQuarter, and BillingAnnual are only supported by WD customers. Possible values include: 'TimeGrainTypeMonthly', 'TimeGrainTypeQuarterly', 'TimeGrainTypeAnnually', 'TimeGrainTypeBillingMonth', 'TimeGrainTypeBillingQuarter', 'TimeGrainTypeBillingAnnual'
	TimeGrain TimeGrainType `json:"timeGrain,omitempty"`
	// TimePeriod - Has start and end date of the budget. The start date must be first of the month and should be less than the end date. Budget start date must be on or after June 1, 2017. Future start date should not be more than twelve months. Past start date should  be selected within the timegrain period. There are no restrictions on the end date.
	TimePeriod *BudgetTimePeriod `json:"timePeriod,omitempty"`
	// Filter - May be used to filter budgets by user-specified dimensions and/or tags.
	Filter *BudgetFilter `json:"filter,omitempty"`
	// CurrentSpend - READ-ONLY; The current amount of cost which is being tracked for a budget.
	CurrentSpend *CurrentSpend `json:"currentSpend,omitempty"`
	// Notifications - Dictionary of notifications associated with the budget. Budget can have up to five notifications.
	Notifications map[string]*Notification `json:"notifications"`
	// ForecastSpend - READ-ONLY; The forecasted cost which is being tracked for a budget.
	ForecastSpend *ForecastSpend `json:"forecastSpend,omitempty"`
}

Can you please add support for the eTag field?

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Aug 17, 2021
@RickWinter RickWinter added Consumption Mgmt This issue is related to a management-plane library. labels Aug 17, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Aug 17, 2021
@lirenhe lirenhe added feature-request This issue requires a new behavior in the product in order be resolved. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Sep 10, 2021
@ghost ghost added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Sep 10, 2021
@Alancere
Copy link
Contributor

Hi @stephybun thanks for this issue!

Our SDK is generated based on swagger. I checked swagger after 2019-10-01 and there is no eTag attribute in BudgetProperties. Sorry for that.

@RickWinter RickWinter added needs-author-feedback Workflow: More information is needed from author to address the issue. and removed needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team customer-response-expected labels Sep 17, 2021
@ghost ghost added the no-recent-activity There has been no recent activity on this issue. label Sep 24, 2021
@ghost
Copy link

ghost commented Sep 24, 2021

Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

@stephybun
Copy link
Author

Thanks for the response @804873052, could you then please add the field to the swagger spec so that it can be generated in the SDK?

@ghost ghost added needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team and removed needs-author-feedback Workflow: More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue. labels Sep 27, 2021
@Alancere
Copy link
Contributor

Alancere commented Sep 28, 2021

@stephybun Swagger is maintained by the service team and I cannot modify it directly. I found that Budget has a root level ETag field, you see https://github.com/Azure/azure-sdk-for-go/blob/main/services/consumption/mgmt/2019-10-01/consumption/models.go#L232

@stephybun
Copy link
Author

stephybun commented Sep 30, 2021

@804873052 thanks for pointing the field out on root level, must have missed it. Unfortunately the reason we thought we needed the ETag was for toggling the thresholdType in the notification for a budget, but even when sending the ETag along in the request the field still isn't properly updated. You can close this issue - I will raise a new one in the swagger repo.
Update: Issue in swagger repo Azure/azure-rest-api-specs#16240

@lirenhe
Copy link
Member

lirenhe commented Oct 8, 2021

Close this one as this is related to Swagger/service behaviour.
@stephybun, could you link the new issue in Swagger repo here?

@lirenhe lirenhe closed this as completed Oct 8, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. feature-request This issue requires a new behavior in the product in order be resolved. 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
Projects
None yet
Development

No branches or pull requests

4 participants