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::ApiGateway::VpcLink resource creates an API Gateway VPC link for a REST API to access resources in an Amazon Virtual Private Cloud (VPC). For more information, see [vpclink:create](https://docs.aws.amazon.com/apigateway/latest/api/API_CreateVpcLink.html) in the Amazon API Gateway REST API Reference.
Idaws.apigateway.vpc_links

Fields

NameDatatypeDescription
namestringThe name used to label and identify the VPC link.
descriptionstringThe description of the VPC link.
tagsarrayAn array of arbitrary tags (key-value pairs) to associate with the VPC link.
target_arnsarrayThe ARN of the network load balancer of the VPC targeted by the VPC link. The network load balancer must be owned by the same AWS-account of the API owner.
vpc_link_idstring
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTName, TargetArns, 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,
name,
description,
tags,
target_arns,
vpc_link_id
FROM aws.apigateway.vpc_links
WHERE region = 'us-east-1';

Gets all properties from an individual vpc_link.

SELECT
region,
name,
description,
tags,
target_arns,
vpc_link_id
FROM aws.apigateway.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.apigateway.vpc_links (
Name,
TargetArns,
region
)
SELECT
'{{ Name }}',
'{{ TargetArns }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.apigateway.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:PUT,
apigateway:GET,
ec2:CreateVpcEndpointServiceConfiguration,
ec2:DeleteVpcEndpointServiceConfigurations,
ec2:DescribeVpcEndpointServiceConfigurations,
ec2:ModifyVpcEndpointServicePermissions

Update

apigateway:PATCH,
apigateway:GET,
apigateway:PUT,
ec2:CreateVpcEndpointServiceConfiguration,
ec2:DeleteVpcEndpointServiceConfigurations,
ec2:DescribeVpcEndpointServiceConfigurations,
ec2:ModifyVpcEndpointServicePermissions

Read

apigateway:GET,
ec2:CreateVpcEndpointServiceConfiguration,
ec2:DeleteVpcEndpointServiceConfigurations,
ec2:DescribeVpcEndpointServiceConfigurations,
ec2:ModifyVpcEndpointServicePermissions

List

apigateway:GET,
ec2:CreateVpcEndpointServiceConfiguration,
ec2:DeleteVpcEndpointServiceConfigurations,
ec2:DescribeVpcEndpointServiceConfigurations,
ec2:ModifyVpcEndpointServicePermissions

Delete

apigateway:GET,
apigateway:DELETE,
apigateway:PUT,
ec2:CreateVpcEndpointServiceConfiguration,
ec2:DeleteVpcEndpointServiceConfigurations,
ec2:DescribeVpcEndpointServiceConfigurations,
ec2:ModifyVpcEndpointServicePermissions