vpc_links
Creates, updates, deletes or gets a vpc_link
resource or lists vpc_links
in a region
Overview
Name | vpc_links |
Type | Resource |
Description | The 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 . |
Id | aws.apigateway.vpc_links |
Fields
Name | Datatype | Description |
---|---|---|
name | string | The name used to label and identify the VPC link. |
description | string | The description of the VPC link. |
tags | array | An array of arbitrary tags (key-value pairs) to associate with the VPC link. |
target_arns | array | The 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_id | string | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, TargetArns, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.apigateway.vpc_links (
Name,
TargetArns,
region
)
SELECT
'{{ Name }}',
'{{ TargetArns }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.apigateway.vpc_links (
Name,
Description,
Tags,
TargetArns,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ Tags }}',
'{{ TargetArns }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: vpc_link
props:
- name: Name
value: '{{ Name }}'
- name: Description
value: '{{ Description }}'
- name: Tags
value:
- Value: '{{ Value }}'
Key: '{{ Key }}'
- name: TargetArns
value:
- '{{ TargetArns[0] }}'
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