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::FcaPolicyAssociation
Associates a Flex Cost Allocation (FCA) policy with a network resource such as a NAT gateway, EC2 instance, or VPC peering connection.
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::EC2::FcaPolicyAssociation", "Properties" : { "FcaPolicyId" :String, "NetworkResourceId" :String, "NetworkResourceScopeType" :String} }
YAML
Type: AWS::EC2::FcaPolicyAssociation Properties: FcaPolicyId:StringNetworkResourceId:StringNetworkResourceScopeType:String
Properties
FcaPolicyId-
The ID of the FCA policy to associate, such as
fcap-1234567890abcdef0.Required: Yes
Type: String
Pattern:
^fcap-[a-f0-9]{17}$Update requires: Replacement
NetworkResourceId-
The ID of the network resource to associate the FCA policy with.
When
NetworkResourceScopeTypeis omitted, this is the ID of a specific network resource, for example a NAT gateway or an instance, and its type must match the policy'sNetworkResourceType. WhenNetworkResourceScopeTypeis set, this is the ID of the scope, for example an account, VPC, or subnet.Required: Yes
Type: String
Update requires: Replacement
NetworkResourceScopeType-
Associate by scope instead of directly. When set,
NetworkResourceIdis the ID of the scope (an account ID, a VPC ID, or a subnet ID) and the association covers every eligible network resource in that scope. When omitted,NetworkResourceIdis a direct network resource (for example, a NAT gateway or instance) and must match the policy'sNetworkResourceType.Required: No
Type: String
Allowed values:
account | vpc | subnetUpdate requires: Replacement
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the ID of the FCA policy association.
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.
AssociatedAt-
The timestamp when the association was created.
AssociationMode-
The mode of the association.
ExpectedEffectiveAt-
The timestamp when the association is expected to take effect.
FcaPolicyAssociationId-
The ID of the FCA policy association, such as
fcapassoc-1234567890abcdef0. ManagedBy-
Indicates who manages the association: the account that created it, or a declarative policy.
OwnerAccount-
The ID of the Amazon Web Services account that owns the FCA policy association.
Examples
Associate an FCA policy with a NAT gateway
The following example associates an FCA policy with a NAT gateway.
YAML
MyFcaPolicyAssociation: Type: AWS::EC2::FcaPolicyAssociation Properties: FcaPolicyId: fcap-1234567890abcdef0 NetworkResourceId: nat-1234567890abcdef0
JSON
{ "MyFcaPolicyAssociation": { "Type": "AWS::EC2::FcaPolicyAssociation", "Properties": { "FcaPolicyId": "fcap-1234567890abcdef0", "NetworkResourceId": "nat-1234567890abcdef0" } } }