

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::ApiGatewayV2::VpcLink
<a name="aws-resource-apigatewayv2-vpclink"></a>

The `AWS::ApiGatewayV2::VpcLink` resource creates a VPC link. Supported only for HTTP APIs. The VPC link status must transition from `PENDING` to `AVAILABLE` to successfully create a VPC link, which can take up to 10 minutes. To learn more, see [Working with VPC Links for HTTP APIs](https://docs.amazonaws.cn/apigateway/latest/developerguide/http-api-vpc-links.html) in the *API Gateway Developer Guide*. 

## Syntax
<a name="aws-resource-apigatewayv2-vpclink-syntax"></a>

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

### JSON
<a name="aws-resource-apigatewayv2-vpclink-syntax.json"></a>

```
{
  "Type" : "AWS::ApiGatewayV2::VpcLink",
  "Properties" : {
      "[Name](#cfn-apigatewayv2-vpclink-name)" : {{String}},
      "[SecurityGroupIds](#cfn-apigatewayv2-vpclink-securitygroupids)" : {{[ String, ... ]}},
      "[SubnetIds](#cfn-apigatewayv2-vpclink-subnetids)" : {{[ String, ... ]}},
      "[Tags](#cfn-apigatewayv2-vpclink-tags)" : {{{{{Key}}: {{Value}}, ...}}}
    }
}
```

### YAML
<a name="aws-resource-apigatewayv2-vpclink-syntax.yaml"></a>

```
Type: AWS::ApiGatewayV2::VpcLink
Properties:
  [Name](#cfn-apigatewayv2-vpclink-name): {{String}}
  [SecurityGroupIds](#cfn-apigatewayv2-vpclink-securitygroupids): {{
    - String}}
  [SubnetIds](#cfn-apigatewayv2-vpclink-subnetids): {{
    - String}}
  [Tags](#cfn-apigatewayv2-vpclink-tags): {{
    {{Key}}: {{Value}}}}
```

## Properties
<a name="aws-resource-apigatewayv2-vpclink-properties"></a>

`Name`  <a name="cfn-apigatewayv2-vpclink-name"></a>
The name of the VPC link.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SecurityGroupIds`  <a name="cfn-apigatewayv2-vpclink-securitygroupids"></a>
A list of security group IDs for the VPC link.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SubnetIds`  <a name="cfn-apigatewayv2-vpclink-subnetids"></a>
A list of subnet IDs to include in the VPC link.  
*Required*: Yes  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-apigatewayv2-vpclink-tags"></a>
The collection of tags. Each tag element is associated with a given resource.  
*Required*: No  
*Type*: Object of String  
*Pattern*: `.*`  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-apigatewayv2-vpclink-return-values"></a>

### Ref
<a name="aws-resource-apigatewayv2-vpclink-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the VPC link's ID, such as `abcde1`.

For more information about using the `Ref` function, see [https://docs.amazonaws.cn/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.amazonaws.cn/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

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

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 [https://docs.amazonaws.cn/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.amazonaws.cn/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-apigatewayv2-vpclink-return-values-fn--getatt-fn--getatt"></a>

`VpcLinkId`  <a name="VpcLinkId-fn::getatt"></a>
The VPC link ID.