1. Packages
  2. Packages
  3. Elasticstack Provider
  4. API Docs
  5. getKibanaExportSavedObjects
Viewing docs for elasticstack 0.15.0
published on Thursday, May 14, 2026 by elastic
Viewing docs for elasticstack 0.15.0
published on Thursday, May 14, 2026 by elastic

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as elasticstack from "@pulumi/elasticstack";
    
    // Minimal connector so the export references a saved object that exists on first plan
    // (dashboard IDs are environment-specific; action connectors created here are deterministic).
    const exportDemo = new elasticstack.KibanaActionConnector("export_demo", {
        name: "examples-export-demo-connector",
        connectorTypeId: ".slack",
        secrets: JSON.stringify({
            webhookUrl: "https://example.com",
        }),
    });
    const example = elasticstack.getKibanaExportSavedObjectsOutput({
        spaceId: "default",
        excludeExportDetails: true,
        includeReferencesDeep: true,
        objects: [{
            type: "action",
            id: exportDemo.connectorId,
        }],
    });
    export const savedObjects = example.apply(example => example.exportedObjects);
    
    import pulumi
    import json
    import pulumi_elasticstack as elasticstack
    
    # Minimal connector so the export references a saved object that exists on first plan
    # (dashboard IDs are environment-specific; action connectors created here are deterministic).
    export_demo = elasticstack.KibanaActionConnector("export_demo",
        name="examples-export-demo-connector",
        connector_type_id=".slack",
        secrets=json.dumps({
            "webhookUrl": "https://example.com",
        }))
    example = elasticstack.get_kibana_export_saved_objects_output(space_id="default",
        exclude_export_details=True,
        include_references_deep=True,
        objects=[{
            "type": "action",
            "id": export_demo.connector_id,
        }])
    pulumi.export("savedObjects", example.exported_objects)
    
    package main
    
    import (
    	"encoding/json"
    
    	"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 {
    		tmpJSON0, err := json.Marshal(map[string]interface{}{
    			"webhookUrl": "https://example.com",
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		// Minimal connector so the export references a saved object that exists on first plan
    		// (dashboard IDs are environment-specific; action connectors created here are deterministic).
    		exportDemo, err := elasticstack.NewKibanaActionConnector(ctx, "export_demo", &elasticstack.KibanaActionConnectorArgs{
    			Name:            pulumi.String("examples-export-demo-connector"),
    			ConnectorTypeId: pulumi.String(".slack"),
    			Secrets:         pulumi.String(json0),
    		})
    		if err != nil {
    			return err
    		}
    		example := elasticstack.GetKibanaExportSavedObjectsOutput(ctx, elasticstack.GetKibanaExportSavedObjectsOutputArgs{
    			SpaceId:               pulumi.String("default"),
    			ExcludeExportDetails:  pulumi.Bool(true),
    			IncludeReferencesDeep: pulumi.Bool(true),
    			Objects: elasticstack.GetKibanaExportSavedObjectsObjectArray{
    				&elasticstack.GetKibanaExportSavedObjectsObjectArgs{
    					Type: pulumi.String("action"),
    					Id:   exportDemo.ConnectorId,
    				},
    			},
    		}, nil)
    		ctx.Export("savedObjects", example.ApplyT(func(example elasticstack.GetKibanaExportSavedObjectsResult) (*string, error) {
    			return &example.ExportedObjects, nil
    		}).(pulumi.StringPtrOutput))
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Elasticstack = Pulumi.Elasticstack;
    
    return await Deployment.RunAsync(() => 
    {
        // Minimal connector so the export references a saved object that exists on first plan
        // (dashboard IDs are environment-specific; action connectors created here are deterministic).
        var exportDemo = new Elasticstack.KibanaActionConnector("export_demo", new()
        {
            Name = "examples-export-demo-connector",
            ConnectorTypeId = ".slack",
            Secrets = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["webhookUrl"] = "https://example.com",
            }),
        });
    
        var example = Elasticstack.GetKibanaExportSavedObjects.Invoke(new()
        {
            SpaceId = "default",
            ExcludeExportDetails = true,
            IncludeReferencesDeep = true,
            Objects = new[]
            {
                new Elasticstack.Inputs.GetKibanaExportSavedObjectsObjectInputArgs
                {
                    Type = "action",
                    Id = exportDemo.ConnectorId,
                },
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["savedObjects"] = example.Apply(getKibanaExportSavedObjectsResult => getKibanaExportSavedObjectsResult.ExportedObjects),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.elasticstack.KibanaActionConnector;
    import com.pulumi.elasticstack.KibanaActionConnectorArgs;
    import com.pulumi.elasticstack.ElasticstackFunctions;
    import com.pulumi.elasticstack.inputs.GetKibanaExportSavedObjectsArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    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) {
            // Minimal connector so the export references a saved object that exists on first plan
            // (dashboard IDs are environment-specific; action connectors created here are deterministic).
            var exportDemo = new KibanaActionConnector("exportDemo", KibanaActionConnectorArgs.builder()
                .name("examples-export-demo-connector")
                .connectorTypeId(".slack")
                .secrets(serializeJson(
                    jsonObject(
                        jsonProperty("webhookUrl", "https://example.com")
                    )))
                .build());
    
            final var example = ElasticstackFunctions.getKibanaExportSavedObjects(GetKibanaExportSavedObjectsArgs.builder()
                .spaceId("default")
                .excludeExportDetails(true)
                .includeReferencesDeep(true)
                .objects(GetKibanaExportSavedObjectsObjectArgs.builder()
                    .type("action")
                    .id(exportDemo.connectorId())
                    .build())
                .build());
    
            ctx.export("savedObjects", example.applyValue(_example -> _example.exportedObjects()));
        }
    }
    
    resources:
      # Minimal connector so the export references a saved object that exists on first plan
      # (dashboard IDs are environment-specific; action connectors created here are deterministic).
      exportDemo:
        type: elasticstack:KibanaActionConnector
        name: export_demo
        properties:
          name: examples-export-demo-connector
          connectorTypeId: .slack
          secrets:
            fn::toJSON:
              webhookUrl: https://example.com
    variables:
      example:
        fn::invoke:
          function: elasticstack:getKibanaExportSavedObjects
          arguments:
            spaceId: default
            excludeExportDetails: true
            includeReferencesDeep: true
            objects:
              - type: action
                id: ${exportDemo.connectorId}
    outputs:
      savedObjects: ${example.exportedObjects}
    
    Example coming soon!
    

    Using getKibanaExportSavedObjects

    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 getKibanaExportSavedObjects(args: GetKibanaExportSavedObjectsArgs, opts?: InvokeOptions): Promise<GetKibanaExportSavedObjectsResult>
    function getKibanaExportSavedObjectsOutput(args: GetKibanaExportSavedObjectsOutputArgs, opts?: InvokeOptions): Output<GetKibanaExportSavedObjectsResult>
    def get_kibana_export_saved_objects(exclude_export_details: Optional[bool] = None,
                                        include_references_deep: Optional[bool] = None,
                                        kibana_connections: Optional[Sequence[GetKibanaExportSavedObjectsKibanaConnection]] = None,
                                        objects: Optional[Sequence[GetKibanaExportSavedObjectsObject]] = None,
                                        space_id: Optional[str] = None,
                                        opts: Optional[InvokeOptions] = None) -> GetKibanaExportSavedObjectsResult
    def get_kibana_export_saved_objects_output(exclude_export_details: pulumi.Input[Optional[bool]] = None,
                                        include_references_deep: pulumi.Input[Optional[bool]] = None,
                                        kibana_connections: pulumi.Input[Optional[Sequence[pulumi.Input[GetKibanaExportSavedObjectsKibanaConnectionArgs]]]] = None,
                                        objects: pulumi.Input[Optional[Sequence[pulumi.Input[GetKibanaExportSavedObjectsObjectArgs]]]] = None,
                                        space_id: pulumi.Input[Optional[str]] = None,
                                        opts: Optional[InvokeOptions] = None) -> Output[GetKibanaExportSavedObjectsResult]
    func GetKibanaExportSavedObjects(ctx *Context, args *GetKibanaExportSavedObjectsArgs, opts ...InvokeOption) (*GetKibanaExportSavedObjectsResult, error)
    func GetKibanaExportSavedObjectsOutput(ctx *Context, args *GetKibanaExportSavedObjectsOutputArgs, opts ...InvokeOption) GetKibanaExportSavedObjectsResultOutput

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

    public static class GetKibanaExportSavedObjects 
    {
        public static Task<GetKibanaExportSavedObjectsResult> InvokeAsync(GetKibanaExportSavedObjectsArgs args, InvokeOptions? opts = null)
        public static Output<GetKibanaExportSavedObjectsResult> Invoke(GetKibanaExportSavedObjectsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetKibanaExportSavedObjectsResult> getKibanaExportSavedObjects(GetKibanaExportSavedObjectsArgs args, InvokeOptions options)
    public static Output<GetKibanaExportSavedObjectsResult> getKibanaExportSavedObjects(GetKibanaExportSavedObjectsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: elasticstack:index/getKibanaExportSavedObjects:getKibanaExportSavedObjects
      arguments:
        # arguments dictionary
    data "elasticstack_getkibanaexportsavedobjects" "name" {
        # arguments
    }

    The following arguments are supported:

    Objects List<GetKibanaExportSavedObjectsObject>
    List of objects to export.
    ExcludeExportDetails bool
    Do not add export details. Defaults to true.
    IncludeReferencesDeep bool
    Include references to other saved objects recursively. Defaults to true.
    KibanaConnections List<GetKibanaExportSavedObjectsKibanaConnection>
    Kibana connection configuration block.
    SpaceId string
    An identifier for the space. If space_id is not provided, the default space is used.
    Objects []GetKibanaExportSavedObjectsObject
    List of objects to export.
    ExcludeExportDetails bool
    Do not add export details. Defaults to true.
    IncludeReferencesDeep bool
    Include references to other saved objects recursively. Defaults to true.
    KibanaConnections []GetKibanaExportSavedObjectsKibanaConnection
    Kibana connection configuration block.
    SpaceId string
    An identifier for the space. If space_id is not provided, the default space is used.
    objects list(object)
    List of objects to export.
    exclude_export_details bool
    Do not add export details. Defaults to true.
    include_references_deep bool
    Include references to other saved objects recursively. Defaults to true.
    kibana_connections list(object)
    Kibana connection configuration block.
    space_id string
    An identifier for the space. If space_id is not provided, the default space is used.
    objects List<GetKibanaExportSavedObjectsObject>
    List of objects to export.
    excludeExportDetails Boolean
    Do not add export details. Defaults to true.
    includeReferencesDeep Boolean
    Include references to other saved objects recursively. Defaults to true.
    kibanaConnections List<GetKibanaExportSavedObjectsKibanaConnection>
    Kibana connection configuration block.
    spaceId String
    An identifier for the space. If space_id is not provided, the default space is used.
    objects GetKibanaExportSavedObjectsObject[]
    List of objects to export.
    excludeExportDetails boolean
    Do not add export details. Defaults to true.
    includeReferencesDeep boolean
    Include references to other saved objects recursively. Defaults to true.
    kibanaConnections GetKibanaExportSavedObjectsKibanaConnection[]
    Kibana connection configuration block.
    spaceId string
    An identifier for the space. If space_id is not provided, the default space is used.
    objects Sequence[GetKibanaExportSavedObjectsObject]
    List of objects to export.
    exclude_export_details bool
    Do not add export details. Defaults to true.
    include_references_deep bool
    Include references to other saved objects recursively. Defaults to true.
    kibana_connections Sequence[GetKibanaExportSavedObjectsKibanaConnection]
    Kibana connection configuration block.
    space_id str
    An identifier for the space. If space_id is not provided, the default space is used.
    objects List<Property Map>
    List of objects to export.
    excludeExportDetails Boolean
    Do not add export details. Defaults to true.
    includeReferencesDeep Boolean
    Include references to other saved objects recursively. Defaults to true.
    kibanaConnections List<Property Map>
    Kibana connection configuration block.
    spaceId String
    An identifier for the space. If space_id is not provided, the default space is used.

    getKibanaExportSavedObjects Result

    The following output properties are available:

    ExportedObjects string
    The exported objects in NDJSON format.
    Id string
    Generated ID for the export.
    Objects List<GetKibanaExportSavedObjectsObject>
    List of objects to export.
    ExcludeExportDetails bool
    Do not add export details. Defaults to true.
    IncludeReferencesDeep bool
    Include references to other saved objects recursively. Defaults to true.
    KibanaConnections List<GetKibanaExportSavedObjectsKibanaConnection>
    Kibana connection configuration block.
    SpaceId string
    An identifier for the space. If space_id is not provided, the default space is used.
    ExportedObjects string
    The exported objects in NDJSON format.
    Id string
    Generated ID for the export.
    Objects []GetKibanaExportSavedObjectsObject
    List of objects to export.
    ExcludeExportDetails bool
    Do not add export details. Defaults to true.
    IncludeReferencesDeep bool
    Include references to other saved objects recursively. Defaults to true.
    KibanaConnections []GetKibanaExportSavedObjectsKibanaConnection
    Kibana connection configuration block.
    SpaceId string
    An identifier for the space. If space_id is not provided, the default space is used.
    exported_objects string
    The exported objects in NDJSON format.
    id string
    Generated ID for the export.
    objects list(object)
    List of objects to export.
    exclude_export_details bool
    Do not add export details. Defaults to true.
    include_references_deep bool
    Include references to other saved objects recursively. Defaults to true.
    kibana_connections list(object)
    Kibana connection configuration block.
    space_id string
    An identifier for the space. If space_id is not provided, the default space is used.
    exportedObjects String
    The exported objects in NDJSON format.
    id String
    Generated ID for the export.
    objects List<GetKibanaExportSavedObjectsObject>
    List of objects to export.
    excludeExportDetails Boolean
    Do not add export details. Defaults to true.
    includeReferencesDeep Boolean
    Include references to other saved objects recursively. Defaults to true.
    kibanaConnections List<GetKibanaExportSavedObjectsKibanaConnection>
    Kibana connection configuration block.
    spaceId String
    An identifier for the space. If space_id is not provided, the default space is used.
    exportedObjects string
    The exported objects in NDJSON format.
    id string
    Generated ID for the export.
    objects GetKibanaExportSavedObjectsObject[]
    List of objects to export.
    excludeExportDetails boolean
    Do not add export details. Defaults to true.
    includeReferencesDeep boolean
    Include references to other saved objects recursively. Defaults to true.
    kibanaConnections GetKibanaExportSavedObjectsKibanaConnection[]
    Kibana connection configuration block.
    spaceId string
    An identifier for the space. If space_id is not provided, the default space is used.
    exported_objects str
    The exported objects in NDJSON format.
    id str
    Generated ID for the export.
    objects Sequence[GetKibanaExportSavedObjectsObject]
    List of objects to export.
    exclude_export_details bool
    Do not add export details. Defaults to true.
    include_references_deep bool
    Include references to other saved objects recursively. Defaults to true.
    kibana_connections Sequence[GetKibanaExportSavedObjectsKibanaConnection]
    Kibana connection configuration block.
    space_id str
    An identifier for the space. If space_id is not provided, the default space is used.
    exportedObjects String
    The exported objects in NDJSON format.
    id String
    Generated ID for the export.
    objects List<Property Map>
    List of objects to export.
    excludeExportDetails Boolean
    Do not add export details. Defaults to true.
    includeReferencesDeep Boolean
    Include references to other saved objects recursively. Defaults to true.
    kibanaConnections List<Property Map>
    Kibana connection configuration block.
    spaceId String
    An identifier for the space. If space_id is not provided, the default space is used.

    Supporting Types

    GetKibanaExportSavedObjectsKibanaConnection

    ApiKey string
    API Key to use for authentication to Kibana
    BearerToken string
    Bearer Token to use for authentication to Kibana
    CaCerts List<string>
    A list of paths to CA certificates to validate the certificate presented by the Kibana server.
    Endpoints List<string>
    Insecure bool
    Disable TLS certificate validation
    Password string
    Password to use for API authentication to Kibana.
    Username string
    Username to use for API authentication to Kibana.
    ApiKey string
    API Key to use for authentication to Kibana
    BearerToken string
    Bearer Token to use for authentication to Kibana
    CaCerts []string
    A list of paths to CA certificates to validate the certificate presented by the Kibana server.
    Endpoints []string
    Insecure bool
    Disable TLS certificate validation
    Password string
    Password to use for API authentication to Kibana.
    Username string
    Username to use for API authentication to Kibana.
    api_key string
    API Key to use for authentication to Kibana
    bearer_token string
    Bearer Token to use for authentication to Kibana
    ca_certs list(string)
    A list of paths to CA certificates to validate the certificate presented by the Kibana server.
    endpoints list(string)
    insecure bool
    Disable TLS certificate validation
    password string
    Password to use for API authentication to Kibana.
    username string
    Username to use for API authentication to Kibana.
    apiKey String
    API Key to use for authentication to Kibana
    bearerToken String
    Bearer Token to use for authentication to Kibana
    caCerts List<String>
    A list of paths to CA certificates to validate the certificate presented by the Kibana server.
    endpoints List<String>
    insecure Boolean
    Disable TLS certificate validation
    password String
    Password to use for API authentication to Kibana.
    username String
    Username to use for API authentication to Kibana.
    apiKey string
    API Key to use for authentication to Kibana
    bearerToken string
    Bearer Token to use for authentication to Kibana
    caCerts string[]
    A list of paths to CA certificates to validate the certificate presented by the Kibana server.
    endpoints string[]
    insecure boolean
    Disable TLS certificate validation
    password string
    Password to use for API authentication to Kibana.
    username string
    Username to use for API authentication to Kibana.
    api_key str
    API Key to use for authentication to Kibana
    bearer_token str
    Bearer Token to use for authentication to Kibana
    ca_certs Sequence[str]
    A list of paths to CA certificates to validate the certificate presented by the Kibana server.
    endpoints Sequence[str]
    insecure bool
    Disable TLS certificate validation
    password str
    Password to use for API authentication to Kibana.
    username str
    Username to use for API authentication to Kibana.
    apiKey String
    API Key to use for authentication to Kibana
    bearerToken String
    Bearer Token to use for authentication to Kibana
    caCerts List<String>
    A list of paths to CA certificates to validate the certificate presented by the Kibana server.
    endpoints List<String>
    insecure Boolean
    Disable TLS certificate validation
    password String
    Password to use for API authentication to Kibana.
    username String
    Username to use for API authentication to Kibana.

    GetKibanaExportSavedObjectsObject

    Id string
    The ID of the saved object.
    Type string
    The type of the saved object.
    Id string
    The ID of the saved object.
    Type string
    The type of the saved object.
    id string
    The ID of the saved object.
    type string
    The type of the saved object.
    id String
    The ID of the saved object.
    type String
    The type of the saved object.
    id string
    The ID of the saved object.
    type string
    The type of the saved object.
    id str
    The ID of the saved object.
    type str
    The type of the saved object.
    id String
    The ID of the saved object.
    type String
    The type of the saved object.

    Package Details

    Repository
    elasticstack elastic/terraform-provider-elasticstack
    License
    Notes
    This Pulumi package is based on the elasticstack Terraform Provider.
    Viewing docs for elasticstack 0.15.0
    published on Thursday, May 14, 2026 by elastic
      Try Pulumi Cloud free. Your team will thank you.