Skip to main content

vpc_links

Creates, updates, deletes or gets a vpc_link resource or lists vpc_links in a region

Overview

Namevpc_links
TypeResource
DescriptionThe 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.aws.amazon.com/apigateway/latest/developerguide/http-api-vpc-links.html) in the *API Gateway Developer Guide*.
Idaws.apigatewayv2.vpc_links

Fields

NameDatatypeDescription
vpc_link_idstring
subnet_idsarrayA list of subnet IDs to include in the VPC link.
security_group_idsarrayA list of security group IDs for the VPC link.
tagsobjectThe collection of tags. Each tag element is associated with a given resource.
namestringThe name of the VPC link.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTSubnetIds, Name, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all vpc_links in a region.

SELECT
region,
vpc_link_id,
subnet_ids,
security_group_ids,
tags,
name
FROM aws.apigatewayv2.vpc_links
WHERE region = 'us-east-1';

Gets all properties from an individual vpc_link.

SELECT
region,
vpc_link_id,
subnet_ids,
security_group_ids,
tags,
name
FROM aws.apigatewayv2.vpc_links
WHERE region = 'us-east-1' AND data__Identifier = '<VpcLinkId>';

INSERT example

Use the following StackQL query and manifest file to create a new vpc_link resource, using stack-deploy.

/*+ create */
INSERT INTO aws.apigatewayv2.vpc_links (
SubnetIds,
Name,
region
)
SELECT
'{{ SubnetIds }}',
'{{ Name }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.apigatewayv2.vpc_links
WHERE data__Identifier = '<VpcLinkId>'
AND region = 'us-east-1';

Permissions

To operate on the vpc_links resource, the following permissions are required:

Create

apigateway:POST,
apigateway:GET,
apigateway:TagResource,
iam:CreateServiceLinkedRole,
iam:DeleteServiceLinkedRole,
iam:GetServiceLinkedRoleDeletionStatus

Update

apigateway:PATCH,
apigateway:GET,
apigateway:TagResource,
apigateway:unTagResource,
iam:CreateServiceLinkedRole,
iam:DeleteServiceLinkedRole,
iam:GetServiceLinkedRoleDeletionStatus

Read

apigateway:GET,
iam:CreateServiceLinkedRole,
iam:DeleteServiceLinkedRole,
iam:GetServiceLinkedRoleDeletionStatus

Delete

apigateway:GET,
apigateway:DELETE,
iam:CreateServiceLinkedRole,
iam:DeleteServiceLinkedRole,
iam:GetServiceLinkedRoleDeletionStatus

List

apigateway:GET,
iam:CreateServiceLinkedRole,
iam:DeleteServiceLinkedRole,
iam:GetServiceLinkedRoleDeletionStatus