elasticstack.KibanaImportSavedObjects
Explore with Pulumi AI
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:
- File
Contents string - The contents of the exported saved objects file.
- Ignore
Import boolErrors - 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 string - An identifier for the space. If space_id is not provided, the default space is used.
- File
Contents string - The contents of the exported saved objects file.
- Ignore
Import boolErrors - 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 string - An identifier for the space. If space_id is not provided, the default space is used.
- file
Contents String - The contents of the exported saved objects file.
- ignore
Import BooleanErrors - 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.
- space
Id String - An identifier for the space. If space_id is not provided, the default space is used.
- file
Contents string - The contents of the exported saved objects file.
- ignore
Import booleanErrors - 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.
- space
Id 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_ boolerrors - 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.
- file
Contents String - The contents of the exported saved objects file.
- ignore
Import BooleanErrors - 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.
- space
Id 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<Kibana
Import Saved Objects Error> - 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.
- Success
Count double - Indicates the number of successfully imported records.
- Success
Results List<KibanaImport Saved Objects Success Result>
- Errors
[]Kibana
Import Saved Objects Error - 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.
- Success
Count float64 - Indicates the number of successfully imported records.
- Success
Results []KibanaImport Saved Objects Success Result
- errors
List<Kibana
Import Saved Objects Error> - 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.
- success
Count Double - Indicates the number of successfully imported records.
- success
Results List<KibanaImport Saved Objects Success Result>
- errors
Kibana
Import Saved Objects Error[] - 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.
- success
Count number - Indicates the number of successfully imported records.
- success
Results KibanaImport Saved Objects Success Result[]
- errors
Sequence[Kibana
Import Saved Objects Error] - 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[KibanaImport Saved Objects Success Result]
- 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.
- success
Count Number - Indicates the number of successfully imported records.
- success
Results 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.
- Errors
List<Kibana
Import Saved Objects Error> - File
Contents string - The contents of the exported saved objects file.
- Ignore
Import boolErrors - 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 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.
- Success
Count double - Indicates the number of successfully imported records.
- Success
Results List<KibanaImport Saved Objects Success Result>
- Errors
[]Kibana
Import Saved Objects Error Args - File
Contents string - The contents of the exported saved objects file.
- Ignore
Import boolErrors - 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 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.
- Success
Count float64 - Indicates the number of successfully imported records.
- Success
Results []KibanaImport Saved Objects Success Result Args
- errors
List<Kibana
Import Saved Objects Error> - file
Contents String - The contents of the exported saved objects file.
- ignore
Import BooleanErrors - 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.
- space
Id 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.
- success
Count Double - Indicates the number of successfully imported records.
- success
Results List<KibanaImport Saved Objects Success Result>
- errors
Kibana
Import Saved Objects Error[] - file
Contents string - The contents of the exported saved objects file.
- ignore
Import booleanErrors - 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.
- space
Id 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.
- success
Count number - Indicates the number of successfully imported records.
- success
Results KibanaImport Saved Objects Success Result[]
- errors
Sequence[Kibana
Import Saved Objects Error Args] - file_
contents str - The contents of the exported saved objects file.
- ignore_
import_ boolerrors - 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[KibanaImport Saved Objects Success Result Args]
- errors List<Property Map>
- file
Contents String - The contents of the exported saved objects file.
- ignore
Import BooleanErrors - 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.
- space
Id 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.
- success
Count Number - Indicates the number of successfully imported records.
- success
Results List<Property Map>
Supporting Types
KibanaImportSavedObjectsError, KibanaImportSavedObjectsErrorArgs
- Error
Kibana
Import Saved Objects Error Error - Id string
- Meta
Kibana
Import Saved Objects Error Meta - Title string
- Type string
- Error
Kibana
Import Saved Objects Error Error - Id string
- Meta
Kibana
Import Saved Objects Error Meta - Title string
- Type string
- error
Kibana
Import Saved Objects Error Error - id String
- meta
Kibana
Import Saved Objects Error Meta - title String
- type String
- error
Kibana
Import Saved Objects Error Error - id string
- meta
Kibana
Import Saved Objects Error Meta - title string
- type string
- error Property Map
- id String
- meta Property Map
- title String
- type String
KibanaImportSavedObjectsErrorError, KibanaImportSavedObjectsErrorErrorArgs
- Type string
- Type string
- type String
- type string
- type str
- type String
KibanaImportSavedObjectsErrorMeta, KibanaImportSavedObjectsErrorMetaArgs
KibanaImportSavedObjectsSuccessResult, KibanaImportSavedObjectsSuccessResultArgs
- Destination
Id string - Id string
- Meta
Kibana
Import Saved Objects Success Result Meta - Type string
- Destination
Id string - Id string
- Meta
Kibana
Import Saved Objects Success Result Meta - Type string
- destination
Id String - id String
- meta
Kibana
Import Saved Objects Success Result Meta - type String
- destination
Id string - id string
- meta
Kibana
Import Saved Objects Success Result Meta - type string
- destination
Id String - id String
- meta Property Map
- type String
KibanaImportSavedObjectsSuccessResultMeta, KibanaImportSavedObjectsSuccessResultMetaArgs
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.