Skip to content

Commit

Permalink
Create a new version of consumption, with preview budget merge with u…
Browse files Browse the repository at this point in the history
…sage detail and reservation (#2289)

* Create a new version, with budget merge with usage detail and reservation

* Remove budget preview tag

* update readme with new version

* Add resource group, resource, and filter to budget

* Revert "Add resource group, resource, and filter to budget"

This reverts commit 9010e29.

* Keep tags in Resource, and eTag in ProxyResource

* Update data type to validate model

* Revert "Update data type to validate model"

This reverts commit 15221bd.

* Update model to fix errors on model validation

* Switch a data type from integer to number

* Revert "Switch a data type from integer to number"

This reverts commit 380cc0e.
  • Loading branch information
bgsky authored and jhendrixMSFT committed Jan 24, 2018
1 parent 9410e99 commit 90eb6bc
Show file tree
Hide file tree
Showing 15 changed files with 1,793 additions and 1 deletion.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"parameters": {
"api-version": "2018-01-31",
"subscriptionId": "{subscription-id}",
"name": "TestBudget"
},
"responses": {
"200": {
"body": {
"id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget",
"name": "TestBudget",
"type": "Microsoft.Consumption/budgets",
"eTag": "\"1d34d012214157f\"",
"properties": {
"category": "Cost",
"amount": 100.65,
"timeGrain": "Monthly",
"timePeriod": {
"startDate": "2017-10-01T00:00:00Z",
"endDate": "2018-10-31T00:00:00Z"
},
"currentSpend": {
"amount": 80.89,
"unit": "USD"
},
"notifications": {
"Actual_GreaterThan_80_Percent": {
"enabled": true,
"operator": "GreaterThan",
"threshold": 80,
"contactEmails": [
"johndoe@contoso.com",
"janesmith@contoso.com"
],
"contactRoles": [
"Contributor",
"Reader"
]
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"parameters": {
"api-version": "2018-01-31",
"subscriptionId": "{subscription-id}"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget",
"name": "TestBudget",
"type": "Microsoft.Consumption/budgets",
"eTag": "\"1d34d012214157f\"",
"properties": {
"category": "Cost",
"amount": 100.65,
"timeGrain": "Monthly",
"timePeriod": {
"startDate": "2017-10-01T00:00:00Z",
"endDate": "2018-10-31T00:00:00Z"
},
"currentSpend": {
"amount": 80.89,
"unit": "USD"
},
"notifications": {
"Actual_GreaterThan_80_Percent": {
"enabled": true,
"operator": "GreaterThan",
"threshold": 80,
"contactEmails": [
"johndoe@contoso.com",
"janesmith@contoso.com"
],
"contactRoles": [
"Contributor",
"Reader"
]
},
"Actual_GreaterThanOrEqualTo_90_Percent": {
"enabled": true,
"operator": "GreaterThanOrEqualTo",
"threshold": 90,
"contactEmails": [
"johndoe@contoso.com",
"janesmith@contoso.com"
],
"contactRoles": [
"Contributor",
"Reader"
]
}
}
}
},
{
"id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget",
"name": "TestBudget",
"type": "Microsoft.Consumption/budgets",
"eTag": "\"1d34d012214157f\"",
"properties": {
"category": "Cost",
"amount": 600.65,
"timeGrain": "Monthly",
"timePeriod": {
"startDate": "2017-10-01T00:00:00Z",
"endDate": "2018-10-31T00:00:00Z"
},
"currentSpend": {
"amount": 120.89,
"unit": "USD"
},
"notifications": {
"Actual_GreaterThan_40_Percent": {
"enabled": true,
"operator": "GreaterThan",
"threshold": 40,
"contactEmails": [
"johndoe@contoso.com",
"janesmith@contoso.com"
],
"contactRoles": [
"Contributor",
"Reader"
]
},
"Actual_GreaterThanOrEqualTo_60_Percent": {
"enabled": true,
"operator": "GreaterThanOrEqualTo",
"threshold": 60,
"contactEmails": [
"johndoe@contoso.com",
"janesmith@contoso.com"
],
"contactRoles": [
"Contributor",
"Reader"
]
}
}
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"parameters": {
"api-version": "2018-01-31",
"subscriptionId": "{subscription-id}",
"name": "TestBudget",
"parameters": {
"eTag": "\"1d34d016a593709\"",
"properties": {
"category": "Cost",
"amount": 100.65,
"timeGrain": "Monthly",
"timePeriod": {
"startDate": "2017-10-01T00:00:00Z",
"endDate": "2018-10-31T00:00:00Z"
},
"notifications": {
"Actual_GreaterThan_80_Percent": {
"enabled": true,
"operator": "GreaterThan",
"threshold": 80,
"contactEmails": [
"johndoe@contoso.com",
"janesmith@contoso.com"
],
"contactRoles": [
"Contributor",
"Reader"
]
}
}
}
}
},
"responses": {
"201": {
"body": {
"id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget",
"name": "TestBudget",
"type": "Microsoft.Consumption/budgets",
"eTag": "\"1d34d012214157f\"",
"properties": {
"category": "Cost",
"amount": 100.65,
"timeGrain": "Monthly",
"timePeriod": {
"startDate": "2017-10-01T00:00:00Z",
"endDate": "2018-10-31T00:00:00Z"
},
"currentSpend": {
"amount": 80.89,
"unit": "USD"
},
"notifications": {
"Actual_GreaterThan_80_Percent": {
"enabled": true,
"operator": "GreaterThan",
"threshold": 80,
"contactEmails": [
"johndoe@contoso.com",
"janesmith@contoso.com"
],
"contactRoles": [
"Contributor",
"Reader"
]
}
}
}
}
},
"200": {
"body": {
"id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/budgets/TestBudget",
"name": "TestBudget",
"type": "Microsoft.Consumption/budgets",
"eTag": "\"1d34d012214157f\"",
"properties": {
"category": "Cost",
"amount": 100.65,
"timeGrain": "Monthly",
"timePeriod": {
"startDate": "2017-10-01T00:00:00Z",
"endDate": "2018-10-31T00:00:00Z"
},
"currentSpend": {
"amount": 80.89,
"unit": "USD"
},
"notifications": {
"Actual_GreaterThan_80_Percent": {
"enabled": true,
"operator": "GreaterThan",
"threshold": 80,
"contactEmails": [
"johndoe@contoso.com",
"janesmith@contoso.com"
],
"contactRoles": [
"Contributor",
"Reader"
]
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"parameters": {
"api-version": "2018-01-31",
"subscriptionId": "{subscription-id}",
"name": "TestBudget"
},
"responses": {
"200": {
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parameters": {
"api-version": "2018-01-31",
"scope": "providers/Microsoft.Capacity/reservationorders/87f3c981-3e33-43d0-b26b-dfca785cf18a",
"$filter": "properties/UsageDate ge 2017-10-01 AND properties/UsageDate le 2017-12-05"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "providers/Microsoft.Capacity/reservationOrders/87f3c981-3e33-43d0-b26b-dfca785cf18a/reservations/ba4a5693-71ef-4ec2-a5ea-c4897ee7e740/providers/Microsoft.Consumption/reservationDetails/20171129",
"name": "87f3c981-3e33-43d0-b26b-dfca785cf18a_ba4a5693-71ef-4ec2-a5ea-c4897ee7e740_20171129",
"type": "Microsoft.Consumption/reservationDetails",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"reservationOrderId": "87f3c981-3e33-43d0-b26b-dfca785cf18a",
"reservationId": "ba4a5693-71ef-4ec2-a5ea-c4897ee7e740",
"usageDate": "2017-11-29T00:00:00Z",
"skuName": "Standard_D2_v2",
"instanceId": "/subscriptions/ace02136-302a-429c-a2c8-dac173f60bea/resourcegroups/wvn-sql/providers/microsoft.compute/virtualmachines/wvn-sql2014sp33",
"totalReservedQuantity": 1.000000000000000,
"reservedHours": 24.000000000000000,
"usedHours": 24.000000000000000
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parameters": {
"api-version": "2018-01-31",
"scope": "providers/Microsoft.Capacity/reservationorders/87f3c981-3e33-43d0-b26b-dfca785cf18a/reservations/ba4a5693-71ef-4ec2-a5ea-c4897ee7e740",
"$filter": "properties/UsageDate ge 2017-10-01 AND properties/UsageDate le 2017-12-05"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "providers/Microsoft.Capacity/reservationOrders/87f3c981-3e33-43d0-b26b-dfca785cf18a/reservations/ba4a5693-71ef-4ec2-a5ea-c4897ee7e740/providers/Microsoft.Consumption/reservationDetails/20171129",
"name": "87f3c981-3e33-43d0-b26b-dfca785cf18a_ba4a5693-71ef-4ec2-a5ea-c4897ee7e740_20171129",
"type": "Microsoft.Consumption/reservationDetails",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"reservationOrderId": "87f3c981-3e33-43d0-b26b-dfca785cf18a",
"reservationId": "ba4a5693-71ef-4ec2-a5ea-c4897ee7e740",
"usageDate": "2017-11-29T00:00:00Z",
"skuName": "Standard_D2_v2",
"instanceId": "/subscriptions/ace02136-302a-429c-a2c8-dac173f60bea/resourcegroups/wvn-sql/providers/microsoft.compute/virtualmachines/wvn-sql2014sp33",
"totalReservedQuantity": 1.000000000000000,
"reservedHours": 24.000000000000000,
"usedHours": 24.000000000000000
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"parameters": {
"api-version": "2018-01-31",
"scope": "providers/Microsoft.Capacity/reservationorders/87f3c981-3e33-43d0-b26b-dfca785cf18a",
"grain":"daily",
"$filter": "properties/UsageDate ge 2017-10-01 AND properties/UsageDate le 2017-11-20"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "providers/Microsoft.Capacity/reservationOrders/87f3c981-3e33-43d0-b26b-dfca785cf18a/reservations/ed0bcc5a-8027-451e-8435-e96c4021abc3/providers/Microsoft.Consumption/reservationSummaries/20171001",
"name": "87f3c981-3e33-43d0-b26b-dfca785cf18a_ed0bcc5a-8027-451e-8435-e96c4021abc3_20171001",
"type": "Microsoft.Consumption/reservationsummaries",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"reservationOrderId": "87f3c981-3e33-43d0-b26b-dfca785cf18a",
"reservationId": "ed0bcc5a-8027-451e-8435-e96c4021abc3",
"skuName": "Standard_D8s_v3",
"reservedHours": 0.0,
"usageDate": "2017-10-01T00:00:00Z",
"usedHours": 0.0,
"minUtilizationPercentage": 0.0,
"avgUtilizationPercentage": 0.0,
"maxUtilizationPercentage": 0.0
}
}
]
}
}
}
}
Loading

1 comment on commit 90eb6bc

@AutorestCI
Copy link

Choose a reason for hiding this comment

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

Did a commit to SDK for Python:
Azure/azure-sdk-for-python@0732b21

Please sign in to comment.