1. Packages
  2. OVH
  3. API Docs
  4. CloudProject
  5. getOpenSearchPattern
OVHCloud v0.45.0 published on Tuesday, Jun 4, 2024 by OVHcloud

ovh.CloudProject.getOpenSearchPattern

Explore with Pulumi AI

ovh logo
OVHCloud v0.45.0 published on Tuesday, Jun 4, 2024 by OVHcloud

    Use this data source to get information about a 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 pattern = ovh.CloudProject.getOpenSearchPattern({
        serviceName: "XXX",
        clusterId: "YYY",
        id: "ZZZ",
    });
    export const patternPattern = pattern.then(pattern => pattern.pattern);
    
    import pulumi
    import pulumi_ovh as ovh
    
    pattern = ovh.CloudProject.get_open_search_pattern(service_name="XXX",
        cluster_id="YYY",
        id="ZZZ")
    pulumi.export("patternPattern", pattern.pattern)
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/go/ovh/CloudProject"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		pattern, err := CloudProject.GetOpenSearchPattern(ctx, &cloudproject.GetOpenSearchPatternArgs{
    			ServiceName: "XXX",
    			ClusterId:   "YYY",
    			Id:          "ZZZ",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("patternPattern", pattern.Pattern)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var pattern = Ovh.CloudProject.GetOpenSearchPattern.Invoke(new()
        {
            ServiceName = "XXX",
            ClusterId = "YYY",
            Id = "ZZZ",
        });
    
        return new Dictionary<string, object?>
        {
            ["patternPattern"] = pattern.Apply(getOpenSearchPatternResult => getOpenSearchPatternResult.Pattern),
        };
    });
    
    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.GetOpenSearchPatternArgs;
    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 pattern = CloudProjectFunctions.getOpenSearchPattern(GetOpenSearchPatternArgs.builder()
                .serviceName("XXX")
                .clusterId("YYY")
                .id("ZZZ")
                .build());
    
            ctx.export("patternPattern", pattern.applyValue(getOpenSearchPatternResult -> getOpenSearchPatternResult.pattern()));
        }
    }
    
    variables:
      pattern:
        fn::invoke:
          Function: ovh:CloudProject:getOpenSearchPattern
          Arguments:
            serviceName: XXX
            clusterId: YYY
            id: ZZZ
    outputs:
      patternPattern: ${pattern.pattern}
    

    Using getOpenSearchPattern

    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 getOpenSearchPattern(args: GetOpenSearchPatternArgs, opts?: InvokeOptions): Promise<GetOpenSearchPatternResult>
    function getOpenSearchPatternOutput(args: GetOpenSearchPatternOutputArgs, opts?: InvokeOptions): Output<GetOpenSearchPatternResult>
    def get_open_search_pattern(cluster_id: Optional[str] = None,
                                id: Optional[str] = None,
                                service_name: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetOpenSearchPatternResult
    def get_open_search_pattern_output(cluster_id: Optional[pulumi.Input[str]] = None,
                                id: Optional[pulumi.Input[str]] = None,
                                service_name: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetOpenSearchPatternResult]
    func GetOpenSearchPattern(ctx *Context, args *GetOpenSearchPatternArgs, opts ...InvokeOption) (*GetOpenSearchPatternResult, error)
    func GetOpenSearchPatternOutput(ctx *Context, args *GetOpenSearchPatternOutputArgs, opts ...InvokeOption) GetOpenSearchPatternResultOutput

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

    public static class GetOpenSearchPattern 
    {
        public static Task<GetOpenSearchPatternResult> InvokeAsync(GetOpenSearchPatternArgs args, InvokeOptions? opts = null)
        public static Output<GetOpenSearchPatternResult> Invoke(GetOpenSearchPatternInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetOpenSearchPatternResult> getOpenSearchPattern(GetOpenSearchPatternArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: ovh:CloudProject/getOpenSearchPattern:getOpenSearchPattern
      arguments:
        # arguments dictionary

    The following arguments are supported:

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

    getOpenSearchPattern Result

    The following output properties are available:

    ClusterId string
    See Argument Reference above.
    Id string
    See Argument Reference above.
    MaxIndexCount int
    Maximum number of index for this pattern.
    Pattern string
    Pattern format.
    ServiceName string
    Current status of the pattern.
    ClusterId string
    See Argument Reference above.
    Id string
    See Argument Reference above.
    MaxIndexCount int
    Maximum number of index for this pattern.
    Pattern string
    Pattern format.
    ServiceName string
    Current status of the pattern.
    clusterId String
    See Argument Reference above.
    id String
    See Argument Reference above.
    maxIndexCount Integer
    Maximum number of index for this pattern.
    pattern String
    Pattern format.
    serviceName String
    Current status of the pattern.
    clusterId string
    See Argument Reference above.
    id string
    See Argument Reference above.
    maxIndexCount number
    Maximum number of index for this pattern.
    pattern string
    Pattern format.
    serviceName string
    Current status of the pattern.
    cluster_id str
    See Argument Reference above.
    id str
    See Argument Reference above.
    max_index_count int
    Maximum number of index for this pattern.
    pattern str
    Pattern format.
    service_name str
    Current status of the pattern.
    clusterId String
    See Argument Reference above.
    id String
    See Argument Reference above.
    maxIndexCount Number
    Maximum number of index for this pattern.
    pattern String
    Pattern format.
    serviceName String
    Current status of the pattern.

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    OVHCloud v0.45.0 published on Tuesday, Jun 4, 2024 by OVHcloud