View a markdown version of this page

AWS::EC2::FcaPolicyAssociation - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

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: String NetworkResourceId: String NetworkResourceScopeType: 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 NetworkResourceScopeType is 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's NetworkResourceType. When NetworkResourceScopeType is 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, NetworkResourceId is 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, NetworkResourceId is a direct network resource (for example, a NAT gateway or instance) and must match the policy's NetworkResourceType.

Required: No

Type: String

Allowed values: account | vpc | subnet

Update 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" } } }