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 in the Amazon API Gateway REST API Reference. |
| Id | awscc.apigateway.vpc_links |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
name | string | |
description | string | |
tags | array | An array of arbitrary tags (key-value pairs) to associate with the VPC link. |
target_arns | array | |
vpc_link_id | string | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
vpc_link_id | string | |
region | string | AWS region. |
For more information, see AWS::ApiGateway::VpcLink.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | vpc_links | INSERT | Name, TargetArns, 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,
name,
description,
tags,
target_arns,
vpc_link_id
FROM awscc.apigateway.vpc_links
WHERE
region = '{{ region }}' AND
Identifier = '{{ vpc_link_id }}';
Lists all vpc_links in a region.
SELECT
region,
vpc_link_id
FROM awscc.apigateway.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.apigateway.vpc_links (
Name,
TargetArns,
region
)
SELECT
'{{ name }}',
'{{ target_arns }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.apigateway.vpc_links (
Name,
Description,
Tags,
TargetArns,
region
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ tags }}',
'{{ target_arns }}',
'{{ 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: name
value: '{{ name }}'
- name: description
value: '{{ description }}'
- name: tags
value:
- value: '{{ value }}'
key: '{{ key }}'
- name: target_arns
value:
- '{{ target_arns[0] }}'
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:
| 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
- List
- Delete
apigateway:POST,
apigateway:PUT,
apigateway:GET,
ec2:CreateVpcEndpointServiceConfiguration,
ec2:DeleteVpcEndpointServiceConfigurations,
ec2:DescribeVpcEndpointServiceConfigurations,
ec2:ModifyVpcEndpointServicePermissions
apigateway:PATCH,
apigateway:GET,
apigateway:PUT,
ec2:CreateVpcEndpointServiceConfiguration,
ec2:DeleteVpcEndpointServiceConfigurations,
ec2:DescribeVpcEndpointServiceConfigurations,
ec2:ModifyVpcEndpointServicePermissions
apigateway:GET,
ec2:CreateVpcEndpointServiceConfiguration,
ec2:DeleteVpcEndpointServiceConfigurations,
ec2:DescribeVpcEndpointServiceConfigurations,
ec2:ModifyVpcEndpointServicePermissions
apigateway:GET,
ec2:CreateVpcEndpointServiceConfiguration,
ec2:DeleteVpcEndpointServiceConfigurations,
ec2:DescribeVpcEndpointServiceConfigurations,
ec2:ModifyVpcEndpointServicePermissions
apigateway:GET,
apigateway:DELETE,
apigateway:PUT,
ec2:CreateVpcEndpointServiceConfiguration,
ec2:DeleteVpcEndpointServiceConfigurations,
ec2:DescribeVpcEndpointServiceConfigurations,
ec2:ModifyVpcEndpointServicePermissions