ModifyNetworkingFlexCostAllocationPolicy
Modifies a flex cost allocation policy. Changing a policy document or
ShowBackEnabled creates a new version of the policy. Changing only the description doesn't
create a new version.
A policy can have up to 100 versions. Versions are never removed, so after a policy reaches 100
versions, you can't change its policy document or ShowBackEnabled. Policies that are managed
by a declarative policy aren't subject to this limit.
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
- FcaPolicyId
-
The ID of the flex cost allocation policy to modify. This parameter is required.
Type: String
Length Constraints: Fixed length of 22.
Pattern:
fcap-[a-f0-9]{17}Required: Yes
- InstanceFcaPolicyDocument
-
The updated policy document that defines cost allocation for EC2 instances.
Type: InstanceFlexCostAllocationPolicyDocument object
Required: No
- NatFcaPolicyDocument
-
The updated policy document that defines cost allocation for NAT gateways.
Type: NatFlexCostAllocationPolicyDocument object
Required: No
- PcxFcaPolicyDocument
-
The updated policy document that defines cost allocation for Amazon VPC peering connections.
Type: PcxFlexCostAllocationPolicyDocument object
Required: No
- ShowBackEnabled
-
Specifies whether showback reporting is enabled for the policy. If you omit this parameter, the current setting is unchanged.
Type: Boolean
Required: No
Response Elements
The following elements are returned by the service.
- 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
- updatedAt
-
The date and time when the policy was updated.
Type: Timestamp
- version
-
The version number of the policy that this modification created.
Type: Integer
Valid Range: Minimum value of 1. Maximum value of 2147483647.
- versionExpectedEffectiveAt
-
The date and time when the new version of the policy is expected to apply to network traffic.
Type: Timestamp
Errors
For information about the errors that are common to all actions, see Common Error Types.
Examples
Example 1
This example disables showback reporting for the specified flex cost allocation policy, which creates a new version of the policy.
Sample Request
https://ec2.amazonaws.com/?Action=ModifyNetworkingFlexCostAllocationPolicy
&FcaPolicyId=fcap-1234567890abcdef0
&ShowBackEnabled=false
&AUTHPARAMS
Sample Response
<ModifyNetworkingFlexCostAllocationPolicyResponse xmlns="http://ec2.amazonaws.com/doc/2016-11-15/">
<requestId>a1b2c3d4-5678-90ab-cdef-EXAMPLE44444</requestId>
<fcaPolicyId>fcap-1234567890abcdef0</fcaPolicyId>
<updatedAt>2026-11-02T09:00:00.000Z</updatedAt>
<version>2</version>
<versionExpectedEffectiveAt>2026-11-02T10:00:00.000Z</versionExpectedEffectiveAt>
</ModifyNetworkingFlexCostAllocationPolicyResponse>
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: