Skip to content

Commit 6c1991b

Browse files
Add support for custom time periods in budget configuration
1 parent 47ee816 commit 6c1991b

File tree

8 files changed

+35
-18
lines changed

8 files changed

+35
-18
lines changed

generator/ServiceModels/budgets/budgets-2016-10-20.api.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@
624624
"type":"string",
625625
"max":2048,
626626
"min":20,
627-
"pattern":"^arn:aws[a-z-]*:(billing)::[0-9]{12}:billingview/[a-zA-Z0-9/:_+=.\\-@]{0,75}[a-zA-Z0-9]$"
627+
"pattern":"^arn:aws[a-z-]*:(billing)::[0-9]{12}:billingview/[a-zA-Z0-9/:_\\+=\\.\\-@]{0,75}[a-zA-Z0-9]$"
628628
},
629629
"Budget":{
630630
"type":"structure",
@@ -1322,7 +1322,8 @@
13221322
"enum":[
13231323
"BILLING_VIEW_NO_ACCESS",
13241324
"BILLING_VIEW_UNHEALTHY",
1325-
"FILTER_INVALID"
1325+
"FILTER_INVALID",
1326+
"MULTI_YEAR_HISTORICAL_DATA_DISABLED"
13261327
]
13271328
},
13281329
"HealthStatusValue":{
@@ -1742,7 +1743,8 @@
17421743
"DAILY",
17431744
"MONTHLY",
17441745
"QUARTERLY",
1745-
"ANNUALLY"
1746+
"ANNUALLY",
1747+
"CUSTOM"
17461748
]
17471749
},
17481750
"UnitValue":{

generator/ServiceModels/budgets/budgets-2016-10-20.docs.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@
563563
"AutoAdjustData$LastAutoAdjustTime": "<p>The last time that your budget was auto-adjusted.</p>",
564564
"Budget$LastUpdatedTime": "<p>The last time that you updated this budget.</p>",
565565
"HealthStatus$LastUpdatedTime": null,
566-
"TimePeriod$Start": "<p>The start date for a budget. If you created your budget and didn't specify a start date, Amazon Web Services defaults to the start of your chosen time period (DAILY, MONTHLY, QUARTERLY, or ANNUALLY). For example, if you created your budget on January 24, 2018, chose <code>DAILY</code>, and didn't set a start date, Amazon Web Services set your start date to <code>01/24/18 00:00 UTC</code>. If you chose <code>MONTHLY</code>, Amazon Web Services set your start date to <code>01/01/18 00:00 UTC</code>. The defaults are the same for the Billing and Cost Management console and the API.</p> <p>You can change your start date with the <code>UpdateBudget</code> operation.</p>",
566+
"TimePeriod$Start": "<p>The start date for a budget. If you created your budget and didn't specify a start date, Amazon Web Services defaults to the start of your chosen time period (DAILY, MONTHLY, QUARTERLY, ANNUALLY, or CUSTOM). For example, if you created your budget on January 24, 2018, chose <code>DAILY</code>, and didn't set a start date, Amazon Web Services set your start date to <code>01/24/18 00:00 UTC</code>. If you chose <code>MONTHLY</code>, Amazon Web Services set your start date to <code>01/01/18 00:00 UTC</code>. The defaults are the same for the Billing and Cost Management console and the API.</p> <p>You can change your start date with the <code>UpdateBudget</code> operation.</p>",
567567
"TimePeriod$End": "<p>The end date for a budget. If you didn't specify an end date, Amazon Web Services set your end date to <code>06/15/87 00:00 UTC</code>. The defaults are the same for the Billing and Cost Management console and the API.</p> <p>After the end date, Amazon Web Services deletes the budget and all the associated notifications and subscribers. You can change your end date with the <code>UpdateBudget</code> operation.</p>"
568568
}
569569
},
@@ -588,7 +588,7 @@
588588
"HealthStatusReason": {
589589
"base": null,
590590
"refs": {
591-
"HealthStatus$StatusReason": "<p>The reason for the current status.</p> <ul> <li> <p> <code>BILLING_VIEW_NO_ACCESS</code>: The billing view resource does not grant <code>billing:GetBillingViewData</code> permission to this account.</p> </li> <li> <p> <code>BILLING_VIEW_UNHEALTHY</code>: The billing view associated with the budget is unhealthy.</p> </li> <li> <p> <code>FILTER_INVALID</code>: The filter contains reference to an account you do not have access to.</p> </li> </ul>"
591+
"HealthStatus$StatusReason": "<p>The reason for the current status.</p> <ul> <li> <p> <code>BILLING_VIEW_NO_ACCESS</code>: The billing view resource does not grant <code>billing:GetBillingViewData</code> permission to this account.</p> </li> <li> <p> <code>BILLING_VIEW_UNHEALTHY</code>: The billing view associated with the budget is unhealthy.</p> </li> <li> <p> <code>FILTER_INVALID</code>: The filter contains reference to an account you do not have access to.</p> </li> <li> <p> <code>MULTI_YEAR_HISTORICAL_DATA_DISABLED</code>: The budget is not being updated. Enable multi-year historical data in your Cost Management preferences.</p> </li> </ul>"
592592
}
593593
},
594594
"HealthStatusValue": {
@@ -962,7 +962,7 @@
962962
"TimePeriod": {
963963
"base": "<p>The period of time that's covered by a budget. The period has a start date and an end date. The start date must come before the end date. There are no restrictions on the end date. </p>",
964964
"refs": {
965-
"Budget$TimePeriod": "<p>The period of time that's covered by a budget. You set the start date and end date. The start date must come before the end date. The end date must come before <code>06/15/87 00:00 UTC</code>. </p> <p>If you create your budget and don't specify a start date, Amazon Web Services defaults to the start of your chosen time period (DAILY, MONTHLY, QUARTERLY, or ANNUALLY). For example, if you created your budget on January 24, 2018, chose <code>DAILY</code>, and didn't set a start date, Amazon Web Services set your start date to <code>01/24/18 00:00 UTC</code>. If you chose <code>MONTHLY</code>, Amazon Web Services set your start date to <code>01/01/18 00:00 UTC</code>. If you didn't specify an end date, Amazon Web Services set your end date to <code>06/15/87 00:00 UTC</code>. The defaults are the same for the Billing and Cost Management console and the API. </p> <p>You can change either date with the <code>UpdateBudget</code> operation.</p> <p>After the end date, Amazon Web Services deletes the budget and all the associated notifications and subscribers.</p>",
965+
"Budget$TimePeriod": "<p>The period of time that's covered by a budget. You set the start date and end date. The start date must come before the end date. The end date must come before <code>06/15/87 00:00 UTC</code>. </p> <p>If you create your budget and don't specify a start date, Amazon Web Services defaults to the start of your chosen time period (DAILY, MONTHLY, QUARTERLY, ANNUALLY, or CUSTOM). For example, if you created your budget on January 24, 2018, chose <code>DAILY</code>, and didn't set a start date, Amazon Web Services set your start date to <code>01/24/18 00:00 UTC</code>. If you chose <code>MONTHLY</code>, Amazon Web Services set your start date to <code>01/01/18 00:00 UTC</code>. If you didn't specify an end date, Amazon Web Services set your end date to <code>06/15/87 00:00 UTC</code>. The defaults are the same for the Billing and Cost Management console and the API. </p> <p>You can change either date with the <code>UpdateBudget</code> operation.</p> <p>After the end date, Amazon Web Services deletes the budget and all the associated notifications and subscribers.</p>",
966966
"BudgetedAndActualAmounts$TimePeriod": "<p>The time period that's covered by this budget comparison.</p>",
967967
"DescribeBudgetActionHistoriesRequest$TimePeriod": null,
968968
"DescribeBudgetPerformanceHistoryRequest$TimePeriod": "<p>Retrieves how often the budget went into an <code>ALARM</code> state for the specified time period.</p>"

generator/ServiceModels/budgets/budgets-2016-10-20.normal.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@
699699
"type":"string",
700700
"max":2048,
701701
"min":20,
702-
"pattern":"^arn:aws[a-z-]*:(billing)::[0-9]{12}:billingview/[a-zA-Z0-9/:_+=.\\-@]{0,75}[a-zA-Z0-9]$"
702+
"pattern":"^arn:aws[a-z-]*:(billing)::[0-9]{12}:billingview/[a-zA-Z0-9/:_\\+=\\.\\-@]{0,75}[a-zA-Z0-9]$"
703703
},
704704
"Budget":{
705705
"type":"structure",
@@ -741,7 +741,7 @@
741741
},
742742
"TimePeriod":{
743743
"shape":"TimePeriod",
744-
"documentation":"<p>The period of time that's covered by a budget. You set the start date and end date. The start date must come before the end date. The end date must come before <code>06/15/87 00:00 UTC</code>. </p> <p>If you create your budget and don't specify a start date, Amazon Web Services defaults to the start of your chosen time period (DAILY, MONTHLY, QUARTERLY, or ANNUALLY). For example, if you created your budget on January 24, 2018, chose <code>DAILY</code>, and didn't set a start date, Amazon Web Services set your start date to <code>01/24/18 00:00 UTC</code>. If you chose <code>MONTHLY</code>, Amazon Web Services set your start date to <code>01/01/18 00:00 UTC</code>. If you didn't specify an end date, Amazon Web Services set your end date to <code>06/15/87 00:00 UTC</code>. The defaults are the same for the Billing and Cost Management console and the API. </p> <p>You can change either date with the <code>UpdateBudget</code> operation.</p> <p>After the end date, Amazon Web Services deletes the budget and all the associated notifications and subscribers.</p>"
744+
"documentation":"<p>The period of time that's covered by a budget. You set the start date and end date. The start date must come before the end date. The end date must come before <code>06/15/87 00:00 UTC</code>. </p> <p>If you create your budget and don't specify a start date, Amazon Web Services defaults to the start of your chosen time period (DAILY, MONTHLY, QUARTERLY, ANNUALLY, or CUSTOM). For example, if you created your budget on January 24, 2018, chose <code>DAILY</code>, and didn't set a start date, Amazon Web Services set your start date to <code>01/24/18 00:00 UTC</code>. If you chose <code>MONTHLY</code>, Amazon Web Services set your start date to <code>01/01/18 00:00 UTC</code>. If you didn't specify an end date, Amazon Web Services set your end date to <code>06/15/87 00:00 UTC</code>. The defaults are the same for the Billing and Cost Management console and the API. </p> <p>You can change either date with the <code>UpdateBudget</code> operation.</p> <p>After the end date, Amazon Web Services deletes the budget and all the associated notifications and subscribers.</p>"
745745
},
746746
"CalculatedSpend":{
747747
"shape":"CalculatedSpend",
@@ -1773,7 +1773,7 @@
17731773
},
17741774
"StatusReason":{
17751775
"shape":"HealthStatusReason",
1776-
"documentation":"<p>The reason for the current status.</p> <ul> <li> <p> <code>BILLING_VIEW_NO_ACCESS</code>: The billing view resource does not grant <code>billing:GetBillingViewData</code> permission to this account.</p> </li> <li> <p> <code>BILLING_VIEW_UNHEALTHY</code>: The billing view associated with the budget is unhealthy.</p> </li> <li> <p> <code>FILTER_INVALID</code>: The filter contains reference to an account you do not have access to.</p> </li> </ul>"
1776+
"documentation":"<p>The reason for the current status.</p> <ul> <li> <p> <code>BILLING_VIEW_NO_ACCESS</code>: The billing view resource does not grant <code>billing:GetBillingViewData</code> permission to this account.</p> </li> <li> <p> <code>BILLING_VIEW_UNHEALTHY</code>: The billing view associated with the budget is unhealthy.</p> </li> <li> <p> <code>FILTER_INVALID</code>: The filter contains reference to an account you do not have access to.</p> </li> <li> <p> <code>MULTI_YEAR_HISTORICAL_DATA_DISABLED</code>: The budget is not being updated. Enable multi-year historical data in your Cost Management preferences.</p> </li> </ul>"
17771777
},
17781778
"LastUpdatedTime":{"shape":"GenericTimestamp"}
17791779
},
@@ -1784,7 +1784,8 @@
17841784
"enum":[
17851785
"BILLING_VIEW_NO_ACCESS",
17861786
"BILLING_VIEW_UNHEALTHY",
1787-
"FILTER_INVALID"
1787+
"FILTER_INVALID",
1788+
"MULTI_YEAR_HISTORICAL_DATA_DISABLED"
17881789
]
17891790
},
17901791
"HealthStatusValue":{
@@ -2316,7 +2317,7 @@
23162317
"members":{
23172318
"Start":{
23182319
"shape":"GenericTimestamp",
2319-
"documentation":"<p>The start date for a budget. If you created your budget and didn't specify a start date, Amazon Web Services defaults to the start of your chosen time period (DAILY, MONTHLY, QUARTERLY, or ANNUALLY). For example, if you created your budget on January 24, 2018, chose <code>DAILY</code>, and didn't set a start date, Amazon Web Services set your start date to <code>01/24/18 00:00 UTC</code>. If you chose <code>MONTHLY</code>, Amazon Web Services set your start date to <code>01/01/18 00:00 UTC</code>. The defaults are the same for the Billing and Cost Management console and the API.</p> <p>You can change your start date with the <code>UpdateBudget</code> operation.</p>"
2320+
"documentation":"<p>The start date for a budget. If you created your budget and didn't specify a start date, Amazon Web Services defaults to the start of your chosen time period (DAILY, MONTHLY, QUARTERLY, ANNUALLY, or CUSTOM). For example, if you created your budget on January 24, 2018, chose <code>DAILY</code>, and didn't set a start date, Amazon Web Services set your start date to <code>01/24/18 00:00 UTC</code>. If you chose <code>MONTHLY</code>, Amazon Web Services set your start date to <code>01/01/18 00:00 UTC</code>. The defaults are the same for the Billing and Cost Management console and the API.</p> <p>You can change your start date with the <code>UpdateBudget</code> operation.</p>"
23202321
},
23212322
"End":{
23222323
"shape":"GenericTimestamp",
@@ -2332,7 +2333,8 @@
23322333
"DAILY",
23332334
"MONTHLY",
23342335
"QUARTERLY",
2335-
"ANNUALLY"
2336+
"ANNUALLY",
2337+
"CUSTOM"
23362338
]
23372339
},
23382340
"UnitValue":{

sdk/code-analysis/ServiceAnalysis/Budgets/Generated/PropertyValueRules.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@
544544
<property>Amazon.Budgets.Model.Budget.BillingViewArn</property>
545545
<min>20</min>
546546
<max>2048</max>
547-
<pattern>^arn:aws[a-z-]*:(billing)::[0-9]{12}:billingview/[a-zA-Z0-9/:_+=.\-@]{0,75}[a-zA-Z0-9]$</pattern>
547+
<pattern>^arn:aws[a-z-]*:(billing)::[0-9]{12}:billingview/[a-zA-Z0-9/:_\+=\.\-@]{0,75}[a-zA-Z0-9]$</pattern>
548548
</property-value-rule>
549549
<property-value-rule>
550550
<property>Amazon.Budgets.Model.Budget.BudgetName</property>
@@ -562,7 +562,7 @@
562562
<property>Amazon.Budgets.Model.BudgetPerformanceHistory.BillingViewArn</property>
563563
<min>20</min>
564564
<max>2048</max>
565-
<pattern>^arn:aws[a-z-]*:(billing)::[0-9]{12}:billingview/[a-zA-Z0-9/:_+=.\-@]{0,75}[a-zA-Z0-9]$</pattern>
565+
<pattern>^arn:aws[a-z-]*:(billing)::[0-9]{12}:billingview/[a-zA-Z0-9/:_\+=\.\-@]{0,75}[a-zA-Z0-9]$</pattern>
566566
</property-value-rule>
567567
<property-value-rule>
568568
<property>Amazon.Budgets.Model.BudgetPerformanceHistory.BudgetName</property>

sdk/src/Services/Budgets/Generated/Model/Budget.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ internal bool IsSetPlannedBudgetLimits()
415415
///
416416
/// <para>
417417
/// If you create your budget and don't specify a start date, Amazon Web Services defaults
418-
/// to the start of your chosen time period (DAILY, MONTHLY, QUARTERLY, or ANNUALLY).
418+
/// to the start of your chosen time period (DAILY, MONTHLY, QUARTERLY, ANNUALLY, or CUSTOM).
419419
/// For example, if you created your budget on January 24, 2018, chose <c>DAILY</c>, and
420420
/// didn't set a start date, Amazon Web Services set your start date to <c>01/24/18 00:00
421421
/// UTC</c>. If you chose <c>MONTHLY</c>, Amazon Web Services set your start date to <c>01/01/18

sdk/src/Services/Budgets/Generated/Model/HealthStatus.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ internal bool IsSetStatus()
9191
/// <c>FILTER_INVALID</c>: The filter contains reference to an account you do not have
9292
/// access to.
9393
/// </para>
94+
/// </li> <li>
95+
/// <para>
96+
/// <c>MULTI_YEAR_HISTORICAL_DATA_DISABLED</c>: The budget is not being updated. Enable
97+
/// multi-year historical data in your Cost Management preferences.
98+
/// </para>
9499
/// </li> </ul>
95100
/// </summary>
96101
public HealthStatusReason StatusReason

sdk/src/Services/Budgets/Generated/Model/TimePeriod.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ internal bool IsSetEnd()
7070
/// <para>
7171
/// The start date for a budget. If you created your budget and didn't specify a start
7272
/// date, Amazon Web Services defaults to the start of your chosen time period (DAILY,
73-
/// MONTHLY, QUARTERLY, or ANNUALLY). For example, if you created your budget on January
74-
/// 24, 2018, chose <c>DAILY</c>, and didn't set a start date, Amazon Web Services set
75-
/// your start date to <c>01/24/18 00:00 UTC</c>. If you chose <c>MONTHLY</c>, Amazon
73+
/// MONTHLY, QUARTERLY, ANNUALLY, or CUSTOM). For example, if you created your budget
74+
/// on January 24, 2018, chose <c>DAILY</c>, and didn't set a start date, Amazon Web Services
75+
/// set your start date to <c>01/24/18 00:00 UTC</c>. If you chose <c>MONTHLY</c>, Amazon
7676
/// Web Services set your start date to <c>01/01/18 00:00 UTC</c>. The defaults are the
7777
/// same for the Billing and Cost Management console and the API.
7878
/// </para>

sdk/src/Services/Budgets/Generated/ServiceEnumerations.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,10 @@ public class HealthStatusReason : ConstantClass
742742
/// Constant FILTER_INVALID for HealthStatusReason
743743
/// </summary>
744744
public static readonly HealthStatusReason FILTER_INVALID = new HealthStatusReason("FILTER_INVALID");
745+
/// <summary>
746+
/// Constant MULTI_YEAR_HISTORICAL_DATA_DISABLED for HealthStatusReason
747+
/// </summary>
748+
public static readonly HealthStatusReason MULTI_YEAR_HISTORICAL_DATA_DISABLED = new HealthStatusReason("MULTI_YEAR_HISTORICAL_DATA_DISABLED");
745749

746750
/// <summary>
747751
/// This constant constructor does not need to be called if the constant
@@ -1187,6 +1191,10 @@ public class TimeUnit : ConstantClass
11871191
/// </summary>
11881192
public static readonly TimeUnit ANNUALLY = new TimeUnit("ANNUALLY");
11891193
/// <summary>
1194+
/// Constant CUSTOM for TimeUnit
1195+
/// </summary>
1196+
public static readonly TimeUnit CUSTOM = new TimeUnit("CUSTOM");
1197+
/// <summary>
11901198
/// Constant DAILY for TimeUnit
11911199
/// </summary>
11921200
public static readonly TimeUnit DAILY = new TimeUnit("DAILY");

0 commit comments

Comments
 (0)