-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Hub Generated] Review request for Microsoft.CostManagement to add ve…
…rsion preview/2020-03-01-preview (#10407) * Adds base for updating Microsoft.CostManagement from version preview/2019-04-01-preview to version 2020-03-01-preview * Updates readme * Updates API version in new specs and examples * Sync to private repo change set * Fix warnings * Fix example for string over boolean * List operation id fix * Implement changes from review * Fix response types * Only one tag * Fix failures * Fix operation Ids * Just CostAllocation * Percentage as number * Revert to working version * First wave of review changes * ruleName in examples * Percentage as number, example for tag * ruleName in tag example * Add nesting for list * More changes * Fix example name * Update tags/summary setup * Update based on review * Complete changes for API review * remove tags * fix response model, restore tag * Add 204 to example * Remove actual next link until implemented * Improve naming * restore paging * fixes found in review * Reduce duplication of definition object * camelcase checkname url * Make one type limitation clearer * Use enum descriptions * Add created/updated date to response contract * minor style fix * Fix examples * Improve messages * Remove correlation id, run prettier * Fix error format * Rename new files to costallocation. Include all existing resources in version * Include additional json in readme * Remove items that aren't changing versions * Use 2020-06-01 to avoid lint errors * Fix more object mismatches * Match parameter descriptions * Remove request/response differences * Fix semantics * Fix readonly setup * Remove format from readonly field * Fix capitalization
- Loading branch information
1 parent
d6d4333
commit 7ac0082
Showing
8 changed files
with
992 additions
and
2 deletions.
There are no files selected for viewing
601 changes: 601 additions & 0 deletions
601
.../resource-manager/Microsoft.CostManagement/preview/2020-03-01-preview/costallocation.json
Large diffs are not rendered by default.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
...nagement/preview/2020-03-01-preview/examples/CostAllocationRuleCheckNameAvailability.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2020-03-01-preview", | ||
"billingAccountId": "100", | ||
"costAllocationRuleCheckNameAvailabilityRequest": { | ||
"name": "testRule", | ||
"type": "Microsoft.CostManagement/costAllocationRules" | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"nameAvailable": false, | ||
"reason": "AlreadyExists", | ||
"message": "A cost allocation rule with name testRule is already present for the billing account 100. Please specify a differnt name." | ||
} | ||
} | ||
} | ||
} |
85 changes: 85 additions & 0 deletions
85
...icrosoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreate.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2020-03-01-preview", | ||
"billingAccountId": "100", | ||
"ruleName": "testRule", | ||
"costAllocationRule": { | ||
"properties": { | ||
"description": "This is a testRule", | ||
"status": "Active", | ||
"details": { | ||
"sourceResources": [ | ||
{ | ||
"resourceType": "Dimension", | ||
"name": "ResourceGroupName", | ||
"values": [ | ||
"sampleRG", | ||
"secondRG" | ||
] | ||
} | ||
], | ||
"targetResources": [ | ||
{ | ||
"resourceType": "Dimension", | ||
"policyType": "FixedProportion", | ||
"name": "ResourceGroupName", | ||
"values": [ | ||
{ | ||
"name": "destinationRG", | ||
"percentage": 45 | ||
}, | ||
{ | ||
"name": "destinationRG2", | ||
"percentage": 54 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "providers/Microsoft.Billing/billingAccounts/100/providers/Microsoft.CostManagement/costAllocationRules/testRule", | ||
"name": "testRule", | ||
"type": "Microsoft.CostManagement/costAllocationRules", | ||
"properties": { | ||
"description": "This is a testRule", | ||
"createdDate": "2020-06-18T22:21:51.1287144Z", | ||
"updatedDate": "2020-06-18T22:21:51.1287144Z", | ||
"status": "Creating", | ||
"details": { | ||
"sourceResources": [ | ||
{ | ||
"resourceType": "Dimension", | ||
"name": "ResourceGroupName", | ||
"values": [ | ||
"sampleRG" | ||
] | ||
} | ||
], | ||
"targetResources": [ | ||
{ | ||
"resourceType": "Dimension", | ||
"policyType": "FixedProportion", | ||
"name": "ResourceGroupName", | ||
"values": [ | ||
{ | ||
"name": "destinationRG", | ||
"percentage": 50 | ||
}, | ||
{ | ||
"name": "destinationRG2", | ||
"percentage": 50 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
88 changes: 88 additions & 0 deletions
88
...osoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleCreateTag.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2020-03-01-preview", | ||
"billingAccountId": "100", | ||
"ruleName": "testRule", | ||
"costAllocationRule": { | ||
"properties": { | ||
"description": "This is a testRule", | ||
"status": "Active", | ||
"details": { | ||
"sourceResources": [ | ||
{ | ||
"resourceType": "Tag", | ||
"name": "category", | ||
"values": [ | ||
"devops" | ||
] | ||
} | ||
], | ||
"targetResources": [ | ||
{ | ||
"resourceType": "Dimension", | ||
"policyType": "FixedProportion", | ||
"name": "ResourceGroupName", | ||
"values": [ | ||
{ | ||
"name": "destinationRG", | ||
"percentage": 33.33 | ||
}, | ||
{ | ||
"name": "destinationRG2", | ||
"percentage": 33.33 | ||
}, | ||
{ | ||
"name": "destinationRG3", | ||
"percentage": 33.34 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "providers/Microsoft.Billing/billingAccounts/100/providers/Microsoft.CostManagement/costAllocationRules/testRule", | ||
"name": "testRule", | ||
"type": "Microsoft.CostManagement/costAllocationRules", | ||
"properties": { | ||
"description": "This is a testRule", | ||
"createdDate": "2020-06-18T22:21:51.1287144Z", | ||
"updatedDate": "2020-06-18T22:21:51.1287144Z", | ||
"status": "Creating", | ||
"details": { | ||
"sourceResources": [ | ||
{ | ||
"resourceType": "Dimension", | ||
"name": "ResourceGroupName", | ||
"values": [ | ||
"sampleRG" | ||
] | ||
} | ||
], | ||
"targetResources": [ | ||
{ | ||
"resourceType": "Dimension", | ||
"policyType": "FixedProportion", | ||
"name": "ResourceGroupName", | ||
"values": [ | ||
{ | ||
"name": "destinationRG", | ||
"percentage": 50 | ||
}, | ||
{ | ||
"name": "destinationRG2", | ||
"percentage": 50 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...icrosoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleDelete.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2020-03-01-preview", | ||
"billingAccountId": "100", | ||
"ruleName": "testRule" | ||
}, | ||
"responses": { | ||
"200": {}, | ||
"204": {} | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
...r/Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRuleGet.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2020-03-01-preview", | ||
"billingAccountId": "100", | ||
"ruleName": "testRule" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "providers/Microsoft.Billing/billingAccounts/100/providers/Microsoft.CostManagement/costAllocationRules/testRule", | ||
"name": "testRule", | ||
"type": "Microsoft.CostManagement/costAllocationRules", | ||
"properties": { | ||
"description": "This is a testRule", | ||
"createdDate": "2020-06-18T22:21:51.1287144Z", | ||
"updatedDate": "2020-06-18T22:21:51.1287144Z", | ||
"status": "NotActive", | ||
"details": { | ||
"sourceResources": [ | ||
{ | ||
"resourceType": "Dimension", | ||
"name": "ResourceGroupName", | ||
"values": [ | ||
"sampleRG" | ||
] | ||
} | ||
], | ||
"targetResources": [ | ||
{ | ||
"resourceType": "Dimension", | ||
"policyType": "FixedProportion", | ||
"name": "ResourceGroupName", | ||
"values": [ | ||
{ | ||
"name": "destinationRG", | ||
"percentage": 50 | ||
}, | ||
{ | ||
"name": "destinationRG2", | ||
"percentage": 50 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
128 changes: 128 additions & 0 deletions
128
...Microsoft.CostManagement/preview/2020-03-01-preview/examples/CostAllocationRulesList.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2020-03-01-preview", | ||
"billingAccountId": "100" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"value": [ | ||
{ | ||
"id": "providers/Microsoft.Billing/billingAccounts/100/providers/Microsoft.CostManagement/costAllocationRules/testRule", | ||
"name": "testRule", | ||
"type": "Microsoft.CostManagement/costAllocationRules", | ||
"properties": { | ||
"description": "This is a testRule", | ||
"createdDate": "2020-06-18T22:21:51.1287144Z", | ||
"updatedDate": "2020-06-18T22:21:51.1287144Z", | ||
"status": "NotActive", | ||
"details": { | ||
"sourceResources": [ | ||
{ | ||
"resourceType": "Dimension", | ||
"name": "ResourceGroupName", | ||
"values": [ | ||
"sampleRG" | ||
] | ||
} | ||
], | ||
"targetResources": [ | ||
{ | ||
"resourceType": "Dimension", | ||
"policyType": "FixedProportion", | ||
"name": "ResourceGroupName", | ||
"values": [ | ||
{ | ||
"name": "destinationRG", | ||
"percentage": 50 | ||
}, | ||
{ | ||
"name": "destinationRG2", | ||
"percentage": 50 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"id": "providers/Microsoft.Billing/billingAccounts/100/providers/Microsoft.CostManagement/costAllocationRules/testRule2", | ||
"name": "testRule2", | ||
"type": "Microsoft.CostManagement/costAllocationRules", | ||
"properties": { | ||
"description": "This is a second test Rule", | ||
"createdDate": "2020-06-18T22:21:51.1287144Z", | ||
"updatedDate": "2020-06-18T22:21:51.1287144Z", | ||
"status": "Active", | ||
"details": { | ||
"sourceResources": [ | ||
{ | ||
"resourceType": "Dimension", | ||
"name": "SubscriptionId", | ||
"values": [ | ||
"2A002F2D-536F-4D7C-90DA-3D0BAE879B0E" | ||
] | ||
} | ||
], | ||
"targetResources": [ | ||
{ | ||
"resourceType": "Tag", | ||
"policyType": "FixedProportion", | ||
"name": "category", | ||
"values": [ | ||
{ | ||
"name": "devops", | ||
"percentage": 100 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"id": "providers/Microsoft.Billing/billingAccounts/100/providers/Microsoft.CostManagement/costAllocationRules/testRule3", | ||
"name": "testRule3", | ||
"type": "Microsoft.CostManagement/costAllocationRules", | ||
"properties": { | ||
"description": "This is a third test Rule", | ||
"createdDate": "2020-06-18T22:21:51.1287144Z", | ||
"updatedDate": "2020-06-18T22:21:51.1287144Z", | ||
"status": "Active", | ||
"details": { | ||
"sourceResources": [ | ||
{ | ||
"resourceType": "Tag", | ||
"name": "category", | ||
"values": [ | ||
"devops" | ||
] | ||
} | ||
], | ||
"targetResources": [ | ||
{ | ||
"resourceType": "Dimension", | ||
"policyType": "FixedProportion", | ||
"name": "ResourceGroupName", | ||
"values": [ | ||
{ | ||
"name": "ResourceGroup", | ||
"percentage": 55.55 | ||
}, | ||
{ | ||
"name": "ResourceGroupSecond", | ||
"percentage": 44.45 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
], | ||
"nextLink": null | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.