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 in the API Gateway Developer Guide. |
| Id | awscc.apigatewayv2.vpc_links |
Fields
- get (all properties)
- list (identifiers only)
| 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. |
| Name | Datatype | Description |
|---|---|---|
vpc_link_id | string | |
region | string | AWS region. |
For more information, see AWS::ApiGatewayV2::VpcLink.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | vpc_links | INSERT | SubnetIds, Name, region |
delete_resource | vpc_links | DELETE | Identifier, region |
update_resource | vpc_links | UPDATE | Identifier, PatchDocument, region |
list_resources | vpc_links_list_only | SELECT | region |
get_resource | vpc_links | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 }}';
Lists all vpc_links in a region.
SELECT
region,
vpc_link_id
FROM awscc.apigatewayv2.vpc_links_list_only
WHERE
region = '{{ region }}';
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 awscc.apigatewayv2.vpc_links (
SubnetIds,
Name,
region
)
SELECT
'{{ subnet_ids }}',
'{{ name }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.apigatewayv2.vpc_links (
SubnetIds,
SecurityGroupIds,
Tags,
Name,
region
)
SELECT
'{{ subnet_ids }}',
'{{ security_group_ids }}',
'{{ tags }}',
'{{ name }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: vpc_link
props:
- name: subnet_ids
value:
- '{{ subnet_ids[0] }}'
- name: security_group_ids
value:
- '{{ security_group_ids[0] }}'
- name: tags
value: {}
- name: name
value: '{{ name }}'
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:
| Parameter | Description |
|---|---|
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:
- Create
- Update
- Read
- Delete
- List
apigateway:POST,
apigateway:GET,
apigateway:TagResource,
iam:CreateServiceLinkedRole,
iam:DeleteServiceLinkedRole,
iam:GetServiceLinkedRoleDeletionStatus
apigateway:PATCH,
apigateway:GET,
apigateway:TagResource,
apigateway:unTagResource,
iam:CreateServiceLinkedRole,
iam:DeleteServiceLinkedRole,
iam:GetServiceLinkedRoleDeletionStatus
apigateway:GET,
iam:CreateServiceLinkedRole,
iam:DeleteServiceLinkedRole,
iam:GetServiceLinkedRoleDeletionStatus
apigateway:GET,
apigateway:DELETE,
iam:CreateServiceLinkedRole,
iam:DeleteServiceLinkedRole,
iam:GetServiceLinkedRoleDeletionStatus
apigateway:GET,
iam:CreateServiceLinkedRole,
iam:DeleteServiceLinkedRole,
iam:GetServiceLinkedRoleDeletionStatus