Skip to content

Commit ce232dd

Browse files
author
awstools
committed
feat(client-billingconductor): This release adds a new filter to ListAccountAssociations API and a new filter to ListBillingGroups API.
1 parent ffb7403 commit ce232dd

File tree

5 files changed

+669
-470
lines changed

5 files changed

+669
-470
lines changed

clients/client-billingconductor/src/endpoint/EndpointParameters.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const resolveClientEndpointParameters = <T>(
2424
};
2525

2626
export interface EndpointParameters extends __EndpointParameters {
27-
Region: string;
27+
Region?: string;
2828
UseDualStack?: boolean;
2929
UseFIPS?: boolean;
3030
Endpoint?: string;

clients/client-billingconductor/src/endpoint/ruleset.ts

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,34 @@ import { RuleSetObject } from "@aws-sdk/util-endpoints";
66
or see "smithy.rules#endpointRuleSet"
77
in codegen/sdk-codegen/aws-models/billingconductor.json */
88

9-
const y="type",
10-
z="fn",
11-
A="argv",
12-
B="ref";
13-
const a=true,
14-
b=false,
15-
c="String",
16-
d="PartitionResult",
17-
e="tree",
18-
f="error",
19-
g="endpoint",
20-
h="stringEquals",
21-
i="getAttr",
22-
j={"required":true,"default":false,[y]:"Boolean"},
23-
k={[B]:"Region"},
24-
l={[B]:"Endpoint"},
25-
m={},
26-
n={[B]:d},
27-
o={[f]:"FIPS and DualStack are enabled, but this partition does not support one or both",[y]:f},
28-
p={[f]:"FIPS is enabled but this partition does not support FIPS",[y]:f},
29-
q={[f]:"DualStack is enabled but this partition does not support DualStack",[y]:f},
30-
r={"url":"https://billingconductor.us-east-1.amazonaws.com","properties":{"authSchemes":[{"name":"sigv4","signingRegion":"us-east-1","signingName":"billingconductor"}]},"headers":{}},
31-
s=[{[z]:"booleanEquals",[A]:[{[B]:"UseFIPS"},true]}],
32-
t=[{[z]:"booleanEquals",[A]:[{[B]:"UseDualStack"},true]}],
33-
u=[{[z]:"booleanEquals",[A]:[{[B]:"UseFIPS"},true]},{[z]:"booleanEquals",[A]:[{[B]:"UseDualStack"},true]}],
34-
v=[{[z]:"booleanEquals",[A]:[true,{[z]:i,[A]:[n,"supportsFIPS"]}]},{[z]:"booleanEquals",[A]:[true,{[z]:i,[A]:[n,"supportsDualStack"]}]}],
35-
w=[{[z]:"booleanEquals",[A]:[true,{[z]:i,[A]:[n,"supportsFIPS"]}]}],
36-
x=[{[z]:"booleanEquals",[A]:[true,{[z]:i,[A]:[n,"supportsDualStack"]}]}];
37-
const _data={version:"1.0",parameters:{Region:{required:a,[y]:c},UseDualStack:j,UseFIPS:j,Endpoint:{required:b,[y]:c}},rules:[{conditions:[{[z]:"aws.partition",[A]:[k],assign:d}],[y]:e,rules:[{conditions:[{[z]:"isSet",[A]:[l]}],[y]:e,rules:[{conditions:s,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[y]:f},{[y]:e,rules:[{conditions:t,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[y]:f},{endpoint:{url:l,properties:m,headers:m},[y]:g}]}]},{conditions:[{[z]:h,[A]:[{[z]:i,[A]:[n,"name"]},"aws"]}],[y]:e,rules:[{conditions:u,[y]:e,rules:[{conditions:v,[y]:e,rules:[{endpoint:{url:"https://billingconductor-fips.{Region}.api.aws",properties:m,headers:m},[y]:g}]},o]},{conditions:s,[y]:e,rules:[{conditions:w,[y]:e,rules:[{endpoint:{url:"https://billingconductor-fips.{Region}.amazonaws.com",properties:m,headers:m},[y]:g}]},p]},{conditions:t,[y]:e,rules:[{conditions:x,[y]:e,rules:[{endpoint:{url:"https://billingconductor.{Region}.api.aws",properties:m,headers:m},[y]:g}]},q]},{endpoint:r,[y]:g}]},{conditions:u,[y]:e,rules:[{conditions:v,[y]:e,rules:[{[y]:e,rules:[{endpoint:{url:"https://billingconductor-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},[y]:g}]}]},o]},{conditions:s,[y]:e,rules:[{conditions:w,[y]:e,rules:[{[y]:e,rules:[{endpoint:{url:"https://billingconductor-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},[y]:g}]}]},p]},{conditions:t,[y]:e,rules:[{conditions:x,[y]:e,rules:[{[y]:e,rules:[{endpoint:{url:"https://billingconductor.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},[y]:g}]}]},q]},{[y]:e,rules:[{conditions:[{[z]:h,[A]:[k,"aws-global"]}],endpoint:r,[y]:g},{endpoint:{url:"https://billingconductor.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},[y]:g}]}]}]};
9+
const y="required",
10+
z="type",
11+
A="fn",
12+
B="argv",
13+
C="ref";
14+
const a="isSet",
15+
b="tree",
16+
c="error",
17+
d="endpoint",
18+
e="PartitionResult",
19+
f="stringEquals",
20+
g="getAttr",
21+
h={[y]:false,[z]:"String"},
22+
i={[y]:true,"default":false,[z]:"Boolean"},
23+
j={[C]:"Endpoint"},
24+
k={},
25+
l={[C]:"Region"},
26+
m={[C]:e},
27+
n={[c]:"FIPS and DualStack are enabled, but this partition does not support one or both",[z]:c},
28+
o={[c]:"FIPS is enabled but this partition does not support FIPS",[z]:c},
29+
p={[c]:"DualStack is enabled but this partition does not support DualStack",[z]:c},
30+
q={"url":"https://billingconductor.us-east-1.amazonaws.com","properties":{"authSchemes":[{"name":"sigv4","signingName":"billingconductor","signingRegion":"us-east-1"}]},"headers":{}},
31+
r=[{[A]:"booleanEquals",[B]:[{[C]:"UseFIPS"},true]}],
32+
s=[{[A]:"booleanEquals",[B]:[{[C]:"UseDualStack"},true]}],
33+
t=[l],
34+
u=[{[A]:"booleanEquals",[B]:[{[C]:"UseFIPS"},true]},{[A]:"booleanEquals",[B]:[{[C]:"UseDualStack"},true]}],
35+
v=[{[A]:"booleanEquals",[B]:[true,{[A]:g,[B]:[m,"supportsFIPS"]}]},{[A]:"booleanEquals",[B]:[true,{[A]:g,[B]:[m,"supportsDualStack"]}]}],
36+
w=[{[A]:"booleanEquals",[B]:[true,{[A]:g,[B]:[m,"supportsFIPS"]}]}],
37+
x=[{[A]:"booleanEquals",[B]:[true,{[A]:g,[B]:[m,"supportsDualStack"]}]}];
38+
const _data={version:"1.0",parameters:{Region:h,UseDualStack:i,UseFIPS:i,Endpoint:h},rules:[{conditions:[{[A]:a,[B]:[j]}],[z]:b,rules:[{conditions:r,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[z]:c},{[z]:b,rules:[{conditions:s,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[z]:c},{endpoint:{url:j,properties:k,headers:k},[z]:d}]}]},{[z]:b,rules:[{conditions:[{[A]:a,[B]:t}],[z]:b,rules:[{conditions:[{[A]:"aws.partition",[B]:t,assign:e}],[z]:b,rules:[{conditions:[{[A]:f,[B]:[{[A]:g,[B]:[m,"name"]},"aws"]}],[z]:b,rules:[{conditions:u,[z]:b,rules:[{conditions:v,[z]:b,rules:[{endpoint:{url:"https://billingconductor-fips.{Region}.api.aws",properties:k,headers:k},[z]:d}]},n]},{conditions:r,[z]:b,rules:[{conditions:w,[z]:b,rules:[{endpoint:{url:"https://billingconductor-fips.{Region}.amazonaws.com",properties:k,headers:k},[z]:d}]},o]},{conditions:s,[z]:b,rules:[{conditions:x,[z]:b,rules:[{endpoint:{url:"https://billingconductor.{Region}.api.aws",properties:k,headers:k},[z]:d}]},p]},{endpoint:q,[z]:d}]},{conditions:u,[z]:b,rules:[{conditions:v,[z]:b,rules:[{[z]:b,rules:[{endpoint:{url:"https://billingconductor-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},[z]:d}]}]},n]},{conditions:r,[z]:b,rules:[{conditions:w,[z]:b,rules:[{[z]:b,rules:[{endpoint:{url:"https://billingconductor-fips.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},[z]:d}]}]},o]},{conditions:s,[z]:b,rules:[{conditions:x,[z]:b,rules:[{[z]:b,rules:[{endpoint:{url:"https://billingconductor.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},[z]:d}]}]},p]},{[z]:b,rules:[{conditions:[{[A]:f,[B]:[l,"aws-global"]}],endpoint:q,[z]:d},{endpoint:{url:"https://billingconductor.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},[z]:d}]}]}]},{error:"Invalid Configuration: Missing Region",[z]:c}]}]};
3839
export const ruleSet: RuleSetObject = _data;

clients/client-billingconductor/src/models/models_0.ts

Lines changed: 55 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -321,18 +321,22 @@ export enum ValidationExceptionReason {
321321
ILLEGAL_ENDED_BILLINGGROUP = "ILLEGAL_ENDED_BILLINGGROUP",
322322
ILLEGAL_EXPRESSION = "ILLEGAL_EXPRESSION",
323323
ILLEGAL_MODIFIER_PERCENTAGE = "ILLEGAL_MODIFIER_PERCENTAGE",
324+
ILLEGAL_OPERATION = "ILLEGAL_OPERATION",
324325
ILLEGAL_PRIMARY_ACCOUNT = "ILLEGAL_PRIMARY_ACCOUNT",
325326
ILLEGAL_RESOURCE_ARNS = "ILLEGAL_RESOURCE_ARNS",
326327
ILLEGAL_SCOPE = "ILLEGAL_SCOPE",
327328
ILLEGAL_SERVICE = "ILLEGAL_SERVICE",
328329
ILLEGAL_TIERING_INPUT = "ILLEGAL_TIERING_INPUT",
329330
ILLEGAL_TYPE = "ILLEGAL_TYPE",
330331
ILLEGAL_UPDATE_CHARGE_DETAILS = "ILLEGAL_UPDATE_CHARGE_DETAILS",
332+
ILLEGAL_USAGE_TYPE = "ILLEGAL_USAGE_TYPE",
331333
INVALID_ARN = "INVALID_ARN",
332334
INVALID_BILLINGVIEW_ARN = "INVALID_BILLINGVIEW_ARN",
333335
INVALID_BILLING_GROUP = "INVALID_BILLING_GROUP",
334336
INVALID_BILLING_GROUP_STATUS = "INVALID_BILLING_GROUP_STATUS",
335337
INVALID_BILLING_PERIOD_FOR_OPERATION = "INVALID_BILLING_PERIOD_FOR_OPERATION",
338+
INVALID_FILTER = "INVALID_FILTER",
339+
INVALID_SKU_COMBO = "INVALID_SKU_COMBO",
336340
INVALID_TIME_RANGE = "INVALID_TIME_RANGE",
337341
MISMATCHED_BILLINGGROUP_ARN = "MISMATCHED_BILLINGGROUP_ARN",
338342
MISMATCHED_BILLINGVIEW_ARN = "MISMATCHED_BILLINGVIEW_ARN",
@@ -563,6 +567,11 @@ export interface DisassociateAccountsOutput {
563567
Arn?: string;
564568
}
565569

570+
export enum BillingGroupStatus {
571+
ACTIVE = "ACTIVE",
572+
PRIMARY_ACCOUNT_MISSING = "PRIMARY_ACCOUNT_MISSING",
573+
}
574+
566575
/**
567576
* <p>The filter that specifies the billing groups and pricing plans to retrieve billing group information.
568577
* </p>
@@ -577,6 +586,13 @@ export interface ListBillingGroupsFilter {
577586
* <p>The pricing plan Amazon Resource Names (ARNs) to retrieve information. </p>
578587
*/
579588
PricingPlan?: string;
589+
590+
/**
591+
* <p>
592+
* A list of billing groups to retrieve their current status for a specific time range
593+
* </p>
594+
*/
595+
Statuses?: (BillingGroupStatus | string)[];
580596
}
581597

582598
export interface ListBillingGroupsInput {
@@ -605,11 +621,6 @@ export interface ListBillingGroupsInput {
605621
Filters?: ListBillingGroupsFilter;
606622
}
607623

608-
export enum BillingGroupStatus {
609-
ACTIVE = "ACTIVE",
610-
PRIMARY_ACCOUNT_MISSING = "PRIMARY_ACCOUNT_MISSING",
611-
}
612-
613624
/**
614625
* <p>A representation of a billing group.
615626
* </p>
@@ -1357,6 +1368,20 @@ export interface CustomLineItemVersionListElement {
13571368
* <p>The end billing period of the custom line item version.</p>
13581369
*/
13591370
EndBillingPeriod?: string;
1371+
1372+
/**
1373+
* <p>
1374+
* A list of custom line item Amazon Resource Names (ARNs) to retrieve information.
1375+
* </p>
1376+
*/
1377+
Arn?: string;
1378+
1379+
/**
1380+
* <p>
1381+
* The inclusive start time.
1382+
* </p>
1383+
*/
1384+
StartTime?: number;
13601385
}
13611386

13621387
export interface ListCustomLineItemVersionsOutput {
@@ -1639,6 +1664,13 @@ export interface ListAccountAssociationsFilter {
16391664
* </p>
16401665
*/
16411666
AccountId?: string;
1667+
1668+
/**
1669+
* <p>
1670+
* The list of Amazon Web Services IDs to retrieve their associated billing group for a given time range.
1671+
* </p>
1672+
*/
1673+
AccountIds?: string[];
16421674
}
16431675

16441676
export interface ListAccountAssociationsInput {
@@ -2080,6 +2112,7 @@ export enum PricingRuleScope {
20802112
BILLING_ENTITY = "BILLING_ENTITY",
20812113
GLOBAL = "GLOBAL",
20822114
SERVICE = "SERVICE",
2115+
SKU = "SKU",
20832116
}
20842117

20852118
/**
@@ -2376,6 +2409,23 @@ export interface PricingRuleListElement {
23762409
* </p>
23772410
*/
23782411
Tiering?: Tiering;
2412+
2413+
/**
2414+
* <p>
2415+
* Usage type is the unit that each service uses to measure the usage of a specific type of resource.</p>
2416+
* <p>If the <code>Scope</code> attribute is set to <code>SKU</code>, this attribute indicates which usage type the <code>PricingRule</code> is modifying. For example, <code>USW2-BoxUsage:m2.2xlarge</code> describes an<code> M2 High Memory Double Extra Large</code> instance in the US West (Oregon) Region.
2417+
*
2418+
* </p>
2419+
*/
2420+
UsageType?: string;
2421+
2422+
/**
2423+
* <p>
2424+
* Operation is the specific Amazon Web Services action covered by this line item. This describes the specific usage of the line item.</p>
2425+
* <p>
2426+
* If the <code>Scope</code> attribute is set to <code>SKU</code>, this attribute indicates which operation the <code>PricingRule</code> is modifying. For example, a value of <code>RunInstances:0202</code> indicates the operation of running an Amazon EC2 instance.</p>
2427+
*/
2428+
Operation?: string;
23792429
}
23802430

23812431
export interface ListPricingRulesOutput {

clients/client-billingconductor/src/protocols/Aws_restJson1.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ import {
110110
AssociateResourceResponseElement,
111111
BillingGroupCostReportElement,
112112
BillingGroupListElement,
113+
BillingGroupStatus,
113114
ComputationPreference,
114115
ConflictException,
115116
CreateFreeTierConfig,
@@ -3041,6 +3042,14 @@ const serializeAws_restJson1AccountGrouping = (input: AccountGrouping, context:
30413042
};
30423043
};
30433044

3045+
const serializeAws_restJson1AccountIdFilterList = (input: string[], context: __SerdeContext): any => {
3046+
return input
3047+
.filter((e: any) => e != null)
3048+
.map((entry) => {
3049+
return entry;
3050+
});
3051+
};
3052+
30443053
const serializeAws_restJson1AccountIdList = (input: string[], context: __SerdeContext): any => {
30453054
return input
30463055
.filter((e: any) => e != null)
@@ -3057,6 +3066,17 @@ const serializeAws_restJson1BillingGroupArnList = (input: string[], context: __S
30573066
});
30583067
};
30593068

3069+
const serializeAws_restJson1BillingGroupStatusList = (
3070+
input: (BillingGroupStatus | string)[],
3071+
context: __SerdeContext
3072+
): any => {
3073+
return input
3074+
.filter((e: any) => e != null)
3075+
.map((entry) => {
3076+
return entry;
3077+
});
3078+
};
3079+
30603080
const serializeAws_restJson1ComputationPreference = (input: ComputationPreference, context: __SerdeContext): any => {
30613081
return {
30623082
...(input.PricingPlanArn != null && { PricingPlanArn: input.PricingPlanArn }),
@@ -3170,6 +3190,9 @@ const serializeAws_restJson1ListAccountAssociationsFilter = (
31703190
): any => {
31713191
return {
31723192
...(input.AccountId != null && { AccountId: input.AccountId }),
3193+
...(input.AccountIds != null && {
3194+
AccountIds: serializeAws_restJson1AccountIdFilterList(input.AccountIds, context),
3195+
}),
31733196
...(input.Association != null && { Association: input.Association }),
31743197
};
31753198
};
@@ -3192,6 +3215,7 @@ const serializeAws_restJson1ListBillingGroupsFilter = (
31923215
return {
31933216
...(input.Arns != null && { Arns: serializeAws_restJson1BillingGroupArnList(input.Arns, context) }),
31943217
...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }),
3218+
...(input.Statuses != null && { Statuses: serializeAws_restJson1BillingGroupStatusList(input.Statuses, context) }),
31953219
};
31963220
};
31973221

@@ -3525,6 +3549,7 @@ const deserializeAws_restJson1CustomLineItemVersionListElement = (
35253549
context: __SerdeContext
35263550
): CustomLineItemVersionListElement => {
35273551
return {
3552+
Arn: __expectString(output.Arn),
35283553
AssociationSize: __expectLong(output.AssociationSize),
35293554
BillingGroupArn: __expectString(output.BillingGroupArn),
35303555
ChargeDetails:
@@ -3539,6 +3564,7 @@ const deserializeAws_restJson1CustomLineItemVersionListElement = (
35393564
Name: __expectString(output.Name),
35403565
ProductCode: __expectString(output.ProductCode),
35413566
StartBillingPeriod: __expectString(output.StartBillingPeriod),
3567+
StartTime: __expectLong(output.StartTime),
35423568
} as any;
35433569
};
35443570

@@ -3709,10 +3735,12 @@ const deserializeAws_restJson1PricingRuleListElement = (
37093735
LastModifiedTime: __expectLong(output.LastModifiedTime),
37103736
ModifierPercentage: __limitedParseDouble(output.ModifierPercentage),
37113737
Name: __expectString(output.Name),
3738+
Operation: __expectString(output.Operation),
37123739
Scope: __expectString(output.Scope),
37133740
Service: __expectString(output.Service),
37143741
Tiering: output.Tiering != null ? deserializeAws_restJson1Tiering(output.Tiering, context) : undefined,
37153742
Type: __expectString(output.Type),
3743+
UsageType: __expectString(output.UsageType),
37163744
} as any;
37173745
};
37183746

0 commit comments

Comments
 (0)