Skip to main content

vpc_endpoints

Creates, updates, deletes or gets a vpc_endpoint resource or lists vpc_endpoints in a region

Overview

Namevpc_endpoints
TypeResource
DescriptionAmazon OpenSearchServerless vpc endpoint resource
Idaws.opensearchserverless.vpc_endpoints

Fields

NameDatatypeDescription
idstringThe identifier of the VPC Endpoint
namestringThe name of the VPC Endpoint
security_group_idsarrayThe ID of one or more security groups to associate with the endpoint network interface
subnet_idsarrayThe ID of one or more subnets in which to create an endpoint network interface
vpc_idstringThe ID of the VPC in which the endpoint will be used.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTName, VpcId, SubnetIds, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all vpc_endpoints in a region.

SELECT
region,
id,
name,
security_group_ids,
subnet_ids,
vpc_id
FROM aws.opensearchserverless.vpc_endpoints
WHERE region = 'us-east-1';

Gets all properties from an individual vpc_endpoint.

SELECT
region,
id,
name,
security_group_ids,
subnet_ids,
vpc_id
FROM aws.opensearchserverless.vpc_endpoints
WHERE region = 'us-east-1' AND data__Identifier = '<Id>';

INSERT example

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

/*+ create */
INSERT INTO aws.opensearchserverless.vpc_endpoints (
Name,
SubnetIds,
VpcId,
region
)
SELECT
'{{ Name }}',
'{{ SubnetIds }}',
'{{ VpcId }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.opensearchserverless.vpc_endpoints
WHERE data__Identifier = '<Id>'
AND region = 'us-east-1';

Permissions

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

Create

aoss:BatchGetVpcEndpoint,
aoss:CreateVpcEndpoint,
ec2:CreateVpcEndpoint,
ec2:DeleteVpcEndPoints,
ec2:DescribeVpcEndpoints,
ec2:ModifyVpcEndPoint,
ec2:DescribeVpcs,
ec2:DescribeSubnets,
ec2:DescribeSecurityGroups,
ec2:CreateTags,
route53:ChangeResourceRecordSets,
route53:GetChange,
route53:GetHostedZone,
route53:ListResourceRecordSets,
route53:ListHostedZonesByName,
route53:CreateHostedZone,
route53:ListHostedZonesByVPC,
route53:AssociateVPCWithHostedZone

Read

aoss:BatchGetVpcEndpoint,
ec2:DescribeVpcEndpoints

Update

aoss:BatchGetVpcEndpoint,
aoss:UpdateVpcEndpoint,
ec2:CreateVpcEndpoint,
ec2:DeleteVpcEndPoints,
ec2:DescribeVpcEndpoints,
ec2:ModifyVpcEndPoint,
ec2:DescribeVpcs,
ec2:DescribeSubnets,
ec2:DescribeSecurityGroups,
ec2:CreateTags,
route53:ChangeResourceRecordSets,
route53:GetChange,
route53:GetHostedZone,
route53:ListResourceRecordSets,
route53:ListHostedZonesByName,
route53:CreateHostedZone,
route53:ListHostedZonesByVPC,
route53:AssociateVPCWithHostedZone

Delete

aoss:BatchGetVpcEndpoint,
aoss:DeleteVpcEndpoint,
ec2:DeleteVpcEndPoints,
ec2:DescribeVpcEndpoints,
ec2:ModifyVpcEndPoint,
ec2:DescribeVpcs,
ec2:DescribeSubnets,
ec2:DescribeSecurityGroups,
ec2:CreateTags,
route53:ChangeResourceRecordSets,
route53:DeleteHostedZone,
route53:GetChange,
route53:GetHostedZone,
route53:ListResourceRecordSets,
route53:ListHostedZonesByName,
route53:ListHostedZonesByVPC,
route53:AssociateVPCWithHostedZone

List

aoss:ListVpcEndpoints,
ec2:DescribeVpcEndpoints