UNPKG

@piclemx/pulumi-opensearch

Version:

A Pulumi package for creating and managing Opensearch resources. Based on terraform-provider-opensearch: version v2.2.1

96 lines (95 loc) 3.13 kB
import * as pulumi from "@pulumi/pulumi"; /** * Provides an OpenSearch script resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as opensearch from "@piclemx/pulumi-opensearch"; * * // Create a script * const testScript = new opensearch.Script("testScript", { * lang: "painless", * scriptId: "my_script", * source: "Math.log(_score * 2) + params.my_modifier", * }); * ``` * * ## Import * * ```sh * $ pulumi import opensearch:index/script:Script test_script my_script * ``` */ export declare class Script extends pulumi.CustomResource { /** * Get an existing Script resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ScriptState, opts?: pulumi.CustomResourceOptions): Script; /** * Returns true if the given object is an instance of Script. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Script; /** * Specifies the language the script is written in. Defaults to painless. */ readonly lang: pulumi.Output<string | undefined>; /** * Identifier for the stored script. Must be unique within the cluster. */ readonly scriptId: pulumi.Output<string>; /** * The source of the stored script */ readonly source: pulumi.Output<string>; /** * Create a Script resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ScriptArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Script resources. */ export interface ScriptState { /** * Specifies the language the script is written in. Defaults to painless. */ lang?: pulumi.Input<string>; /** * Identifier for the stored script. Must be unique within the cluster. */ scriptId?: pulumi.Input<string>; /** * The source of the stored script */ source?: pulumi.Input<string>; } /** * The set of arguments for constructing a Script resource. */ export interface ScriptArgs { /** * Specifies the language the script is written in. Defaults to painless. */ lang?: pulumi.Input<string>; /** * Identifier for the stored script. Must be unique within the cluster. */ scriptId: pulumi.Input<string>; /** * The source of the stored script */ source: pulumi.Input<string>; }