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
Idawscc.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.

For more information, see AWS::OpenSearchServerless::VpcEndpoint.

Methods

NameResourceAccessible byRequired Params
create_resourcevpc_endpointsINSERTName, VpcId, SubnetIds, region
delete_resourcevpc_endpointsDELETEIdentifier, region
update_resourcevpc_endpointsUPDATEIdentifier, PatchDocument, region
list_resourcesvpc_endpoints_list_onlySELECTregion
get_resourcevpc_endpointsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual vpc_endpoint.

SELECT
region,
id,
name,
security_group_ids,
subnet_ids,
vpc_id
FROM awscc.opensearchserverless.vpc_endpoints
WHERE
region = '{{ region }}' AND
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 awscc.opensearchserverless.vpc_endpoints (
Name,
SubnetIds,
VpcId,
region
)
SELECT
'{{ name }}',
'{{ subnet_ids }}',
'{{ vpc_id }}',
'{{ 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_endpoint resource, using stack-deploy.

/*+ update */
UPDATE awscc.opensearchserverless.vpc_endpoints
SET PatchDocument = string('{{ {
"SecurityGroupIds": security_group_ids,
"SubnetIds": subnet_ids
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.opensearchserverless.vpc_endpoints
WHERE
Identifier = '{{ 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_endpoints resource, the following permissions are required:

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