Skip to content

Commit

Permalink
[Hub Generated] Review request for Microsoft.CostManagement to add ve…
Browse files Browse the repository at this point in the history
…rsion stable/2021-10-01 (Azure#15953)

* Adds base for updating Microsoft.CostManagement from version stable/2021-01-01 to version 2021-10-01

* Updates readme

* Updates API version in new specs and examples

* Added costmanagement.json, examples from 2020-06-01, chnaged readme.md for 2021-10-01

* 1: Deprecate expand forf Dimension    2: Fix linter exception: .parameters.apiVersionParameter.description' has incompatible values - apiVersionParamaDecrip should be same for all the json files

* supress r4011, r3023, r4018

* supress R4011, R3023, R4018

* Supress R3018 - EnumInsteadOfBoolean

* Linter Warning: UniqueXmsExample

* Linter - Fixing  - Missing Description/Title

* Supress R4037 and R4009

* Linter - Fix MisingTypeObject for exports and costmanagement

* removed R3023 from costmanagement.generatedetailedcostreport.json from redme.md file

* Added type:object for autorest exception and added back the supress R3023

* MissingTypeObject ForecastDataSet for costmanagement

* removed R4011, R3023, R4018

* added back R4011, R3023, R4018

* updating the version in the examples

* removing exampls with expand

* adding the expand chnage and examples back in, as this was breaking chnage

Co-authored-by: Mita Garg <v-migarg@microsoft.com>
  • Loading branch information
2 people authored and jovannikolov-msft committed Dec 1, 2021
1 parent 21a6ff0 commit 70dc4a7
Show file tree
Hide file tree
Showing 127 changed files with 12,730 additions and 4 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"parameters": {
"api-version": "2021-10-01-preview",
"billingAccountId": "12345:6789",
"scope": "providers/Microsoft.Billing/billingAccounts/12345:6789"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000",
"name": "00000000-0000-0000-0000-000000000000",
"type": "Microsoft.CostManagement/alerts",
"properties": {
"definition": {
"type": "Budget",
"category": "Cost",
"criteria": "CostThresholdExceeded"
},
"description": "",
"source": "Preset",
"details": {
"timeGrainType": "Quarterly",
"periodStartDate": "2020-03-01T00:00:00Z",
"triggeredBy": "00000000-0000-0000-0000-000000000000_1_01",
"resourceGroupFilter": [],
"resourceFilter": [],
"meterFilter": [],
"tagFilter": {},
"threshold": 0.8,
"operator": "GreaterThan",
"amount": 200000.0,
"unit": "USD",
"currentSpend": 161000.12,
"contactEmails": [
"1234@contoso.com"
],
"contactGroups": [],
"contactRoles": [],
"overridingAlert": null
},
"costEntityId": "budget1",
"status": "Active",
"creationTime": "2020-04-27T11:07:52.7143901Z",
"closeTime": "0001-01-01T00:00:00",
"modificationTime": "2020-04-28T11:06:02.8999373Z",
"statusModificationUserName": null,
"statusModificationTime": "0001-01-01T00:00:00"
}
},
{
"id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111",
"name": "11111111-1111-1111-111111111111",
"type": "Microsoft.CostManagement/alerts",
"properties": {
"definition": {
"type": "Budget",
"category": "Cost",
"criteria": "CostThresholdExceeded"
},
"description": "",
"source": "Preset",
"details": {
"timeGrainType": "Quarterly",
"periodStartDate": "2020-03-01T00:00:00Z",
"triggeredBy": "11111111-1111-1111-111111111111_1_01",
"resourceGroupFilter": [],
"resourceFilter": [],
"meterFilter": [],
"tagFilter": {},
"threshold": 0.8,
"operator": "GreaterThan",
"amount": 200000.0,
"unit": "USD",
"currentSpend": 171000.32,
"contactEmails": [
"1234@contoso.com"
],
"contactGroups": [],
"contactRoles": [],
"overridingAlert": null
},
"costEntityId": "budget1",
"status": "Active",
"creationTime": "2019-06-24T05:51:52.8713179Z",
"closeTime": "0001-01-01T00:00:00",
"modificationTime": "2019-08-31T17:51:55.1808807Z",
"statusModificationUserName": null,
"statusModificationTime": "0001-01-01T00:00:00"
}
}
],
"nextLink": null
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"parameters": {
"api-version": "2021-10-01",
"billingAccountId": "100",
"scope": "providers/Microsoft.Billing/billingAccounts/100"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31",
"name": "dimensions_ResourceGroup_2018-05-01_2018-05-31",
"type": "microsoft.CostManagement/dimensions",
"properties": {
"data": [],
"total": 377,
"category": "ResourceGroup",
"usageStart": "2018-05-01T00:00:00-07:00",
"usageEnd": "2018-05-31T00:00:00-07:00",
"description": "Resource group",
"filterEnabled": true,
"groupingEnabled": true
}
},
{
"id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31",
"name": "dimensions_ResourceType_2018-05-01_2018-05-31",
"type": "microsoft.CostManagement/dimensions",
"properties": {
"data": [],
"total": 37,
"category": "ResourceType",
"usageStart": "2018-05-01T00:00:00-07:00",
"usageEnd": "2018-05-31T00:00:00-07:00",
"description": "Resource type",
"filterEnabled": true,
"groupingEnabled": true
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"parameters": {
"api-version": "2019-10-01",
"billingAccountId": "100",
"$expand": "properties/data",
"$top": 5,
"scope": "providers/Microsoft.Billing/billingAccounts/100"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31_5",
"name": "dimensions_ResourceGroup_2018-05-01_2018-05-31_5",
"type": "microsoft.CostManagement/dimensions",
"properties": {
"data": [
"thoroetrg01",
"default-notificationhubs-westus",
"jedikeyvaultrg",
"contosocodeflow8d4a",
"noobaa"
],
"total": 377,
"category": "ResourceGroup",
"usageStart": "2018-05-01T00:00:00-07:00",
"usageEnd": "2018-05-31T00:00:00-07:00",
"description": "Resource group",
"filterEnabled": true,
"groupingEnabled": true
}
},
{
"id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31_5",
"name": "dimensions_ResourceType_2018-05-01_2018-05-31_5",
"type": "microsoft.CostManagement/dimensions",
"properties": {
"data": [
"microsoft.automation/automationaccounts",
"microsoft.databricks/workspaces",
"microsoft.dbformysql/servers",
"microsoft.containerregistry/registries",
"microsoft.search/searchservices"
],
"total": 37,
"category": "ResourceType",
"usageStart": "2018-05-01T00:00:00-07:00",
"usageEnd": "2018-05-31T00:00:00-07:00",
"description": "Resource type",
"filterEnabled": true,
"groupingEnabled": true
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"parameters": {
"api-version": "2019-10-01",
"billingAccountId": "100",
"$expand": "properties/data",
"$top": 5,
"$filter": "properties/category eq 'resourceId'",
"scope": "providers/Microsoft.Billing/billingAccounts/100"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.CostManagement/dimensions_ResourceId_2018-05-01_2018-05-31_5",
"name": "dimensions_ResourceId_2018-05-01_2018-05-31_5",
"type": "microsoft.CostManagement/dimensions",
"properties": {
"data": [
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount",
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount",
"/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus",
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1",
"/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume"
],
"total": 1409,
"category": "ResourceId",
"usageStart": "2018-05-01T00:00:00-07:00",
"usageEnd": "2018-05-31T00:00:00-07:00",
"description": "Resource Id",
"filterEnabled": true,
"groupingEnabled": true,
"nextLink": "http://management.azure.com/providers/Microsoft.Billing/billingAccounts/100/providers/Microsoft.CostManagement/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2019-10-01&$expand=properties/data&$skiptoken=AQAAAA%3D%3D"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
{
"parameters": {
"api-version": "2021-10-01",
"billingAccountId": "12345:6789",
"scope": "providers/Microsoft.Billing/billingAccounts/12345:6789",
"parameters": {
"type": "Usage",
"timeframe": "MonthToDate",
"dataset": {
"granularity": "Daily",
"filter": {
"and": [
{
"or": [
{
"dimension": {
"name": "ResourceLocation",
"operator": "In",
"values": [
"East US",
"West Europe"
]
}
},
{
"tag": {
"name": "Environment",
"operator": "In",
"values": [
"UAT",
"Prod"
]
}
}
]
},
{
"dimension": {
"name": "ResourceGroup",
"operator": "In",
"values": [
"API"
]
}
}
]
}
},
"includeActualCost": false,
"includeFreshPartialCost": false
}
},
"responses": {
"200": {
"body": {
"id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd",
"name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd",
"type": "microsoft.costmanagement/Query",
"properties": {
"nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/Forecast?api-version=2021-10-01&$skiptoken=AQAAAA%3D%3D",
"columns": [
{
"name": "PreTaxCost",
"type": "Number"
},
{
"name": "ResourceGroup",
"type": "String"
},
{
"name": "UsageDate",
"type": "Number"
},
{
"name": "CostStatus",
"type": "String"
},
{
"name": "Currency",
"type": "String"
}
],
"rows": [
[
2.10333307059661,
"JapanUnifia-Trial",
20180331,
"Forecast",
"USD"
],
[
218.68795741935486,
"RVIIOT-TRIAL",
20180331,
"Forecast",
"USD"
],
[
0.14384913581657052,
"VSTSHOL-1595322048000",
20180401,
"Forecast",
"USD"
],
[
0.009865586851323632,
"gs-stms-dev",
20180429,
"Forecast",
"USD"
]
]
}
}
}
}
}
Loading

0 comments on commit 70dc4a7

Please sign in to comment.