1. Packages
  2. AWS
  3. API Docs
  4. opensearch
  5. ServerlessCollection
Viewing docs for AWS v7.26.0
published on Thursday, Apr 16, 2026 by Pulumi
aws logo
Viewing docs for AWS v7.26.0
published on Thursday, Apr 16, 2026 by Pulumi

    Resource for managing an AWS OpenSearch Serverless Collection.

    NOTE: An aws.opensearch.ServerlessCollection must have encryption configured either by an applicable encryption security policy or by setting encryptionConfig directly on the resource.

    NOTE: An aws.opensearch.ServerlessCollection is not accessible without configuring an applicable network security policy. Data cannot be accessed without configuring an applicable data access policy.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.opensearch.ServerlessSecurityPolicy("example", {
        name: "example",
        type: "encryption",
        policy: JSON.stringify({
            Rules: [{
                Resource: ["collection/example"],
                ResourceType: "collection",
            }],
            AWSOwnedKey: true,
        }),
    });
    const exampleServerlessCollection = new aws.opensearch.ServerlessCollection("example", {name: "example"}, {
        dependsOn: [example],
    });
    
    import pulumi
    import json
    import pulumi_aws as aws
    
    example = aws.opensearch.ServerlessSecurityPolicy("example",
        name="example",
        type="encryption",
        policy=json.dumps({
            "Rules": [{
                "Resource": ["collection/example"],
                "ResourceType": "collection",
            }],
            "AWSOwnedKey": True,
        }))
    example_serverless_collection = aws.opensearch.ServerlessCollection("example", name="example",
    opts = pulumi.ResourceOptions(depends_on=[example]))
    
    package main
    
    import (
    	"encoding/json"
    
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/opensearch"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		tmpJSON0, err := json.Marshal(map[string]interface{}{
    			"Rules": []map[string]interface{}{
    				map[string]interface{}{
    					"Resource": []string{
    						"collection/example",
    					},
    					"ResourceType": "collection",
    				},
    			},
    			"AWSOwnedKey": true,
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		example, err := opensearch.NewServerlessSecurityPolicy(ctx, "example", &opensearch.ServerlessSecurityPolicyArgs{
    			Name:   pulumi.String("example"),
    			Type:   pulumi.String("encryption"),
    			Policy: pulumi.String(pulumi.String(json0)),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = opensearch.NewServerlessCollection(ctx, "example", &opensearch.ServerlessCollectionArgs{
    			Name: pulumi.String("example"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			example,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.OpenSearch.ServerlessSecurityPolicy("example", new()
        {
            Name = "example",
            Type = "encryption",
            Policy = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["Rules"] = new[]
                {
                    new Dictionary<string, object?>
                    {
                        ["Resource"] = new[]
                        {
                            "collection/example",
                        },
                        ["ResourceType"] = "collection",
                    },
                },
                ["AWSOwnedKey"] = true,
            }),
        });
    
        var exampleServerlessCollection = new Aws.OpenSearch.ServerlessCollection("example", new()
        {
            Name = "example",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                example,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.opensearch.ServerlessSecurityPolicy;
    import com.pulumi.aws.opensearch.ServerlessSecurityPolicyArgs;
    import com.pulumi.aws.opensearch.ServerlessCollection;
    import com.pulumi.aws.opensearch.ServerlessCollectionArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    import com.pulumi.resources.CustomResourceOptions;
    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 ServerlessSecurityPolicy("example", ServerlessSecurityPolicyArgs.builder()
                .name("example")
                .type("encryption")
                .policy(serializeJson(
                    jsonObject(
                        jsonProperty("Rules", jsonArray(jsonObject(
                            jsonProperty("Resource", jsonArray("collection/example")),
                            jsonProperty("ResourceType", "collection")
                        ))),
                        jsonProperty("AWSOwnedKey", true)
                    )))
                .build());
    
            var exampleServerlessCollection = new ServerlessCollection("exampleServerlessCollection", ServerlessCollectionArgs.builder()
                .name("example")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(example)
                    .build());
    
        }
    }
    
    resources:
      example:
        type: aws:opensearch:ServerlessSecurityPolicy
        properties:
          name: example
          type: encryption
          policy:
            fn::toJSON:
              Rules:
                - Resource:
                    - collection/example
                  ResourceType: collection
              AWSOwnedKey: true
      exampleServerlessCollection:
        type: aws:opensearch:ServerlessCollection
        name: example
        properties:
          name: example
        options:
          dependsOn:
            - ${example}
    

    With a Collection Group and Direct Encryption Configuration

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.kms.Key("example", {
        description: "example",
        deletionWindowInDays: 7,
    });
    const exampleServerlessCollectionGroup = new aws.opensearch.ServerlessCollectionGroup("example", {
        name: "example-group",
        standbyReplicas: "ENABLED",
    });
    const exampleServerlessCollection = new aws.opensearch.ServerlessCollection("example", {
        name: "example",
        type: "SEARCH",
        collectionGroupName: exampleServerlessCollectionGroup.name,
        encryptionConfigs: [{
            kmsKeyArn: example.arn,
        }],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.kms.Key("example",
        description="example",
        deletion_window_in_days=7)
    example_serverless_collection_group = aws.opensearch.ServerlessCollectionGroup("example",
        name="example-group",
        standby_replicas="ENABLED")
    example_serverless_collection = aws.opensearch.ServerlessCollection("example",
        name="example",
        type="SEARCH",
        collection_group_name=example_serverless_collection_group.name,
        encryption_configs=[{
            "kms_key_arn": example.arn,
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/kms"
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/opensearch"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := kms.NewKey(ctx, "example", &kms.KeyArgs{
    			Description:          pulumi.String("example"),
    			DeletionWindowInDays: pulumi.Int(7),
    		})
    		if err != nil {
    			return err
    		}
    		exampleServerlessCollectionGroup, err := opensearch.NewServerlessCollectionGroup(ctx, "example", &opensearch.ServerlessCollectionGroupArgs{
    			Name:            pulumi.String("example-group"),
    			StandbyReplicas: pulumi.String("ENABLED"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = opensearch.NewServerlessCollection(ctx, "example", &opensearch.ServerlessCollectionArgs{
    			Name:                pulumi.String("example"),
    			Type:                pulumi.String("SEARCH"),
    			CollectionGroupName: exampleServerlessCollectionGroup.Name,
    			EncryptionConfigs: opensearch.ServerlessCollectionEncryptionConfigArray{
    				&opensearch.ServerlessCollectionEncryptionConfigArgs{
    					KmsKeyArn: example.Arn,
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Kms.Key("example", new()
        {
            Description = "example",
            DeletionWindowInDays = 7,
        });
    
        var exampleServerlessCollectionGroup = new Aws.OpenSearch.ServerlessCollectionGroup("example", new()
        {
            Name = "example-group",
            StandbyReplicas = "ENABLED",
        });
    
        var exampleServerlessCollection = new Aws.OpenSearch.ServerlessCollection("example", new()
        {
            Name = "example",
            Type = "SEARCH",
            CollectionGroupName = exampleServerlessCollectionGroup.Name,
            EncryptionConfigs = new[]
            {
                new Aws.OpenSearch.Inputs.ServerlessCollectionEncryptionConfigArgs
                {
                    KmsKeyArn = example.Arn,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.kms.Key;
    import com.pulumi.aws.kms.KeyArgs;
    import com.pulumi.aws.opensearch.ServerlessCollectionGroup;
    import com.pulumi.aws.opensearch.ServerlessCollectionGroupArgs;
    import com.pulumi.aws.opensearch.ServerlessCollection;
    import com.pulumi.aws.opensearch.ServerlessCollectionArgs;
    import com.pulumi.aws.opensearch.inputs.ServerlessCollectionEncryptionConfigArgs;
    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 Key("example", KeyArgs.builder()
                .description("example")
                .deletionWindowInDays(7)
                .build());
    
            var exampleServerlessCollectionGroup = new ServerlessCollectionGroup("exampleServerlessCollectionGroup", ServerlessCollectionGroupArgs.builder()
                .name("example-group")
                .standbyReplicas("ENABLED")
                .build());
    
            var exampleServerlessCollection = new ServerlessCollection("exampleServerlessCollection", ServerlessCollectionArgs.builder()
                .name("example")
                .type("SEARCH")
                .collectionGroupName(exampleServerlessCollectionGroup.name())
                .encryptionConfigs(ServerlessCollectionEncryptionConfigArgs.builder()
                    .kmsKeyArn(example.arn())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:kms:Key
        properties:
          description: example
          deletionWindowInDays: 7
      exampleServerlessCollectionGroup:
        type: aws:opensearch:ServerlessCollectionGroup
        name: example
        properties:
          name: example-group
          standbyReplicas: ENABLED
      exampleServerlessCollection:
        type: aws:opensearch:ServerlessCollection
        name: example
        properties:
          name: example
          type: SEARCH
          collectionGroupName: ${exampleServerlessCollectionGroup.name}
          encryptionConfigs:
            - kmsKeyArn: ${example.arn}
    

    Create ServerlessCollection Resource

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

    Constructor syntax

    new ServerlessCollection(name: string, args?: ServerlessCollectionArgs, opts?: CustomResourceOptions);
    @overload
    def ServerlessCollection(resource_name: str,
                             args: Optional[ServerlessCollectionArgs] = None,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServerlessCollection(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             collection_group_name: Optional[str] = None,
                             description: Optional[str] = None,
                             encryption_configs: Optional[Sequence[ServerlessCollectionEncryptionConfigArgs]] = None,
                             name: Optional[str] = None,
                             region: Optional[str] = None,
                             standby_replicas: Optional[str] = None,
                             tags: Optional[Mapping[str, str]] = None,
                             timeouts: Optional[ServerlessCollectionTimeoutsArgs] = None,
                             type: Optional[str] = None)
    func NewServerlessCollection(ctx *Context, name string, args *ServerlessCollectionArgs, opts ...ResourceOption) (*ServerlessCollection, error)
    public ServerlessCollection(string name, ServerlessCollectionArgs? args = null, CustomResourceOptions? opts = null)
    public ServerlessCollection(String name, ServerlessCollectionArgs args)
    public ServerlessCollection(String name, ServerlessCollectionArgs args, CustomResourceOptions options)
    
    type: aws:opensearch:ServerlessCollection
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ServerlessCollectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ServerlessCollectionArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ServerlessCollectionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServerlessCollectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServerlessCollectionArgs
    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 serverlessCollectionResource = new Aws.OpenSearch.ServerlessCollection("serverlessCollectionResource", new()
    {
        CollectionGroupName = "string",
        Description = "string",
        EncryptionConfigs = new[]
        {
            new Aws.OpenSearch.Inputs.ServerlessCollectionEncryptionConfigArgs
            {
                AwsOwnedKey = false,
                KmsKeyArn = "string",
            },
        },
        Name = "string",
        Region = "string",
        StandbyReplicas = "string",
        Tags = 
        {
            { "string", "string" },
        },
        Timeouts = new Aws.OpenSearch.Inputs.ServerlessCollectionTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
        Type = "string",
    });
    
    example, err := opensearch.NewServerlessCollection(ctx, "serverlessCollectionResource", &opensearch.ServerlessCollectionArgs{
    	CollectionGroupName: pulumi.String("string"),
    	Description:         pulumi.String("string"),
    	EncryptionConfigs: opensearch.ServerlessCollectionEncryptionConfigArray{
    		&opensearch.ServerlessCollectionEncryptionConfigArgs{
    			AwsOwnedKey: pulumi.Bool(false),
    			KmsKeyArn:   pulumi.String("string"),
    		},
    	},
    	Name:            pulumi.String("string"),
    	Region:          pulumi.String("string"),
    	StandbyReplicas: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Timeouts: &opensearch.ServerlessCollectionTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    	},
    	Type: pulumi.String("string"),
    })
    
    var serverlessCollectionResource = new ServerlessCollection("serverlessCollectionResource", ServerlessCollectionArgs.builder()
        .collectionGroupName("string")
        .description("string")
        .encryptionConfigs(ServerlessCollectionEncryptionConfigArgs.builder()
            .awsOwnedKey(false)
            .kmsKeyArn("string")
            .build())
        .name("string")
        .region("string")
        .standbyReplicas("string")
        .tags(Map.of("string", "string"))
        .timeouts(ServerlessCollectionTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .type("string")
        .build());
    
    serverless_collection_resource = aws.opensearch.ServerlessCollection("serverlessCollectionResource",
        collection_group_name="string",
        description="string",
        encryption_configs=[{
            "aws_owned_key": False,
            "kms_key_arn": "string",
        }],
        name="string",
        region="string",
        standby_replicas="string",
        tags={
            "string": "string",
        },
        timeouts={
            "create": "string",
            "delete": "string",
        },
        type="string")
    
    const serverlessCollectionResource = new aws.opensearch.ServerlessCollection("serverlessCollectionResource", {
        collectionGroupName: "string",
        description: "string",
        encryptionConfigs: [{
            awsOwnedKey: false,
            kmsKeyArn: "string",
        }],
        name: "string",
        region: "string",
        standbyReplicas: "string",
        tags: {
            string: "string",
        },
        timeouts: {
            create: "string",
            "delete": "string",
        },
        type: "string",
    });
    
    type: aws:opensearch:ServerlessCollection
    properties:
        collectionGroupName: string
        description: string
        encryptionConfigs:
            - awsOwnedKey: false
              kmsKeyArn: string
        name: string
        region: string
        standbyReplicas: string
        tags:
            string: string
        timeouts:
            create: string
            delete: string
        type: string
    

    ServerlessCollection 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 ServerlessCollection resource accepts the following input properties:

    CollectionGroupName string
    Name of the collection group to associate with this collection.
    Description string
    Description of the collection.
    EncryptionConfigs List<ServerlessCollectionEncryptionConfig>
    Configuration block for direct collection encryption settings. See encryptionConfig below for details.
    Name string

    Name of the collection.

    The following arguments are optional:

    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    StandbyReplicas string
    Indicates whether standby replicas should be used for a collection. One of ENABLED or DISABLED. Defaults to ENABLED.
    Tags Dictionary<string, string>
    A map of tags to assign to the collection. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Timeouts ServerlessCollectionTimeouts
    Type string
    Type of collection. One of SEARCH, TIMESERIES, or VECTORSEARCH. Defaults to TIMESERIES.
    CollectionGroupName string
    Name of the collection group to associate with this collection.
    Description string
    Description of the collection.
    EncryptionConfigs []ServerlessCollectionEncryptionConfigArgs
    Configuration block for direct collection encryption settings. See encryptionConfig below for details.
    Name string

    Name of the collection.

    The following arguments are optional:

    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    StandbyReplicas string
    Indicates whether standby replicas should be used for a collection. One of ENABLED or DISABLED. Defaults to ENABLED.
    Tags map[string]string
    A map of tags to assign to the collection. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Timeouts ServerlessCollectionTimeoutsArgs
    Type string
    Type of collection. One of SEARCH, TIMESERIES, or VECTORSEARCH. Defaults to TIMESERIES.
    collectionGroupName String
    Name of the collection group to associate with this collection.
    description String
    Description of the collection.
    encryptionConfigs List<ServerlessCollectionEncryptionConfig>
    Configuration block for direct collection encryption settings. See encryptionConfig below for details.
    name String

    Name of the collection.

    The following arguments are optional:

    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    standbyReplicas String
    Indicates whether standby replicas should be used for a collection. One of ENABLED or DISABLED. Defaults to ENABLED.
    tags Map<String,String>
    A map of tags to assign to the collection. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts ServerlessCollectionTimeouts
    type String
    Type of collection. One of SEARCH, TIMESERIES, or VECTORSEARCH. Defaults to TIMESERIES.
    collectionGroupName string
    Name of the collection group to associate with this collection.
    description string
    Description of the collection.
    encryptionConfigs ServerlessCollectionEncryptionConfig[]
    Configuration block for direct collection encryption settings. See encryptionConfig below for details.
    name string

    Name of the collection.

    The following arguments are optional:

    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    standbyReplicas string
    Indicates whether standby replicas should be used for a collection. One of ENABLED or DISABLED. Defaults to ENABLED.
    tags {[key: string]: string}
    A map of tags to assign to the collection. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts ServerlessCollectionTimeouts
    type string
    Type of collection. One of SEARCH, TIMESERIES, or VECTORSEARCH. Defaults to TIMESERIES.
    collection_group_name str
    Name of the collection group to associate with this collection.
    description str
    Description of the collection.
    encryption_configs Sequence[ServerlessCollectionEncryptionConfigArgs]
    Configuration block for direct collection encryption settings. See encryptionConfig below for details.
    name str

    Name of the collection.

    The following arguments are optional:

    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    standby_replicas str
    Indicates whether standby replicas should be used for a collection. One of ENABLED or DISABLED. Defaults to ENABLED.
    tags Mapping[str, str]
    A map of tags to assign to the collection. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts ServerlessCollectionTimeoutsArgs
    type str
    Type of collection. One of SEARCH, TIMESERIES, or VECTORSEARCH. Defaults to TIMESERIES.
    collectionGroupName String
    Name of the collection group to associate with this collection.
    description String
    Description of the collection.
    encryptionConfigs List<Property Map>
    Configuration block for direct collection encryption settings. See encryptionConfig below for details.
    name String

    Name of the collection.

    The following arguments are optional:

    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    standbyReplicas String
    Indicates whether standby replicas should be used for a collection. One of ENABLED or DISABLED. Defaults to ENABLED.
    tags Map<String>
    A map of tags to assign to the collection. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts Property Map
    type String
    Type of collection. One of SEARCH, TIMESERIES, or VECTORSEARCH. Defaults to TIMESERIES.

    Outputs

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

    Arn string
    Amazon Resource Name (ARN) of the collection.
    CollectionEndpoint string
    Collection-specific endpoint used to submit index, search, and data upload requests to an OpenSearch Serverless collection.
    DashboardEndpoint string
    Collection-specific endpoint used to access OpenSearch Dashboards.
    Id string
    The provider-assigned unique ID for this managed resource.
    KmsKeyArn string
    The ARN of the Amazon Web Services KMS key used to encrypt the collection.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    Arn string
    Amazon Resource Name (ARN) of the collection.
    CollectionEndpoint string
    Collection-specific endpoint used to submit index, search, and data upload requests to an OpenSearch Serverless collection.
    DashboardEndpoint string
    Collection-specific endpoint used to access OpenSearch Dashboards.
    Id string
    The provider-assigned unique ID for this managed resource.
    KmsKeyArn string
    The ARN of the Amazon Web Services KMS key used to encrypt the collection.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    arn String
    Amazon Resource Name (ARN) of the collection.
    collectionEndpoint String
    Collection-specific endpoint used to submit index, search, and data upload requests to an OpenSearch Serverless collection.
    dashboardEndpoint String
    Collection-specific endpoint used to access OpenSearch Dashboards.
    id String
    The provider-assigned unique ID for this managed resource.
    kmsKeyArn String
    The ARN of the Amazon Web Services KMS key used to encrypt the collection.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    arn string
    Amazon Resource Name (ARN) of the collection.
    collectionEndpoint string
    Collection-specific endpoint used to submit index, search, and data upload requests to an OpenSearch Serverless collection.
    dashboardEndpoint string
    Collection-specific endpoint used to access OpenSearch Dashboards.
    id string
    The provider-assigned unique ID for this managed resource.
    kmsKeyArn string
    The ARN of the Amazon Web Services KMS key used to encrypt the collection.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    arn str
    Amazon Resource Name (ARN) of the collection.
    collection_endpoint str
    Collection-specific endpoint used to submit index, search, and data upload requests to an OpenSearch Serverless collection.
    dashboard_endpoint str
    Collection-specific endpoint used to access OpenSearch Dashboards.
    id str
    The provider-assigned unique ID for this managed resource.
    kms_key_arn str
    The ARN of the Amazon Web Services KMS key used to encrypt the collection.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    arn String
    Amazon Resource Name (ARN) of the collection.
    collectionEndpoint String
    Collection-specific endpoint used to submit index, search, and data upload requests to an OpenSearch Serverless collection.
    dashboardEndpoint String
    Collection-specific endpoint used to access OpenSearch Dashboards.
    id String
    The provider-assigned unique ID for this managed resource.
    kmsKeyArn String
    The ARN of the Amazon Web Services KMS key used to encrypt the collection.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.

    Look up Existing ServerlessCollection Resource

    Get an existing ServerlessCollection 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?: ServerlessCollectionState, opts?: CustomResourceOptions): ServerlessCollection
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            collection_endpoint: Optional[str] = None,
            collection_group_name: Optional[str] = None,
            dashboard_endpoint: Optional[str] = None,
            description: Optional[str] = None,
            encryption_configs: Optional[Sequence[ServerlessCollectionEncryptionConfigArgs]] = None,
            kms_key_arn: Optional[str] = None,
            name: Optional[str] = None,
            region: Optional[str] = None,
            standby_replicas: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            timeouts: Optional[ServerlessCollectionTimeoutsArgs] = None,
            type: Optional[str] = None) -> ServerlessCollection
    func GetServerlessCollection(ctx *Context, name string, id IDInput, state *ServerlessCollectionState, opts ...ResourceOption) (*ServerlessCollection, error)
    public static ServerlessCollection Get(string name, Input<string> id, ServerlessCollectionState? state, CustomResourceOptions? opts = null)
    public static ServerlessCollection get(String name, Output<String> id, ServerlessCollectionState state, CustomResourceOptions options)
    resources:  _:    type: aws:opensearch:ServerlessCollection    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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:
    Arn string
    Amazon Resource Name (ARN) of the collection.
    CollectionEndpoint string
    Collection-specific endpoint used to submit index, search, and data upload requests to an OpenSearch Serverless collection.
    CollectionGroupName string
    Name of the collection group to associate with this collection.
    DashboardEndpoint string
    Collection-specific endpoint used to access OpenSearch Dashboards.
    Description string
    Description of the collection.
    EncryptionConfigs List<ServerlessCollectionEncryptionConfig>
    Configuration block for direct collection encryption settings. See encryptionConfig below for details.
    KmsKeyArn string
    The ARN of the Amazon Web Services KMS key used to encrypt the collection.
    Name string

    Name of the collection.

    The following arguments are optional:

    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    StandbyReplicas string
    Indicates whether standby replicas should be used for a collection. One of ENABLED or DISABLED. Defaults to ENABLED.
    Tags Dictionary<string, string>
    A map of tags to assign to the collection. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    Timeouts ServerlessCollectionTimeouts
    Type string
    Type of collection. One of SEARCH, TIMESERIES, or VECTORSEARCH. Defaults to TIMESERIES.
    Arn string
    Amazon Resource Name (ARN) of the collection.
    CollectionEndpoint string
    Collection-specific endpoint used to submit index, search, and data upload requests to an OpenSearch Serverless collection.
    CollectionGroupName string
    Name of the collection group to associate with this collection.
    DashboardEndpoint string
    Collection-specific endpoint used to access OpenSearch Dashboards.
    Description string
    Description of the collection.
    EncryptionConfigs []ServerlessCollectionEncryptionConfigArgs
    Configuration block for direct collection encryption settings. See encryptionConfig below for details.
    KmsKeyArn string
    The ARN of the Amazon Web Services KMS key used to encrypt the collection.
    Name string

    Name of the collection.

    The following arguments are optional:

    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    StandbyReplicas string
    Indicates whether standby replicas should be used for a collection. One of ENABLED or DISABLED. Defaults to ENABLED.
    Tags map[string]string
    A map of tags to assign to the collection. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    Timeouts ServerlessCollectionTimeoutsArgs
    Type string
    Type of collection. One of SEARCH, TIMESERIES, or VECTORSEARCH. Defaults to TIMESERIES.
    arn String
    Amazon Resource Name (ARN) of the collection.
    collectionEndpoint String
    Collection-specific endpoint used to submit index, search, and data upload requests to an OpenSearch Serverless collection.
    collectionGroupName String
    Name of the collection group to associate with this collection.
    dashboardEndpoint String
    Collection-specific endpoint used to access OpenSearch Dashboards.
    description String
    Description of the collection.
    encryptionConfigs List<ServerlessCollectionEncryptionConfig>
    Configuration block for direct collection encryption settings. See encryptionConfig below for details.
    kmsKeyArn String
    The ARN of the Amazon Web Services KMS key used to encrypt the collection.
    name String

    Name of the collection.

    The following arguments are optional:

    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    standbyReplicas String
    Indicates whether standby replicas should be used for a collection. One of ENABLED or DISABLED. Defaults to ENABLED.
    tags Map<String,String>
    A map of tags to assign to the collection. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    timeouts ServerlessCollectionTimeouts
    type String
    Type of collection. One of SEARCH, TIMESERIES, or VECTORSEARCH. Defaults to TIMESERIES.
    arn string
    Amazon Resource Name (ARN) of the collection.
    collectionEndpoint string
    Collection-specific endpoint used to submit index, search, and data upload requests to an OpenSearch Serverless collection.
    collectionGroupName string
    Name of the collection group to associate with this collection.
    dashboardEndpoint string
    Collection-specific endpoint used to access OpenSearch Dashboards.
    description string
    Description of the collection.
    encryptionConfigs ServerlessCollectionEncryptionConfig[]
    Configuration block for direct collection encryption settings. See encryptionConfig below for details.
    kmsKeyArn string
    The ARN of the Amazon Web Services KMS key used to encrypt the collection.
    name string

    Name of the collection.

    The following arguments are optional:

    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    standbyReplicas string
    Indicates whether standby replicas should be used for a collection. One of ENABLED or DISABLED. Defaults to ENABLED.
    tags {[key: string]: string}
    A map of tags to assign to the collection. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    timeouts ServerlessCollectionTimeouts
    type string
    Type of collection. One of SEARCH, TIMESERIES, or VECTORSEARCH. Defaults to TIMESERIES.
    arn str
    Amazon Resource Name (ARN) of the collection.
    collection_endpoint str
    Collection-specific endpoint used to submit index, search, and data upload requests to an OpenSearch Serverless collection.
    collection_group_name str
    Name of the collection group to associate with this collection.
    dashboard_endpoint str
    Collection-specific endpoint used to access OpenSearch Dashboards.
    description str
    Description of the collection.
    encryption_configs Sequence[ServerlessCollectionEncryptionConfigArgs]
    Configuration block for direct collection encryption settings. See encryptionConfig below for details.
    kms_key_arn str
    The ARN of the Amazon Web Services KMS key used to encrypt the collection.
    name str

    Name of the collection.

    The following arguments are optional:

    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    standby_replicas str
    Indicates whether standby replicas should be used for a collection. One of ENABLED or DISABLED. Defaults to ENABLED.
    tags Mapping[str, str]
    A map of tags to assign to the collection. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    timeouts ServerlessCollectionTimeoutsArgs
    type str
    Type of collection. One of SEARCH, TIMESERIES, or VECTORSEARCH. Defaults to TIMESERIES.
    arn String
    Amazon Resource Name (ARN) of the collection.
    collectionEndpoint String
    Collection-specific endpoint used to submit index, search, and data upload requests to an OpenSearch Serverless collection.
    collectionGroupName String
    Name of the collection group to associate with this collection.
    dashboardEndpoint String
    Collection-specific endpoint used to access OpenSearch Dashboards.
    description String
    Description of the collection.
    encryptionConfigs List<Property Map>
    Configuration block for direct collection encryption settings. See encryptionConfig below for details.
    kmsKeyArn String
    The ARN of the Amazon Web Services KMS key used to encrypt the collection.
    name String

    Name of the collection.

    The following arguments are optional:

    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    standbyReplicas String
    Indicates whether standby replicas should be used for a collection. One of ENABLED or DISABLED. Defaults to ENABLED.
    tags Map<String>
    A map of tags to assign to the collection. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    timeouts Property Map
    type String
    Type of collection. One of SEARCH, TIMESERIES, or VECTORSEARCH. Defaults to TIMESERIES.

    Supporting Types

    ServerlessCollectionEncryptionConfig, ServerlessCollectionEncryptionConfigArgs

    AwsOwnedKey bool
    Whether to use an AWS owned key for collection encryption.
    KmsKeyArn string
    ARN of the AWS KMS key to use for collection encryption.
    AwsOwnedKey bool
    Whether to use an AWS owned key for collection encryption.
    KmsKeyArn string
    ARN of the AWS KMS key to use for collection encryption.
    awsOwnedKey Boolean
    Whether to use an AWS owned key for collection encryption.
    kmsKeyArn String
    ARN of the AWS KMS key to use for collection encryption.
    awsOwnedKey boolean
    Whether to use an AWS owned key for collection encryption.
    kmsKeyArn string
    ARN of the AWS KMS key to use for collection encryption.
    aws_owned_key bool
    Whether to use an AWS owned key for collection encryption.
    kms_key_arn str
    ARN of the AWS KMS key to use for collection encryption.
    awsOwnedKey Boolean
    Whether to use an AWS owned key for collection encryption.
    kmsKeyArn String
    ARN of the AWS KMS key to use for collection encryption.

    ServerlessCollectionTimeouts, ServerlessCollectionTimeoutsArgs

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

    Import

    Identity Schema

    Required

    • id (String) Unique identifier for the collection.

    Optional

    • accountId (String) AWS Account where this resource is managed.
    • region (String) Region where this resource is managed.

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

    $ pulumi import aws:opensearch/serverlessCollection:ServerlessCollection example example
    

    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.
    aws logo
    Viewing docs for AWS v7.26.0
    published on Thursday, Apr 16, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.