This is the new Amazon CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the Amazon CloudFormation User Guide.
AWS::EC2::FcaPolicy
Networking Flexible Cost Allocation (FCA) is a feature of Amazon VPC that lets you specify an FCA policy. An FCA policy defines how shared network costs, such as data transfer and data processing, are allocated and reported for network resources such as NAT gateways, Amazon EC2 instances, and VPC peering connections.
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::EC2::FcaPolicy", "Properties" : { "Description" :String, "InstanceFcaPolicyDocument" :InstanceFcaPolicyDocument, "NatFcaPolicyDocument" :NatFcaPolicyDocument, "NetworkResourceType" :String, "PcxFcaPolicyDocument" :PcxFcaPolicyDocument, "ShowBackEnabled" :Boolean, "Tags" :[ Tag, ... ]} }
YAML
Type: AWS::EC2::FcaPolicy Properties: Description:StringInstanceFcaPolicyDocument:InstanceFcaPolicyDocumentNatFcaPolicyDocument:NatFcaPolicyDocumentNetworkResourceType:StringPcxFcaPolicyDocument:PcxFcaPolicyDocumentShowBackEnabled:BooleanTags:- Tag
Properties
Description-
The description of the FCA policy.
Required: No
Type: String
Update requires: No interruption
InstanceFcaPolicyDocument-
The FCA policy document for EC2 instance cost allocation. This property is required when
NetworkResourceTypeisec2, and you can't specify it for other resource types.Required: No
Type: InstanceFcaPolicyDocument
Update requires: No interruption
NatFcaPolicyDocument-
The FCA policy document for NAT gateway cost allocation. This property is required when
NetworkResourceTypeisnatgw, and you can't specify it for other resource types.Required: No
Type: NatFcaPolicyDocument
Update requires: No interruption
NetworkResourceType-
The type of network resource that the FCA policy applies to.
Specify the policy document that matches the resource type:
NatFcaPolicyDocumentfornatgw,InstanceFcaPolicyDocumentforec2, orPcxFcaPolicyDocumentforpcx. Don't specify a policy document for a different resource type.Required: Yes
Type: String
Allowed values:
natgw | pcx | ec2Update requires: Replacement
PcxFcaPolicyDocument-
The FCA policy document for VPC peering connection cost allocation. This property is required when
NetworkResourceTypeispcx, and you can't specify it for other resource types.Required: No
Type: PcxFcaPolicyDocument
Update requires: No interruption
ShowBackEnabled-
Specifies whether showback reporting is enabled for the FCA policy.
Default:
trueRequired: No
Type: Boolean
Update requires: No interruption
-
The tags to apply to the FCA policy.
Required: No
Type: Array of Tag
Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the Amazon Resource Name (ARN) of the FCA policy.
For more information about using the Ref function, see Ref.
Fn::GetAtt
The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.
Arn-
The Amazon Resource Name (ARN) of the FCA policy.
FcaPolicyId-
The ID of the FCA policy, such as
fcap-1234567890abcdef0. LatestVersion-
The latest version number of the FCA policy.
OwnerAccount-
The ID of the Amazon Web Services account that owns the FCA policy.
PolicyCreatedAt-
The timestamp when the FCA policy was created.
VersionExpectedEffectiveAt-
The timestamp when the latest version of the FCA policy is expected to take effect.
Examples
Create an FCA policy for a NAT gateway
The following example creates a Flex Cost Allocation policy that allocates NAT gateway data transfer and data processing costs, reported at the subnet level.
YAML
MyFcaPolicy: Type: AWS::EC2::FcaPolicy Properties: NetworkResourceType: natgw Description: Allocate NAT gateway costs by subnet ShowBackEnabled: true NatFcaPolicyDocument: ReportingGranularity: - subnet Dimensions: - data-transfer - data-processing Tags: - Key: Team Value: Networking
JSON
{ "MyFcaPolicy": { "Type": "AWS::EC2::FcaPolicy", "Properties": { "NetworkResourceType": "natgw", "Description": "Allocate NAT gateway costs by subnet", "ShowBackEnabled": true, "NatFcaPolicyDocument": { "ReportingGranularity": [ "subnet" ], "Dimensions": [ "data-transfer", "data-processing" ] }, "Tags": [ { "Key": "Team", "Value": "Networking" } ] } } }