1. Packages
  2. AWS
  3. API Docs
  4. opensearch
  5. ServerlessVpcEndpoint
AWS v6.78.0 published on Thursday, Apr 24, 2025 by Pulumi

aws.opensearch.ServerlessVpcEndpoint

Explore with Pulumi AI

Resource for managing an AWS OpenSearchServerless VPC Endpoint.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.opensearch.ServerlessVpcEndpoint("example", {
    name: "myendpoint",
    subnetIds: [exampleAwsSubnet.id],
    vpcId: exampleAwsVpc.id,
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.opensearch.ServerlessVpcEndpoint("example",
    name="myendpoint",
    subnet_ids=[example_aws_subnet["id"]],
    vpc_id=example_aws_vpc["id"])
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opensearch"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := opensearch.NewServerlessVpcEndpoint(ctx, "example", &opensearch.ServerlessVpcEndpointArgs{
			Name: pulumi.String("myendpoint"),
			SubnetIds: pulumi.StringArray{
				exampleAwsSubnet.Id,
			},
			VpcId: pulumi.Any(exampleAwsVpc.Id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.OpenSearch.ServerlessVpcEndpoint("example", new()
    {
        Name = "myendpoint",
        SubnetIds = new[]
        {
            exampleAwsSubnet.Id,
        },
        VpcId = exampleAwsVpc.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.opensearch.ServerlessVpcEndpoint;
import com.pulumi.aws.opensearch.ServerlessVpcEndpointArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new ServerlessVpcEndpoint("example", ServerlessVpcEndpointArgs.builder()
            .name("myendpoint")
            .subnetIds(exampleAwsSubnet.id())
            .vpcId(exampleAwsVpc.id())
            .build());

    }
}
Copy
resources:
  example:
    type: aws:opensearch:ServerlessVpcEndpoint
    properties:
      name: myendpoint
      subnetIds:
        - ${exampleAwsSubnet.id}
      vpcId: ${exampleAwsVpc.id}
Copy

Create ServerlessVpcEndpoint Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ServerlessVpcEndpoint(name: string, args: ServerlessVpcEndpointArgs, opts?: CustomResourceOptions);
@overload
def ServerlessVpcEndpoint(resource_name: str,
                          args: ServerlessVpcEndpointArgs,
                          opts: Optional[ResourceOptions] = None)

@overload
def ServerlessVpcEndpoint(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          subnet_ids: Optional[Sequence[str]] = None,
                          vpc_id: Optional[str] = None,
                          name: Optional[str] = None,
                          security_group_ids: Optional[Sequence[str]] = None,
                          timeouts: Optional[ServerlessVpcEndpointTimeoutsArgs] = None)
func NewServerlessVpcEndpoint(ctx *Context, name string, args ServerlessVpcEndpointArgs, opts ...ResourceOption) (*ServerlessVpcEndpoint, error)
public ServerlessVpcEndpoint(string name, ServerlessVpcEndpointArgs args, CustomResourceOptions? opts = null)
public ServerlessVpcEndpoint(String name, ServerlessVpcEndpointArgs args)
public ServerlessVpcEndpoint(String name, ServerlessVpcEndpointArgs args, CustomResourceOptions options)
type: aws:opensearch:ServerlessVpcEndpoint
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ServerlessVpcEndpointArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ServerlessVpcEndpointArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ServerlessVpcEndpointArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ServerlessVpcEndpointArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ServerlessVpcEndpointArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var serverlessVpcEndpointResource = new Aws.OpenSearch.ServerlessVpcEndpoint("serverlessVpcEndpointResource", new()
{
    SubnetIds = new[]
    {
        "string",
    },
    VpcId = "string",
    Name = "string",
    SecurityGroupIds = new[]
    {
        "string",
    },
    Timeouts = new Aws.OpenSearch.Inputs.ServerlessVpcEndpointTimeoutsArgs
    {
        Create = "string",
        Delete = "string",
        Update = "string",
    },
});
Copy
example, err := opensearch.NewServerlessVpcEndpoint(ctx, "serverlessVpcEndpointResource", &opensearch.ServerlessVpcEndpointArgs{
	SubnetIds: pulumi.StringArray{
		pulumi.String("string"),
	},
	VpcId: pulumi.String("string"),
	Name:  pulumi.String("string"),
	SecurityGroupIds: pulumi.StringArray{
		pulumi.String("string"),
	},
	Timeouts: &opensearch.ServerlessVpcEndpointTimeoutsArgs{
		Create: pulumi.String("string"),
		Delete: pulumi.String("string"),
		Update: pulumi.String("string"),
	},
})
Copy
var serverlessVpcEndpointResource = new ServerlessVpcEndpoint("serverlessVpcEndpointResource", ServerlessVpcEndpointArgs.builder()
    .subnetIds("string")
    .vpcId("string")
    .name("string")
    .securityGroupIds("string")
    .timeouts(ServerlessVpcEndpointTimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .update("string")
        .build())
    .build());
Copy
serverless_vpc_endpoint_resource = aws.opensearch.ServerlessVpcEndpoint("serverlessVpcEndpointResource",
    subnet_ids=["string"],
    vpc_id="string",
    name="string",
    security_group_ids=["string"],
    timeouts={
        "create": "string",
        "delete": "string",
        "update": "string",
    })
Copy
const serverlessVpcEndpointResource = new aws.opensearch.ServerlessVpcEndpoint("serverlessVpcEndpointResource", {
    subnetIds: ["string"],
    vpcId: "string",
    name: "string",
    securityGroupIds: ["string"],
    timeouts: {
        create: "string",
        "delete": "string",
        update: "string",
    },
});
Copy
type: aws:opensearch:ServerlessVpcEndpoint
properties:
    name: string
    securityGroupIds:
        - string
    subnetIds:
        - string
    timeouts:
        create: string
        delete: string
        update: string
    vpcId: string
Copy

ServerlessVpcEndpoint Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ServerlessVpcEndpoint resource accepts the following input properties:

SubnetIds This property is required. List<string>
One or more subnet IDs from which you'll access OpenSearch Serverless. Up to 6 subnets can be provided.
VpcId This property is required. string

ID of the VPC from which you'll access OpenSearch Serverless.

The following arguments are optional:

Name string
Name of the interface endpoint.
SecurityGroupIds List<string>
One or more security groups that define the ports, protocols, and sources for inbound traffic that you are authorizing into your endpoint. Up to 5 security groups can be provided.
Timeouts ServerlessVpcEndpointTimeouts
SubnetIds This property is required. []string
One or more subnet IDs from which you'll access OpenSearch Serverless. Up to 6 subnets can be provided.
VpcId This property is required. string

ID of the VPC from which you'll access OpenSearch Serverless.

The following arguments are optional:

Name string
Name of the interface endpoint.
SecurityGroupIds []string
One or more security groups that define the ports, protocols, and sources for inbound traffic that you are authorizing into your endpoint. Up to 5 security groups can be provided.
Timeouts ServerlessVpcEndpointTimeoutsArgs
subnetIds This property is required. List<String>
One or more subnet IDs from which you'll access OpenSearch Serverless. Up to 6 subnets can be provided.
vpcId This property is required. String

ID of the VPC from which you'll access OpenSearch Serverless.

The following arguments are optional:

name String
Name of the interface endpoint.
securityGroupIds List<String>
One or more security groups that define the ports, protocols, and sources for inbound traffic that you are authorizing into your endpoint. Up to 5 security groups can be provided.
timeouts ServerlessVpcEndpointTimeouts
subnetIds This property is required. string[]
One or more subnet IDs from which you'll access OpenSearch Serverless. Up to 6 subnets can be provided.
vpcId This property is required. string

ID of the VPC from which you'll access OpenSearch Serverless.

The following arguments are optional:

name string
Name of the interface endpoint.
securityGroupIds string[]
One or more security groups that define the ports, protocols, and sources for inbound traffic that you are authorizing into your endpoint. Up to 5 security groups can be provided.
timeouts ServerlessVpcEndpointTimeouts
subnet_ids This property is required. Sequence[str]
One or more subnet IDs from which you'll access OpenSearch Serverless. Up to 6 subnets can be provided.
vpc_id This property is required. str

ID of the VPC from which you'll access OpenSearch Serverless.

The following arguments are optional:

name str
Name of the interface endpoint.
security_group_ids Sequence[str]
One or more security groups that define the ports, protocols, and sources for inbound traffic that you are authorizing into your endpoint. Up to 5 security groups can be provided.
timeouts ServerlessVpcEndpointTimeoutsArgs
subnetIds This property is required. List<String>
One or more subnet IDs from which you'll access OpenSearch Serverless. Up to 6 subnets can be provided.
vpcId This property is required. String

ID of the VPC from which you'll access OpenSearch Serverless.

The following arguments are optional:

name String
Name of the interface endpoint.
securityGroupIds List<String>
One or more security groups that define the ports, protocols, and sources for inbound traffic that you are authorizing into your endpoint. Up to 5 security groups can be provided.
timeouts Property Map

Outputs

All input properties are implicitly available as output properties. Additionally, the ServerlessVpcEndpoint resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing ServerlessVpcEndpoint Resource

Get an existing ServerlessVpcEndpoint resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ServerlessVpcEndpointState, opts?: CustomResourceOptions): ServerlessVpcEndpoint
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        name: Optional[str] = None,
        security_group_ids: Optional[Sequence[str]] = None,
        subnet_ids: Optional[Sequence[str]] = None,
        timeouts: Optional[ServerlessVpcEndpointTimeoutsArgs] = None,
        vpc_id: Optional[str] = None) -> ServerlessVpcEndpoint
func GetServerlessVpcEndpoint(ctx *Context, name string, id IDInput, state *ServerlessVpcEndpointState, opts ...ResourceOption) (*ServerlessVpcEndpoint, error)
public static ServerlessVpcEndpoint Get(string name, Input<string> id, ServerlessVpcEndpointState? state, CustomResourceOptions? opts = null)
public static ServerlessVpcEndpoint get(String name, Output<String> id, ServerlessVpcEndpointState state, CustomResourceOptions options)
resources:  _:    type: aws:opensearch:ServerlessVpcEndpoint    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Name string
Name of the interface endpoint.
SecurityGroupIds List<string>
One or more security groups that define the ports, protocols, and sources for inbound traffic that you are authorizing into your endpoint. Up to 5 security groups can be provided.
SubnetIds List<string>
One or more subnet IDs from which you'll access OpenSearch Serverless. Up to 6 subnets can be provided.
Timeouts ServerlessVpcEndpointTimeouts
VpcId string

ID of the VPC from which you'll access OpenSearch Serverless.

The following arguments are optional:

Name string
Name of the interface endpoint.
SecurityGroupIds []string
One or more security groups that define the ports, protocols, and sources for inbound traffic that you are authorizing into your endpoint. Up to 5 security groups can be provided.
SubnetIds []string
One or more subnet IDs from which you'll access OpenSearch Serverless. Up to 6 subnets can be provided.
Timeouts ServerlessVpcEndpointTimeoutsArgs
VpcId string

ID of the VPC from which you'll access OpenSearch Serverless.

The following arguments are optional:

name String
Name of the interface endpoint.
securityGroupIds List<String>
One or more security groups that define the ports, protocols, and sources for inbound traffic that you are authorizing into your endpoint. Up to 5 security groups can be provided.
subnetIds List<String>
One or more subnet IDs from which you'll access OpenSearch Serverless. Up to 6 subnets can be provided.
timeouts ServerlessVpcEndpointTimeouts
vpcId String

ID of the VPC from which you'll access OpenSearch Serverless.

The following arguments are optional:

name string
Name of the interface endpoint.
securityGroupIds string[]
One or more security groups that define the ports, protocols, and sources for inbound traffic that you are authorizing into your endpoint. Up to 5 security groups can be provided.
subnetIds string[]
One or more subnet IDs from which you'll access OpenSearch Serverless. Up to 6 subnets can be provided.
timeouts ServerlessVpcEndpointTimeouts
vpcId string

ID of the VPC from which you'll access OpenSearch Serverless.

The following arguments are optional:

name str
Name of the interface endpoint.
security_group_ids Sequence[str]
One or more security groups that define the ports, protocols, and sources for inbound traffic that you are authorizing into your endpoint. Up to 5 security groups can be provided.
subnet_ids Sequence[str]
One or more subnet IDs from which you'll access OpenSearch Serverless. Up to 6 subnets can be provided.
timeouts ServerlessVpcEndpointTimeoutsArgs
vpc_id str

ID of the VPC from which you'll access OpenSearch Serverless.

The following arguments are optional:

name String
Name of the interface endpoint.
securityGroupIds List<String>
One or more security groups that define the ports, protocols, and sources for inbound traffic that you are authorizing into your endpoint. Up to 5 security groups can be provided.
subnetIds List<String>
One or more subnet IDs from which you'll access OpenSearch Serverless. Up to 6 subnets can be provided.
timeouts Property Map
vpcId String

ID of the VPC from which you'll access OpenSearch Serverless.

The following arguments are optional:

Supporting Types

ServerlessVpcEndpointTimeouts
, ServerlessVpcEndpointTimeoutsArgs

Create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
Update string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
Update string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
update String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
update string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
update str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
update String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

Import

Using pulumi import, import OpenSearchServerless Vpc Endpointa using the id. For example:

$ pulumi import aws:opensearch/serverlessVpcEndpoint:ServerlessVpcEndpoint example vpce-8012925589
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.