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

Renamed cost allocation tags to cost tags and added schema for get list of all available tag keys #2862

Merged
merged 28 commits into from
Apr 13, 2018
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7b927cf
Added Tags filter for budgets and updated the api version
asarkar84 Mar 8, 2018
c641158
Updated comments
asarkar84 Mar 9, 2018
0e276b2
Incorporated review comments
asarkar84 Mar 10, 2018
7be4364
Incorporated review comments
asarkar84 Mar 13, 2018
bff7aa7
Incorporated review comment
asarkar84 Mar 13, 2018
011c9f0
Merge remote-tracking branch 'upstream/master'
asarkar84 Mar 13, 2018
002a6db
Added Tags filter and grouping for UsageDetails
asarkar84 Mar 15, 2018
020911c
Merge remote-tracking branch 'upstream/master'
asarkar84 Mar 15, 2018
502d70e
Added reservation recommendations and tags
asarkar84 Mar 16, 2018
b41bd12
Merge remote-tracking branch 'upstream/master'
asarkar84 Mar 16, 2018
7956270
Incorporated review comments
asarkar84 Mar 16, 2018
346ce83
Incorporated review comments
asarkar84 Mar 16, 2018
a0072f9
Removed unwanted space
asarkar84 Mar 16, 2018
ee9bfc3
Removed extra whitespace
asarkar84 Mar 16, 2018
6df7a9e
add swagger->sdk config for go
jhendrixMSFT Mar 16, 2018
7a5eab1
fix broken tags for go
jhendrixMSFT Mar 17, 2018
623ff00
Merge remote-tracking branch 'upstream/master'
asarkar84 Mar 22, 2018
6388784
Added schema spec for cost allocation tags
asarkar84 Mar 23, 2018
a8d47d1
Merge remote-tracking branch 'upstream/master'
asarkar84 Mar 23, 2018
3ccf1b4
Updated Get Operation
asarkar84 Mar 23, 2018
884aabe
Incorporated review comments
asarkar84 Mar 23, 2018
3d1c7c1
Review comments incorporated
asarkar84 Mar 26, 2018
def6325
Updated path
asarkar84 Mar 27, 2018
ef019c5
Merge remote-tracking branch 'upstream/master'
asarkar84 Apr 12, 2018
1f2de0f
Renamed cost allocation tags to cost tags and added schema for get li…
asarkar84 Apr 12, 2018
5699a84
Incorporated review comments
asarkar84 Apr 12, 2018
3bd6450
Incorporated review comments
asarkar84 Apr 12, 2018
7f53393
Incorporated review comments
asarkar84 Apr 12, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1143,19 +1143,19 @@
}
}
},
"/providers/Microsoft.CostManagement/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/costAllocationTags": {
"/providers/Microsoft.CostManagement/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/costTags": {
"get": {
"tags": [
"CostAllocationTags"
"CostTags"
],
"operationId": "CostAllocationTags_Get",
"description": "Get cost allocation tags for a billing account.",
"operationId": "CostTags_Get",
"description": "Get cost tags for a billing account.",
"externalDocs": {
"url": "https://docs.microsoft.com/en-us/rest/api/consumption/"
},
"x-ms-examples": {
"CostAllocationTags_Get": {
"$ref": "./examples/CostAllocationTags.json"
"CostTags_Get": {
"$ref": "./examples/CostTags.json"
}
},
"parameters": [
Expand All @@ -1170,7 +1170,7 @@
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/CostAllocationTags"
"$ref": "#/definitions/CostTags"
}
},
"default": {
Expand All @@ -1183,16 +1183,16 @@
},
"put": {
"tags": [
"CostAllocationTags"
"CostTags"
],
"operationId": "CostAllocationTags_CreateOrUpdate",
"description": "The operation to create or update cost allocation tags assiciated with a billing account. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.",
"operationId": "CostTags_CreateOrUpdate",
"description": "The operation to create or update cost tags assiciated with a billing account. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.",
"externalDocs": {
"url": "https://docs.microsoft.com/en-us/rest/api/consumption/"
},
"x-ms-examples": {
"CreateOrUpdateCostAllocationTags": {
"$ref": "./examples/CreateOrUpdateCostAllocationTags.json"
"CreateOrUpdateCostTags": {
"$ref": "./examples/CreateOrUpdateCostTags.json"
}
},
"parameters": [
Expand All @@ -1207,22 +1207,61 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CostAllocationTags"
"$ref": "#/definitions/CostTags"
},
"description": "Parameters supplied to the Create cost allocation tags operation."
"description": "Parameters supplied to the Create cost tags operation."
}
],
"responses": {
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/CostAllocationTags"
"$ref": "#/definitions/CostTags"
}
},
"201": {
"description": "Created.",
"schema": {
"$ref": "#/definitions/CostAllocationTags"
"$ref": "#/definitions/CostTags"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/providers/Microsoft.CostManagement/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/tags": {
"get": {
"tags": [
"Tags"
],
"operationId": "Tags_Get",
"description": "Get all available tag keys for a billing account.",
"externalDocs": {
"url": "https://docs.microsoft.com/en-us/rest/api/consumption/"
},
"x-ms-examples": {
"Tags_Get": {
"$ref": "./examples/Tags.json"
}
},
"parameters": [
{
"$ref": "#/parameters/apiVersionParameter"
},
{
"$ref": "#/parameters/billingAccountIdParameter"
}
],
"responses": {
"200": {
"description": "OK. The request has succeeded.",
"schema": {
"$ref": "#/definitions/Tags"
}
},
"default": {
Expand Down Expand Up @@ -1868,6 +1907,43 @@
}
}
},
"Tags": {
"description": "A resource listing all tags.",
"type": "object",
"allOf": [
{
"$ref": "#/definitions/ProxyResource"
}
],
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/TagProperties",
"title": "Tag properties"
}
}
},
"TagProperties": {
"description": "The properties of the tag.",
"properties": {
"tags": {
"description": "Tags.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more thing : Please avoid using property name as the description. Try to add a little more info :)

Copy link
Contributor Author

@asarkar84 asarkar84 Apr 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! I have made the changes. Will keep this in mind for future as well.

"type": "array",
"items": {
"$ref": "#/definitions/Tag"
}
}
}
},
"Tag": {
"description": "The tag.",
"properties": {
"key": {
"description": "Tag key.",
"type": "string"
}
}
},
"BudgetsListResult": {
"description": "Result of listing budgets. It contains a list of available budgets in the scope provided.",
"properties": {
Expand Down Expand Up @@ -2103,8 +2179,8 @@
"contactEmails"
]
},
"CostAllocationTags": {
"description": "A cost allocation tag resource.",
"CostTags": {
"description": "A cost tag resource.",
"type": "object",
"allOf": [
{
Expand All @@ -2114,28 +2190,28 @@
"properties": {
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/CostAllocationTagProperties",
"title": "Cost allocation tag properties"
"$ref": "#/definitions/CostTagProperties",
"title": "Cost tag properties"
}
}
},
"CostAllocationTagProperties": {
"description": "The properties of the cost allocation tag.",
"CostTagProperties": {
"description": "The properties of the cost tag.",
"properties": {
"costAllocationTags": {
"description": "Cost allocation tags.",
"costTags": {
"description": "Cost tags.",
"type": "array",
"items": {
"$ref": "#/definitions/CostAllocationTag"
"$ref": "#/definitions/CostTag"
}
}
}
},
"CostAllocationTag": {
"description": "The cost allocation tag.",
"CostTag": {
"description": "The cost tag.",
"properties": {
"key": {
"description": "Cost allocation tag key.",
"description": "Cost tag key.",
"type": "string"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"responses": {
"200": {
"body": {
"id": "providers/Microsoft.CostManagement/billingAccounts/{billingaccount-id}/providers/Microsoft.Consumption/costAllocationTags/costAllocationTags1",
"name": "costAllocationTags1",
"type": "Microsoft.Consumption/costAllocationTags",
"id": "providers/Microsoft.CostManagement/billingAccounts/{billingaccount-id}/providers/Microsoft.Consumption/costTags/costTags1",
"name": "costTags1",
"type": "Microsoft.Consumption/costTags",
"eTag": "\"1d34d012214157f\"",
"properties": {
"costAllocationTags": [
"costTags": [
{
"key": "Department"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"api-version": "2018-03-31",
"billingAccountId": "12345",
"parameters": {
"costAllocationTags": [
"costTags": [
{
"key": "Department"
},
Expand All @@ -22,12 +22,12 @@
"responses": {
"201": {
"body": {
"id": "providers/Microsoft.CostManagement/billingAccounts/{billingaccount-id}/providers/Microsoft.Consumption/costAllocationTags/costAllocationTags1",
"name": "costAllocationTags1",
"type": "Microsoft.Consumption/costAllocationTags",
"id": "providers/Microsoft.CostManagement/billingAccounts/{billingaccount-id}/providers/Microsoft.Consumption/costTags/costTags1",
"name": "costTags1",
"type": "Microsoft.Consumption/costTags",
"eTag": "\"1d34d012214157f\"",
"properties": {
"costAllocationTags": [
"costTags": [
{
"key": "Department"
},
Expand All @@ -46,12 +46,12 @@
},
"200": {
"body": {
"id": "providers/Microsoft.CostManagement/billingAccounts/{billingaccount-id}/providers/Microsoft.Consumption/costAllocationTags/costAllocationTags1",
"name": "costAllocationTags1",
"type": "Microsoft.Consumption/costAllocationTags",
"id": "providers/Microsoft.CostManagement/billingAccounts/{billingaccount-id}/providers/Microsoft.Consumption/costTags/costTags1",
"name": "costTags1",
"type": "Microsoft.Consumption/costTags",
"eTag": "\"1d34d012214157f\"",
"properties": {
"costAllocationTags": [
"costTags": [
{
"key": "Department"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"parameters": {
"api-version": "2018-03-31",
"billingAccountId": "12345"
},
"responses": {
"200": {
"body": {
"id": "providers/Microsoft.CostManagement/billingAccounts/{billingaccount-id}/providers/Microsoft.Consumption/tags/tags1",
"name": "tags1",
"type": "Microsoft.Consumption/tags",
"eTag": "\"1d34d012214157f\"",
"properties": {
"tags": [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The property name here should be "costTags", as defined in TagProperties.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! for mentioning this. Actually it was wrong at the other place. I am corrected it there.

{
"key": "Department"
},
{
"key": "CostCenter"
},
{
"key": "Portal"
},
{
"key": "OrgName"
},
{
"key": "Namespace"
},
{
"key": "resourceType"
},
{
"key": "Subsystem"
},
{
"key": "Environment"
},
{
"key": "clusterName"
}
]
}
}
}
}
}