-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Added schema spec for cost allocation tags #2742
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
7b927cf
Added Tags filter for budgets and updated the api version
asarkar84 c641158
Updated comments
asarkar84 0e276b2
Incorporated review comments
asarkar84 7be4364
Incorporated review comments
asarkar84 bff7aa7
Incorporated review comment
asarkar84 011c9f0
Merge remote-tracking branch 'upstream/master'
asarkar84 002a6db
Added Tags filter and grouping for UsageDetails
asarkar84 020911c
Merge remote-tracking branch 'upstream/master'
asarkar84 502d70e
Added reservation recommendations and tags
asarkar84 b41bd12
Merge remote-tracking branch 'upstream/master'
asarkar84 7956270
Incorporated review comments
asarkar84 346ce83
Incorporated review comments
asarkar84 a0072f9
Removed unwanted space
asarkar84 ee9bfc3
Removed extra whitespace
asarkar84 6df7a9e
add swagger->sdk config for go
jhendrixMSFT 7a5eab1
fix broken tags for go
jhendrixMSFT 623ff00
Merge remote-tracking branch 'upstream/master'
asarkar84 6388784
Added schema spec for cost allocation tags
asarkar84 a8d47d1
Merge remote-tracking branch 'upstream/master'
asarkar84 3ccf1b4
Updated Get Operation
asarkar84 884aabe
Incorporated review comments
asarkar84 3d1c7c1
Review comments incorporated
asarkar84 def6325
Updated path
asarkar84 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...resource-manager/Microsoft.Consumption/stable/2018-03-31/examples/CostAllocationTags.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2018-03-31", | ||
"billingAccountId": "12345" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "providers/Microsoft.CostManagement/billingAccounts/{billingaccount-id}/providers/Microsoft.Consumption/costAllocationTags/costAllocationTags1", | ||
"name": "costAllocationTags1", | ||
"type": "Microsoft.Consumption/costAllocationTags", | ||
"eTag": "\"1d34d012214157f\"", | ||
"properties": { | ||
"costAllocationTags": [ | ||
{ | ||
"key": "Department" | ||
}, | ||
{ | ||
"key": "CostCenter" | ||
}, | ||
{ | ||
"key": "Portal" | ||
}, | ||
{ | ||
"key": "OrgName" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
72 changes: 72 additions & 0 deletions
72
...er/Microsoft.Consumption/stable/2018-03-31/examples/CreateOrUpdateCostAllocationTags.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2018-03-31", | ||
"billingAccountId": "12345", | ||
"parameters": { | ||
"costAllocationTags": [ | ||
{ | ||
"key": "Department" | ||
}, | ||
{ | ||
"key": "CostCenter" | ||
}, | ||
{ | ||
"key": "Portal" | ||
}, | ||
{ | ||
"key": "OrgName" | ||
} | ||
] | ||
} | ||
}, | ||
"responses": { | ||
"201": { | ||
"body": { | ||
"id": "providers/Microsoft.CostManagement/billingAccounts/{billingaccount-id}/providers/Microsoft.Consumption/costAllocationTags/costAllocationTags1", | ||
"name": "costAllocationTags1", | ||
"type": "Microsoft.Consumption/costAllocationTags", | ||
"eTag": "\"1d34d012214157f\"", | ||
"properties": { | ||
"costAllocationTags": [ | ||
{ | ||
"key": "Department" | ||
}, | ||
{ | ||
"key": "CostCenter" | ||
}, | ||
{ | ||
"key": "Portal" | ||
}, | ||
{ | ||
"key": "OrgName" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"200": { | ||
"body": { | ||
"id": "providers/Microsoft.CostManagement/billingAccounts/{billingaccount-id}/providers/Microsoft.Consumption/costAllocationTags/costAllocationTags1", | ||
"name": "costAllocationTags1", | ||
"type": "Microsoft.Consumption/costAllocationTags", | ||
"eTag": "\"1d34d012214157f\"", | ||
"properties": { | ||
"costAllocationTags": [ | ||
{ | ||
"key": "Department" | ||
}, | ||
{ | ||
"key": "CostCenter" | ||
}, | ||
{ | ||
"key": "Portal" | ||
}, | ||
{ | ||
"key": "OrgName" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@asarkar84 - As per the definition of "eTag" in the spec, it is a string.
What is the reason behind escaping the quotes
"\"1d34d012214157f\""
? Wouldn't this"1d34d012214157f"
be sufficient? Why is the service sending a string with quotes in it ?/cc @sergey-shandar - FYI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is how azure services or apis do eTag: " For example, I checked the CosmosDB data explorer which is publicly available. I found _eTag property exposed there and the service returns it with quotes. Storage also has quotes in their eTag. Since 2 double quotes are not accepted in json we need to escape one which is inside the value.
PFB the CosmosDB example for reference:
_etag": ""00000e3a-0000-0000-0000-59c94cd20000"",
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amarzavery Just refer any public API for reference, eTag will have quote. Escape char is used as per json standard since it will not accept 2 quotes like this ""
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the explanation. That makes sense.