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

elasticstack.KibanaImportSavedObjects

Explore with Pulumi AI

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

    Create sets of Kibana saved objects from a file created by the export API. See https://www.elastic.co/guide/en/kibana/current/saved-objects-api-import.html

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as elasticstack from "@pulumi/elasticstack";
    
    const settings = new elasticstack.KibanaImportSavedObjects("settings", {
        overwrite: true,
        fileContents: `{"attributes":{"buildNum":42747,"defaultIndex":"metricbeat-*","theme:darkMode":true},"coreMigrationVersion":"7.0.0","id":"7.14.0","managed":false,"references":[],"type":"config","typeMigrationVersion":"7.0.0","updated_at":"2021-08-04T02:04:43.306Z","version":"WzY1MiwyXQ=="}
    {"excludedObjects":[],"excludedObjectsCount":0,"exportedCount":1,"missingRefCount":0,"missingReferences":[]}
    `,
    });
    
    import pulumi
    import pulumi_elasticstack as elasticstack
    
    settings = elasticstack.KibanaImportSavedObjects("settings",
        overwrite=True,
        file_contents="""{"attributes":{"buildNum":42747,"defaultIndex":"metricbeat-*","theme:darkMode":true},"coreMigrationVersion":"7.0.0","id":"7.14.0","managed":false,"references":[],"type":"config","typeMigrationVersion":"7.0.0","updated_at":"2021-08-04T02:04:43.306Z","version":"WzY1MiwyXQ=="}
    {"excludedObjects":[],"excludedObjectsCount":0,"exportedCount":1,"missingRefCount":0,"missingReferences":[]}
    """)
    
    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 {
    		_, err := elasticstack.NewKibanaImportSavedObjects(ctx, "settings", &elasticstack.KibanaImportSavedObjectsArgs{
    			Overwrite:    pulumi.Bool(true),
    			FileContents: pulumi.String("{\"attributes\":{\"buildNum\":42747,\"defaultIndex\":\"metricbeat-*\",\"theme:darkMode\":true},\"coreMigrationVersion\":\"7.0.0\",\"id\":\"7.14.0\",\"managed\":false,\"references\":[],\"type\":\"config\",\"typeMigrationVersion\":\"7.0.0\",\"updated_at\":\"2021-08-04T02:04:43.306Z\",\"version\":\"WzY1MiwyXQ==\"}\n{\"excludedObjects\":[],\"excludedObjectsCount\":0,\"exportedCount\":1,\"missingRefCount\":0,\"missingReferences\":[]}\n"),
    		})
    		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 settings = new Elasticstack.KibanaImportSavedObjects("settings", new()
        {
            Overwrite = true,
            FileContents = @"{""attributes"":{""buildNum"":42747,""defaultIndex"":""metricbeat-*"",""theme:darkMode"":true},""coreMigrationVersion"":""7.0.0"",""id"":""7.14.0"",""managed"":false,""references"":[],""type"":""config"",""typeMigrationVersion"":""7.0.0"",""updated_at"":""2021-08-04T02:04:43.306Z"",""version"":""WzY1MiwyXQ==""}
    {""excludedObjects"":[],""excludedObjectsCount"":0,""exportedCount"":1,""missingRefCount"":0,""missingReferences"":[]}
    ",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.elasticstack.KibanaImportSavedObjects;
    import com.pulumi.elasticstack.KibanaImportSavedObjectsArgs;
    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) {
            var settings = new KibanaImportSavedObjects("settings", KibanaImportSavedObjectsArgs.builder()
                .overwrite(true)
                .fileContents("""
    {"attributes":{"buildNum":42747,"defaultIndex":"metricbeat-*","theme:darkMode":true},"coreMigrationVersion":"7.0.0","id":"7.14.0","managed":false,"references":[],"type":"config","typeMigrationVersion":"7.0.0","updated_at":"2021-08-04T02:04:43.306Z","version":"WzY1MiwyXQ=="}
    {"excludedObjects":[],"excludedObjectsCount":0,"exportedCount":1,"missingRefCount":0,"missingReferences":[]}
                """)
                .build());
    
        }
    }
    
    resources:
      settings:
        type: elasticstack:KibanaImportSavedObjects
        properties:
          overwrite: true
          fileContents: |
            {"attributes":{"buildNum":42747,"defaultIndex":"metricbeat-*","theme:darkMode":true},"coreMigrationVersion":"7.0.0","id":"7.14.0","managed":false,"references":[],"type":"config","typeMigrationVersion":"7.0.0","updated_at":"2021-08-04T02:04:43.306Z","version":"WzY1MiwyXQ=="}
            {"excludedObjects":[],"excludedObjectsCount":0,"exportedCount":1,"missingRefCount":0,"missingReferences":[]}        
    

    Create KibanaImportSavedObjects Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new KibanaImportSavedObjects(name: string, args: KibanaImportSavedObjectsArgs, opts?: CustomResourceOptions);
    @overload
    def KibanaImportSavedObjects(resource_name: str,
                                 args: KibanaImportSavedObjectsArgs,
                                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def KibanaImportSavedObjects(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 file_contents: Optional[str] = None,
                                 ignore_import_errors: Optional[bool] = None,
                                 overwrite: Optional[bool] = None,
                                 space_id: Optional[str] = None)
    func NewKibanaImportSavedObjects(ctx *Context, name string, args KibanaImportSavedObjectsArgs, opts ...ResourceOption) (*KibanaImportSavedObjects, error)
    public KibanaImportSavedObjects(string name, KibanaImportSavedObjectsArgs args, CustomResourceOptions? opts = null)
    public KibanaImportSavedObjects(String name, KibanaImportSavedObjectsArgs args)
    public KibanaImportSavedObjects(String name, KibanaImportSavedObjectsArgs args, CustomResourceOptions options)
    
    type: elasticstack:KibanaImportSavedObjects
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args KibanaImportSavedObjectsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args KibanaImportSavedObjectsArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args KibanaImportSavedObjectsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args KibanaImportSavedObjectsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args KibanaImportSavedObjectsArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var kibanaImportSavedObjectsResource = new Elasticstack.KibanaImportSavedObjects("kibanaImportSavedObjectsResource", new()
    {
        FileContents = "string",
        IgnoreImportErrors = false,
        Overwrite = false,
        SpaceId = "string",
    });
    
    example, err := elasticstack.NewKibanaImportSavedObjects(ctx, "kibanaImportSavedObjectsResource", &elasticstack.KibanaImportSavedObjectsArgs{
    	FileContents:       pulumi.String("string"),
    	IgnoreImportErrors: pulumi.Bool(false),
    	Overwrite:          pulumi.Bool(false),
    	SpaceId:            pulumi.String("string"),
    })
    
    var kibanaImportSavedObjectsResource = new KibanaImportSavedObjects("kibanaImportSavedObjectsResource", KibanaImportSavedObjectsArgs.builder()
        .fileContents("string")
        .ignoreImportErrors(false)
        .overwrite(false)
        .spaceId("string")
        .build());
    
    kibana_import_saved_objects_resource = elasticstack.KibanaImportSavedObjects("kibanaImportSavedObjectsResource",
        file_contents="string",
        ignore_import_errors=False,
        overwrite=False,
        space_id="string")
    
    const kibanaImportSavedObjectsResource = new elasticstack.KibanaImportSavedObjects("kibanaImportSavedObjectsResource", {
        fileContents: "string",
        ignoreImportErrors: false,
        overwrite: false,
        spaceId: "string",
    });
    
    type: elasticstack:KibanaImportSavedObjects
    properties:
        fileContents: string
        ignoreImportErrors: false
        overwrite: false
        spaceId: string
    

    KibanaImportSavedObjects Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The KibanaImportSavedObjects resource accepts the following input properties:

    FileContents string
    The contents of the exported saved objects file.
    IgnoreImportErrors bool
    If set to true, errors during the import process will not fail the configuration application
    Overwrite bool
    Overwrites saved objects when they already exist. When used, potential conflict errors are automatically resolved by overwriting the destination object.
    SpaceId string
    An identifier for the space. If space_id is not provided, the default space is used.
    FileContents string
    The contents of the exported saved objects file.
    IgnoreImportErrors bool
    If set to true, errors during the import process will not fail the configuration application
    Overwrite bool
    Overwrites saved objects when they already exist. When used, potential conflict errors are automatically resolved by overwriting the destination object.
    SpaceId string
    An identifier for the space. If space_id is not provided, the default space is used.
    fileContents String
    The contents of the exported saved objects file.
    ignoreImportErrors Boolean
    If set to true, errors during the import process will not fail the configuration application
    overwrite Boolean
    Overwrites saved objects when they already exist. When used, potential conflict errors are automatically resolved by overwriting the destination object.
    spaceId String
    An identifier for the space. If space_id is not provided, the default space is used.
    fileContents string
    The contents of the exported saved objects file.
    ignoreImportErrors boolean
    If set to true, errors during the import process will not fail the configuration application
    overwrite boolean
    Overwrites saved objects when they already exist. When used, potential conflict errors are automatically resolved by overwriting the destination object.
    spaceId string
    An identifier for the space. If space_id is not provided, the default space is used.
    file_contents str
    The contents of the exported saved objects file.
    ignore_import_errors bool
    If set to true, errors during the import process will not fail the configuration application
    overwrite bool
    Overwrites saved objects when they already exist. When used, potential conflict errors are automatically resolved by overwriting the destination object.
    space_id str
    An identifier for the space. If space_id is not provided, the default space is used.
    fileContents String
    The contents of the exported saved objects file.
    ignoreImportErrors Boolean
    If set to true, errors during the import process will not fail the configuration application
    overwrite Boolean
    Overwrites saved objects when they already exist. When used, potential conflict errors are automatically resolved by overwriting the destination object.
    spaceId String
    An identifier for the space. If space_id is not provided, the default space is used.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the KibanaImportSavedObjects resource produces the following output properties:

    Errors List<KibanaImportSavedObjectsError>
    Id string
    The provider-assigned unique ID for this managed resource.
    Success bool
    Indicates when the import was successfully completed. When set to false, some objects may not have been created. For additional information, refer to the errors and success_results properties.
    SuccessCount double
    Indicates the number of successfully imported records.
    SuccessResults List<KibanaImportSavedObjectsSuccessResult>
    Errors []KibanaImportSavedObjectsError
    Id string
    The provider-assigned unique ID for this managed resource.
    Success bool
    Indicates when the import was successfully completed. When set to false, some objects may not have been created. For additional information, refer to the errors and success_results properties.
    SuccessCount float64
    Indicates the number of successfully imported records.
    SuccessResults []KibanaImportSavedObjectsSuccessResult
    errors List<KibanaImportSavedObjectsError>
    id String
    The provider-assigned unique ID for this managed resource.
    success Boolean
    Indicates when the import was successfully completed. When set to false, some objects may not have been created. For additional information, refer to the errors and success_results properties.
    successCount Double
    Indicates the number of successfully imported records.
    successResults List<KibanaImportSavedObjectsSuccessResult>
    errors KibanaImportSavedObjectsError[]
    id string
    The provider-assigned unique ID for this managed resource.
    success boolean
    Indicates when the import was successfully completed. When set to false, some objects may not have been created. For additional information, refer to the errors and success_results properties.
    successCount number
    Indicates the number of successfully imported records.
    successResults KibanaImportSavedObjectsSuccessResult[]
    errors Sequence[KibanaImportSavedObjectsError]
    id str
    The provider-assigned unique ID for this managed resource.
    success bool
    Indicates when the import was successfully completed. When set to false, some objects may not have been created. For additional information, refer to the errors and success_results properties.
    success_count float
    Indicates the number of successfully imported records.
    success_results Sequence[KibanaImportSavedObjectsSuccessResult]
    errors List<Property Map>
    id String
    The provider-assigned unique ID for this managed resource.
    success Boolean
    Indicates when the import was successfully completed. When set to false, some objects may not have been created. For additional information, refer to the errors and success_results properties.
    successCount Number
    Indicates the number of successfully imported records.
    successResults List<Property Map>

    Look up Existing KibanaImportSavedObjects Resource

    Get an existing KibanaImportSavedObjects resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: KibanaImportSavedObjectsState, opts?: CustomResourceOptions): KibanaImportSavedObjects
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            errors: Optional[Sequence[KibanaImportSavedObjectsErrorArgs]] = None,
            file_contents: Optional[str] = None,
            ignore_import_errors: Optional[bool] = None,
            overwrite: Optional[bool] = None,
            space_id: Optional[str] = None,
            success: Optional[bool] = None,
            success_count: Optional[float] = None,
            success_results: Optional[Sequence[KibanaImportSavedObjectsSuccessResultArgs]] = None) -> KibanaImportSavedObjects
    func GetKibanaImportSavedObjects(ctx *Context, name string, id IDInput, state *KibanaImportSavedObjectsState, opts ...ResourceOption) (*KibanaImportSavedObjects, error)
    public static KibanaImportSavedObjects Get(string name, Input<string> id, KibanaImportSavedObjectsState? state, CustomResourceOptions? opts = null)
    public static KibanaImportSavedObjects get(String name, Output<String> id, KibanaImportSavedObjectsState state, CustomResourceOptions options)
    resources:  _:    type: elasticstack:KibanaImportSavedObjects    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Errors List<KibanaImportSavedObjectsError>
    FileContents string
    The contents of the exported saved objects file.
    IgnoreImportErrors bool
    If set to true, errors during the import process will not fail the configuration application
    Overwrite bool
    Overwrites saved objects when they already exist. When used, potential conflict errors are automatically resolved by overwriting the destination object.
    SpaceId string
    An identifier for the space. If space_id is not provided, the default space is used.
    Success bool
    Indicates when the import was successfully completed. When set to false, some objects may not have been created. For additional information, refer to the errors and success_results properties.
    SuccessCount double
    Indicates the number of successfully imported records.
    SuccessResults List<KibanaImportSavedObjectsSuccessResult>
    Errors []KibanaImportSavedObjectsErrorArgs
    FileContents string
    The contents of the exported saved objects file.
    IgnoreImportErrors bool
    If set to true, errors during the import process will not fail the configuration application
    Overwrite bool
    Overwrites saved objects when they already exist. When used, potential conflict errors are automatically resolved by overwriting the destination object.
    SpaceId string
    An identifier for the space. If space_id is not provided, the default space is used.
    Success bool
    Indicates when the import was successfully completed. When set to false, some objects may not have been created. For additional information, refer to the errors and success_results properties.
    SuccessCount float64
    Indicates the number of successfully imported records.
    SuccessResults []KibanaImportSavedObjectsSuccessResultArgs
    errors List<KibanaImportSavedObjectsError>
    fileContents String
    The contents of the exported saved objects file.
    ignoreImportErrors Boolean
    If set to true, errors during the import process will not fail the configuration application
    overwrite Boolean
    Overwrites saved objects when they already exist. When used, potential conflict errors are automatically resolved by overwriting the destination object.
    spaceId String
    An identifier for the space. If space_id is not provided, the default space is used.
    success Boolean
    Indicates when the import was successfully completed. When set to false, some objects may not have been created. For additional information, refer to the errors and success_results properties.
    successCount Double
    Indicates the number of successfully imported records.
    successResults List<KibanaImportSavedObjectsSuccessResult>
    errors KibanaImportSavedObjectsError[]
    fileContents string
    The contents of the exported saved objects file.
    ignoreImportErrors boolean
    If set to true, errors during the import process will not fail the configuration application
    overwrite boolean
    Overwrites saved objects when they already exist. When used, potential conflict errors are automatically resolved by overwriting the destination object.
    spaceId string
    An identifier for the space. If space_id is not provided, the default space is used.
    success boolean
    Indicates when the import was successfully completed. When set to false, some objects may not have been created. For additional information, refer to the errors and success_results properties.
    successCount number
    Indicates the number of successfully imported records.
    successResults KibanaImportSavedObjectsSuccessResult[]
    errors Sequence[KibanaImportSavedObjectsErrorArgs]
    file_contents str
    The contents of the exported saved objects file.
    ignore_import_errors bool
    If set to true, errors during the import process will not fail the configuration application
    overwrite bool
    Overwrites saved objects when they already exist. When used, potential conflict errors are automatically resolved by overwriting the destination object.
    space_id str
    An identifier for the space. If space_id is not provided, the default space is used.
    success bool
    Indicates when the import was successfully completed. When set to false, some objects may not have been created. For additional information, refer to the errors and success_results properties.
    success_count float
    Indicates the number of successfully imported records.
    success_results Sequence[KibanaImportSavedObjectsSuccessResultArgs]
    errors List<Property Map>
    fileContents String
    The contents of the exported saved objects file.
    ignoreImportErrors Boolean
    If set to true, errors during the import process will not fail the configuration application
    overwrite Boolean
    Overwrites saved objects when they already exist. When used, potential conflict errors are automatically resolved by overwriting the destination object.
    spaceId String
    An identifier for the space. If space_id is not provided, the default space is used.
    success Boolean
    Indicates when the import was successfully completed. When set to false, some objects may not have been created. For additional information, refer to the errors and success_results properties.
    successCount Number
    Indicates the number of successfully imported records.
    successResults List<Property Map>

    Supporting Types

    KibanaImportSavedObjectsError, KibanaImportSavedObjectsErrorArgs

    KibanaImportSavedObjectsErrorError, KibanaImportSavedObjectsErrorErrorArgs

    Type string
    Type string
    type String
    type string
    type str
    type String

    KibanaImportSavedObjectsErrorMeta, KibanaImportSavedObjectsErrorMetaArgs

    Icon string
    Title string
    Icon string
    Title string
    icon String
    title String
    icon string
    title string
    icon str
    title str
    icon String
    title String

    KibanaImportSavedObjectsSuccessResult, KibanaImportSavedObjectsSuccessResultArgs

    KibanaImportSavedObjectsSuccessResultMeta, KibanaImportSavedObjectsSuccessResultMetaArgs

    Icon string
    Title string
    Icon string
    Title string
    icon String
    title String
    icon string
    title string
    icon str
    title str
    icon String
    title String

    Import

    Import is not supported.

    To learn more about importing existing cloud resources, see Importing resources.

    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