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 in the Amazon API Gateway REST API Reference.
Idawscc.apigateway.vpc_links

Fields

NameDatatypeDescription
namestring
descriptionstring
tagsarrayAn array of arbitrary tags (key-value pairs) to associate with the VPC link.
target_arnsarray
vpc_link_idstring
regionstringAWS region.

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

Methods

NameResourceAccessible byRequired Params
create_resourcevpc_linksINSERTName, TargetArns, 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,
name,
description,
tags,
target_arns,
vpc_link_id
FROM awscc.apigateway.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.apigateway.vpc_links (
Name,
TargetArns,
region
)
SELECT
'{{ name }}',
'{{ target_arns }}',
'{{ 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.apigateway.vpc_links
SET PatchDocument = string('{{ {
"Name": name,
"Description": description,
"Tags": tags
} | 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.apigateway.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:PUT,
apigateway:GET,
ec2:CreateVpcEndpointServiceConfiguration,
ec2:DeleteVpcEndpointServiceConfigurations,
ec2:DescribeVpcEndpointServiceConfigurations,
ec2:ModifyVpcEndpointServicePermissions