1. Packages
  2. AWS
  3. API Docs
  4. opensearch
  5. getServerlessCollection
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

aws.opensearch.getServerlessCollection

Explore with Pulumi AI

Data source for managing an AWS OpenSearch Serverless Collection.

Example Usage

Basic Usage

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

const example = aws.opensearch.getServerlessCollection({
    name: "example",
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.opensearch.get_serverless_collection(name="example")
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.LookupServerlessCollection(ctx, &opensearch.LookupServerlessCollectionArgs{
			Name: pulumi.StringRef("example"),
		}, nil)
		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 = Aws.OpenSearch.GetServerlessCollection.Invoke(new()
    {
        Name = "example",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.opensearch.OpensearchFunctions;
import com.pulumi.aws.opensearch.inputs.GetServerlessCollectionArgs;
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) {
        final var example = OpensearchFunctions.getServerlessCollection(GetServerlessCollectionArgs.builder()
            .name("example")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: aws:opensearch:getServerlessCollection
      arguments:
        name: example
Copy

Using getServerlessCollection

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getServerlessCollection(args: GetServerlessCollectionArgs, opts?: InvokeOptions): Promise<GetServerlessCollectionResult>
function getServerlessCollectionOutput(args: GetServerlessCollectionOutputArgs, opts?: InvokeOptions): Output<GetServerlessCollectionResult>
Copy
def get_serverless_collection(id: Optional[str] = None,
                              name: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetServerlessCollectionResult
def get_serverless_collection_output(id: Optional[pulumi.Input[str]] = None,
                              name: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetServerlessCollectionResult]
Copy
func LookupServerlessCollection(ctx *Context, args *LookupServerlessCollectionArgs, opts ...InvokeOption) (*LookupServerlessCollectionResult, error)
func LookupServerlessCollectionOutput(ctx *Context, args *LookupServerlessCollectionOutputArgs, opts ...InvokeOption) LookupServerlessCollectionResultOutput
Copy

> Note: This function is named LookupServerlessCollection in the Go SDK.

public static class GetServerlessCollection 
{
    public static Task<GetServerlessCollectionResult> InvokeAsync(GetServerlessCollectionArgs args, InvokeOptions? opts = null)
    public static Output<GetServerlessCollectionResult> Invoke(GetServerlessCollectionInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetServerlessCollectionResult> getServerlessCollection(GetServerlessCollectionArgs args, InvokeOptions options)
public static Output<GetServerlessCollectionResult> getServerlessCollection(GetServerlessCollectionArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws:opensearch/getServerlessCollection:getServerlessCollection
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Id string
ID of the collection.
Name string
Name of the collection.
Id string
ID of the collection.
Name string
Name of the collection.
id String
ID of the collection.
name String
Name of the collection.
id string
ID of the collection.
name string
Name of the collection.
id str
ID of the collection.
name str
Name of the collection.
id String
ID of the collection.
name String
Name of the collection.

getServerlessCollection Result

The following output properties are available:

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.
CreatedDate string
Date the Collection was created.
DashboardEndpoint string
Collection-specific endpoint used to access OpenSearch Dashboards.
Description string
Description of the collection.
FailureCode string
A failure code associated with the collection.
FailureMessage string
Id string
KmsKeyArn string
The ARN of the Amazon Web Services KMS key used to encrypt the collection.
LastModifiedDate string
Date the Collection was last modified.
Name string
StandbyReplicas string
Indicates whether standby replicas should be used for a collection.
Tags Dictionary<string, string>
A map of tags to assign to the collection.
Type string
Type of collection.
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.
CreatedDate string
Date the Collection was created.
DashboardEndpoint string
Collection-specific endpoint used to access OpenSearch Dashboards.
Description string
Description of the collection.
FailureCode string
A failure code associated with the collection.
FailureMessage string
Id string
KmsKeyArn string
The ARN of the Amazon Web Services KMS key used to encrypt the collection.
LastModifiedDate string
Date the Collection was last modified.
Name string
StandbyReplicas string
Indicates whether standby replicas should be used for a collection.
Tags map[string]string
A map of tags to assign to the collection.
Type string
Type of collection.
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.
createdDate String
Date the Collection was created.
dashboardEndpoint String
Collection-specific endpoint used to access OpenSearch Dashboards.
description String
Description of the collection.
failureCode String
A failure code associated with the collection.
failureMessage String
id String
kmsKeyArn String
The ARN of the Amazon Web Services KMS key used to encrypt the collection.
lastModifiedDate String
Date the Collection was last modified.
name String
standbyReplicas String
Indicates whether standby replicas should be used for a collection.
tags Map<String,String>
A map of tags to assign to the collection.
type String
Type of collection.
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.
createdDate string
Date the Collection was created.
dashboardEndpoint string
Collection-specific endpoint used to access OpenSearch Dashboards.
description string
Description of the collection.
failureCode string
A failure code associated with the collection.
failureMessage string
id string
kmsKeyArn string
The ARN of the Amazon Web Services KMS key used to encrypt the collection.
lastModifiedDate string
Date the Collection was last modified.
name string
standbyReplicas string
Indicates whether standby replicas should be used for a collection.
tags {[key: string]: string}
A map of tags to assign to the collection.
type string
Type of collection.
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.
created_date str
Date the Collection was created.
dashboard_endpoint str
Collection-specific endpoint used to access OpenSearch Dashboards.
description str
Description of the collection.
failure_code str
A failure code associated with the collection.
failure_message str
id str
kms_key_arn str
The ARN of the Amazon Web Services KMS key used to encrypt the collection.
last_modified_date str
Date the Collection was last modified.
name str
standby_replicas str
Indicates whether standby replicas should be used for a collection.
tags Mapping[str, str]
A map of tags to assign to the collection.
type str
Type of collection.
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.
createdDate String
Date the Collection was created.
dashboardEndpoint String
Collection-specific endpoint used to access OpenSearch Dashboards.
description String
Description of the collection.
failureCode String
A failure code associated with the collection.
failureMessage String
id String
kmsKeyArn String
The ARN of the Amazon Web Services KMS key used to encrypt the collection.
lastModifiedDate String
Date the Collection was last modified.
name String
standbyReplicas String
Indicates whether standby replicas should be used for a collection.
tags Map<String>
A map of tags to assign to the collection.
type String
Type of collection.

Package Details

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