Skip to content

Commit 3efe3b3

Browse files
Adds support for billing views. Billing views let you control access to cost and usage data through an AWS resource, streamlining the process of sharing cost and usage data across account boundaries. With this release, you can now create and view budgets based on billing views.
1 parent a96715d commit 3efe3b3

20 files changed

+648
-3
lines changed

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

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
{"shape":"DuplicateRecordException"},
3131
{"shape":"AccessDeniedException"},
3232
{"shape":"ThrottlingException"},
33-
{"shape":"ServiceQuotaExceededException"}
33+
{"shape":"ServiceQuotaExceededException"},
34+
{"shape":"NotFoundException"}
3435
]
3536
},
3637
"CreateBudgetAction":{
@@ -619,6 +620,12 @@
619620
"FORECAST"
620621
]
621622
},
623+
"BillingViewArn":{
624+
"type":"string",
625+
"max":2048,
626+
"min":20,
627+
"pattern":"^arn:aws[a-z-]*:(billing)::[0-9]{12}:billingview/[a-zA-Z0-9/:_+=.\\-@]{0,75}[a-zA-Z0-9]$"
628+
},
622629
"Budget":{
623630
"type":"structure",
624631
"required":[
@@ -649,7 +656,9 @@
649656
"LastUpdatedTime":{"shape":"GenericTimestamp"},
650657
"AutoAdjustData":{"shape":"AutoAdjustData"},
651658
"FilterExpression":{"shape":"Expression"},
652-
"Metrics":{"shape":"Metrics"}
659+
"Metrics":{"shape":"Metrics"},
660+
"BillingViewArn":{"shape":"BillingViewArn"},
661+
"HealthStatus":{"shape":"HealthStatus"}
653662
}
654663
},
655664
"BudgetName":{
@@ -678,6 +687,7 @@
678687
"CostFilters":{"shape":"CostFilters"},
679688
"CostTypes":{"shape":"CostTypes"},
680689
"TimeUnit":{"shape":"TimeUnit"},
690+
"BillingViewArn":{"shape":"BillingViewArn"},
681691
"BudgetedAndActualAmountsList":{"shape":"BudgetedAndActualAmountsList"}
682692
}
683693
},
@@ -1299,6 +1309,29 @@
12991309
"max":100,
13001310
"min":1
13011311
},
1312+
"HealthStatus":{
1313+
"type":"structure",
1314+
"members":{
1315+
"Status":{"shape":"HealthStatusValue"},
1316+
"StatusReason":{"shape":"HealthStatusReason"},
1317+
"LastUpdatedTime":{"shape":"GenericTimestamp"}
1318+
}
1319+
},
1320+
"HealthStatusReason":{
1321+
"type":"string",
1322+
"enum":[
1323+
"BILLING_VIEW_NO_ACCESS",
1324+
"BILLING_VIEW_UNHEALTHY",
1325+
"FILTER_INVALID"
1326+
]
1327+
},
1328+
"HealthStatusValue":{
1329+
"type":"string",
1330+
"enum":[
1331+
"HEALTHY",
1332+
"UNHEALTHY"
1333+
]
1334+
},
13021335
"HistoricalOptions":{
13031336
"type":"structure",
13041337
"required":["BudgetAdjustmentPeriod"],

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,13 @@
179179
"AutoAdjustData$AutoAdjustType": "<p>The string that defines whether your budget auto-adjusts based on historical or forecasted data.</p>"
180180
}
181181
},
182+
"BillingViewArn": {
183+
"base": null,
184+
"refs": {
185+
"Budget$BillingViewArn": "<p>The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN is used to specify which particular billing view you want to interact with or retrieve information from when making API calls related to Amazon Web Services Billing and Cost Management features. The BillingViewArn can be retrieved by calling the ListBillingViews API.</p>",
186+
"BudgetPerformanceHistory$BillingViewArn": "<p>The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN is used to specify which particular billing view you want to interact with or retrieve information from when making API calls related to Amazon Web Services Billing and Cost Management features. The BillingViewArn can be retrieved by calling the ListBillingViews API.</p>"
187+
}
188+
},
182189
"Budget": {
183190
"base": "<p>Represents the output of the <code>CreateBudget</code> operation. The content consists of the detailed metadata and data file information, and the current status of the <code>budget</code> object.</p> <p>This is the Amazon Resource Name (ARN) pattern for a budget: </p> <p> <code>arn:aws:budgets::AccountId:budget/budgetName</code> </p>",
184191
"refs": {
@@ -555,6 +562,7 @@
555562
"ActionHistory$Timestamp": null,
556563
"AutoAdjustData$LastAutoAdjustTime": "<p>The last time that your budget was auto-adjusted.</p>",
557564
"Budget$LastUpdatedTime": "<p>The last time that you updated this budget.</p>",
565+
"HealthStatus$LastUpdatedTime": null,
558566
"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>",
559567
"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>"
560568
}
@@ -571,6 +579,24 @@
571579
"IamActionDefinition$Groups": "<p>A list of groups to be attached. There must be at least one group. </p>"
572580
}
573581
},
582+
"HealthStatus": {
583+
"base": "<p>Provides information about the current operational state of a billing view resource, including its ability to access and update based on its associated billing view.</p>",
584+
"refs": {
585+
"Budget$HealthStatus": "<p>The current operational state of a Billing View derived resource.</p>"
586+
}
587+
},
588+
"HealthStatusReason": {
589+
"base": null,
590+
"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>"
592+
}
593+
},
594+
"HealthStatusValue": {
595+
"base": null,
596+
"refs": {
597+
"HealthStatus$Status": "<p>The current status of the billing view resource.</p>"
598+
}
599+
},
574600
"HistoricalOptions": {
575601
"base": "<p>The parameters that define or describe the historical data that your auto-adjusting budget is based on.</p>",
576602
"refs": {

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

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
{"shape":"DuplicateRecordException"},
3131
{"shape":"AccessDeniedException"},
3232
{"shape":"ThrottlingException"},
33-
{"shape":"ServiceQuotaExceededException"}
33+
{"shape":"ServiceQuotaExceededException"},
34+
{"shape":"NotFoundException"}
3435
],
3536
"documentation":"<p>Creates a budget and, if included, notifications and subscribers. </p> <important> <p>Only one of <code>BudgetLimit</code> or <code>PlannedBudgetLimits</code> can be present in the syntax at one time. Use the syntax that matches your use case. The Request Syntax section shows the <code>BudgetLimit</code> syntax. For <code>PlannedBudgetLimits</code>, see the <a href=\"https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_budgets_CreateBudget.html#API_CreateBudget_Examples\">Examples</a> section.</p> <p>Similarly, only one set of filter and metric selections can be present in the syntax at one time. Either <code>FilterExpression</code> and <code>Metrics</code> or <code>CostFilters</code> and <code>CostTypes</code>, not both or a different combination. We recommend using <code>FilterExpression</code> and <code>Metrics</code> as they provide more flexible and powerful filtering capabilities. The Request Syntax section shows the <code>FilterExpression</code>/<code>Metrics</code> syntax.</p> </important>"
3637
},
@@ -694,6 +695,12 @@
694695
"FORECAST"
695696
]
696697
},
698+
"BillingViewArn":{
699+
"type":"string",
700+
"max":2048,
701+
"min":20,
702+
"pattern":"^arn:aws[a-z-]*:(billing)::[0-9]{12}:billingview/[a-zA-Z0-9/:_+=.\\-@]{0,75}[a-zA-Z0-9]$"
703+
},
697704
"Budget":{
698705
"type":"structure",
699706
"required":[
@@ -759,6 +766,14 @@
759766
"Metrics":{
760767
"shape":"Metrics",
761768
"documentation":"<p>The definition for how the budget data is aggregated.</p>"
769+
},
770+
"BillingViewArn":{
771+
"shape":"BillingViewArn",
772+
"documentation":"<p>The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN is used to specify which particular billing view you want to interact with or retrieve information from when making API calls related to Amazon Web Services Billing and Cost Management features. The BillingViewArn can be retrieved by calling the ListBillingViews API.</p>"
773+
},
774+
"HealthStatus":{
775+
"shape":"HealthStatus",
776+
"documentation":"<p>The current operational state of a Billing View derived resource.</p>"
762777
}
763778
},
764779
"documentation":"<p>Represents the output of the <code>CreateBudget</code> operation. The content consists of the detailed metadata and data file information, and the current status of the <code>budget</code> object.</p> <p>This is the Amazon Resource Name (ARN) pattern for a budget: </p> <p> <code>arn:aws:budgets::AccountId:budget/budgetName</code> </p>"
@@ -797,6 +812,10 @@
797812
"documentation":"<p>The history of the cost types for a budget during the specified time period.</p>"
798813
},
799814
"TimeUnit":{"shape":"TimeUnit"},
815+
"BillingViewArn":{
816+
"shape":"BillingViewArn",
817+
"documentation":"<p>The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN is used to specify which particular billing view you want to interact with or retrieve information from when making API calls related to Amazon Web Services Billing and Cost Management features. The BillingViewArn can be retrieved by calling the ListBillingViews API.</p>"
818+
},
800819
"BudgetedAndActualAmountsList":{
801820
"shape":"BudgetedAndActualAmountsList",
802821
"documentation":"<p>A list of amounts of cost or usage that you created budgets for, which are compared to your actual costs or usage.</p>"
@@ -1745,6 +1764,36 @@
17451764
"max":100,
17461765
"min":1
17471766
},
1767+
"HealthStatus":{
1768+
"type":"structure",
1769+
"members":{
1770+
"Status":{
1771+
"shape":"HealthStatusValue",
1772+
"documentation":"<p>The current status of the billing view resource.</p>"
1773+
},
1774+
"StatusReason":{
1775+
"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>"
1777+
},
1778+
"LastUpdatedTime":{"shape":"GenericTimestamp"}
1779+
},
1780+
"documentation":"<p>Provides information about the current operational state of a billing view resource, including its ability to access and update based on its associated billing view.</p>"
1781+
},
1782+
"HealthStatusReason":{
1783+
"type":"string",
1784+
"enum":[
1785+
"BILLING_VIEW_NO_ACCESS",
1786+
"BILLING_VIEW_UNHEALTHY",
1787+
"FILTER_INVALID"
1788+
]
1789+
},
1790+
"HealthStatusValue":{
1791+
"type":"string",
1792+
"enum":[
1793+
"HEALTHY",
1794+
"UNHEALTHY"
1795+
]
1796+
},
17481797
"HistoricalOptions":{
17491798
"type":"structure",
17501799
"required":["BudgetAdjustmentPeriod"],

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,12 @@
540540
<min>0</min>
541541
<max>15000000000000</max>
542542
</property-value-rule>
543+
<property-value-rule>
544+
<property>Amazon.Budgets.Model.Budget.BillingViewArn</property>
545+
<min>20</min>
546+
<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>
548+
</property-value-rule>
543549
<property-value-rule>
544550
<property>Amazon.Budgets.Model.Budget.BudgetName</property>
545551
<min>1</min>
@@ -552,6 +558,12 @@
552558
<max>100</max>
553559
<pattern>^(?![^:\\]*/action/|(?i).*&lt;script&gt;.*&lt;/script&gt;.*)[^:\\]+$</pattern>
554560
</property-value-rule>
561+
<property-value-rule>
562+
<property>Amazon.Budgets.Model.BudgetPerformanceHistory.BillingViewArn</property>
563+
<min>20</min>
564+
<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>
566+
</property-value-rule>
555567
<property-value-rule>
556568
<property>Amazon.Budgets.Model.BudgetPerformanceHistory.BudgetName</property>
557569
<min>1</min>

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

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,15 @@ namespace Amazon.Budgets.Model
4646
public partial class Budget
4747
{
4848
private AutoAdjustData _autoAdjustData;
49+
private string _billingViewArn;
4950
private Spend _budgetLimit;
5051
private string _budgetName;
5152
private BudgetType _budgetType;
5253
private CalculatedSpend _calculatedSpend;
5354
private Dictionary<string, List<string>> _costFilters = AWSConfigs.InitializeCollections ? new Dictionary<string, List<string>>() : null;
5455
private CostTypes _costTypes;
5556
private Expression _filterExpression;
57+
private HealthStatus _healthStatus;
5658
private DateTime? _lastUpdatedTime;
5759
private List<string> _metrics = AWSConfigs.InitializeCollections ? new List<string>() : null;
5860
private Dictionary<string, Spend> _plannedBudgetLimits = AWSConfigs.InitializeCollections ? new Dictionary<string, Spend>() : null;
@@ -77,6 +79,29 @@ internal bool IsSetAutoAdjustData()
7779
return this._autoAdjustData != null;
7880
}
7981

82+
/// <summary>
83+
/// Gets and sets the property BillingViewArn.
84+
/// <para>
85+
/// The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The
86+
/// ARN is used to specify which particular billing view you want to interact with or
87+
/// retrieve information from when making API calls related to Amazon Web Services Billing
88+
/// and Cost Management features. The BillingViewArn can be retrieved by calling the ListBillingViews
89+
/// API.
90+
/// </para>
91+
/// </summary>
92+
[AWSProperty(Min=20, Max=2048)]
93+
public string BillingViewArn
94+
{
95+
get { return this._billingViewArn; }
96+
set { this._billingViewArn = value; }
97+
}
98+
99+
// Check to see if BillingViewArn property is set
100+
internal bool IsSetBillingViewArn()
101+
{
102+
return this._billingViewArn != null;
103+
}
104+
80105
/// <summary>
81106
/// Gets and sets the property BudgetLimit.
82107
/// <para>
@@ -250,6 +275,24 @@ internal bool IsSetFilterExpression()
250275
return this._filterExpression != null;
251276
}
252277

278+
/// <summary>
279+
/// Gets and sets the property HealthStatus.
280+
/// <para>
281+
/// The current operational state of a Billing View derived resource.
282+
/// </para>
283+
/// </summary>
284+
public HealthStatus HealthStatus
285+
{
286+
get { return this._healthStatus; }
287+
set { this._healthStatus = value; }
288+
}
289+
290+
// Check to see if HealthStatus property is set
291+
internal bool IsSetHealthStatus()
292+
{
293+
return this._healthStatus != null;
294+
}
295+
253296
/// <summary>
254297
/// Gets and sets the property LastUpdatedTime.
255298
/// <para>

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,37 @@ namespace Amazon.Budgets.Model
3434
/// </summary>
3535
public partial class BudgetPerformanceHistory
3636
{
37+
private string _billingViewArn;
3738
private List<BudgetedAndActualAmounts> _budgetedAndActualAmountsList = AWSConfigs.InitializeCollections ? new List<BudgetedAndActualAmounts>() : null;
3839
private string _budgetName;
3940
private BudgetType _budgetType;
4041
private Dictionary<string, List<string>> _costFilters = AWSConfigs.InitializeCollections ? new Dictionary<string, List<string>>() : null;
4142
private CostTypes _costTypes;
4243
private TimeUnit _timeUnit;
4344

45+
/// <summary>
46+
/// Gets and sets the property BillingViewArn.
47+
/// <para>
48+
/// The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The
49+
/// ARN is used to specify which particular billing view you want to interact with or
50+
/// retrieve information from when making API calls related to Amazon Web Services Billing
51+
/// and Cost Management features. The BillingViewArn can be retrieved by calling the ListBillingViews
52+
/// API.
53+
/// </para>
54+
/// </summary>
55+
[AWSProperty(Min=20, Max=2048)]
56+
public string BillingViewArn
57+
{
58+
get { return this._billingViewArn; }
59+
set { this._billingViewArn = value; }
60+
}
61+
62+
// Check to see if BillingViewArn property is set
63+
internal bool IsSetBillingViewArn()
64+
{
65+
return this._billingViewArn != null;
66+
}
67+
4468
/// <summary>
4569
/// Gets and sets the property BudgetedAndActualAmountsList.
4670
/// <para>

0 commit comments

Comments
 (0)