1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Opensearch
  5. getOpensearchVersion
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

oci.Opensearch.getOpensearchVersion

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

    This data source provides details about a specific Opensearch Version resource in Oracle Cloud Infrastructure Opensearch service.

    Lists the supported Opensearch versions

    Prerequisites

    The below policies must be created in compartment before creating OpensearchCluster

    {Compartment-Name} - Name of your compartment
    Allow service opensearch to manage vnics in compartment {Compartment-Name}
    Allow service opensearch to use subnets in compartment {Compartment-Name}
    Allow service opensearch to use network-security-groups in compartment {Compartment-Name}
    Allow service opensearch to manage vcns in compartment {Compartment-Name}
    

    For latest documentation on OpenSearch use please refer to https://docs.oracle.com/en-us/iaas/Content/search-opensearch/home.htm
    Required permissions: https://docs.oracle.com/en-us/iaas/Content/search-opensearch/Concepts/ocisearchpermissions.htm

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testOpensearchVersion = oci.Opensearch.getOpensearchVersion({
        compartmentId: compartmentId,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_opensearch_version = oci.Opensearch.get_opensearch_version(compartment_id=compartment_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Opensearch"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Opensearch.GetOpensearchVersion(ctx, &opensearch.GetOpensearchVersionArgs{
    			CompartmentId: compartmentId,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testOpensearchVersion = Oci.Opensearch.GetOpensearchVersion.Invoke(new()
        {
            CompartmentId = compartmentId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Opensearch.OpensearchFunctions;
    import com.pulumi.oci.Opensearch.inputs.GetOpensearchVersionArgs;
    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 testOpensearchVersion = OpensearchFunctions.getOpensearchVersion(GetOpensearchVersionArgs.builder()
                .compartmentId(compartmentId)
                .build());
    
        }
    }
    
    variables:
      testOpensearchVersion:
        fn::invoke:
          Function: oci:Opensearch:getOpensearchVersion
          Arguments:
            compartmentId: ${compartmentId}
    

    Using getOpensearchVersion

    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 getOpensearchVersion(args: GetOpensearchVersionArgs, opts?: InvokeOptions): Promise<GetOpensearchVersionResult>
    function getOpensearchVersionOutput(args: GetOpensearchVersionOutputArgs, opts?: InvokeOptions): Output<GetOpensearchVersionResult>
    def get_opensearch_version(compartment_id: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetOpensearchVersionResult
    def get_opensearch_version_output(compartment_id: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetOpensearchVersionResult]
    func GetOpensearchVersion(ctx *Context, args *GetOpensearchVersionArgs, opts ...InvokeOption) (*GetOpensearchVersionResult, error)
    func GetOpensearchVersionOutput(ctx *Context, args *GetOpensearchVersionOutputArgs, opts ...InvokeOption) GetOpensearchVersionResultOutput

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

    public static class GetOpensearchVersion 
    {
        public static Task<GetOpensearchVersionResult> InvokeAsync(GetOpensearchVersionArgs args, InvokeOptions? opts = null)
        public static Output<GetOpensearchVersionResult> Invoke(GetOpensearchVersionInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetOpensearchVersionResult> getOpensearchVersion(GetOpensearchVersionArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Opensearch/getOpensearchVersion:getOpensearchVersion
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The ID of the compartment in which to list resources.
    CompartmentId string
    The ID of the compartment in which to list resources.
    compartmentId String
    The ID of the compartment in which to list resources.
    compartmentId string
    The ID of the compartment in which to list resources.
    compartment_id str
    The ID of the compartment in which to list resources.
    compartmentId String
    The ID of the compartment in which to list resources.

    getOpensearchVersion Result

    The following output properties are available:

    CompartmentId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Items List<GetOpensearchVersionItem>
    A list of OpenSearch versions.
    CompartmentId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Items []GetOpensearchVersionItem
    A list of OpenSearch versions.
    compartmentId String
    id String
    The provider-assigned unique ID for this managed resource.
    items List<GetVersionItem>
    A list of OpenSearch versions.
    compartmentId string
    id string
    The provider-assigned unique ID for this managed resource.
    items GetOpensearchVersionItem[]
    A list of OpenSearch versions.
    compartment_id str
    id str
    The provider-assigned unique ID for this managed resource.
    items Sequence[opensearch.GetOpensearchVersionItem]
    A list of OpenSearch versions.
    compartmentId String
    id String
    The provider-assigned unique ID for this managed resource.
    items List<Property Map>
    A list of OpenSearch versions.

    Supporting Types

    GetOpensearchVersionItem

    Version string
    The version of OpenSearch.
    Version string
    The version of OpenSearch.
    version String
    The version of OpenSearch.
    version string
    The version of OpenSearch.
    version str
    The version of OpenSearch.
    version String
    The version of OpenSearch.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi