From fd82543b760e67b461bc3e1192a932f746bc4d55 Mon Sep 17 00:00:00 2001 From: Steven Kang Date: Wed, 19 Jul 2017 10:49:43 -0700 Subject: [PATCH] Update budget Management API's to list/create/update RI_UTILIZATION type budget. Update budget Management API's to support DAILY timeUnit for RI_UTILIZATION type budget. --- .../budgets/budgets-2016-10-20.examples.json | 5 ++++ .../budgets/budgets-2016-10-20.normal.json | 19 +++++++++----- .../Budgets/Generated/PropertyValueRules.xml | 26 +++++++++++-------- .../Budgets/Generated/ServiceEnumerations.cs | 8 ++++++ 4 files changed, 41 insertions(+), 17 deletions(-) create mode 100644 generator/ServiceModels/budgets/budgets-2016-10-20.examples.json diff --git a/generator/ServiceModels/budgets/budgets-2016-10-20.examples.json b/generator/ServiceModels/budgets/budgets-2016-10-20.examples.json new file mode 100644 index 000000000000..0ea7e3b0bbe9 --- /dev/null +++ b/generator/ServiceModels/budgets/budgets-2016-10-20.examples.json @@ -0,0 +1,5 @@ +{ + "version": "1.0", + "examples": { + } +} diff --git a/generator/ServiceModels/budgets/budgets-2016-10-20.normal.json b/generator/ServiceModels/budgets/budgets-2016-10-20.normal.json index 9dfcd5eb4e09..194d804918ec 100644 --- a/generator/ServiceModels/budgets/budgets-2016-10-20.normal.json +++ b/generator/ServiceModels/budgets/budgets-2016-10-20.normal.json @@ -250,16 +250,17 @@ }, "BudgetName":{ "type":"string", - "documentation":"A string represents the budget name. No \":\" character is allowed.", + "documentation":"A string represents the budget name. No \":\" and \"\\\" character is allowed.", "max":100, - "pattern":"[^:]+" + "pattern":"[^:\\\\]+" }, "BudgetType":{ "type":"string", - "documentation":"The type of a budget. Can be COST or USAGE.", + "documentation":"The type of a budget. It should be COST, USAGE, or RI_UTILIZATION.", "enum":[ "USAGE", - "COST" + "COST", + "RI_UTILIZATION" ] }, "Budgets":{ @@ -654,7 +655,7 @@ ], "members":{ "Amount":{"shape":"NumericValue"}, - "Unit":{"shape":"GenericString"} + "Unit":{"shape":"UnitValue"} }, "documentation":"A structure represent either a cost spend or usage spend. Contains an amount and a unit." }, @@ -699,13 +700,19 @@ }, "TimeUnit":{ "type":"string", - "documentation":"The time unit of the budget. e.g. weekly, monthly, etc.", + "documentation":"The time unit of the budget. e.g. MONTHLY, QUARTERLY, etc.", "enum":[ + "DAILY", "MONTHLY", "QUARTERLY", "ANNUALLY" ] }, + "UnitValue":{ + "type":"string", + "documentation":"A string to represent budget spend unit. It should be not null and not empty.", + "min":1 + }, "UpdateBudgetRequest":{ "type":"structure", "required":[ diff --git a/sdk/code-analysis/ServiceAnalysis/Budgets/Generated/PropertyValueRules.xml b/sdk/code-analysis/ServiceAnalysis/Budgets/Generated/PropertyValueRules.xml index b10322202557..101304637cd3 100644 --- a/sdk/code-analysis/ServiceAnalysis/Budgets/Generated/PropertyValueRules.xml +++ b/sdk/code-analysis/ServiceAnalysis/Budgets/Generated/PropertyValueRules.xml @@ -13,7 +13,7 @@ Amazon.Budgets.Model.CreateNotificationRequest.BudgetName 100 - [^:]+ + [^:\\]+ Amazon.Budgets.Model.CreateSubscriberRequest.AccountId @@ -23,7 +23,7 @@ Amazon.Budgets.Model.CreateSubscriberRequest.BudgetName 100 - [^:]+ + [^:\\]+ Amazon.Budgets.Model.DeleteBudgetRequest.AccountId @@ -33,7 +33,7 @@ Amazon.Budgets.Model.DeleteBudgetRequest.BudgetName 100 - [^:]+ + [^:\\]+ Amazon.Budgets.Model.DeleteNotificationRequest.AccountId @@ -43,7 +43,7 @@ Amazon.Budgets.Model.DeleteNotificationRequest.BudgetName 100 - [^:]+ + [^:\\]+ Amazon.Budgets.Model.DeleteSubscriberRequest.AccountId @@ -53,7 +53,7 @@ Amazon.Budgets.Model.DeleteSubscriberRequest.BudgetName 100 - [^:]+ + [^:\\]+ Amazon.Budgets.Model.DescribeBudgetRequest.AccountId @@ -63,7 +63,7 @@ Amazon.Budgets.Model.DescribeBudgetRequest.BudgetName 100 - [^:]+ + [^:\\]+ Amazon.Budgets.Model.DescribeBudgetsRequest.AccountId @@ -83,7 +83,7 @@ Amazon.Budgets.Model.DescribeNotificationsForBudgetRequest.BudgetName 100 - [^:]+ + [^:\\]+ Amazon.Budgets.Model.DescribeNotificationsForBudgetRequest.MaxResults @@ -98,7 +98,7 @@ Amazon.Budgets.Model.DescribeSubscribersForNotificationRequest.BudgetName 100 - [^:]+ + [^:\\]+ Amazon.Budgets.Model.DescribeSubscribersForNotificationRequest.MaxResults @@ -118,7 +118,7 @@ Amazon.Budgets.Model.UpdateNotificationRequest.BudgetName 100 - [^:]+ + [^:\\]+ Amazon.Budgets.Model.UpdateSubscriberRequest.AccountId @@ -128,12 +128,12 @@ Amazon.Budgets.Model.UpdateSubscriberRequest.BudgetName 100 - [^:]+ + [^:\\]+ Amazon.Budgets.Model.Budget.BudgetName 100 - [^:]+ + [^:\\]+ Amazon.Budgets.Model.Notification.Threshold @@ -143,4 +143,8 @@ Amazon.Budgets.Model.Spend.Amount [0-9]*(\.)?[0-9]+ + + Amazon.Budgets.Model.Spend.Unit + 1 + \ No newline at end of file diff --git a/sdk/src/Services/Budgets/Generated/ServiceEnumerations.cs b/sdk/src/Services/Budgets/Generated/ServiceEnumerations.cs index 0f70b81d5706..06f2bfdfcfd2 100644 --- a/sdk/src/Services/Budgets/Generated/ServiceEnumerations.cs +++ b/sdk/src/Services/Budgets/Generated/ServiceEnumerations.cs @@ -35,6 +35,10 @@ public class BudgetType : ConstantClass /// public static readonly BudgetType COST = new BudgetType("COST"); /// + /// Constant RI_UTILIZATION for BudgetType + /// + public static readonly BudgetType RI_UTILIZATION = new BudgetType("RI_UTILIZATION"); + /// /// Constant USAGE for BudgetType /// public static readonly BudgetType USAGE = new BudgetType("USAGE"); @@ -239,6 +243,10 @@ public class TimeUnit : ConstantClass /// public static readonly TimeUnit ANNUALLY = new TimeUnit("ANNUALLY"); /// + /// Constant DAILY for TimeUnit + /// + public static readonly TimeUnit DAILY = new TimeUnit("DAILY"); + /// /// Constant MONTHLY for TimeUnit /// public static readonly TimeUnit MONTHLY = new TimeUnit("MONTHLY");