Skip to content

Commit

Permalink
Renamed cost allocation tags to cost tags and added schema for get li…
Browse files Browse the repository at this point in the history
…st of all available tag keys (#2862)

* Added Tags filter for budgets and updated the api version

Added Tags filter for budgets and updated the api version

* Updated comments

Updated comments

* Incorporated review comments

Incorporated review comments

* Incorporated review comments

Incorporated review comments

* Incorporated review comment

Incorporated review comment

* Added Tags filter and grouping for UsageDetails

Added Tags filter and grouping for UsageDetails

* Added reservation recommendations and tags

Added reservation recommendations and tags

* Incorporated review comments

Incorporated review comments

* Incorporated review comments

Incorporated review comments

* Removed unwanted space

Removed unwanted space

* Removed extra whitespace

Removed extra whitespace

* add swagger->sdk config for go

* fix broken tags for go

* Added schema spec for cost allocation tags

Added schema spec for cost allocation tags

* Updated Get Operation

Updated Get Operation

* Incorporated review comments

Incorporated review comments

* Review comments incorporated

Review comments incorporated

* Updated path

Updated path

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

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

* Incorporated review comments

Incorporated review comments

* Incorporated review comments

Incorporated review comments

* Incorporated review comments

Incorporated review comments
  • Loading branch information
asarkar84 authored and jianghaolu committed Apr 13, 2018
1 parent 6467703 commit b9da36a
Show file tree
Hide file tree
Showing 4 changed files with 164 additions and 41 deletions.
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": "A list of Tag.",
"type": "array",
"items": {
"$ref": "#/definitions/Tag"
}
}
}
},
"Tag": {
"description": "The tag resource.",
"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": [
{
"key": "Department"
},
{
"key": "CostCenter"
},
{
"key": "Portal"
},
{
"key": "OrgName"
},
{
"key": "Namespace"
},
{
"key": "resourceType"
},
{
"key": "Subsystem"
},
{
"key": "Environment"
},
{
"key": "clusterName"
}
]
}
}
}
}
}

0 comments on commit b9da36a

Please sign in to comment.