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](https://docs.aws.amazon.com/apigateway/latest/api/API_CreateVpcLink.html) 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 = 'us-east-1' 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 = 'us-east-1';
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 }}';
/*+ create */
INSERT INTO awscc.apigateway.vpc_links (
Name,
Description,
Tags,
TargetArns,
region
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ tags }}',
'{{ target_arns }}',
'{{ region }}';
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 }}';
DELETE example
/*+ delete */
DELETE FROM awscc.apigateway.vpc_links
WHERE
Identifier = '{{ vpc_link_id }}' AND
region = 'us-east-1';
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