1. Packages
  2. UpCloud
  3. API Docs
  4. getManagedDatabaseOpensearchIndices
UpCloud v0.2.0 published on Wednesday, Apr 16, 2025 by UpCloudLtd

upcloud.getManagedDatabaseOpensearchIndices

Explore with Pulumi AI

OpenSearch indices

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as upcloud from "@pulumi/upcloud";
import * as upcloud from "@upcloud/pulumi-upcloud";

// Use data source to gather a list of the indices for a Managed OpenSearch Database
// Create a Managed OpenSearch resource
const exampleManagedDatabaseOpensearch = new upcloud.ManagedDatabaseOpensearch("example", {
    name: "opensearch-example",
    title: "opensearch-example",
    plan: "1x2xCPU-4GB-80GB-1D",
    zone: "fi-hel1",
    properties: {
        automaticUtilityNetworkIpFilter: false,
        publicAccess: false,
    },
});
// Read the available indices of the newly created service
const example = upcloud.getManagedDatabaseOpensearchIndicesOutput({
    service: exampleManagedDatabaseOpensearch.id,
});
Copy
import pulumi
import pulumi_upcloud as upcloud

# Use data source to gather a list of the indices for a Managed OpenSearch Database
# Create a Managed OpenSearch resource
example_managed_database_opensearch = upcloud.ManagedDatabaseOpensearch("example",
    name="opensearch-example",
    title="opensearch-example",
    plan="1x2xCPU-4GB-80GB-1D",
    zone="fi-hel1",
    properties={
        "automatic_utility_network_ip_filter": False,
        "public_access": False,
    })
# Read the available indices of the newly created service
example = upcloud.get_managed_database_opensearch_indices_output(service=example_managed_database_opensearch.id)
Copy
package main

import (
	"github.com/UpCloudLtd/pulumi-upcloud/sdk/go/upcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Use data source to gather a list of the indices for a Managed OpenSearch Database
		// Create a Managed OpenSearch resource
		exampleManagedDatabaseOpensearch, err := upcloud.NewManagedDatabaseOpensearch(ctx, "example", &upcloud.ManagedDatabaseOpensearchArgs{
			Name:  pulumi.String("opensearch-example"),
			Title: pulumi.String("opensearch-example"),
			Plan:  pulumi.String("1x2xCPU-4GB-80GB-1D"),
			Zone:  pulumi.String("fi-hel1"),
			Properties: &upcloud.ManagedDatabaseOpensearchPropertiesArgs{
				AutomaticUtilityNetworkIpFilter: pulumi.Bool(false),
				PublicAccess:                    pulumi.Bool(false),
			},
		})
		if err != nil {
			return err
		}
		// Read the available indices of the newly created service
		_ = upcloud.GetManagedDatabaseOpensearchIndicesOutput(ctx, upcloud.GetManagedDatabaseOpensearchIndicesOutputArgs{
			Service: exampleManagedDatabaseOpensearch.ID(),
		}, nil)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using UpCloud = Pulumi.UpCloud;
using UpCloud = UpCloud.Pulumi.UpCloud;

return await Deployment.RunAsync(() => 
{
    // Use data source to gather a list of the indices for a Managed OpenSearch Database
    // Create a Managed OpenSearch resource
    var exampleManagedDatabaseOpensearch = new UpCloud.ManagedDatabaseOpensearch("example", new()
    {
        Name = "opensearch-example",
        Title = "opensearch-example",
        Plan = "1x2xCPU-4GB-80GB-1D",
        Zone = "fi-hel1",
        Properties = new UpCloud.Inputs.ManagedDatabaseOpensearchPropertiesArgs
        {
            AutomaticUtilityNetworkIpFilter = false,
            PublicAccess = false,
        },
    });

    // Read the available indices of the newly created service
    var example = UpCloud.GetManagedDatabaseOpensearchIndices.Invoke(new()
    {
        Service = exampleManagedDatabaseOpensearch.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.upcloud.ManagedDatabaseOpensearch;
import com.pulumi.upcloud.ManagedDatabaseOpensearchArgs;
import com.pulumi.upcloud.inputs.ManagedDatabaseOpensearchPropertiesArgs;
import com.pulumi.upcloud.UpcloudFunctions;
import com.pulumi.upcloud.inputs.GetManagedDatabaseOpensearchIndicesArgs;
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) {
        // Use data source to gather a list of the indices for a Managed OpenSearch Database
        // Create a Managed OpenSearch resource
        var exampleManagedDatabaseOpensearch = new ManagedDatabaseOpensearch("exampleManagedDatabaseOpensearch", ManagedDatabaseOpensearchArgs.builder()
            .name("opensearch-example")
            .title("opensearch-example")
            .plan("1x2xCPU-4GB-80GB-1D")
            .zone("fi-hel1")
            .properties(ManagedDatabaseOpensearchPropertiesArgs.builder()
                .automaticUtilityNetworkIpFilter(false)
                .publicAccess(false)
                .build())
            .build());

        // Read the available indices of the newly created service
        final var example = UpcloudFunctions.getManagedDatabaseOpensearchIndices(GetManagedDatabaseOpensearchIndicesArgs.builder()
            .service(exampleManagedDatabaseOpensearch.id())
            .build());

    }
}
Copy
resources:
  # Use data source to gather a list of the indices for a Managed OpenSearch Database

  # Create a Managed OpenSearch resource
  exampleManagedDatabaseOpensearch:
    type: upcloud:ManagedDatabaseOpensearch
    name: example
    properties:
      name: opensearch-example
      title: opensearch-example
      plan: 1x2xCPU-4GB-80GB-1D
      zone: fi-hel1
      properties:
        automaticUtilityNetworkIpFilter: false
        publicAccess: false
variables:
  # Read the available indices of the newly created service
  example:
    fn::invoke:
      function: upcloud:getManagedDatabaseOpensearchIndices
      arguments:
        service: ${exampleManagedDatabaseOpensearch.id}
Copy

Using getManagedDatabaseOpensearchIndices

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 getManagedDatabaseOpensearchIndices(args: GetManagedDatabaseOpensearchIndicesArgs, opts?: InvokeOptions): Promise<GetManagedDatabaseOpensearchIndicesResult>
function getManagedDatabaseOpensearchIndicesOutput(args: GetManagedDatabaseOpensearchIndicesOutputArgs, opts?: InvokeOptions): Output<GetManagedDatabaseOpensearchIndicesResult>
Copy
def get_managed_database_opensearch_indices(indices: Optional[Sequence[GetManagedDatabaseOpensearchIndicesIndex]] = None,
                                            service: Optional[str] = None,
                                            opts: Optional[InvokeOptions] = None) -> GetManagedDatabaseOpensearchIndicesResult
def get_managed_database_opensearch_indices_output(indices: Optional[pulumi.Input[Sequence[pulumi.Input[GetManagedDatabaseOpensearchIndicesIndexArgs]]]] = None,
                                            service: Optional[pulumi.Input[str]] = None,
                                            opts: Optional[InvokeOptions] = None) -> Output[GetManagedDatabaseOpensearchIndicesResult]
Copy
func GetManagedDatabaseOpensearchIndices(ctx *Context, args *GetManagedDatabaseOpensearchIndicesArgs, opts ...InvokeOption) (*GetManagedDatabaseOpensearchIndicesResult, error)
func GetManagedDatabaseOpensearchIndicesOutput(ctx *Context, args *GetManagedDatabaseOpensearchIndicesOutputArgs, opts ...InvokeOption) GetManagedDatabaseOpensearchIndicesResultOutput
Copy

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

public static class GetManagedDatabaseOpensearchIndices 
{
    public static Task<GetManagedDatabaseOpensearchIndicesResult> InvokeAsync(GetManagedDatabaseOpensearchIndicesArgs args, InvokeOptions? opts = null)
    public static Output<GetManagedDatabaseOpensearchIndicesResult> Invoke(GetManagedDatabaseOpensearchIndicesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetManagedDatabaseOpensearchIndicesResult> getManagedDatabaseOpensearchIndices(GetManagedDatabaseOpensearchIndicesArgs args, InvokeOptions options)
public static Output<GetManagedDatabaseOpensearchIndicesResult> getManagedDatabaseOpensearchIndices(GetManagedDatabaseOpensearchIndicesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: upcloud:index/getManagedDatabaseOpensearchIndices:getManagedDatabaseOpensearchIndices
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

service This property is required. String
indices List<Property Map>

getManagedDatabaseOpensearchIndices Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Indices List<UpCloud.Pulumi.UpCloud.Outputs.GetManagedDatabaseOpensearchIndicesIndex>
Service string
Id string
The provider-assigned unique ID for this managed resource.
Indices []GetManagedDatabaseOpensearchIndicesIndex
Service string
id String
The provider-assigned unique ID for this managed resource.
indices List<GetManagedDatabaseOpensearchIndicesIndex>
service String
id string
The provider-assigned unique ID for this managed resource.
indices GetManagedDatabaseOpensearchIndicesIndex[]
service string
id str
The provider-assigned unique ID for this managed resource.
indices Sequence[GetManagedDatabaseOpensearchIndicesIndex]
service str
id String
The provider-assigned unique ID for this managed resource.
indices List<Property Map>
service String

Supporting Types

GetManagedDatabaseOpensearchIndicesIndex

CreateTime This property is required. string
Timestamp indicating the creation time of the index.
Docs This property is required. int
Number of documents stored in the index.
Health This property is required. string
Health status of the index e.g. green, yellow, or red.
IndexName This property is required. string
Name of the index.
NumberOfReplicas This property is required. int
Number of replicas configured for the index.
NumberOfShards This property is required. int
Number of shards configured & used by the index.
ReadOnlyAllowDelete This property is required. bool
Indicates whether the index is in a read-only state that permits deletion of the entire index. This attribute can be automatically set to true in certain scenarios where the node disk space exceeds the flood stage.
Size This property is required. int
Size of the index in bytes.
Status This property is required. string
Status of the index e.g. open or closed.
CreateTime This property is required. string
Timestamp indicating the creation time of the index.
Docs This property is required. int
Number of documents stored in the index.
Health This property is required. string
Health status of the index e.g. green, yellow, or red.
IndexName This property is required. string
Name of the index.
NumberOfReplicas This property is required. int
Number of replicas configured for the index.
NumberOfShards This property is required. int
Number of shards configured & used by the index.
ReadOnlyAllowDelete This property is required. bool
Indicates whether the index is in a read-only state that permits deletion of the entire index. This attribute can be automatically set to true in certain scenarios where the node disk space exceeds the flood stage.
Size This property is required. int
Size of the index in bytes.
Status This property is required. string
Status of the index e.g. open or closed.
createTime This property is required. String
Timestamp indicating the creation time of the index.
docs This property is required. Integer
Number of documents stored in the index.
health This property is required. String
Health status of the index e.g. green, yellow, or red.
indexName This property is required. String
Name of the index.
numberOfReplicas This property is required. Integer
Number of replicas configured for the index.
numberOfShards This property is required. Integer
Number of shards configured & used by the index.
readOnlyAllowDelete This property is required. Boolean
Indicates whether the index is in a read-only state that permits deletion of the entire index. This attribute can be automatically set to true in certain scenarios where the node disk space exceeds the flood stage.
size This property is required. Integer
Size of the index in bytes.
status This property is required. String
Status of the index e.g. open or closed.
createTime This property is required. string
Timestamp indicating the creation time of the index.
docs This property is required. number
Number of documents stored in the index.
health This property is required. string
Health status of the index e.g. green, yellow, or red.
indexName This property is required. string
Name of the index.
numberOfReplicas This property is required. number
Number of replicas configured for the index.
numberOfShards This property is required. number
Number of shards configured & used by the index.
readOnlyAllowDelete This property is required. boolean
Indicates whether the index is in a read-only state that permits deletion of the entire index. This attribute can be automatically set to true in certain scenarios where the node disk space exceeds the flood stage.
size This property is required. number
Size of the index in bytes.
status This property is required. string
Status of the index e.g. open or closed.
create_time This property is required. str
Timestamp indicating the creation time of the index.
docs This property is required. int
Number of documents stored in the index.
health This property is required. str
Health status of the index e.g. green, yellow, or red.
index_name This property is required. str
Name of the index.
number_of_replicas This property is required. int
Number of replicas configured for the index.
number_of_shards This property is required. int
Number of shards configured & used by the index.
read_only_allow_delete This property is required. bool
Indicates whether the index is in a read-only state that permits deletion of the entire index. This attribute can be automatically set to true in certain scenarios where the node disk space exceeds the flood stage.
size This property is required. int
Size of the index in bytes.
status This property is required. str
Status of the index e.g. open or closed.
createTime This property is required. String
Timestamp indicating the creation time of the index.
docs This property is required. Number
Number of documents stored in the index.
health This property is required. String
Health status of the index e.g. green, yellow, or red.
indexName This property is required. String
Name of the index.
numberOfReplicas This property is required. Number
Number of replicas configured for the index.
numberOfShards This property is required. Number
Number of shards configured & used by the index.
readOnlyAllowDelete This property is required. Boolean
Indicates whether the index is in a read-only state that permits deletion of the entire index. This attribute can be automatically set to true in certain scenarios where the node disk space exceeds the flood stage.
size This property is required. Number
Size of the index in bytes.
status This property is required. String
Status of the index e.g. open or closed.

Package Details

Repository
upcloud UpCloudLtd/pulumi-upcloud
License
Apache-2.0
Notes
This Pulumi package is based on the upcloud Terraform Provider.