Skip to content

Commit 28e60e3

Browse files
mitagargMita Garg
andauthored
[Hub Generated] Review request for Microsoft.CostManagement to add version stable/2021-10-01 (#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 <[email protected]>
1 parent 052bec2 commit 28e60e3

File tree

127 files changed

+12730
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+12730
-4
lines changed

specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2021-10-01/costmanagement.exports.json

Lines changed: 892 additions & 0 deletions
Large diffs are not rendered by default.

specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2021-10-01/costmanagement.generatedetailedcostreport.json

Lines changed: 408 additions & 0 deletions
Large diffs are not rendered by default.

specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2021-10-01/costmanagement.json

Lines changed: 2612 additions & 0 deletions
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-10-01-preview",
4+
"billingAccountId": "12345:6789",
5+
"scope": "providers/Microsoft.Billing/billingAccounts/12345:6789"
6+
},
7+
"responses": {
8+
"200": {
9+
"body": {
10+
"value": [
11+
{
12+
"id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/alerts/00000000-0000-0000-0000-000000000000",
13+
"name": "00000000-0000-0000-0000-000000000000",
14+
"type": "Microsoft.CostManagement/alerts",
15+
"properties": {
16+
"definition": {
17+
"type": "Budget",
18+
"category": "Cost",
19+
"criteria": "CostThresholdExceeded"
20+
},
21+
"description": "",
22+
"source": "Preset",
23+
"details": {
24+
"timeGrainType": "Quarterly",
25+
"periodStartDate": "2020-03-01T00:00:00Z",
26+
"triggeredBy": "00000000-0000-0000-0000-000000000000_1_01",
27+
"resourceGroupFilter": [],
28+
"resourceFilter": [],
29+
"meterFilter": [],
30+
"tagFilter": {},
31+
"threshold": 0.8,
32+
"operator": "GreaterThan",
33+
"amount": 200000.0,
34+
"unit": "USD",
35+
"currentSpend": 161000.12,
36+
"contactEmails": [
37+
38+
],
39+
"contactGroups": [],
40+
"contactRoles": [],
41+
"overridingAlert": null
42+
},
43+
"costEntityId": "budget1",
44+
"status": "Active",
45+
"creationTime": "2020-04-27T11:07:52.7143901Z",
46+
"closeTime": "0001-01-01T00:00:00",
47+
"modificationTime": "2020-04-28T11:06:02.8999373Z",
48+
"statusModificationUserName": null,
49+
"statusModificationTime": "0001-01-01T00:00:00"
50+
}
51+
},
52+
{
53+
"id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/alerts/11111111-1111-1111-111111111111",
54+
"name": "11111111-1111-1111-111111111111",
55+
"type": "Microsoft.CostManagement/alerts",
56+
"properties": {
57+
"definition": {
58+
"type": "Budget",
59+
"category": "Cost",
60+
"criteria": "CostThresholdExceeded"
61+
},
62+
"description": "",
63+
"source": "Preset",
64+
"details": {
65+
"timeGrainType": "Quarterly",
66+
"periodStartDate": "2020-03-01T00:00:00Z",
67+
"triggeredBy": "11111111-1111-1111-111111111111_1_01",
68+
"resourceGroupFilter": [],
69+
"resourceFilter": [],
70+
"meterFilter": [],
71+
"tagFilter": {},
72+
"threshold": 0.8,
73+
"operator": "GreaterThan",
74+
"amount": 200000.0,
75+
"unit": "USD",
76+
"currentSpend": 171000.32,
77+
"contactEmails": [
78+
79+
],
80+
"contactGroups": [],
81+
"contactRoles": [],
82+
"overridingAlert": null
83+
},
84+
"costEntityId": "budget1",
85+
"status": "Active",
86+
"creationTime": "2019-06-24T05:51:52.8713179Z",
87+
"closeTime": "0001-01-01T00:00:00",
88+
"modificationTime": "2019-08-31T17:51:55.1808807Z",
89+
"statusModificationUserName": null,
90+
"statusModificationTime": "0001-01-01T00:00:00"
91+
}
92+
}
93+
],
94+
"nextLink": null
95+
}
96+
}
97+
}
98+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-10-01",
4+
"billingAccountId": "100",
5+
"scope": "providers/Microsoft.Billing/billingAccounts/100"
6+
},
7+
"responses": {
8+
"200": {
9+
"body": {
10+
"value": [
11+
{
12+
"id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31",
13+
"name": "dimensions_ResourceGroup_2018-05-01_2018-05-31",
14+
"type": "microsoft.CostManagement/dimensions",
15+
"properties": {
16+
"data": [],
17+
"total": 377,
18+
"category": "ResourceGroup",
19+
"usageStart": "2018-05-01T00:00:00-07:00",
20+
"usageEnd": "2018-05-31T00:00:00-07:00",
21+
"description": "Resource group",
22+
"filterEnabled": true,
23+
"groupingEnabled": true
24+
}
25+
},
26+
{
27+
"id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31",
28+
"name": "dimensions_ResourceType_2018-05-01_2018-05-31",
29+
"type": "microsoft.CostManagement/dimensions",
30+
"properties": {
31+
"data": [],
32+
"total": 37,
33+
"category": "ResourceType",
34+
"usageStart": "2018-05-01T00:00:00-07:00",
35+
"usageEnd": "2018-05-31T00:00:00-07:00",
36+
"description": "Resource type",
37+
"filterEnabled": true,
38+
"groupingEnabled": true
39+
}
40+
}
41+
]
42+
}
43+
}
44+
}
45+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"parameters": {
3+
"api-version": "2019-10-01",
4+
"billingAccountId": "100",
5+
"$expand": "properties/data",
6+
"$top": 5,
7+
"scope": "providers/Microsoft.Billing/billingAccounts/100"
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"value": [
13+
{
14+
"id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.CostManagement/dimensions_ResourceGroup_2018-05-01_2018-05-31_5",
15+
"name": "dimensions_ResourceGroup_2018-05-01_2018-05-31_5",
16+
"type": "microsoft.CostManagement/dimensions",
17+
"properties": {
18+
"data": [
19+
"thoroetrg01",
20+
"default-notificationhubs-westus",
21+
"jedikeyvaultrg",
22+
"contosocodeflow8d4a",
23+
"noobaa"
24+
],
25+
"total": 377,
26+
"category": "ResourceGroup",
27+
"usageStart": "2018-05-01T00:00:00-07:00",
28+
"usageEnd": "2018-05-31T00:00:00-07:00",
29+
"description": "Resource group",
30+
"filterEnabled": true,
31+
"groupingEnabled": true
32+
}
33+
},
34+
{
35+
"id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.CostManagement/dimensions_ResourceType_2018-05-01_2018-05-31_5",
36+
"name": "dimensions_ResourceType_2018-05-01_2018-05-31_5",
37+
"type": "microsoft.CostManagement/dimensions",
38+
"properties": {
39+
"data": [
40+
"microsoft.automation/automationaccounts",
41+
"microsoft.databricks/workspaces",
42+
"microsoft.dbformysql/servers",
43+
"microsoft.containerregistry/registries",
44+
"microsoft.search/searchservices"
45+
],
46+
"total": 37,
47+
"category": "ResourceType",
48+
"usageStart": "2018-05-01T00:00:00-07:00",
49+
"usageEnd": "2018-05-31T00:00:00-07:00",
50+
"description": "Resource type",
51+
"filterEnabled": true,
52+
"groupingEnabled": true
53+
}
54+
}
55+
]
56+
}
57+
}
58+
}
59+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"parameters": {
3+
"api-version": "2019-10-01",
4+
"billingAccountId": "100",
5+
"$expand": "properties/data",
6+
"$top": 5,
7+
"$filter": "properties/category eq 'resourceId'",
8+
"scope": "providers/Microsoft.Billing/billingAccounts/100"
9+
},
10+
"responses": {
11+
"200": {
12+
"body": {
13+
"value": [
14+
{
15+
"id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.CostManagement/dimensions_ResourceId_2018-05-01_2018-05-31_5",
16+
"name": "dimensions_ResourceId_2018-05-01_2018-05-31_5",
17+
"type": "microsoft.CostManagement/dimensions",
18+
"properties": {
19+
"data": [
20+
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount",
21+
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount",
22+
"/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus",
23+
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1",
24+
"/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume"
25+
],
26+
"total": 1409,
27+
"category": "ResourceId",
28+
"usageStart": "2018-05-01T00:00:00-07:00",
29+
"usageEnd": "2018-05-31T00:00:00-07:00",
30+
"description": "Resource Id",
31+
"filterEnabled": true,
32+
"groupingEnabled": true,
33+
"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"
34+
}
35+
}
36+
]
37+
}
38+
}
39+
}
40+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-10-01",
4+
"billingAccountId": "12345:6789",
5+
"scope": "providers/Microsoft.Billing/billingAccounts/12345:6789",
6+
"parameters": {
7+
"type": "Usage",
8+
"timeframe": "MonthToDate",
9+
"dataset": {
10+
"granularity": "Daily",
11+
"filter": {
12+
"and": [
13+
{
14+
"or": [
15+
{
16+
"dimension": {
17+
"name": "ResourceLocation",
18+
"operator": "In",
19+
"values": [
20+
"East US",
21+
"West Europe"
22+
]
23+
}
24+
},
25+
{
26+
"tag": {
27+
"name": "Environment",
28+
"operator": "In",
29+
"values": [
30+
"UAT",
31+
"Prod"
32+
]
33+
}
34+
}
35+
]
36+
},
37+
{
38+
"dimension": {
39+
"name": "ResourceGroup",
40+
"operator": "In",
41+
"values": [
42+
"API"
43+
]
44+
}
45+
}
46+
]
47+
}
48+
},
49+
"includeActualCost": false,
50+
"includeFreshPartialCost": false
51+
}
52+
},
53+
"responses": {
54+
"200": {
55+
"body": {
56+
"id": "providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd",
57+
"name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd",
58+
"type": "microsoft.costmanagement/Query",
59+
"properties": {
60+
"nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/providers/Microsoft.CostManagement/Forecast?api-version=2021-10-01&$skiptoken=AQAAAA%3D%3D",
61+
"columns": [
62+
{
63+
"name": "PreTaxCost",
64+
"type": "Number"
65+
},
66+
{
67+
"name": "ResourceGroup",
68+
"type": "String"
69+
},
70+
{
71+
"name": "UsageDate",
72+
"type": "Number"
73+
},
74+
{
75+
"name": "CostStatus",
76+
"type": "String"
77+
},
78+
{
79+
"name": "Currency",
80+
"type": "String"
81+
}
82+
],
83+
"rows": [
84+
[
85+
2.10333307059661,
86+
"JapanUnifia-Trial",
87+
20180331,
88+
"Forecast",
89+
"USD"
90+
],
91+
[
92+
218.68795741935486,
93+
"RVIIOT-TRIAL",
94+
20180331,
95+
"Forecast",
96+
"USD"
97+
],
98+
[
99+
0.14384913581657052,
100+
"VSTSHOL-1595322048000",
101+
20180401,
102+
"Forecast",
103+
"USD"
104+
],
105+
[
106+
0.009865586851323632,
107+
"gs-stms-dev",
108+
20180429,
109+
"Forecast",
110+
"USD"
111+
]
112+
]
113+
}
114+
}
115+
}
116+
}
117+
}

0 commit comments

Comments
 (0)