

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](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::EC2::TransitGatewayNetworkFunctionAttachment
<a name="aws-resource-ec2-transitgatewaynetworkfunctionattachment"></a>

Contains information about a transit gateway network function attachment, including the attachment ID, the transit gateway, the endpoint service, the Availability Zones, and the state of the attachment.

## Syntax
<a name="aws-resource-ec2-transitgatewaynetworkfunctionattachment-syntax"></a>

To declare this entity in your Amazon CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-ec2-transitgatewaynetworkfunctionattachment-syntax.json"></a>

```
{
  "Type" : "AWS::EC2::TransitGatewayNetworkFunctionAttachment",
  "Properties" : {
      "[AvailabilityZoneIds](#cfn-ec2-transitgatewaynetworkfunctionattachment-availabilityzoneids)" : {{[ String, ... ]}},
      "[AvailabilityZones](#cfn-ec2-transitgatewaynetworkfunctionattachment-availabilityzones)" : {{[ String, ... ]}},
      "[ServiceName](#cfn-ec2-transitgatewaynetworkfunctionattachment-servicename)" : {{String}},
      "[Tags](#cfn-ec2-transitgatewaynetworkfunctionattachment-tags)" : {{[ Tag, ... ]}},
      "[TransitGatewayId](#cfn-ec2-transitgatewaynetworkfunctionattachment-transitgatewayid)" : {{String}}
    }
}
```

### YAML
<a name="aws-resource-ec2-transitgatewaynetworkfunctionattachment-syntax.yaml"></a>

```
Type: AWS::EC2::TransitGatewayNetworkFunctionAttachment
Properties:
  [AvailabilityZoneIds](#cfn-ec2-transitgatewaynetworkfunctionattachment-availabilityzoneids): {{
    - String}}
  [AvailabilityZones](#cfn-ec2-transitgatewaynetworkfunctionattachment-availabilityzones): {{
    - String}}
  [ServiceName](#cfn-ec2-transitgatewaynetworkfunctionattachment-servicename): {{String}}
  [Tags](#cfn-ec2-transitgatewaynetworkfunctionattachment-tags): {{
    - Tag}}
  [TransitGatewayId](#cfn-ec2-transitgatewaynetworkfunctionattachment-transitgatewayid): {{String}}
```

## Properties
<a name="aws-resource-ec2-transitgatewaynetworkfunctionattachment-properties"></a>

`AvailabilityZoneIds`  <a name="cfn-ec2-transitgatewaynetworkfunctionattachment-availabilityzoneids"></a>
The IDs of the Availability Zones for the attachment.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AvailabilityZones`  <a name="cfn-ec2-transitgatewaynetworkfunctionattachment-availabilityzones"></a>
The names of the Availability Zones for the attachment.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ServiceName`  <a name="cfn-ec2-transitgatewaynetworkfunctionattachment-servicename"></a>
Property description not available.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-ec2-transitgatewaynetworkfunctionattachment-tags"></a>
The tags for the attachment.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-ec2-transitgatewaynetworkfunctionattachment-tag.md)  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TransitGatewayId`  <a name="cfn-ec2-transitgatewaynetworkfunctionattachment-transitgatewayid"></a>
The ID of the transit gateway.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-ec2-transitgatewaynetworkfunctionattachment-return-values"></a>

### Ref
<a name="aws-resource-ec2-transitgatewaynetworkfunctionattachment-return-values-ref"></a>

### Fn::GetAtt
<a name="aws-resource-ec2-transitgatewaynetworkfunctionattachment-return-values-fn--getatt"></a>

#### 
<a name="aws-resource-ec2-transitgatewaynetworkfunctionattachment-return-values-fn--getatt-fn--getatt"></a>

`CreationTime`  <a name="CreationTime-fn::getatt"></a>
The date and time the attachment was created.

`ResourceId`  <a name="ResourceId-fn::getatt"></a>
The name of the Gateway Load Balancer endpoint service.

`State`  <a name="State-fn::getatt"></a>
The state of the attachment.

`TransitGatewayAttachmentId`  <a name="TransitGatewayAttachmentId-fn::getatt"></a>
The ID of the attachment.