1. Packages
  2. Splight
  3. API Docs
  4. Function
splight v0.1.24 published on Friday, Jun 28, 2024 by splightplatform

splight.Function

Explore with Pulumi AI

splight logo
splight v0.1.24 published on Friday, Jun 28, 2024 by splightplatform

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as splight from "@splightplatform/pulumi-splight";
    
    const functionTest = new splight.Function("functionTest", {
        description: "Created with Terraform",
        type: "rate",
        timeWindow: 600,
        rateValue: 10,
        rateUnit: "minute",
        targetVariable: "A",
        targetAsset: {
            id: "49551a15-d79b-40dc-9434-1b33d6b2fcb2",
            name: "An asset",
        },
        targetAttribute: {
            id: "49551a15-d79b-40dc-9434-1b33d6b2fcb2",
            name: "An attribute",
        },
        functionItems: [
            {
                refId: "A",
                type: "QUERY",
                expressionPlain: "",
                queryPlain: JSON.stringify([{
                    $match: {
                        asset: "49551a15-d79b-40dc-9434-1b33d6b2fcb2",
                        attribute: "c1d0d94b-5feb-4ebb-a527-0b0a34196252",
                    },
                }]),
            },
            {
                refId: "B",
                type: "QUERY",
                expressionPlain: "",
                queryPlain: JSON.stringify([{
                    $match: {
                        asset: "49551a15-d79b-40dc-9434-1b33d6b2fcb2",
                        attribute: "c1d0d94b-5feb-4ebb-a527-0b0a34196252",
                    },
                }]),
            },
        ],
    });
    
    import pulumi
    import json
    import pulumi_splight as splight
    
    function_test = splight.Function("functionTest",
        description="Created with Terraform",
        type="rate",
        time_window=600,
        rate_value=10,
        rate_unit="minute",
        target_variable="A",
        target_asset={
            "id": "49551a15-d79b-40dc-9434-1b33d6b2fcb2",
            "name": "An asset",
        },
        target_attribute={
            "id": "49551a15-d79b-40dc-9434-1b33d6b2fcb2",
            "name": "An attribute",
        },
        function_items=[
            splight.FunctionFunctionItemArgs(
                ref_id="A",
                type="QUERY",
                expression_plain="",
                query_plain=json.dumps([{
                    "$match": {
                        "asset": "49551a15-d79b-40dc-9434-1b33d6b2fcb2",
                        "attribute": "c1d0d94b-5feb-4ebb-a527-0b0a34196252",
                    },
                }]),
            ),
            splight.FunctionFunctionItemArgs(
                ref_id="B",
                type="QUERY",
                expression_plain="",
                query_plain=json.dumps([{
                    "$match": {
                        "asset": "49551a15-d79b-40dc-9434-1b33d6b2fcb2",
                        "attribute": "c1d0d94b-5feb-4ebb-a527-0b0a34196252",
                    },
                }]),
            ),
        ])
    
    package main
    
    import (
    	"encoding/json"
    
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/splightplatform/pulumi-splight/sdk/go/splight"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		tmpJSON0, err := json.Marshal([]map[string]interface{}{
    			map[string]interface{}{
    				"$match": map[string]interface{}{
    					"asset":     "49551a15-d79b-40dc-9434-1b33d6b2fcb2",
    					"attribute": "c1d0d94b-5feb-4ebb-a527-0b0a34196252",
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		tmpJSON1, err := json.Marshal([]map[string]interface{}{
    			map[string]interface{}{
    				"$match": map[string]interface{}{
    					"asset":     "49551a15-d79b-40dc-9434-1b33d6b2fcb2",
    					"attribute": "c1d0d94b-5feb-4ebb-a527-0b0a34196252",
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		json1 := string(tmpJSON1)
    		_, err = splight.NewFunction(ctx, "functionTest", &splight.FunctionArgs{
    			Description:    pulumi.String("Created with Terraform"),
    			Type:           pulumi.String("rate"),
    			TimeWindow:     pulumi.Int(600),
    			RateValue:      pulumi.Int(10),
    			RateUnit:       pulumi.String("minute"),
    			TargetVariable: pulumi.String("A"),
    			TargetAsset: pulumi.StringMap{
    				"id":   pulumi.String("49551a15-d79b-40dc-9434-1b33d6b2fcb2"),
    				"name": pulumi.String("An asset"),
    			},
    			TargetAttribute: pulumi.StringMap{
    				"id":   pulumi.String("49551a15-d79b-40dc-9434-1b33d6b2fcb2"),
    				"name": pulumi.String("An attribute"),
    			},
    			FunctionItems: splight.FunctionFunctionItemArray{
    				&splight.FunctionFunctionItemArgs{
    					RefId:           pulumi.String("A"),
    					Type:            pulumi.String("QUERY"),
    					ExpressionPlain: pulumi.String(""),
    					QueryPlain:      pulumi.String(json0),
    				},
    				&splight.FunctionFunctionItemArgs{
    					RefId:           pulumi.String("B"),
    					Type:            pulumi.String("QUERY"),
    					ExpressionPlain: pulumi.String(""),
    					QueryPlain:      pulumi.String(json1),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Splight = Splight.Splight;
    
    return await Deployment.RunAsync(() => 
    {
        var functionTest = new Splight.Function("functionTest", new()
        {
            Description = "Created with Terraform",
            Type = "rate",
            TimeWindow = 600,
            RateValue = 10,
            RateUnit = "minute",
            TargetVariable = "A",
            TargetAsset = 
            {
                { "id", "49551a15-d79b-40dc-9434-1b33d6b2fcb2" },
                { "name", "An asset" },
            },
            TargetAttribute = 
            {
                { "id", "49551a15-d79b-40dc-9434-1b33d6b2fcb2" },
                { "name", "An attribute" },
            },
            FunctionItems = new[]
            {
                new Splight.Inputs.FunctionFunctionItemArgs
                {
                    RefId = "A",
                    Type = "QUERY",
                    ExpressionPlain = "",
                    QueryPlain = JsonSerializer.Serialize(new[]
                    {
                        new Dictionary<string, object?>
                        {
                            ["$match"] = new Dictionary<string, object?>
                            {
                                ["asset"] = "49551a15-d79b-40dc-9434-1b33d6b2fcb2",
                                ["attribute"] = "c1d0d94b-5feb-4ebb-a527-0b0a34196252",
                            },
                        },
                    }),
                },
                new Splight.Inputs.FunctionFunctionItemArgs
                {
                    RefId = "B",
                    Type = "QUERY",
                    ExpressionPlain = "",
                    QueryPlain = JsonSerializer.Serialize(new[]
                    {
                        new Dictionary<string, object?>
                        {
                            ["$match"] = new Dictionary<string, object?>
                            {
                                ["asset"] = "49551a15-d79b-40dc-9434-1b33d6b2fcb2",
                                ["attribute"] = "c1d0d94b-5feb-4ebb-a527-0b0a34196252",
                            },
                        },
                    }),
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.splight.Function;
    import com.pulumi.splight.FunctionArgs;
    import com.pulumi.splight.inputs.FunctionFunctionItemArgs;
    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) {
            var functionTest = new Function("functionTest", FunctionArgs.builder()
                .description("Created with Terraform")
                .type("rate")
                .timeWindow(600)
                .rateValue(10)
                .rateUnit("minute")
                .targetVariable("A")
                .targetAsset(Map.ofEntries(
                    Map.entry("id", "49551a15-d79b-40dc-9434-1b33d6b2fcb2"),
                    Map.entry("name", "An asset")
                ))
                .targetAttribute(Map.ofEntries(
                    Map.entry("id", "49551a15-d79b-40dc-9434-1b33d6b2fcb2"),
                    Map.entry("name", "An attribute")
                ))
                .functionItems(            
                    FunctionFunctionItemArgs.builder()
                        .refId("A")
                        .type("QUERY")
                        .expressionPlain("")
                        .queryPlain(serializeJson(
                            jsonArray(jsonObject(
                                jsonProperty("$match", jsonObject(
                                    jsonProperty("asset", "49551a15-d79b-40dc-9434-1b33d6b2fcb2"),
                                    jsonProperty("attribute", "c1d0d94b-5feb-4ebb-a527-0b0a34196252")
                                ))
                            ))))
                        .build(),
                    FunctionFunctionItemArgs.builder()
                        .refId("B")
                        .type("QUERY")
                        .expressionPlain("")
                        .queryPlain(serializeJson(
                            jsonArray(jsonObject(
                                jsonProperty("$match", jsonObject(
                                    jsonProperty("asset", "49551a15-d79b-40dc-9434-1b33d6b2fcb2"),
                                    jsonProperty("attribute", "c1d0d94b-5feb-4ebb-a527-0b0a34196252")
                                ))
                            ))))
                        .build())
                .build());
    
        }
    }
    
    resources:
      functionTest:
        type: splight:Function
        properties:
          description: Created with Terraform
          type: rate
          timeWindow: 600
          rateValue: 10
          rateUnit: minute
          targetVariable: A
          targetAsset:
            id: 49551a15-d79b-40dc-9434-1b33d6b2fcb2
            name: An asset
          targetAttribute:
            id: 49551a15-d79b-40dc-9434-1b33d6b2fcb2
            name: An attribute
          functionItems:
            - refId: A
              type: QUERY
              expressionPlain:
              queryPlain:
                fn::toJSON:
                  - $match:
                      asset: 49551a15-d79b-40dc-9434-1b33d6b2fcb2
                      attribute: c1d0d94b-5feb-4ebb-a527-0b0a34196252
            - refId: B
              type: QUERY
              expressionPlain:
              queryPlain:
                fn::toJSON:
                  - $match:
                      asset: 49551a15-d79b-40dc-9434-1b33d6b2fcb2
                      attribute: c1d0d94b-5feb-4ebb-a527-0b0a34196252
    

    Create Function Resource

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

    Constructor syntax

    new Function(name: string, args: FunctionArgs, opts?: CustomResourceOptions);
    @overload
    def Function(resource_name: str,
                 args: FunctionArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Function(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 function_items: Optional[Sequence[FunctionFunctionItemArgs]] = None,
                 type: Optional[str] = None,
                 time_window: Optional[int] = None,
                 target_variable: Optional[str] = None,
                 target_attribute: Optional[Mapping[str, str]] = None,
                 target_asset: Optional[Mapping[str, str]] = None,
                 description: Optional[str] = None,
                 cron_month: Optional[int] = None,
                 name: Optional[str] = None,
                 rate_unit: Optional[str] = None,
                 rate_value: Optional[int] = None,
                 cron_year: Optional[int] = None,
                 cron_dom: Optional[int] = None,
                 cron_minutes: Optional[int] = None,
                 cron_hours: Optional[int] = None,
                 cron_dow: Optional[int] = None)
    func NewFunction(ctx *Context, name string, args FunctionArgs, opts ...ResourceOption) (*Function, error)
    public Function(string name, FunctionArgs args, CustomResourceOptions? opts = null)
    public Function(String name, FunctionArgs args)
    public Function(String name, FunctionArgs args, CustomResourceOptions options)
    
    type: splight:Function
    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 FunctionArgs
    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 FunctionArgs
    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 FunctionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FunctionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FunctionArgs
    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 functionResource = new Splight.Function("functionResource", new()
    {
        FunctionItems = new[]
        {
            new Splight.Inputs.FunctionFunctionItemArgs
            {
                ExpressionPlain = "string",
                QueryPlain = "string",
                RefId = "string",
                Type = "string",
            },
        },
        Type = "string",
        TimeWindow = 0,
        TargetVariable = "string",
        TargetAttribute = 
        {
            { "string", "string" },
        },
        TargetAsset = 
        {
            { "string", "string" },
        },
        Description = "string",
        CronMonth = 0,
        Name = "string",
        RateUnit = "string",
        RateValue = 0,
        CronYear = 0,
        CronDom = 0,
        CronMinutes = 0,
        CronHours = 0,
        CronDow = 0,
    });
    
    example, err := splight.NewFunction(ctx, "functionResource", &splight.FunctionArgs{
    	FunctionItems: splight.FunctionFunctionItemArray{
    		&splight.FunctionFunctionItemArgs{
    			ExpressionPlain: pulumi.String("string"),
    			QueryPlain:      pulumi.String("string"),
    			RefId:           pulumi.String("string"),
    			Type:            pulumi.String("string"),
    		},
    	},
    	Type:           pulumi.String("string"),
    	TimeWindow:     pulumi.Int(0),
    	TargetVariable: pulumi.String("string"),
    	TargetAttribute: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	TargetAsset: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	CronMonth:   pulumi.Int(0),
    	Name:        pulumi.String("string"),
    	RateUnit:    pulumi.String("string"),
    	RateValue:   pulumi.Int(0),
    	CronYear:    pulumi.Int(0),
    	CronDom:     pulumi.Int(0),
    	CronMinutes: pulumi.Int(0),
    	CronHours:   pulumi.Int(0),
    	CronDow:     pulumi.Int(0),
    })
    
    var functionResource = new Function("functionResource", FunctionArgs.builder()
        .functionItems(FunctionFunctionItemArgs.builder()
            .expressionPlain("string")
            .queryPlain("string")
            .refId("string")
            .type("string")
            .build())
        .type("string")
        .timeWindow(0)
        .targetVariable("string")
        .targetAttribute(Map.of("string", "string"))
        .targetAsset(Map.of("string", "string"))
        .description("string")
        .cronMonth(0)
        .name("string")
        .rateUnit("string")
        .rateValue(0)
        .cronYear(0)
        .cronDom(0)
        .cronMinutes(0)
        .cronHours(0)
        .cronDow(0)
        .build());
    
    function_resource = splight.Function("functionResource",
        function_items=[splight.FunctionFunctionItemArgs(
            expression_plain="string",
            query_plain="string",
            ref_id="string",
            type="string",
        )],
        type="string",
        time_window=0,
        target_variable="string",
        target_attribute={
            "string": "string",
        },
        target_asset={
            "string": "string",
        },
        description="string",
        cron_month=0,
        name="string",
        rate_unit="string",
        rate_value=0,
        cron_year=0,
        cron_dom=0,
        cron_minutes=0,
        cron_hours=0,
        cron_dow=0)
    
    const functionResource = new splight.Function("functionResource", {
        functionItems: [{
            expressionPlain: "string",
            queryPlain: "string",
            refId: "string",
            type: "string",
        }],
        type: "string",
        timeWindow: 0,
        targetVariable: "string",
        targetAttribute: {
            string: "string",
        },
        targetAsset: {
            string: "string",
        },
        description: "string",
        cronMonth: 0,
        name: "string",
        rateUnit: "string",
        rateValue: 0,
        cronYear: 0,
        cronDom: 0,
        cronMinutes: 0,
        cronHours: 0,
        cronDow: 0,
    });
    
    type: splight:Function
    properties:
        cronDom: 0
        cronDow: 0
        cronHours: 0
        cronMinutes: 0
        cronMonth: 0
        cronYear: 0
        description: string
        functionItems:
            - expressionPlain: string
              queryPlain: string
              refId: string
              type: string
        name: string
        rateUnit: string
        rateValue: 0
        targetAsset:
            string: string
        targetAttribute:
            string: string
        targetVariable: string
        timeWindow: 0
        type: string
    

    Function Resource Properties

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

    Inputs

    The Function resource accepts the following input properties:

    Description string
    The description of the resource
    FunctionItems List<Splight.Splight.Inputs.FunctionFunctionItem>
    traces to be used to compute the results
    TargetAsset Dictionary<string, string>
    asset where to ingest results
    TargetAttribute Dictionary<string, string>
    attribute where to ingest results
    TargetVariable string
    variable to be considered to be ingested
    TimeWindow int
    window to fetch data from. Data out of that window will not be considered for evaluation
    Type string
    [cron|rate] type for the cron
    CronDom int
    schedule value for cron
    CronDow int
    schedule value for cron
    CronHours int
    schedule value for cron
    CronMinutes int
    schedule value for cron
    CronMonth int
    schedule value for cron
    CronYear int
    schedule value for cron
    Name string
    The name of the resource
    RateUnit string
    [day|hour|minute] schedule unit
    RateValue int
    schedule value
    Description string
    The description of the resource
    FunctionItems []FunctionFunctionItemArgs
    traces to be used to compute the results
    TargetAsset map[string]string
    asset where to ingest results
    TargetAttribute map[string]string
    attribute where to ingest results
    TargetVariable string
    variable to be considered to be ingested
    TimeWindow int
    window to fetch data from. Data out of that window will not be considered for evaluation
    Type string
    [cron|rate] type for the cron
    CronDom int
    schedule value for cron
    CronDow int
    schedule value for cron
    CronHours int
    schedule value for cron
    CronMinutes int
    schedule value for cron
    CronMonth int
    schedule value for cron
    CronYear int
    schedule value for cron
    Name string
    The name of the resource
    RateUnit string
    [day|hour|minute] schedule unit
    RateValue int
    schedule value
    description String
    The description of the resource
    functionItems List<FunctionFunctionItem>
    traces to be used to compute the results
    targetAsset Map<String,String>
    asset where to ingest results
    targetAttribute Map<String,String>
    attribute where to ingest results
    targetVariable String
    variable to be considered to be ingested
    timeWindow Integer
    window to fetch data from. Data out of that window will not be considered for evaluation
    type String
    [cron|rate] type for the cron
    cronDom Integer
    schedule value for cron
    cronDow Integer
    schedule value for cron
    cronHours Integer
    schedule value for cron
    cronMinutes Integer
    schedule value for cron
    cronMonth Integer
    schedule value for cron
    cronYear Integer
    schedule value for cron
    name String
    The name of the resource
    rateUnit String
    [day|hour|minute] schedule unit
    rateValue Integer
    schedule value
    description string
    The description of the resource
    functionItems FunctionFunctionItem[]
    traces to be used to compute the results
    targetAsset {[key: string]: string}
    asset where to ingest results
    targetAttribute {[key: string]: string}
    attribute where to ingest results
    targetVariable string
    variable to be considered to be ingested
    timeWindow number
    window to fetch data from. Data out of that window will not be considered for evaluation
    type string
    [cron|rate] type for the cron
    cronDom number
    schedule value for cron
    cronDow number
    schedule value for cron
    cronHours number
    schedule value for cron
    cronMinutes number
    schedule value for cron
    cronMonth number
    schedule value for cron
    cronYear number
    schedule value for cron
    name string
    The name of the resource
    rateUnit string
    [day|hour|minute] schedule unit
    rateValue number
    schedule value
    description str
    The description of the resource
    function_items Sequence[FunctionFunctionItemArgs]
    traces to be used to compute the results
    target_asset Mapping[str, str]
    asset where to ingest results
    target_attribute Mapping[str, str]
    attribute where to ingest results
    target_variable str
    variable to be considered to be ingested
    time_window int
    window to fetch data from. Data out of that window will not be considered for evaluation
    type str
    [cron|rate] type for the cron
    cron_dom int
    schedule value for cron
    cron_dow int
    schedule value for cron
    cron_hours int
    schedule value for cron
    cron_minutes int
    schedule value for cron
    cron_month int
    schedule value for cron
    cron_year int
    schedule value for cron
    name str
    The name of the resource
    rate_unit str
    [day|hour|minute] schedule unit
    rate_value int
    schedule value
    description String
    The description of the resource
    functionItems List<Property Map>
    traces to be used to compute the results
    targetAsset Map<String>
    asset where to ingest results
    targetAttribute Map<String>
    attribute where to ingest results
    targetVariable String
    variable to be considered to be ingested
    timeWindow Number
    window to fetch data from. Data out of that window will not be considered for evaluation
    type String
    [cron|rate] type for the cron
    cronDom Number
    schedule value for cron
    cronDow Number
    schedule value for cron
    cronHours Number
    schedule value for cron
    cronMinutes Number
    schedule value for cron
    cronMonth Number
    schedule value for cron
    cronYear Number
    schedule value for cron
    name String
    The name of the resource
    rateUnit String
    [day|hour|minute] schedule unit
    rateValue Number
    schedule value

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Function Resource

    Get an existing Function 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?: FunctionState, opts?: CustomResourceOptions): Function
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cron_dom: Optional[int] = None,
            cron_dow: Optional[int] = None,
            cron_hours: Optional[int] = None,
            cron_minutes: Optional[int] = None,
            cron_month: Optional[int] = None,
            cron_year: Optional[int] = None,
            description: Optional[str] = None,
            function_items: Optional[Sequence[FunctionFunctionItemArgs]] = None,
            name: Optional[str] = None,
            rate_unit: Optional[str] = None,
            rate_value: Optional[int] = None,
            target_asset: Optional[Mapping[str, str]] = None,
            target_attribute: Optional[Mapping[str, str]] = None,
            target_variable: Optional[str] = None,
            time_window: Optional[int] = None,
            type: Optional[str] = None) -> Function
    func GetFunction(ctx *Context, name string, id IDInput, state *FunctionState, opts ...ResourceOption) (*Function, error)
    public static Function Get(string name, Input<string> id, FunctionState? state, CustomResourceOptions? opts = null)
    public static Function get(String name, Output<String> id, FunctionState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    CronDom int
    schedule value for cron
    CronDow int
    schedule value for cron
    CronHours int
    schedule value for cron
    CronMinutes int
    schedule value for cron
    CronMonth int
    schedule value for cron
    CronYear int
    schedule value for cron
    Description string
    The description of the resource
    FunctionItems List<Splight.Splight.Inputs.FunctionFunctionItem>
    traces to be used to compute the results
    Name string
    The name of the resource
    RateUnit string
    [day|hour|minute] schedule unit
    RateValue int
    schedule value
    TargetAsset Dictionary<string, string>
    asset where to ingest results
    TargetAttribute Dictionary<string, string>
    attribute where to ingest results
    TargetVariable string
    variable to be considered to be ingested
    TimeWindow int
    window to fetch data from. Data out of that window will not be considered for evaluation
    Type string
    [cron|rate] type for the cron
    CronDom int
    schedule value for cron
    CronDow int
    schedule value for cron
    CronHours int
    schedule value for cron
    CronMinutes int
    schedule value for cron
    CronMonth int
    schedule value for cron
    CronYear int
    schedule value for cron
    Description string
    The description of the resource
    FunctionItems []FunctionFunctionItemArgs
    traces to be used to compute the results
    Name string
    The name of the resource
    RateUnit string
    [day|hour|minute] schedule unit
    RateValue int
    schedule value
    TargetAsset map[string]string
    asset where to ingest results
    TargetAttribute map[string]string
    attribute where to ingest results
    TargetVariable string
    variable to be considered to be ingested
    TimeWindow int
    window to fetch data from. Data out of that window will not be considered for evaluation
    Type string
    [cron|rate] type for the cron
    cronDom Integer
    schedule value for cron
    cronDow Integer
    schedule value for cron
    cronHours Integer
    schedule value for cron
    cronMinutes Integer
    schedule value for cron
    cronMonth Integer
    schedule value for cron
    cronYear Integer
    schedule value for cron
    description String
    The description of the resource
    functionItems List<FunctionFunctionItem>
    traces to be used to compute the results
    name String
    The name of the resource
    rateUnit String
    [day|hour|minute] schedule unit
    rateValue Integer
    schedule value
    targetAsset Map<String,String>
    asset where to ingest results
    targetAttribute Map<String,String>
    attribute where to ingest results
    targetVariable String
    variable to be considered to be ingested
    timeWindow Integer
    window to fetch data from. Data out of that window will not be considered for evaluation
    type String
    [cron|rate] type for the cron
    cronDom number
    schedule value for cron
    cronDow number
    schedule value for cron
    cronHours number
    schedule value for cron
    cronMinutes number
    schedule value for cron
    cronMonth number
    schedule value for cron
    cronYear number
    schedule value for cron
    description string
    The description of the resource
    functionItems FunctionFunctionItem[]
    traces to be used to compute the results
    name string
    The name of the resource
    rateUnit string
    [day|hour|minute] schedule unit
    rateValue number
    schedule value
    targetAsset {[key: string]: string}
    asset where to ingest results
    targetAttribute {[key: string]: string}
    attribute where to ingest results
    targetVariable string
    variable to be considered to be ingested
    timeWindow number
    window to fetch data from. Data out of that window will not be considered for evaluation
    type string
    [cron|rate] type for the cron
    cron_dom int
    schedule value for cron
    cron_dow int
    schedule value for cron
    cron_hours int
    schedule value for cron
    cron_minutes int
    schedule value for cron
    cron_month int
    schedule value for cron
    cron_year int
    schedule value for cron
    description str
    The description of the resource
    function_items Sequence[FunctionFunctionItemArgs]
    traces to be used to compute the results
    name str
    The name of the resource
    rate_unit str
    [day|hour|minute] schedule unit
    rate_value int
    schedule value
    target_asset Mapping[str, str]
    asset where to ingest results
    target_attribute Mapping[str, str]
    attribute where to ingest results
    target_variable str
    variable to be considered to be ingested
    time_window int
    window to fetch data from. Data out of that window will not be considered for evaluation
    type str
    [cron|rate] type for the cron
    cronDom Number
    schedule value for cron
    cronDow Number
    schedule value for cron
    cronHours Number
    schedule value for cron
    cronMinutes Number
    schedule value for cron
    cronMonth Number
    schedule value for cron
    cronYear Number
    schedule value for cron
    description String
    The description of the resource
    functionItems List<Property Map>
    traces to be used to compute the results
    name String
    The name of the resource
    rateUnit String
    [day|hour|minute] schedule unit
    rateValue Number
    schedule value
    targetAsset Map<String>
    asset where to ingest results
    targetAttribute Map<String>
    attribute where to ingest results
    targetVariable String
    variable to be considered to be ingested
    timeWindow Number
    window to fetch data from. Data out of that window will not be considered for evaluation
    type String
    [cron|rate] type for the cron

    Supporting Types

    FunctionFunctionItem, FunctionFunctionItemArgs

    ExpressionPlain string
    QueryPlain string
    RefId string
    Type string
    ExpressionPlain string
    QueryPlain string
    RefId string
    Type string
    expressionPlain String
    queryPlain String
    refId String
    type String
    expressionPlain string
    queryPlain string
    refId string
    type string
    expressionPlain String
    queryPlain String
    refId String
    type String

    Import

    $ pulumi import splight:index/function:Function [options] splight_function.<name> <function_id>
    

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

    Package Details

    Repository
    splight splightplatform/pulumi-splight
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the splight Terraform Provider.
    splight logo
    splight v0.1.24 published on Friday, Jun 28, 2024 by splightplatform