1. Packages
  2. Elasticstack Provider
  3. API Docs
  4. getElasticsearchIngestProcessorRegisteredDomain
elasticstack 0.11.15 published on Wednesday, Apr 23, 2025 by elastic

elasticstack.getElasticsearchIngestProcessorRegisteredDomain

Explore with Pulumi AI

elasticstack logo
elasticstack 0.11.15 published on Wednesday, Apr 23, 2025 by elastic

    Extracts the registered domain (also known as the effective top-level domain or eTLD), sub-domain, and top-level domain from a fully qualified domain name (FQDN). Uses the registered domains defined in the Mozilla Public Suffix List.

    See: https://www.elastic.co/guide/en/elasticsearch/reference/current/registered-domain-processor.html

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as elasticstack from "@pulumi/elasticstack";
    
    const domain = elasticstack.getElasticsearchIngestProcessorRegisteredDomain({
        field: "fqdn",
        targetField: "url",
    });
    const myIngestPipeline = new elasticstack.ElasticsearchIngestPipeline("myIngestPipeline", {processors: [domain.then(domain => domain.json)]});
    
    import pulumi
    import pulumi_elasticstack as elasticstack
    
    domain = elasticstack.get_elasticsearch_ingest_processor_registered_domain(field="fqdn",
        target_field="url")
    my_ingest_pipeline = elasticstack.ElasticsearchIngestPipeline("myIngestPipeline", processors=[domain.json])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/elasticstack/elasticstack"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		domain, err := elasticstack.GetElasticsearchIngestProcessorRegisteredDomain(ctx, &elasticstack.GetElasticsearchIngestProcessorRegisteredDomainArgs{
    			Field:       "fqdn",
    			TargetField: pulumi.StringRef("url"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = elasticstack.NewElasticsearchIngestPipeline(ctx, "myIngestPipeline", &elasticstack.ElasticsearchIngestPipelineArgs{
    			Processors: pulumi.StringArray{
    				pulumi.String(domain.Json),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Elasticstack = Pulumi.Elasticstack;
    
    return await Deployment.RunAsync(() => 
    {
        var domain = Elasticstack.GetElasticsearchIngestProcessorRegisteredDomain.Invoke(new()
        {
            Field = "fqdn",
            TargetField = "url",
        });
    
        var myIngestPipeline = new Elasticstack.ElasticsearchIngestPipeline("myIngestPipeline", new()
        {
            Processors = new[]
            {
                domain.Apply(getElasticsearchIngestProcessorRegisteredDomainResult => getElasticsearchIngestProcessorRegisteredDomainResult.Json),
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.elasticstack.ElasticstackFunctions;
    import com.pulumi.elasticstack.inputs.GetElasticsearchIngestProcessorRegisteredDomainArgs;
    import com.pulumi.elasticstack.ElasticsearchIngestPipeline;
    import com.pulumi.elasticstack.ElasticsearchIngestPipelineArgs;
    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 domain = ElasticstackFunctions.getElasticsearchIngestProcessorRegisteredDomain(GetElasticsearchIngestProcessorRegisteredDomainArgs.builder()
                .field("fqdn")
                .targetField("url")
                .build());
    
            var myIngestPipeline = new ElasticsearchIngestPipeline("myIngestPipeline", ElasticsearchIngestPipelineArgs.builder()
                .processors(domain.applyValue(getElasticsearchIngestProcessorRegisteredDomainResult -> getElasticsearchIngestProcessorRegisteredDomainResult.json()))
                .build());
    
        }
    }
    
    resources:
      myIngestPipeline:
        type: elasticstack:ElasticsearchIngestPipeline
        properties:
          processors:
            - ${domain.json}
    variables:
      domain:
        fn::invoke:
          function: elasticstack:getElasticsearchIngestProcessorRegisteredDomain
          arguments:
            field: fqdn
            targetField: url
    

    Using getElasticsearchIngestProcessorRegisteredDomain

    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 getElasticsearchIngestProcessorRegisteredDomain(args: GetElasticsearchIngestProcessorRegisteredDomainArgs, opts?: InvokeOptions): Promise<GetElasticsearchIngestProcessorRegisteredDomainResult>
    function getElasticsearchIngestProcessorRegisteredDomainOutput(args: GetElasticsearchIngestProcessorRegisteredDomainOutputArgs, opts?: InvokeOptions): Output<GetElasticsearchIngestProcessorRegisteredDomainResult>
    def get_elasticsearch_ingest_processor_registered_domain(description: Optional[str] = None,
                                                             field: Optional[str] = None,
                                                             if_: Optional[str] = None,
                                                             ignore_failure: Optional[bool] = None,
                                                             ignore_missing: Optional[bool] = None,
                                                             on_failures: Optional[Sequence[str]] = None,
                                                             tag: Optional[str] = None,
                                                             target_field: Optional[str] = None,
                                                             opts: Optional[InvokeOptions] = None) -> GetElasticsearchIngestProcessorRegisteredDomainResult
    def get_elasticsearch_ingest_processor_registered_domain_output(description: Optional[pulumi.Input[str]] = None,
                                                             field: Optional[pulumi.Input[str]] = None,
                                                             if_: Optional[pulumi.Input[str]] = None,
                                                             ignore_failure: Optional[pulumi.Input[bool]] = None,
                                                             ignore_missing: Optional[pulumi.Input[bool]] = None,
                                                             on_failures: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                                             tag: Optional[pulumi.Input[str]] = None,
                                                             target_field: Optional[pulumi.Input[str]] = None,
                                                             opts: Optional[InvokeOptions] = None) -> Output[GetElasticsearchIngestProcessorRegisteredDomainResult]
    func GetElasticsearchIngestProcessorRegisteredDomain(ctx *Context, args *GetElasticsearchIngestProcessorRegisteredDomainArgs, opts ...InvokeOption) (*GetElasticsearchIngestProcessorRegisteredDomainResult, error)
    func GetElasticsearchIngestProcessorRegisteredDomainOutput(ctx *Context, args *GetElasticsearchIngestProcessorRegisteredDomainOutputArgs, opts ...InvokeOption) GetElasticsearchIngestProcessorRegisteredDomainResultOutput

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

    public static class GetElasticsearchIngestProcessorRegisteredDomain 
    {
        public static Task<GetElasticsearchIngestProcessorRegisteredDomainResult> InvokeAsync(GetElasticsearchIngestProcessorRegisteredDomainArgs args, InvokeOptions? opts = null)
        public static Output<GetElasticsearchIngestProcessorRegisteredDomainResult> Invoke(GetElasticsearchIngestProcessorRegisteredDomainInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetElasticsearchIngestProcessorRegisteredDomainResult> getElasticsearchIngestProcessorRegisteredDomain(GetElasticsearchIngestProcessorRegisteredDomainArgs args, InvokeOptions options)
    public static Output<GetElasticsearchIngestProcessorRegisteredDomainResult> getElasticsearchIngestProcessorRegisteredDomain(GetElasticsearchIngestProcessorRegisteredDomainArgs args, InvokeOptions options)
    
    fn::invoke:
      function: elasticstack:index/getElasticsearchIngestProcessorRegisteredDomain:getElasticsearchIngestProcessorRegisteredDomain
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Field string
    Field containing the source FQDN.
    Description string
    Description of the processor.
    If string
    Conditionally execute the processor
    IgnoreFailure bool
    Ignore failures for the processor.
    IgnoreMissing bool
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    OnFailures List<string>
    Handle failures for the processor.
    Tag string
    Identifier for the processor.
    TargetField string
    Object field containing extracted domain components. If an <empty string>, the processor adds components to the document’s root.
    Field string
    Field containing the source FQDN.
    Description string
    Description of the processor.
    If string
    Conditionally execute the processor
    IgnoreFailure bool
    Ignore failures for the processor.
    IgnoreMissing bool
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    OnFailures []string
    Handle failures for the processor.
    Tag string
    Identifier for the processor.
    TargetField string
    Object field containing extracted domain components. If an <empty string>, the processor adds components to the document’s root.
    field String
    Field containing the source FQDN.
    description String
    Description of the processor.
    if_ String
    Conditionally execute the processor
    ignoreFailure Boolean
    Ignore failures for the processor.
    ignoreMissing Boolean
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    onFailures List<String>
    Handle failures for the processor.
    tag String
    Identifier for the processor.
    targetField String
    Object field containing extracted domain components. If an <empty string>, the processor adds components to the document’s root.
    field string
    Field containing the source FQDN.
    description string
    Description of the processor.
    if string
    Conditionally execute the processor
    ignoreFailure boolean
    Ignore failures for the processor.
    ignoreMissing boolean
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    onFailures string[]
    Handle failures for the processor.
    tag string
    Identifier for the processor.
    targetField string
    Object field containing extracted domain components. If an <empty string>, the processor adds components to the document’s root.
    field str
    Field containing the source FQDN.
    description str
    Description of the processor.
    if_ str
    Conditionally execute the processor
    ignore_failure bool
    Ignore failures for the processor.
    ignore_missing bool
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    on_failures Sequence[str]
    Handle failures for the processor.
    tag str
    Identifier for the processor.
    target_field str
    Object field containing extracted domain components. If an <empty string>, the processor adds components to the document’s root.
    field String
    Field containing the source FQDN.
    description String
    Description of the processor.
    if String
    Conditionally execute the processor
    ignoreFailure Boolean
    Ignore failures for the processor.
    ignoreMissing Boolean
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    onFailures List<String>
    Handle failures for the processor.
    tag String
    Identifier for the processor.
    targetField String
    Object field containing extracted domain components. If an <empty string>, the processor adds components to the document’s root.

    getElasticsearchIngestProcessorRegisteredDomain Result

    The following output properties are available:

    Field string
    Field containing the source FQDN.
    Id string
    Internal identifier of the resource.
    Json string
    JSON representation of this data source.
    Description string
    Description of the processor.
    If string
    Conditionally execute the processor
    IgnoreFailure bool
    Ignore failures for the processor.
    IgnoreMissing bool
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    OnFailures List<string>
    Handle failures for the processor.
    Tag string
    Identifier for the processor.
    TargetField string
    Object field containing extracted domain components. If an <empty string>, the processor adds components to the document’s root.
    Field string
    Field containing the source FQDN.
    Id string
    Internal identifier of the resource.
    Json string
    JSON representation of this data source.
    Description string
    Description of the processor.
    If string
    Conditionally execute the processor
    IgnoreFailure bool
    Ignore failures for the processor.
    IgnoreMissing bool
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    OnFailures []string
    Handle failures for the processor.
    Tag string
    Identifier for the processor.
    TargetField string
    Object field containing extracted domain components. If an <empty string>, the processor adds components to the document’s root.
    field String
    Field containing the source FQDN.
    id String
    Internal identifier of the resource.
    json String
    JSON representation of this data source.
    description String
    Description of the processor.
    if_ String
    Conditionally execute the processor
    ignoreFailure Boolean
    Ignore failures for the processor.
    ignoreMissing Boolean
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    onFailures List<String>
    Handle failures for the processor.
    tag String
    Identifier for the processor.
    targetField String
    Object field containing extracted domain components. If an <empty string>, the processor adds components to the document’s root.
    field string
    Field containing the source FQDN.
    id string
    Internal identifier of the resource.
    json string
    JSON representation of this data source.
    description string
    Description of the processor.
    if string
    Conditionally execute the processor
    ignoreFailure boolean
    Ignore failures for the processor.
    ignoreMissing boolean
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    onFailures string[]
    Handle failures for the processor.
    tag string
    Identifier for the processor.
    targetField string
    Object field containing extracted domain components. If an <empty string>, the processor adds components to the document’s root.
    field str
    Field containing the source FQDN.
    id str
    Internal identifier of the resource.
    json str
    JSON representation of this data source.
    description str
    Description of the processor.
    if_ str
    Conditionally execute the processor
    ignore_failure bool
    Ignore failures for the processor.
    ignore_missing bool
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    on_failures Sequence[str]
    Handle failures for the processor.
    tag str
    Identifier for the processor.
    target_field str
    Object field containing extracted domain components. If an <empty string>, the processor adds components to the document’s root.
    field String
    Field containing the source FQDN.
    id String
    Internal identifier of the resource.
    json String
    JSON representation of this data source.
    description String
    Description of the processor.
    if String
    Conditionally execute the processor
    ignoreFailure Boolean
    Ignore failures for the processor.
    ignoreMissing Boolean
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    onFailures List<String>
    Handle failures for the processor.
    tag String
    Identifier for the processor.
    targetField String
    Object field containing extracted domain components. If an <empty string>, the processor adds components to the document’s root.

    Package Details

    Repository
    elasticstack elastic/terraform-provider-elasticstack
    License
    Notes
    This Pulumi package is based on the elasticstack Terraform Provider.
    elasticstack logo
    elasticstack 0.11.15 published on Wednesday, Apr 23, 2025 by elastic