1. Packages
  2. Azure Classic
  3. API Docs
  4. elasticcloud
  5. getElasticsearch

We recommend using Azure Native.

Azure Classic v5.57.0 published on Tuesday, Nov 28, 2023 by Pulumi

azure.elasticcloud.getElasticsearch

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.57.0 published on Tuesday, Nov 28, 2023 by Pulumi

    Use this data source to access information about an existing Elasticsearch resource.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.ElasticCloud.GetElasticsearch.Invoke(new()
        {
            Name = "my-elastic-search",
            ResourceGroupName = "example-resources",
        });
    
        return new Dictionary<string, object?>
        {
            ["elasticsearchEndpoint"] = example.Apply(getElasticsearchResult => getElasticsearchResult.ElasticsearchServiceUrl),
            ["kibanaEndpoint"] = example.Apply(getElasticsearchResult => getElasticsearchResult.KibanaServiceUrl),
        };
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/elasticcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := elasticcloud.LookupElasticsearch(ctx, &elasticcloud.LookupElasticsearchArgs{
    			Name:              "my-elastic-search",
    			ResourceGroupName: "example-resources",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("elasticsearchEndpoint", example.ElasticsearchServiceUrl)
    		ctx.Export("kibanaEndpoint", example.KibanaServiceUrl)
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.elasticcloud.ElasticcloudFunctions;
    import com.pulumi.azure.elasticcloud.inputs.GetElasticsearchArgs;
    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 = ElasticcloudFunctions.getElasticsearch(GetElasticsearchArgs.builder()
                .name("my-elastic-search")
                .resourceGroupName("example-resources")
                .build());
    
            ctx.export("elasticsearchEndpoint", example.applyValue(getElasticsearchResult -> getElasticsearchResult.elasticsearchServiceUrl()));
            ctx.export("kibanaEndpoint", example.applyValue(getElasticsearchResult -> getElasticsearchResult.kibanaServiceUrl()));
        }
    }
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.elasticcloud.get_elasticsearch(name="my-elastic-search",
        resource_group_name="example-resources")
    pulumi.export("elasticsearchEndpoint", example.elasticsearch_service_url)
    pulumi.export("kibanaEndpoint", example.kibana_service_url)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.elasticcloud.getElasticsearch({
        name: "my-elastic-search",
        resourceGroupName: "example-resources",
    });
    export const elasticsearchEndpoint = example.then(example => example.elasticsearchServiceUrl);
    export const kibanaEndpoint = example.then(example => example.kibanaServiceUrl);
    
    variables:
      example:
        fn::invoke:
          Function: azure:elasticcloud:getElasticsearch
          Arguments:
            name: my-elastic-search
            resourceGroupName: example-resources
    outputs:
      elasticsearchEndpoint: ${example.elasticsearchServiceUrl}
      kibanaEndpoint: ${example.kibanaServiceUrl}
    

    Using getElasticsearch

    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 getElasticsearch(args: GetElasticsearchArgs, opts?: InvokeOptions): Promise<GetElasticsearchResult>
    function getElasticsearchOutput(args: GetElasticsearchOutputArgs, opts?: InvokeOptions): Output<GetElasticsearchResult>
    def get_elasticsearch(logs: Optional[Sequence[GetElasticsearchLog]] = None,
                          name: Optional[str] = None,
                          resource_group_name: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetElasticsearchResult
    def get_elasticsearch_output(logs: Optional[pulumi.Input[Sequence[pulumi.Input[GetElasticsearchLogArgs]]]] = None,
                          name: Optional[pulumi.Input[str]] = None,
                          resource_group_name: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetElasticsearchResult]
    func LookupElasticsearch(ctx *Context, args *LookupElasticsearchArgs, opts ...InvokeOption) (*LookupElasticsearchResult, error)
    func LookupElasticsearchOutput(ctx *Context, args *LookupElasticsearchOutputArgs, opts ...InvokeOption) LookupElasticsearchResultOutput

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

    public static class GetElasticsearch 
    {
        public static Task<GetElasticsearchResult> InvokeAsync(GetElasticsearchArgs args, InvokeOptions? opts = null)
        public static Output<GetElasticsearchResult> Invoke(GetElasticsearchInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetElasticsearchResult> getElasticsearch(GetElasticsearchArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:elasticcloud/getElasticsearch:getElasticsearch
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string

    The name of the Elasticsearch resource.

    ResourceGroupName string

    The name of the resource group in which the Elasticsearch exists.

    Logs List<GetElasticsearchLog>

    A logs block as defined below.

    Name string

    The name of the Elasticsearch resource.

    ResourceGroupName string

    The name of the resource group in which the Elasticsearch exists.

    Logs []GetElasticsearchLog

    A logs block as defined below.

    name String

    The name of the Elasticsearch resource.

    resourceGroupName String

    The name of the resource group in which the Elasticsearch exists.

    logs List<GetElasticsearchLog>

    A logs block as defined below.

    name string

    The name of the Elasticsearch resource.

    resourceGroupName string

    The name of the resource group in which the Elasticsearch exists.

    logs GetElasticsearchLog[]

    A logs block as defined below.

    name str

    The name of the Elasticsearch resource.

    resource_group_name str

    The name of the resource group in which the Elasticsearch exists.

    logs Sequence[GetElasticsearchLog]

    A logs block as defined below.

    name String

    The name of the Elasticsearch resource.

    resourceGroupName String

    The name of the resource group in which the Elasticsearch exists.

    logs List<Property Map>

    A logs block as defined below.

    getElasticsearch Result

    The following output properties are available:

    ElasticCloudDeploymentId string

    The ID of the Deployment within Elastic Cloud.

    ElasticCloudEmailAddress string

    The Email Address which is associated with this Elasticsearch account.

    ElasticCloudSsoDefaultUrl string

    The Default URL used for Single Sign On (SSO) to Elastic Cloud.

    ElasticCloudUserId string

    The ID of the User Account within Elastic Cloud.

    ElasticsearchServiceUrl string

    The URL to the Elasticsearch Service associated with this Elasticsearch.

    Id string

    The provider-assigned unique ID for this managed resource.

    KibanaServiceUrl string

    The URL to the Kibana Dashboard associated with this Elasticsearch.

    KibanaSsoUri string

    The URI used for SSO to the Kibana Dashboard associated with this Elasticsearch.

    Location string

    The Azure Region in which this Elasticsearch exists.

    Logs List<GetElasticsearchLog>

    A logs block as defined below.

    MonitoringEnabled bool

    Specifies if monitoring is enabled on this Elasticsearch or not.

    Name string

    The name (key) of the Tag which should be filtered.

    ResourceGroupName string
    SkuName string

    The name of the SKU used for this Elasticsearch.

    Tags Dictionary<string, string>

    A mapping of tags assigned to the Elasticsearch.

    ElasticCloudDeploymentId string

    The ID of the Deployment within Elastic Cloud.

    ElasticCloudEmailAddress string

    The Email Address which is associated with this Elasticsearch account.

    ElasticCloudSsoDefaultUrl string

    The Default URL used for Single Sign On (SSO) to Elastic Cloud.

    ElasticCloudUserId string

    The ID of the User Account within Elastic Cloud.

    ElasticsearchServiceUrl string

    The URL to the Elasticsearch Service associated with this Elasticsearch.

    Id string

    The provider-assigned unique ID for this managed resource.

    KibanaServiceUrl string

    The URL to the Kibana Dashboard associated with this Elasticsearch.

    KibanaSsoUri string

    The URI used for SSO to the Kibana Dashboard associated with this Elasticsearch.

    Location string

    The Azure Region in which this Elasticsearch exists.

    Logs []GetElasticsearchLog

    A logs block as defined below.

    MonitoringEnabled bool

    Specifies if monitoring is enabled on this Elasticsearch or not.

    Name string

    The name (key) of the Tag which should be filtered.

    ResourceGroupName string
    SkuName string

    The name of the SKU used for this Elasticsearch.

    Tags map[string]string

    A mapping of tags assigned to the Elasticsearch.

    elasticCloudDeploymentId String

    The ID of the Deployment within Elastic Cloud.

    elasticCloudEmailAddress String

    The Email Address which is associated with this Elasticsearch account.

    elasticCloudSsoDefaultUrl String

    The Default URL used for Single Sign On (SSO) to Elastic Cloud.

    elasticCloudUserId String

    The ID of the User Account within Elastic Cloud.

    elasticsearchServiceUrl String

    The URL to the Elasticsearch Service associated with this Elasticsearch.

    id String

    The provider-assigned unique ID for this managed resource.

    kibanaServiceUrl String

    The URL to the Kibana Dashboard associated with this Elasticsearch.

    kibanaSsoUri String

    The URI used for SSO to the Kibana Dashboard associated with this Elasticsearch.

    location String

    The Azure Region in which this Elasticsearch exists.

    logs List<GetElasticsearchLog>

    A logs block as defined below.

    monitoringEnabled Boolean

    Specifies if monitoring is enabled on this Elasticsearch or not.

    name String

    The name (key) of the Tag which should be filtered.

    resourceGroupName String
    skuName String

    The name of the SKU used for this Elasticsearch.

    tags Map<String,String>

    A mapping of tags assigned to the Elasticsearch.

    elasticCloudDeploymentId string

    The ID of the Deployment within Elastic Cloud.

    elasticCloudEmailAddress string

    The Email Address which is associated with this Elasticsearch account.

    elasticCloudSsoDefaultUrl string

    The Default URL used for Single Sign On (SSO) to Elastic Cloud.

    elasticCloudUserId string

    The ID of the User Account within Elastic Cloud.

    elasticsearchServiceUrl string

    The URL to the Elasticsearch Service associated with this Elasticsearch.

    id string

    The provider-assigned unique ID for this managed resource.

    kibanaServiceUrl string

    The URL to the Kibana Dashboard associated with this Elasticsearch.

    kibanaSsoUri string

    The URI used for SSO to the Kibana Dashboard associated with this Elasticsearch.

    location string

    The Azure Region in which this Elasticsearch exists.

    logs GetElasticsearchLog[]

    A logs block as defined below.

    monitoringEnabled boolean

    Specifies if monitoring is enabled on this Elasticsearch or not.

    name string

    The name (key) of the Tag which should be filtered.

    resourceGroupName string
    skuName string

    The name of the SKU used for this Elasticsearch.

    tags {[key: string]: string}

    A mapping of tags assigned to the Elasticsearch.

    elastic_cloud_deployment_id str

    The ID of the Deployment within Elastic Cloud.

    elastic_cloud_email_address str

    The Email Address which is associated with this Elasticsearch account.

    elastic_cloud_sso_default_url str

    The Default URL used for Single Sign On (SSO) to Elastic Cloud.

    elastic_cloud_user_id str

    The ID of the User Account within Elastic Cloud.

    elasticsearch_service_url str

    The URL to the Elasticsearch Service associated with this Elasticsearch.

    id str

    The provider-assigned unique ID for this managed resource.

    kibana_service_url str

    The URL to the Kibana Dashboard associated with this Elasticsearch.

    kibana_sso_uri str

    The URI used for SSO to the Kibana Dashboard associated with this Elasticsearch.

    location str

    The Azure Region in which this Elasticsearch exists.

    logs Sequence[GetElasticsearchLog]

    A logs block as defined below.

    monitoring_enabled bool

    Specifies if monitoring is enabled on this Elasticsearch or not.

    name str

    The name (key) of the Tag which should be filtered.

    resource_group_name str
    sku_name str

    The name of the SKU used for this Elasticsearch.

    tags Mapping[str, str]

    A mapping of tags assigned to the Elasticsearch.

    elasticCloudDeploymentId String

    The ID of the Deployment within Elastic Cloud.

    elasticCloudEmailAddress String

    The Email Address which is associated with this Elasticsearch account.

    elasticCloudSsoDefaultUrl String

    The Default URL used for Single Sign On (SSO) to Elastic Cloud.

    elasticCloudUserId String

    The ID of the User Account within Elastic Cloud.

    elasticsearchServiceUrl String

    The URL to the Elasticsearch Service associated with this Elasticsearch.

    id String

    The provider-assigned unique ID for this managed resource.

    kibanaServiceUrl String

    The URL to the Kibana Dashboard associated with this Elasticsearch.

    kibanaSsoUri String

    The URI used for SSO to the Kibana Dashboard associated with this Elasticsearch.

    location String

    The Azure Region in which this Elasticsearch exists.

    logs List<Property Map>

    A logs block as defined below.

    monitoringEnabled Boolean

    Specifies if monitoring is enabled on this Elasticsearch or not.

    name String

    The name (key) of the Tag which should be filtered.

    resourceGroupName String
    skuName String

    The name of the SKU used for this Elasticsearch.

    tags Map<String>

    A mapping of tags assigned to the Elasticsearch.

    Supporting Types

    GetElasticsearchLog

    FilteringTags List<GetElasticsearchLogFilteringTag>

    A list of filtering_tag blocks as defined above.

    SendActivityLogs bool

    Should the Azure Activity Logs should be sent to the Elasticsearch cluster?

    SendAzureadLogs bool

    Should the AzureAD Logs should be sent to the Elasticsearch cluster?

    SendSubscriptionLogs bool

    Should the Azure Subscription Logs should be sent to the Elasticsearch cluster?

    FilteringTags []GetElasticsearchLogFilteringTag

    A list of filtering_tag blocks as defined above.

    SendActivityLogs bool

    Should the Azure Activity Logs should be sent to the Elasticsearch cluster?

    SendAzureadLogs bool

    Should the AzureAD Logs should be sent to the Elasticsearch cluster?

    SendSubscriptionLogs bool

    Should the Azure Subscription Logs should be sent to the Elasticsearch cluster?

    filteringTags List<GetElasticsearchLogFilteringTag>

    A list of filtering_tag blocks as defined above.

    sendActivityLogs Boolean

    Should the Azure Activity Logs should be sent to the Elasticsearch cluster?

    sendAzureadLogs Boolean

    Should the AzureAD Logs should be sent to the Elasticsearch cluster?

    sendSubscriptionLogs Boolean

    Should the Azure Subscription Logs should be sent to the Elasticsearch cluster?

    filteringTags GetElasticsearchLogFilteringTag[]

    A list of filtering_tag blocks as defined above.

    sendActivityLogs boolean

    Should the Azure Activity Logs should be sent to the Elasticsearch cluster?

    sendAzureadLogs boolean

    Should the AzureAD Logs should be sent to the Elasticsearch cluster?

    sendSubscriptionLogs boolean

    Should the Azure Subscription Logs should be sent to the Elasticsearch cluster?

    filtering_tags Sequence[GetElasticsearchLogFilteringTag]

    A list of filtering_tag blocks as defined above.

    send_activity_logs bool

    Should the Azure Activity Logs should be sent to the Elasticsearch cluster?

    send_azuread_logs bool

    Should the AzureAD Logs should be sent to the Elasticsearch cluster?

    send_subscription_logs bool

    Should the Azure Subscription Logs should be sent to the Elasticsearch cluster?

    filteringTags List<Property Map>

    A list of filtering_tag blocks as defined above.

    sendActivityLogs Boolean

    Should the Azure Activity Logs should be sent to the Elasticsearch cluster?

    sendAzureadLogs Boolean

    Should the AzureAD Logs should be sent to the Elasticsearch cluster?

    sendSubscriptionLogs Boolean

    Should the Azure Subscription Logs should be sent to the Elasticsearch cluster?

    GetElasticsearchLogFilteringTag

    Action string

    The type of action which is taken when the Tag matches the name and value.

    Name string

    The name of the Elasticsearch resource.

    Value string

    The value of the Tag which should be filtered.

    Action string

    The type of action which is taken when the Tag matches the name and value.

    Name string

    The name of the Elasticsearch resource.

    Value string

    The value of the Tag which should be filtered.

    action String

    The type of action which is taken when the Tag matches the name and value.

    name String

    The name of the Elasticsearch resource.

    value String

    The value of the Tag which should be filtered.

    action string

    The type of action which is taken when the Tag matches the name and value.

    name string

    The name of the Elasticsearch resource.

    value string

    The value of the Tag which should be filtered.

    action str

    The type of action which is taken when the Tag matches the name and value.

    name str

    The name of the Elasticsearch resource.

    value str

    The value of the Tag which should be filtered.

    action String

    The type of action which is taken when the Tag matches the name and value.

    name String

    The name of the Elasticsearch resource.

    value String

    The value of the Tag which should be filtered.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the azurerm Terraform Provider.

    azure logo

    We recommend using Azure Native.

    Azure Classic v5.57.0 published on Tuesday, Nov 28, 2023 by Pulumi