1. Packages
  2. OVH
  3. API Docs
  4. CloudProject
  5. getOpenSearchPatterns
OVHCloud v2.1.1 published on Thursday, Apr 10, 2025 by OVHcloud

ovh.CloudProject.getOpenSearchPatterns

Explore with Pulumi AI

OVHCloud v2.1.1 published on Thursday, Apr 10, 2025 by OVHcloud

Use this data source to get the list of pattern of a opensearch cluster associated with a public cloud project.

Example Usage

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

const patterns = ovh.CloudProject.getOpenSearchPatterns({
    serviceName: "XXX",
    clusterId: "YYY",
});
export const patternIds = patterns.then(patterns => patterns.patternIds);
Copy
import pulumi
import pulumi_ovh as ovh

patterns = ovh.CloudProject.get_open_search_patterns(service_name="XXX",
    cluster_id="YYY")
pulumi.export("patternIds", patterns.pattern_ids)
Copy
package main

import (
	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/cloudproject"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		patterns, err := cloudproject.GetOpenSearchPatterns(ctx, &cloudproject.GetOpenSearchPatternsArgs{
			ServiceName: "XXX",
			ClusterId:   "YYY",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("patternIds", patterns.PatternIds)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;

return await Deployment.RunAsync(() => 
{
    var patterns = Ovh.CloudProject.GetOpenSearchPatterns.Invoke(new()
    {
        ServiceName = "XXX",
        ClusterId = "YYY",
    });

    return new Dictionary<string, object?>
    {
        ["patternIds"] = patterns.Apply(getOpenSearchPatternsResult => getOpenSearchPatternsResult.PatternIds),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.CloudProject.CloudProjectFunctions;
import com.pulumi.ovh.CloudProject.inputs.GetOpenSearchPatternsArgs;
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 patterns = CloudProjectFunctions.getOpenSearchPatterns(GetOpenSearchPatternsArgs.builder()
            .serviceName("XXX")
            .clusterId("YYY")
            .build());

        ctx.export("patternIds", patterns.patternIds());
    }
}
Copy
variables:
  patterns:
    fn::invoke:
      function: ovh:CloudProject:getOpenSearchPatterns
      arguments:
        serviceName: XXX
        clusterId: YYY
outputs:
  patternIds: ${patterns.patternIds}
Copy

Using getOpenSearchPatterns

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 getOpenSearchPatterns(args: GetOpenSearchPatternsArgs, opts?: InvokeOptions): Promise<GetOpenSearchPatternsResult>
function getOpenSearchPatternsOutput(args: GetOpenSearchPatternsOutputArgs, opts?: InvokeOptions): Output<GetOpenSearchPatternsResult>
Copy
def get_open_search_patterns(cluster_id: Optional[str] = None,
                             service_name: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetOpenSearchPatternsResult
def get_open_search_patterns_output(cluster_id: Optional[pulumi.Input[str]] = None,
                             service_name: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetOpenSearchPatternsResult]
Copy
func GetOpenSearchPatterns(ctx *Context, args *GetOpenSearchPatternsArgs, opts ...InvokeOption) (*GetOpenSearchPatternsResult, error)
func GetOpenSearchPatternsOutput(ctx *Context, args *GetOpenSearchPatternsOutputArgs, opts ...InvokeOption) GetOpenSearchPatternsResultOutput
Copy

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

public static class GetOpenSearchPatterns 
{
    public static Task<GetOpenSearchPatternsResult> InvokeAsync(GetOpenSearchPatternsArgs args, InvokeOptions? opts = null)
    public static Output<GetOpenSearchPatternsResult> Invoke(GetOpenSearchPatternsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetOpenSearchPatternsResult> getOpenSearchPatterns(GetOpenSearchPatternsArgs args, InvokeOptions options)
public static Output<GetOpenSearchPatternsResult> getOpenSearchPatterns(GetOpenSearchPatternsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: ovh:CloudProject/getOpenSearchPatterns:getOpenSearchPatterns
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ClusterId This property is required. string
Cluster ID
ServiceName This property is required. string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
ClusterId This property is required. string
Cluster ID
ServiceName This property is required. string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
clusterId This property is required. String
Cluster ID
serviceName This property is required. String
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
clusterId This property is required. string
Cluster ID
serviceName This property is required. string
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
cluster_id This property is required. str
Cluster ID
service_name This property is required. str
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
clusterId This property is required. String
Cluster ID
serviceName This property is required. String
The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.

getOpenSearchPatterns Result

The following output properties are available:

ClusterId string
See Argument Reference above.
Id string
The provider-assigned unique ID for this managed resource.
PatternIds List<string>
The list of patterns ids of the opensearch cluster associated with the project.
ServiceName string
See Argument Reference above.
ClusterId string
See Argument Reference above.
Id string
The provider-assigned unique ID for this managed resource.
PatternIds []string
The list of patterns ids of the opensearch cluster associated with the project.
ServiceName string
See Argument Reference above.
clusterId String
See Argument Reference above.
id String
The provider-assigned unique ID for this managed resource.
patternIds List<String>
The list of patterns ids of the opensearch cluster associated with the project.
serviceName String
See Argument Reference above.
clusterId string
See Argument Reference above.
id string
The provider-assigned unique ID for this managed resource.
patternIds string[]
The list of patterns ids of the opensearch cluster associated with the project.
serviceName string
See Argument Reference above.
cluster_id str
See Argument Reference above.
id str
The provider-assigned unique ID for this managed resource.
pattern_ids Sequence[str]
The list of patterns ids of the opensearch cluster associated with the project.
service_name str
See Argument Reference above.
clusterId String
See Argument Reference above.
id String
The provider-assigned unique ID for this managed resource.
patternIds List<String>
The list of patterns ids of the opensearch cluster associated with the project.
serviceName String
See Argument Reference above.

Package Details

Repository
ovh ovh/pulumi-ovh
License
Apache-2.0
Notes
This Pulumi package is based on the ovh Terraform Provider.
OVHCloud v2.1.1 published on Thursday, Apr 10, 2025 by OVHcloud