AWS 빌링 콘솔 템플릿 코드 조각 - AWS CloudFormation

AWS 빌링 콘솔 템플릿 코드 조각

이 예제에서는 10% 글로벌 마크업 요금 규칙을 사용하여 하나의 요금제를 생성합니다. 이 요금제는 과금 그룹에 연결되어 있습니다. 과금 그룹에는 과금 그룹 총 비용에 10 USD 청구와 10% 청구를 추가로 적용하는 2개의 사용자 지정 항목도 있습니다.

JSON

{ "Parameters": { "LinkedAccountIds": { "Type": "ListNumber" }, "PrimaryAccountId": { "Type": "Number" } }, "Resources": { "TestPricingRule": { "Type": "AWS::BillingConductor::PricingRule", "Properties": { "Name": "TestPricingRule", "Description": "Test pricing rule created through Cloudformation. Mark everything by 10%.", "Type": "MARKUP", "Scope": "GLOBAL", "ModifierPercentage": 10 } }, "TestPricingPlan": { "Type": "AWS::BillingConductor::PricingPlan", "Properties": { "Name": "TestPricingPlan", "Description": "Test pricing plan created through Cloudformation.", "PricingRuleArns": [ {"Fn::GetAtt": ["TestPricingRule", "Arn"]} ] } }, "TestBillingGroup": { "Type": "AWS::BillingConductor::BillingGroup", "Properties": { "Name": "TestBillingGroup", "Description": "Test billing group created through Cloudformation with 1 linked account. The linked account is also the primary account.", "PrimaryAccountId": { "Ref": "PrimaryAccountId" }, "AccountGrouping": { "LinkedAccountIds": null }, "ComputationPreference": { "PricingPlanArn": { "Fn::GetAtt": ["TestPricingPlan", "Arn"] } } } }, "TestFlatCustomLineItem": { "Type": "AWS::BillingConductor::CustomLineItem", "Properties": { "Name": "TestFlatCustomLineItem", "Description": "Test flat custom line item created through Cloudformation for a $10 charge.", "BillingGroupArn": { "Fn::GetAtt": ["TestBillingGroup", "Arn"] }, "CustomLineItemChargeDetails": { "Flat": { "ChargeValue": 10 }, "Type": "FEE" } } }, "TestPercentageCustomLineItem": { "Type": "AWS::BillingConductor::CustomLineItem", "Properties": { "Name": "TestPercentageCustomLineItem", "Description": "Test percentage custom line item created through Cloudformation for a %10 additional charge on the overall total bill of the billing group.", "BillingGroupArn": { "Fn::GetAtt": ["TestBillingGroup", "Arn"] }, "CustomLineItemChargeDetails": { "Percentage": { "PercentageValue": 10, "ChildAssociatedResources": [ {"Fn::GetAtt": ["TestBillingGroup", "Arn"]} ] }, "Type": "FEE" } } } } }

YAML

Parameters: LinkedAccountIds: Type: ListNumber PrimaryAccountId: Type: Number Resources: TestPricingRule: Type: 'AWS::BillingConductor::PricingRule' Properties: Name: 'TestPricingRule' Description: 'Test pricing rule created through Cloudformation. Mark everything by 10%.' Type: 'MARKUP' Scope: 'GLOBAL' ModifierPercentage: 10 TestPricingPlan: Type: 'AWS::BillingConductor::PricingPlan' Properties: Name: 'TestPricingPlan' Description: 'Test pricing plan created through Cloudformation.' PricingRuleArns: - !GetAtt TestPricingRule.Arn TestBillingGroup: Type: 'AWS::BillingConductor::BillingGroup' Properties: Name: 'TestBillingGroup' Description: 'Test billing group created through Cloudformation with 1 linked account. The linked account is also the primary account.' PrimaryAccountId: !Ref PrimaryAccountId AccountGrouping: LinkedAccountIds: !Ref LinkedAccountIds ComputationPreference: PricingPlanArn: !GetAtt TestPricingPlan.Arn TestFlatCustomLineItem: Type: 'AWS::BillingConductor::CustomLineItem' Properties: Name: 'TestFlatCustomLineItem' Description: 'Test flat custom line item created through Cloudformation for a $10 charge.' BillingGroupArn: !GetAtt TestBillingGroup.Arn CustomLineItemChargeDetails: Flat: ChargeValue: 10 Type: 'FEE' TestPercentageCustomLineItem: Type: 'AWS::BillingConductor::CustomLineItem' Properties: Name: 'TestPercentageCustomLineItem' Description: 'Test percentage custom line item created through Cloudformation for a %10 additional charge on the overall total bill of the billing group.' BillingGroupArn: !GetAtt TestBillingGroup.Arn CustomLineItemChargeDetails: Percentage: PercentageValue: 10 ChildAssociatedResources: - !GetAtt TestBillingGroup.Arn Type: 'FEE'