diff --git a/clients/client-billingconductor/src/endpoint/EndpointParameters.ts b/clients/client-billingconductor/src/endpoint/EndpointParameters.ts index 83194350d311..e49ca9291180 100644 --- a/clients/client-billingconductor/src/endpoint/EndpointParameters.ts +++ b/clients/client-billingconductor/src/endpoint/EndpointParameters.ts @@ -24,7 +24,7 @@ export const resolveClientEndpointParameters = ( }; export interface EndpointParameters extends __EndpointParameters { - Region: string; + Region?: string; UseDualStack?: boolean; UseFIPS?: boolean; Endpoint?: string; diff --git a/clients/client-billingconductor/src/endpoint/ruleset.ts b/clients/client-billingconductor/src/endpoint/ruleset.ts index 04567f6af634..febab424a488 100644 --- a/clients/client-billingconductor/src/endpoint/ruleset.ts +++ b/clients/client-billingconductor/src/endpoint/ruleset.ts @@ -6,33 +6,34 @@ import { RuleSetObject } from "@aws-sdk/util-endpoints"; or see "smithy.rules#endpointRuleSet" in codegen/sdk-codegen/aws-models/billingconductor.json */ -const y="type", -z="fn", -A="argv", -B="ref"; -const a=true, -b=false, -c="String", -d="PartitionResult", -e="tree", -f="error", -g="endpoint", -h="stringEquals", -i="getAttr", -j={"required":true,"default":false,[y]:"Boolean"}, -k={[B]:"Region"}, -l={[B]:"Endpoint"}, -m={}, -n={[B]:d}, -o={[f]:"FIPS and DualStack are enabled, but this partition does not support one or both",[y]:f}, -p={[f]:"FIPS is enabled but this partition does not support FIPS",[y]:f}, -q={[f]:"DualStack is enabled but this partition does not support DualStack",[y]:f}, -r={"url":"https://billingconductor.us-east-1.amazonaws.com","properties":{"authSchemes":[{"name":"sigv4","signingRegion":"us-east-1","signingName":"billingconductor"}]},"headers":{}}, -s=[{[z]:"booleanEquals",[A]:[{[B]:"UseFIPS"},true]}], -t=[{[z]:"booleanEquals",[A]:[{[B]:"UseDualStack"},true]}], -u=[{[z]:"booleanEquals",[A]:[{[B]:"UseFIPS"},true]},{[z]:"booleanEquals",[A]:[{[B]:"UseDualStack"},true]}], -v=[{[z]:"booleanEquals",[A]:[true,{[z]:i,[A]:[n,"supportsFIPS"]}]},{[z]:"booleanEquals",[A]:[true,{[z]:i,[A]:[n,"supportsDualStack"]}]}], -w=[{[z]:"booleanEquals",[A]:[true,{[z]:i,[A]:[n,"supportsFIPS"]}]}], -x=[{[z]:"booleanEquals",[A]:[true,{[z]:i,[A]:[n,"supportsDualStack"]}]}]; -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}]}]}]}; +const y="required", +z="type", +A="fn", +B="argv", +C="ref"; +const a="isSet", +b="tree", +c="error", +d="endpoint", +e="PartitionResult", +f="stringEquals", +g="getAttr", +h={[y]:false,[z]:"String"}, +i={[y]:true,"default":false,[z]:"Boolean"}, +j={[C]:"Endpoint"}, +k={}, +l={[C]:"Region"}, +m={[C]:e}, +n={[c]:"FIPS and DualStack are enabled, but this partition does not support one or both",[z]:c}, +o={[c]:"FIPS is enabled but this partition does not support FIPS",[z]:c}, +p={[c]:"DualStack is enabled but this partition does not support DualStack",[z]:c}, +q={"url":"https://billingconductor.us-east-1.amazonaws.com","properties":{"authSchemes":[{"name":"sigv4","signingName":"billingconductor","signingRegion":"us-east-1"}]},"headers":{}}, +r=[{[A]:"booleanEquals",[B]:[{[C]:"UseFIPS"},true]}], +s=[{[A]:"booleanEquals",[B]:[{[C]:"UseDualStack"},true]}], +t=[l], +u=[{[A]:"booleanEquals",[B]:[{[C]:"UseFIPS"},true]},{[A]:"booleanEquals",[B]:[{[C]:"UseDualStack"},true]}], +v=[{[A]:"booleanEquals",[B]:[true,{[A]:g,[B]:[m,"supportsFIPS"]}]},{[A]:"booleanEquals",[B]:[true,{[A]:g,[B]:[m,"supportsDualStack"]}]}], +w=[{[A]:"booleanEquals",[B]:[true,{[A]:g,[B]:[m,"supportsFIPS"]}]}], +x=[{[A]:"booleanEquals",[B]:[true,{[A]:g,[B]:[m,"supportsDualStack"]}]}]; +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}]}]}; export const ruleSet: RuleSetObject = _data; diff --git a/clients/client-billingconductor/src/models/models_0.ts b/clients/client-billingconductor/src/models/models_0.ts index db0ff247b824..716049ab23e2 100644 --- a/clients/client-billingconductor/src/models/models_0.ts +++ b/clients/client-billingconductor/src/models/models_0.ts @@ -321,6 +321,7 @@ export enum ValidationExceptionReason { ILLEGAL_ENDED_BILLINGGROUP = "ILLEGAL_ENDED_BILLINGGROUP", ILLEGAL_EXPRESSION = "ILLEGAL_EXPRESSION", ILLEGAL_MODIFIER_PERCENTAGE = "ILLEGAL_MODIFIER_PERCENTAGE", + ILLEGAL_OPERATION = "ILLEGAL_OPERATION", ILLEGAL_PRIMARY_ACCOUNT = "ILLEGAL_PRIMARY_ACCOUNT", ILLEGAL_RESOURCE_ARNS = "ILLEGAL_RESOURCE_ARNS", ILLEGAL_SCOPE = "ILLEGAL_SCOPE", @@ -328,11 +329,14 @@ export enum ValidationExceptionReason { ILLEGAL_TIERING_INPUT = "ILLEGAL_TIERING_INPUT", ILLEGAL_TYPE = "ILLEGAL_TYPE", ILLEGAL_UPDATE_CHARGE_DETAILS = "ILLEGAL_UPDATE_CHARGE_DETAILS", + ILLEGAL_USAGE_TYPE = "ILLEGAL_USAGE_TYPE", INVALID_ARN = "INVALID_ARN", INVALID_BILLINGVIEW_ARN = "INVALID_BILLINGVIEW_ARN", INVALID_BILLING_GROUP = "INVALID_BILLING_GROUP", INVALID_BILLING_GROUP_STATUS = "INVALID_BILLING_GROUP_STATUS", INVALID_BILLING_PERIOD_FOR_OPERATION = "INVALID_BILLING_PERIOD_FOR_OPERATION", + INVALID_FILTER = "INVALID_FILTER", + INVALID_SKU_COMBO = "INVALID_SKU_COMBO", INVALID_TIME_RANGE = "INVALID_TIME_RANGE", MISMATCHED_BILLINGGROUP_ARN = "MISMATCHED_BILLINGGROUP_ARN", MISMATCHED_BILLINGVIEW_ARN = "MISMATCHED_BILLINGVIEW_ARN", @@ -563,6 +567,11 @@ export interface DisassociateAccountsOutput { Arn?: string; } +export enum BillingGroupStatus { + ACTIVE = "ACTIVE", + PRIMARY_ACCOUNT_MISSING = "PRIMARY_ACCOUNT_MISSING", +} + /** *

The filter that specifies the billing groups and pricing plans to retrieve billing group information. *

@@ -577,6 +586,13 @@ export interface ListBillingGroupsFilter { *

The pricing plan Amazon Resource Names (ARNs) to retrieve information.

*/ PricingPlan?: string; + + /** + *

+ * A list of billing groups to retrieve their current status for a specific time range + *

+ */ + Statuses?: (BillingGroupStatus | string)[]; } export interface ListBillingGroupsInput { @@ -605,11 +621,6 @@ export interface ListBillingGroupsInput { Filters?: ListBillingGroupsFilter; } -export enum BillingGroupStatus { - ACTIVE = "ACTIVE", - PRIMARY_ACCOUNT_MISSING = "PRIMARY_ACCOUNT_MISSING", -} - /** *

A representation of a billing group. *

@@ -1357,6 +1368,20 @@ export interface CustomLineItemVersionListElement { *

The end billing period of the custom line item version.

*/ EndBillingPeriod?: string; + + /** + *

+ * A list of custom line item Amazon Resource Names (ARNs) to retrieve information. + *

+ */ + Arn?: string; + + /** + *

+ * The inclusive start time. + *

+ */ + StartTime?: number; } export interface ListCustomLineItemVersionsOutput { @@ -1639,6 +1664,13 @@ export interface ListAccountAssociationsFilter { *

*/ AccountId?: string; + + /** + *

+ * The list of Amazon Web Services IDs to retrieve their associated billing group for a given time range. + *

+ */ + AccountIds?: string[]; } export interface ListAccountAssociationsInput { @@ -2080,6 +2112,7 @@ export enum PricingRuleScope { BILLING_ENTITY = "BILLING_ENTITY", GLOBAL = "GLOBAL", SERVICE = "SERVICE", + SKU = "SKU", } /** @@ -2376,6 +2409,23 @@ export interface PricingRuleListElement { *

*/ Tiering?: Tiering; + + /** + *

+ * Usage type is the unit that each service uses to measure the usage of a specific type of resource.

+ *

If the Scope attribute is set to SKU, this attribute indicates which usage type the PricingRule is modifying. For example, USW2-BoxUsage:m2.2xlarge describes an M2 High Memory Double Extra Large instance in the US West (Oregon) Region. + * + *

+ */ + UsageType?: string; + + /** + *

+ * Operation is the specific Amazon Web Services action covered by this line item. This describes the specific usage of the line item.

+ *

+ * If the Scope attribute is set to SKU, this attribute indicates which operation the PricingRule is modifying. For example, a value of RunInstances:0202 indicates the operation of running an Amazon EC2 instance.

+ */ + Operation?: string; } export interface ListPricingRulesOutput { diff --git a/clients/client-billingconductor/src/protocols/Aws_restJson1.ts b/clients/client-billingconductor/src/protocols/Aws_restJson1.ts index 36be43e9f806..18bdf6a17d43 100644 --- a/clients/client-billingconductor/src/protocols/Aws_restJson1.ts +++ b/clients/client-billingconductor/src/protocols/Aws_restJson1.ts @@ -110,6 +110,7 @@ import { AssociateResourceResponseElement, BillingGroupCostReportElement, BillingGroupListElement, + BillingGroupStatus, ComputationPreference, ConflictException, CreateFreeTierConfig, @@ -3041,6 +3042,14 @@ const serializeAws_restJson1AccountGrouping = (input: AccountGrouping, context: }; }; +const serializeAws_restJson1AccountIdFilterList = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return entry; + }); +}; + const serializeAws_restJson1AccountIdList = (input: string[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) @@ -3057,6 +3066,17 @@ const serializeAws_restJson1BillingGroupArnList = (input: string[], context: __S }); }; +const serializeAws_restJson1BillingGroupStatusList = ( + input: (BillingGroupStatus | string)[], + context: __SerdeContext +): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return entry; + }); +}; + const serializeAws_restJson1ComputationPreference = (input: ComputationPreference, context: __SerdeContext): any => { return { ...(input.PricingPlanArn != null && { PricingPlanArn: input.PricingPlanArn }), @@ -3170,6 +3190,9 @@ const serializeAws_restJson1ListAccountAssociationsFilter = ( ): any => { return { ...(input.AccountId != null && { AccountId: input.AccountId }), + ...(input.AccountIds != null && { + AccountIds: serializeAws_restJson1AccountIdFilterList(input.AccountIds, context), + }), ...(input.Association != null && { Association: input.Association }), }; }; @@ -3192,6 +3215,7 @@ const serializeAws_restJson1ListBillingGroupsFilter = ( return { ...(input.Arns != null && { Arns: serializeAws_restJson1BillingGroupArnList(input.Arns, context) }), ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }), + ...(input.Statuses != null && { Statuses: serializeAws_restJson1BillingGroupStatusList(input.Statuses, context) }), }; }; @@ -3525,6 +3549,7 @@ const deserializeAws_restJson1CustomLineItemVersionListElement = ( context: __SerdeContext ): CustomLineItemVersionListElement => { return { + Arn: __expectString(output.Arn), AssociationSize: __expectLong(output.AssociationSize), BillingGroupArn: __expectString(output.BillingGroupArn), ChargeDetails: @@ -3539,6 +3564,7 @@ const deserializeAws_restJson1CustomLineItemVersionListElement = ( Name: __expectString(output.Name), ProductCode: __expectString(output.ProductCode), StartBillingPeriod: __expectString(output.StartBillingPeriod), + StartTime: __expectLong(output.StartTime), } as any; }; @@ -3709,10 +3735,12 @@ const deserializeAws_restJson1PricingRuleListElement = ( LastModifiedTime: __expectLong(output.LastModifiedTime), ModifierPercentage: __limitedParseDouble(output.ModifierPercentage), Name: __expectString(output.Name), + Operation: __expectString(output.Operation), Scope: __expectString(output.Scope), Service: __expectString(output.Service), Tiering: output.Tiering != null ? deserializeAws_restJson1Tiering(output.Tiering, context) : undefined, Type: __expectString(output.Type), + UsageType: __expectString(output.UsageType), } as any; }; diff --git a/codegen/sdk-codegen/aws-models/billingconductor.json b/codegen/sdk-codegen/aws-models/billingconductor.json index 92adc733f660..1b66ba7d0b80 100644 --- a/codegen/sdk-codegen/aws-models/billingconductor.json +++ b/codegen/sdk-codegen/aws-models/billingconductor.json @@ -71,7 +71,7 @@ "parameters": { "Region": { "builtIn": "AWS::Region", - "required": true, + "required": false, "documentation": "The AWS region used to dispatch the request.", "type": "String" }, @@ -100,13 +100,12 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "isSet", "argv": [ { - "ref": "Region" + "ref": "Endpoint" } - ], - "assign": "PartitionResult" + ] } ], "type": "tree", @@ -114,14 +113,20 @@ { "conditions": [ { - "fn": "isSet", + "fn": "booleanEquals", "argv": [ { - "ref": "Endpoint" - } + "ref": "UseFIPS" + }, + true ] } ], + "error": "Invalid Configuration: FIPS and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], "type": "tree", "rules": [ { @@ -130,64 +135,42 @@ "fn": "booleanEquals", "argv": [ { - "ref": "UseFIPS" + "ref": "UseDualStack" }, true ] } ], - "error": "Invalid Configuration: FIPS and custom endpoint are not supported", + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", "type": "error" }, { "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" + "endpoint": { + "url": { + "ref": "Endpoint" }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" - }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, + } + ] + }, + { + "conditions": [], + "type": "tree", + "rules": [ { "conditions": [ { - "fn": "stringEquals", + "fn": "isSet", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - }, - "aws" + "ref": "Region" + } ] } ], @@ -196,22 +179,13 @@ { "conditions": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", + "fn": "aws.partition", "argv": [ { - "ref": "UseDualStack" - }, - true - ] + "ref": "Region" + } + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -219,147 +193,216 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsFIPS" + "name" ] - } + }, + "aws" ] - }, + } + ], + "type": "tree", + "rules": [ { - "fn": "booleanEquals", - "argv": [ - true, + "conditions": [ { - "fn": "getAttr", + "fn": "booleanEquals", "argv": [ { - "ref": "PartitionResult" + "ref": "UseFIPS" }, - "supportsDualStack" + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://billingconductor-fips.{Region}.api.aws", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } ] + }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" } ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://billingconductor-fips.{Region}.api.aws", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ] - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ { - "fn": "booleanEquals", - "argv": [ - true, + "conditions": [ { - "fn": "getAttr", + "fn": "booleanEquals", "argv": [ { - "ref": "PartitionResult" + "ref": "UseFIPS" }, - "supportsFIPS" + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://billingconductor-fips.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } ] + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" } ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://billingconductor-fips.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ] - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ { - "fn": "booleanEquals", - "argv": [ - true, + "conditions": [ { - "fn": "getAttr", + "fn": "booleanEquals", "argv": [ { - "ref": "PartitionResult" + "ref": "UseDualStack" }, - "supportsDualStack" + true ] } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://billingconductor.{Region}.api.aws", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" + } ] - } - ], - "type": "tree", - "rules": [ + }, { "conditions": [], "endpoint": { - "url": "https://billingconductor.{Region}.api.aws", - "properties": {}, + "url": "https://billingconductor.us-east-1.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "billingconductor", + "signingRegion": "us-east-1" + } + ] + }, "headers": {} }, "type": "endpoint" @@ -367,213 +410,238 @@ ] }, { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" - } - ] - }, - { - "conditions": [], - "endpoint": { - "url": "https://billingconductor.us-east-1.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingRegion": "us-east-1", - "signingName": "billingconductor" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ] - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, + "conditions": [ { - "fn": "getAttr", + "fn": "booleanEquals", "argv": [ { - "ref": "PartitionResult" + "ref": "UseFIPS" }, - "supportsFIPS" + true ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, + }, { - "fn": "getAttr", + "fn": "booleanEquals", "argv": [ { - "ref": "PartitionResult" + "ref": "UseDualStack" }, - "supportsDualStack" + true ] } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], + ], "type": "tree", "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://billingconductor-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + }, { "conditions": [], - "endpoint": { - "url": "https://billingconductor-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" } ] - } - ] - }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ] - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ { - "fn": "booleanEquals", - "argv": [ - true, + "conditions": [ { - "fn": "getAttr", + "fn": "booleanEquals", "argv": [ { - "ref": "PartitionResult" + "ref": "UseFIPS" }, - "supportsFIPS" + true ] } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], + ], "type": "tree", "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://billingconductor-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + }, { "conditions": [], - "endpoint": { - "url": "https://billingconductor-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" } ] - } - ] - }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ] - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ { - "fn": "booleanEquals", - "argv": [ - true, + "conditions": [ { - "fn": "getAttr", + "fn": "booleanEquals", "argv": [ { - "ref": "PartitionResult" + "ref": "UseDualStack" }, - "supportsDualStack" + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://billingconductor.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] - } - ], - "type": "tree", - "rules": [ + }, { "conditions": [], "type": "tree", "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ], + "endpoint": { + "url": "https://billingconductor.us-east-1.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "billingconductor", + "signingRegion": "us-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, { "conditions": [], "endpoint": { - "url": "https://billingconductor.{Region}.{PartitionResult#dualStackDnsSuffix}", + "url": "https://billingconductor.{Region}.{PartitionResult#dnsSuffix}", "properties": {}, "headers": {} }, @@ -582,55 +650,13 @@ ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } ] }, { "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ], - "endpoint": { - "url": "https://billingconductor.us-east-1.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingRegion": "us-east-1", - "signingName": "billingconductor" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://billingconductor.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] } @@ -639,85 +665,68 @@ "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://billingconductor-fips.cn-north-1.api.amazonwebservices.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true - } - }, - { - "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "documentation": "For region aws-global with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://billingconductor-fips.cn-north-1.amazonaws.com.cn" + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "billingconductor", + "signingRegion": "us-east-1" + } + ] + }, + "url": "https://billingconductor.us-east-1.amazonaws.com" } }, "params": { - "Region": "cn-north-1", + "Region": "aws-global", "UseDualStack": false, - "UseFIPS": true - } - }, - { - "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://billingconductor.cn-north-1.api.amazonwebservices.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseDualStack": true, "UseFIPS": false } }, { - "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://billingconductor.cn-north-1.amazonaws.com.cn" + "url": "https://billingconductor-fips.us-east-1.api.aws" } }, "params": { - "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "Region": "us-east-1", + "UseDualStack": true, + "UseFIPS": true } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://billingconductor-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://billingconductor-fips.us-east-1.amazonaws.com" } }, "params": { - "Region": "us-iso-east-1", + "Region": "us-east-1", "UseDualStack": false, "UseFIPS": true } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://billingconductor.us-iso-east-1.c2s.ic.gov" + "url": "https://billingconductor.us-east-1.api.aws" } }, "params": { - "Region": "us-iso-east-1", - "UseDualStack": false, + "Region": "us-east-1", + "UseDualStack": true, "UseFIPS": false } }, { - "documentation": "For region aws-global with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { "properties": { @@ -733,68 +742,59 @@ } }, "params": { - "Region": "aws-global", + "Region": "us-east-1", "UseDualStack": false, "UseFIPS": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://billingconductor-fips.us-east-1.api.aws" + "url": "https://billingconductor-fips.cn-north-1.api.amazonwebservices.com.cn" } }, "params": { - "Region": "us-east-1", + "Region": "cn-north-1", "UseDualStack": true, "UseFIPS": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://billingconductor-fips.us-east-1.amazonaws.com" + "url": "https://billingconductor-fips.cn-north-1.amazonaws.com.cn" } }, "params": { - "Region": "us-east-1", + "Region": "cn-north-1", "UseDualStack": false, "UseFIPS": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://billingconductor.us-east-1.api.aws" + "url": "https://billingconductor.cn-north-1.api.amazonwebservices.com.cn" } }, "params": { - "Region": "us-east-1", + "Region": "cn-north-1", "UseDualStack": true, "UseFIPS": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "billingconductor", - "signingRegion": "us-east-1" - } - ] - }, - "url": "https://billingconductor.us-east-1.amazonaws.com" + "url": "https://billingconductor.cn-north-1.amazonaws.com.cn" } }, "params": { - "Region": "us-east-1", + "Region": "cn-north-1", "UseDualStack": false, "UseFIPS": false } @@ -851,6 +851,32 @@ "UseFIPS": false } }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://billingconductor-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseDualStack": false, + "UseFIPS": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://billingconductor.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseDualStack": false, + "UseFIPS": false + } + }, { "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", "expect": { @@ -878,7 +904,7 @@ } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" @@ -891,6 +917,19 @@ "Endpoint": "https://example.com" } }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseDualStack": false, + "UseFIPS": false, + "Endpoint": "https://example.com" + } + }, { "documentation": "For custom endpoint with fips enabled and dualstack disabled", "expect": { @@ -1004,6 +1043,18 @@ "smithy.api#pattern": "^[0-9]{12}$" } }, + "com.amazonaws.billingconductor#AccountIdFilterList": { + "type": "list", + "member": { + "target": "com.amazonaws.billingconductor#AccountId" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 30 + } + } + }, "com.amazonaws.billingconductor#AccountIdList": { "type": "list", "member": { @@ -1636,6 +1687,18 @@ ] } }, + "com.amazonaws.billingconductor#BillingGroupStatusList": { + "type": "list", + "member": { + "target": "com.amazonaws.billingconductor#BillingGroupStatus" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2 + } + } + }, "com.amazonaws.billingconductor#BillingGroupStatusReason": { "type": "string" }, @@ -2643,6 +2706,19 @@ "traits": { "smithy.api#documentation": "

The end billing period of the custom line item version.

" } + }, + "Arn": { + "target": "com.amazonaws.billingconductor#CustomLineItemArn", + "traits": { + "smithy.api#documentation": "

\n A list of custom line item Amazon Resource Names (ARNs) to retrieve information.\n

" + } + }, + "StartTime": { + "target": "com.amazonaws.billingconductor#Instant", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

\n The inclusive start time.\n

" + } } }, "traits": { @@ -3142,6 +3218,12 @@ "traits": { "smithy.api#documentation": "

\n The Amazon Web Services account ID to filter on.\n

" } + }, + "AccountIds": { + "target": "com.amazonaws.billingconductor#AccountIdFilterList", + "traits": { + "smithy.api#documentation": "

\n The list of Amazon Web Services IDs to retrieve their associated billing group for a given time range.\n

" + } } }, "traits": { @@ -3344,6 +3426,12 @@ "traits": { "smithy.api#documentation": "

The pricing plan Amazon Resource Names (ARNs) to retrieve information.

" } + }, + "Statuses": { + "target": "com.amazonaws.billingconductor#BillingGroupStatusList", + "traits": { + "smithy.api#documentation": "

\n A list of billing groups to retrieve their current status for a specific time range\n

" + } } }, "traits": { @@ -4724,6 +4812,18 @@ "traits": { "smithy.api#documentation": "

\n The set of tiering configurations for the pricing rule.\n

" } + }, + "UsageType": { + "target": "com.amazonaws.billingconductor#UsageType", + "traits": { + "smithy.api#documentation": "

\n Usage type is the unit that each service uses to measure the usage of a specific type of resource.

\n

If the Scope attribute is set to SKU, this attribute indicates which usage type the PricingRule is modifying. For example, USW2-BoxUsage:m2.2xlarge describes an M2 High Memory Double Extra Large instance in the US West (Oregon) Region. \n \n

" + } + }, + "Operation": { + "target": "com.amazonaws.billingconductor#Operation", + "traits": { + "smithy.api#documentation": "

\n Operation is the specific Amazon Web Services action covered by this line item. This describes the specific usage of the line item.

\n

\n If the Scope attribute is set to SKU, this attribute indicates which operation the PricingRule is modifying. For example, a value of RunInstances:0202 indicates the operation of running an Amazon EC2 instance.

" + } } }, "traits": { @@ -4756,6 +4856,10 @@ { "value": "BILLING_ENTITY", "name": "BILLING_ENTITY" + }, + { + "value": "SKU", + "name": "SKU" } ] } @@ -6017,6 +6121,22 @@ { "value": "ILLEGAL_TIERING_INPUT", "name": "ILLEGAL_TIERING_INPUT" + }, + { + "value": "ILLEGAL_OPERATION", + "name": "ILLEGAL_OPERATION" + }, + { + "value": "ILLEGAL_USAGE_TYPE", + "name": "ILLEGAL_USAGE_TYPE" + }, + { + "value": "INVALID_SKU_COMBO", + "name": "INVALID_SKU_COMBO" + }, + { + "value": "INVALID_FILTER", + "name": "INVALID_FILTER" } ] }