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::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*. |
Id | aws.apigatewayv2.vpc_links |
Fields
Name | Datatype | Description |
---|---|---|
vpc_link_id | string | |
subnet_ids | array | A list of subnet IDs to include in the VPC link. |
security_group_ids | array | A list of security group IDs for the VPC link. |
tags | object | The collection of tags. Each tag element is associated with a given resource. |
name | string | The name of the VPC link. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | SubnetIds, Name, 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,
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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.apigatewayv2.vpc_links (
SubnetIds,
Name,
region
)
SELECT
'{{ SubnetIds }}',
'{{ Name }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.apigatewayv2.vpc_links (
SubnetIds,
SecurityGroupIds,
Tags,
Name,
region
)
SELECT
'{{ SubnetIds }}',
'{{ SecurityGroupIds }}',
'{{ Tags }}',
'{{ Name }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: vpc_link
props:
- name: SubnetIds
value:
- '{{ SubnetIds[0] }}'
- name: SecurityGroupIds
value:
- '{{ SecurityGroupIds[0] }}'
- name: Tags
value: {}
- name: Name
value: '{{ Name }}'
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