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 in the API Gateway Developer Guide.
Idawscc.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.

For more information, see AWS::ApiGatewayV2::VpcLink.

Methods

NameResourceAccessible byRequired Params
create_resourcevpc_linksINSERTSubnetIds, Name, region
delete_resourcevpc_linksDELETEIdentifier, region
update_resourcevpc_linksUPDATEIdentifier, PatchDocument, region
list_resourcesvpc_links_list_onlySELECTregion
get_resourcevpc_linksSELECTIdentifier, region

SELECT examples

Gets all properties from an individual vpc_link.

SELECT
region,
vpc_link_id,
subnet_ids,
security_group_ids,
tags,
name
FROM awscc.apigatewayv2.vpc_links
WHERE
region = '{{ region }}' AND
Identifier = '{{ vpc_link_id }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.apigatewayv2.vpc_links (
SubnetIds,
Name,
region
)
SELECT
'{{ subnet_ids }}',
'{{ name }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

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

/*+ update */
UPDATE awscc.apigatewayv2.vpc_links
SET PatchDocument = string('{{ {
"Tags": tags,
"Name": name
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ vpc_link_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.apigatewayv2.vpc_links
WHERE
Identifier = '{{ vpc_link_id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

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

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