CreateNetworkingFlexCostAllocationPolicy
Creates a flex cost allocation policy for Networking Flexible Cost Allocation (FCA), a feature of Amazon Virtual Private Cloud (Amazon VPC). The policy allocates the charges of a shared networking resource at the reporting granularity that you specify. You can create a policy for one of the following resource types: NAT gateways, Amazon VPC peering connections, or EC2 instances. Policies can allocate data transfer charges for all three types, and data processing charges for NAT gateways.
You can have up to 100 policies per account in each AWS Region, plus one additional policy per network resource type created by a declarative policy, for a maximum of 103 policies in an AWS Region.
Request Parameters
The following parameters are for this specific action. For more information about required and optional parameters that are common to all actions, see Common Query Parameters.
- ClientToken
-
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.
Type: String
Required: No
- Description
-
A description for the policy. The description can be up to 1024 characters long.
Type: String
Required: No
- DryRun
-
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation. Otherwise, it isUnauthorizedOperation.Type: Boolean
Required: No
- InstanceFcaPolicyDocument
-
The policy document that defines cost allocation for EC2 instances. Provide this document when
NetworkResourceTypeisec2.Type: InstanceFlexCostAllocationPolicyDocument object
Required: No
- NatFcaPolicyDocument
-
The policy document that defines cost allocation for NAT gateways. Provide this document when
NetworkResourceTypeisnatgw.Type: NatFlexCostAllocationPolicyDocument object
Required: No
- NetworkResourceType
-
The type of network resource that the policy applies to. This parameter is required. Valid values are
natgw(NAT gateway),pcx(Amazon VPC peering connection), andec2(EC2 instance).Specify the policy document that matches the resource type:
NatFcaPolicyDocumentfornatgw,InstanceFcaPolicyDocumentforec2, orPcxFcaPolicyDocumentforpcx. Don't specify a policy document for a different resource type.Type: String
Valid Values:
natgw | pcx | ec2Required: Yes
- PcxFcaPolicyDocument
-
The policy document that defines cost allocation for Amazon VPC peering connections. Provide this document when
NetworkResourceTypeispcx.Type: PcxFlexCostAllocationPolicyDocument object
Required: No
- ShowBackEnabled
-
Specifies whether showback reporting is enabled for the policy.
Default:
trueType: Boolean
Required: No
- TagSpecifications.N
-
The tags to assign to the policy.
Type: Array of TagSpecification objects
Required: No
Response Elements
The following elements are returned by the service.
- createdAt
-
The date and time when the policy was created.
Type: Timestamp
- expectedEffectiveAt
-
The date and time when the policy is expected to apply to network traffic.
Type: Timestamp
- fcaPolicyArn
-
The Amazon Resource Name (ARN) of the flex cost allocation policy.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1024.
- fcaPolicyId
-
The ID of the flex cost allocation policy.
Type: String
Length Constraints: Fixed length of 22.
Pattern:
fcap-[a-f0-9]{17} - requestId
-
The ID of the request.
Type: String
Errors
For information about the errors that are common to all actions, see Common Error Types.
Examples
Example 1
This example creates a flex cost allocation policy for NAT gateways that reports data transfer and data processing costs at the VPC granularity.
Sample Request
https://ec2.amazonaws.com/?Action=CreateNetworkingFlexCostAllocationPolicy
&NetworkResourceType=natgw
&NatFcaPolicyDocument.ReportingGranularity.1=vpc
&NatFcaPolicyDocument.Dimensions.1=data-transfer
&NatFcaPolicyDocument.Dimensions.2=data-processing
&AUTHPARAMS
Sample Response
<CreateNetworkingFlexCostAllocationPolicyResponse xmlns="http://ec2.amazonaws.com/doc/2016-11-15/">
<requestId>a1b2c3d4-5678-90ab-cdef-EXAMPLE11111</requestId>
<fcaPolicyId>fcap-1234567890abcdef0</fcaPolicyId>
<fcaPolicyArn>arn:aws:ec2:us-east-1:111122223333:fca-policy/fcap-1234567890abcdef0</fcaPolicyArn>
<createdAt>2026-11-01T12:00:00.000Z</createdAt>
<expectedEffectiveAt>2026-11-01T13:00:00.000Z</expectedEffectiveAt>
</CreateNetworkingFlexCostAllocationPolicyResponse>
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: