From 27b62d81ed3ef8d29f90bf14edf3094891759eca Mon Sep 17 00:00:00 2001 From: VenelinMartinov Date: Tue, 12 Nov 2024 18:36:37 +0000 Subject: [PATCH] Upgrade terraform-provider-splunk to v1.4.27 (#479) This PR was generated via `$ upgrade-provider pulumi/pulumi-splunk --kind=provider`. --- - Upgrading terraform-provider-splunk from 1.4.25 to 1.4.27. Fixes #473 Also automates module mappings here. --- .../cmd/pulumi-resource-splunk/schema.json | 97 +++++ provider/go.mod | 3 +- provider/go.sum | 6 +- provider/resources.go | 3 + sdk/dotnet/LookupTableFile.cs | 210 ++++++++++ sdk/go/splunk/init.go | 7 + sdk/go/splunk/lookupTableFile.go | 325 ++++++++++++++++ .../com/pulumi/splunk/LookupTableFile.java | 191 +++++++++ .../pulumi/splunk/LookupTableFileArgs.java | 216 +++++++++++ .../splunk/inputs/LookupTableFileState.java | 205 ++++++++++ sdk/nodejs/index.ts | 8 + sdk/nodejs/lookupTableFile.ts | 175 +++++++++ sdk/nodejs/tsconfig.json | 1 + sdk/python/pulumi_splunk/__init__.py | 9 + sdk/python/pulumi_splunk/lookup_table_file.py | 367 ++++++++++++++++++ 15 files changed, 1820 insertions(+), 3 deletions(-) create mode 100644 sdk/dotnet/LookupTableFile.cs create mode 100644 sdk/go/splunk/lookupTableFile.go create mode 100644 sdk/java/src/main/java/com/pulumi/splunk/LookupTableFile.java create mode 100644 sdk/java/src/main/java/com/pulumi/splunk/LookupTableFileArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/splunk/inputs/LookupTableFileState.java create mode 100644 sdk/nodejs/lookupTableFile.ts create mode 100644 sdk/python/pulumi_splunk/lookup_table_file.py diff --git a/provider/cmd/pulumi-resource-splunk/schema.json b/provider/cmd/pulumi-resource-splunk/schema.json index 5da83f6c..3cf26cc9 100644 --- a/provider/cmd/pulumi-resource-splunk/schema.json +++ b/provider/cmd/pulumi-resource-splunk/schema.json @@ -3946,6 +3946,103 @@ "type": "object" } }, + "splunk:index/lookupTableFile:LookupTableFile": { + "description": "## # Resource: splunk.LookupTableFile\n\nCreate and manage lookup table files.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as splunk from \"@pulumi/splunk\";\n\nconst lookupTableFile = new splunk.LookupTableFile(\"lookup_table_file\", {\n app: \"search\",\n owner: \"nobody\",\n fileName: \"lookup.csv\",\n fileContents: [\n [\n \"status\",\n \"status_description\",\n \"status_type\",\n ],\n [\n \"100\",\n \"Continue\",\n \"Informational\",\n ],\n [\n \"101\",\n \"Switching Protocols\",\n \"Informational\",\n ],\n [\n \"200\",\n \"OK\",\n \"Successful\",\n ],\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_splunk as splunk\n\nlookup_table_file = splunk.LookupTableFile(\"lookup_table_file\",\n app=\"search\",\n owner=\"nobody\",\n file_name=\"lookup.csv\",\n file_contents=[\n [\n \"status\",\n \"status_description\",\n \"status_type\",\n ],\n [\n \"100\",\n \"Continue\",\n \"Informational\",\n ],\n [\n \"101\",\n \"Switching Protocols\",\n \"Informational\",\n ],\n [\n \"200\",\n \"OK\",\n \"Successful\",\n ],\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Splunk = Pulumi.Splunk;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var lookupTableFile = new Splunk.LookupTableFile(\"lookup_table_file\", new()\n {\n App = \"search\",\n Owner = \"nobody\",\n FileName = \"lookup.csv\",\n FileContents = new[]\n {\n new[]\n {\n \"status\",\n \"status_description\",\n \"status_type\",\n },\n new[]\n {\n \"100\",\n \"Continue\",\n \"Informational\",\n },\n new[]\n {\n \"101\",\n \"Switching Protocols\",\n \"Informational\",\n },\n new[]\n {\n \"200\",\n \"OK\",\n \"Successful\",\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-splunk/sdk/go/splunk\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := splunk.NewLookupTableFile(ctx, \"lookup_table_file\", \u0026splunk.LookupTableFileArgs{\n\t\t\tApp: pulumi.String(\"search\"),\n\t\t\tOwner: pulumi.String(\"nobody\"),\n\t\t\tFileName: pulumi.String(\"lookup.csv\"),\n\t\t\tFileContents: pulumi.StringArrayArray{\n\t\t\t\tpulumi.StringArray{\n\t\t\t\t\tpulumi.String(\"status\"),\n\t\t\t\t\tpulumi.String(\"status_description\"),\n\t\t\t\t\tpulumi.String(\"status_type\"),\n\t\t\t\t},\n\t\t\t\tpulumi.StringArray{\n\t\t\t\t\tpulumi.String(\"100\"),\n\t\t\t\t\tpulumi.String(\"Continue\"),\n\t\t\t\t\tpulumi.String(\"Informational\"),\n\t\t\t\t},\n\t\t\t\tpulumi.StringArray{\n\t\t\t\t\tpulumi.String(\"101\"),\n\t\t\t\t\tpulumi.String(\"Switching Protocols\"),\n\t\t\t\t\tpulumi.String(\"Informational\"),\n\t\t\t\t},\n\t\t\t\tpulumi.StringArray{\n\t\t\t\t\tpulumi.String(\"200\"),\n\t\t\t\t\tpulumi.String(\"OK\"),\n\t\t\t\t\tpulumi.String(\"Successful\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.splunk.LookupTableFile;\nimport com.pulumi.splunk.LookupTableFileArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var lookupTableFile = new LookupTableFile(\"lookupTableFile\", LookupTableFileArgs.builder()\n .app(\"search\")\n .owner(\"nobody\")\n .fileName(\"lookup.csv\")\n .fileContents( \n \n \"status\",\n \"status_description\",\n \"status_type\",\n \n \"100\",\n \"Continue\",\n \"Informational\",\n \n \"101\",\n \"Switching Protocols\",\n \"Informational\",\n \n \"200\",\n \"OK\",\n \"Successful\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n lookupTableFile:\n type: splunk:LookupTableFile\n name: lookup_table_file\n properties:\n app: search\n owner: nobody\n fileName: lookup.csv\n fileContents:\n - - status\n - status_description\n - status_type\n - - '100'\n - Continue\n - Informational\n - - '101'\n - Switching Protocols\n - Informational\n - - '200'\n - OK\n - Successful\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "properties": { + "app": { + "type": "string", + "description": "The app context for the resource.\n" + }, + "fileContents": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "The column header and row value contents for the lookup table file.\n" + }, + "fileName": { + "type": "string", + "description": "A name for the lookup table file. Generally ends with \".csv\"\n" + }, + "owner": { + "type": "string", + "description": "User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted.\n" + } + }, + "required": [ + "app", + "fileContents", + "fileName", + "owner" + ], + "inputProperties": { + "app": { + "type": "string", + "description": "The app context for the resource.\n", + "willReplaceOnChanges": true + }, + "fileContents": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "The column header and row value contents for the lookup table file.\n" + }, + "fileName": { + "type": "string", + "description": "A name for the lookup table file. Generally ends with \".csv\"\n", + "willReplaceOnChanges": true + }, + "owner": { + "type": "string", + "description": "User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted.\n", + "willReplaceOnChanges": true + } + }, + "requiredInputs": [ + "app", + "fileContents", + "fileName", + "owner" + ], + "stateInputs": { + "description": "Input properties used for looking up and filtering LookupTableFile resources.\n", + "properties": { + "app": { + "type": "string", + "description": "The app context for the resource.\n", + "willReplaceOnChanges": true + }, + "fileContents": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "The column header and row value contents for the lookup table file.\n" + }, + "fileName": { + "type": "string", + "description": "A name for the lookup table file. Generally ends with \".csv\"\n", + "willReplaceOnChanges": true + }, + "owner": { + "type": "string", + "description": "User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted.\n", + "willReplaceOnChanges": true + } + }, + "type": "object" + } + }, "splunk:index/outputsTcpDefault:OutputsTcpDefault": { "description": "## # Resource: splunk.OutputsTcpDefault\n\nManage to global tcpout properties.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as splunk from \"@pulumi/splunk\";\n\nconst tcpDefault = new splunk.OutputsTcpDefault(\"tcp_default\", {\n name: \"tcpout\",\n disabled: false,\n defaultGroup: \"test-indexers\",\n dropEventsOnQueueFull: 60,\n indexAndForward: true,\n sendCookedData: true,\n maxQueueSize: \"100KB\",\n});\n```\n```python\nimport pulumi\nimport pulumi_splunk as splunk\n\ntcp_default = splunk.OutputsTcpDefault(\"tcp_default\",\n name=\"tcpout\",\n disabled=False,\n default_group=\"test-indexers\",\n drop_events_on_queue_full=60,\n index_and_forward=True,\n send_cooked_data=True,\n max_queue_size=\"100KB\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Splunk = Pulumi.Splunk;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var tcpDefault = new Splunk.OutputsTcpDefault(\"tcp_default\", new()\n {\n Name = \"tcpout\",\n Disabled = false,\n DefaultGroup = \"test-indexers\",\n DropEventsOnQueueFull = 60,\n IndexAndForward = true,\n SendCookedData = true,\n MaxQueueSize = \"100KB\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-splunk/sdk/go/splunk\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := splunk.NewOutputsTcpDefault(ctx, \"tcp_default\", \u0026splunk.OutputsTcpDefaultArgs{\n\t\t\tName: pulumi.String(\"tcpout\"),\n\t\t\tDisabled: pulumi.Bool(false),\n\t\t\tDefaultGroup: pulumi.String(\"test-indexers\"),\n\t\t\tDropEventsOnQueueFull: pulumi.Int(60),\n\t\t\tIndexAndForward: pulumi.Bool(true),\n\t\t\tSendCookedData: pulumi.Bool(true),\n\t\t\tMaxQueueSize: pulumi.String(\"100KB\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.splunk.OutputsTcpDefault;\nimport com.pulumi.splunk.OutputsTcpDefaultArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var tcpDefault = new OutputsTcpDefault(\"tcpDefault\", OutputsTcpDefaultArgs.builder()\n .name(\"tcpout\")\n .disabled(false)\n .defaultGroup(\"test-indexers\")\n .dropEventsOnQueueFull(60)\n .indexAndForward(true)\n .sendCookedData(true)\n .maxQueueSize(\"100KB\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n tcpDefault:\n type: splunk:OutputsTcpDefault\n name: tcp_default\n properties:\n name: tcpout\n disabled: false\n defaultGroup: test-indexers\n dropEventsOnQueueFull: 60\n indexAndForward: true\n sendCookedData: true\n maxQueueSize: 100KB\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "properties": { diff --git a/provider/go.mod b/provider/go.mod index 90481a18..1181afdb 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -8,7 +8,7 @@ require ( github.com/hashicorp/terraform-plugin-sdk v1.15.0 github.com/pulumi/pulumi-terraform-bridge/v3 v3.95.0 github.com/pulumi/pulumi/sdk/v3 v3.137.0 - github.com/splunk/terraform-provider-splunk v1.4.25 + github.com/splunk/terraform-provider-splunk v1.4.27 ) // tfinstall was removed from terraform-exec in v0.16.0. @@ -42,6 +42,7 @@ require ( github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/armon/go-radix v1.0.0 // indirect github.com/atotto/clipboard v0.1.4 // indirect + github.com/avast/retry-go/v4 v4.6.0 // indirect github.com/aws/aws-sdk-go v1.50.36 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect diff --git a/provider/go.sum b/provider/go.sum index c906469d..9e8f1581 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -1232,6 +1232,8 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= +github.com/avast/retry-go/v4 v4.6.0 h1:K9xNA+KeB8HHc2aWFuLb25Offp+0iVRXEvFx8IinRJA= +github.com/avast/retry-go/v4 v4.6.0/go.mod h1:gvWlPhBVsvBbLkVGDg/KwvBv0bEkCOLRRSHKIr2PyOE= github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= github.com/aws/aws-sdk-go v1.25.3/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= @@ -1992,8 +1994,8 @@ github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/splunk/terraform-provider-splunk v1.4.25 h1:tXF/EP/7QFDbxZKVuGoe3abHcFh/3SLyKCdSE8AWDR8= -github.com/splunk/terraform-provider-splunk v1.4.25/go.mod h1:XgvDuS4BiuDWgsFufPz2/iUQ5gM/nNl0gULrc6OpL34= +github.com/splunk/terraform-provider-splunk v1.4.27 h1:HqcIMkutKFI1MhlfJ1A2FOulJto1F68zK7IBbtnh168= +github.com/splunk/terraform-provider-splunk v1.4.27/go.mod h1:BBQgS4FK7oM2pF1ZNa8S+UirfG3UtzMSWs8wpx6AmYo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= diff --git a/provider/resources.go b/provider/resources.go index 23bff2b6..60b79540 100644 --- a/provider/resources.go +++ b/provider/resources.go @@ -25,6 +25,7 @@ import ( "github.com/splunk/terraform-provider-splunk/splunk" "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge" + tks "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/tokens" shimv1 "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v1" "github.com/pulumi/pulumi/sdk/v3/go/common/tokens" @@ -247,6 +248,8 @@ func Provider() tfbridge.ProviderInfo { prov.SetAutonaming(255, "-") + prov.MustComputeTokens(tks.SingleModule("splunk_", mainMod, tks.MakeStandard(mainPkg))) + return prov } diff --git a/sdk/dotnet/LookupTableFile.cs b/sdk/dotnet/LookupTableFile.cs new file mode 100644 index 00000000..104f7854 --- /dev/null +++ b/sdk/dotnet/LookupTableFile.cs @@ -0,0 +1,210 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.Splunk +{ + /// + /// ## # Resource: splunk.LookupTableFile + /// + /// Create and manage lookup table files. + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Splunk = Pulumi.Splunk; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var lookupTableFile = new Splunk.LookupTableFile("lookup_table_file", new() + /// { + /// App = "search", + /// Owner = "nobody", + /// FileName = "lookup.csv", + /// FileContents = new[] + /// { + /// new[] + /// { + /// "status", + /// "status_description", + /// "status_type", + /// }, + /// new[] + /// { + /// "100", + /// "Continue", + /// "Informational", + /// }, + /// new[] + /// { + /// "101", + /// "Switching Protocols", + /// "Informational", + /// }, + /// new[] + /// { + /// "200", + /// "OK", + /// "Successful", + /// }, + /// }, + /// }); + /// + /// }); + /// ``` + /// + [SplunkResourceType("splunk:index/lookupTableFile:LookupTableFile")] + public partial class LookupTableFile : global::Pulumi.CustomResource + { + /// + /// The app context for the resource. + /// + [Output("app")] + public Output App { get; private set; } = null!; + + /// + /// The column header and row value contents for the lookup table file. + /// + [Output("fileContents")] + public Output>> FileContents { get; private set; } = null!; + + /// + /// A name for the lookup table file. Generally ends with ".csv" + /// + [Output("fileName")] + public Output FileName { get; private set; } = null!; + + /// + /// User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. + /// + [Output("owner")] + public Output Owner { get; private set; } = null!; + + + /// + /// Create a LookupTableFile resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public LookupTableFile(string name, LookupTableFileArgs args, CustomResourceOptions? options = null) + : base("splunk:index/lookupTableFile:LookupTableFile", name, args ?? new LookupTableFileArgs(), MakeResourceOptions(options, "")) + { + } + + private LookupTableFile(string name, Input id, LookupTableFileState? state = null, CustomResourceOptions? options = null) + : base("splunk:index/lookupTableFile:LookupTableFile", name, state, MakeResourceOptions(options, id)) + { + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing LookupTableFile resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// Any extra arguments used during the lookup. + /// A bag of options that control this resource's behavior + public static LookupTableFile Get(string name, Input id, LookupTableFileState? state = null, CustomResourceOptions? options = null) + { + return new LookupTableFile(name, id, state, options); + } + } + + public sealed class LookupTableFileArgs : global::Pulumi.ResourceArgs + { + /// + /// The app context for the resource. + /// + [Input("app", required: true)] + public Input App { get; set; } = null!; + + [Input("fileContents", required: true)] + private InputList>? _fileContents; + + /// + /// The column header and row value contents for the lookup table file. + /// + public InputList> FileContents + { + get => _fileContents ?? (_fileContents = new InputList>()); + set => _fileContents = value; + } + + /// + /// A name for the lookup table file. Generally ends with ".csv" + /// + [Input("fileName", required: true)] + public Input FileName { get; set; } = null!; + + /// + /// User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. + /// + [Input("owner", required: true)] + public Input Owner { get; set; } = null!; + + public LookupTableFileArgs() + { + } + public static new LookupTableFileArgs Empty => new LookupTableFileArgs(); + } + + public sealed class LookupTableFileState : global::Pulumi.ResourceArgs + { + /// + /// The app context for the resource. + /// + [Input("app")] + public Input? App { get; set; } + + [Input("fileContents")] + private InputList>? _fileContents; + + /// + /// The column header and row value contents for the lookup table file. + /// + public InputList> FileContents + { + get => _fileContents ?? (_fileContents = new InputList>()); + set => _fileContents = value; + } + + /// + /// A name for the lookup table file. Generally ends with ".csv" + /// + [Input("fileName")] + public Input? FileName { get; set; } + + /// + /// User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. + /// + [Input("owner")] + public Input? Owner { get; set; } + + public LookupTableFileState() + { + } + public static new LookupTableFileState Empty => new LookupTableFileState(); + } +} diff --git a/sdk/go/splunk/init.go b/sdk/go/splunk/init.go index f703f071..1efdbd1f 100644 --- a/sdk/go/splunk/init.go +++ b/sdk/go/splunk/init.go @@ -55,6 +55,8 @@ func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi r = &InputsTcpSsl{} case "splunk:index/inputsUdp:InputsUdp": r = &InputsUdp{} + case "splunk:index/lookupTableFile:LookupTableFile": + r = &LookupTableFile{} case "splunk:index/outputsTcpDefault:OutputsTcpDefault": r = &OutputsTcpDefault{} case "splunk:index/outputsTcpGroup:OutputsTcpGroup": @@ -183,6 +185,11 @@ func init() { "index/inputsUdp", &module{version}, ) + pulumi.RegisterResourceModule( + "splunk", + "index/lookupTableFile", + &module{version}, + ) pulumi.RegisterResourceModule( "splunk", "index/outputsTcpDefault", diff --git a/sdk/go/splunk/lookupTableFile.go b/sdk/go/splunk/lookupTableFile.go new file mode 100644 index 00000000..49c6668f --- /dev/null +++ b/sdk/go/splunk/lookupTableFile.go @@ -0,0 +1,325 @@ +// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package splunk + +import ( + "context" + "reflect" + + "errors" + "github.com/pulumi/pulumi-splunk/sdk/go/splunk/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +// ## # Resource: LookupTableFile +// +// Create and manage lookup table files. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-splunk/sdk/go/splunk" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := splunk.NewLookupTableFile(ctx, "lookup_table_file", &splunk.LookupTableFileArgs{ +// App: pulumi.String("search"), +// Owner: pulumi.String("nobody"), +// FileName: pulumi.String("lookup.csv"), +// FileContents: pulumi.StringArrayArray{ +// pulumi.StringArray{ +// pulumi.String("status"), +// pulumi.String("status_description"), +// pulumi.String("status_type"), +// }, +// pulumi.StringArray{ +// pulumi.String("100"), +// pulumi.String("Continue"), +// pulumi.String("Informational"), +// }, +// pulumi.StringArray{ +// pulumi.String("101"), +// pulumi.String("Switching Protocols"), +// pulumi.String("Informational"), +// }, +// pulumi.StringArray{ +// pulumi.String("200"), +// pulumi.String("OK"), +// pulumi.String("Successful"), +// }, +// }, +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +type LookupTableFile struct { + pulumi.CustomResourceState + + // The app context for the resource. + App pulumi.StringOutput `pulumi:"app"` + // The column header and row value contents for the lookup table file. + FileContents pulumi.StringArrayArrayOutput `pulumi:"fileContents"` + // A name for the lookup table file. Generally ends with ".csv" + FileName pulumi.StringOutput `pulumi:"fileName"` + // User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. + Owner pulumi.StringOutput `pulumi:"owner"` +} + +// NewLookupTableFile registers a new resource with the given unique name, arguments, and options. +func NewLookupTableFile(ctx *pulumi.Context, + name string, args *LookupTableFileArgs, opts ...pulumi.ResourceOption) (*LookupTableFile, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.App == nil { + return nil, errors.New("invalid value for required argument 'App'") + } + if args.FileContents == nil { + return nil, errors.New("invalid value for required argument 'FileContents'") + } + if args.FileName == nil { + return nil, errors.New("invalid value for required argument 'FileName'") + } + if args.Owner == nil { + return nil, errors.New("invalid value for required argument 'Owner'") + } + opts = internal.PkgResourceDefaultOpts(opts) + var resource LookupTableFile + err := ctx.RegisterResource("splunk:index/lookupTableFile:LookupTableFile", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetLookupTableFile gets an existing LookupTableFile resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetLookupTableFile(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *LookupTableFileState, opts ...pulumi.ResourceOption) (*LookupTableFile, error) { + var resource LookupTableFile + err := ctx.ReadResource("splunk:index/lookupTableFile:LookupTableFile", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering LookupTableFile resources. +type lookupTableFileState struct { + // The app context for the resource. + App *string `pulumi:"app"` + // The column header and row value contents for the lookup table file. + FileContents [][]string `pulumi:"fileContents"` + // A name for the lookup table file. Generally ends with ".csv" + FileName *string `pulumi:"fileName"` + // User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. + Owner *string `pulumi:"owner"` +} + +type LookupTableFileState struct { + // The app context for the resource. + App pulumi.StringPtrInput + // The column header and row value contents for the lookup table file. + FileContents pulumi.StringArrayArrayInput + // A name for the lookup table file. Generally ends with ".csv" + FileName pulumi.StringPtrInput + // User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. + Owner pulumi.StringPtrInput +} + +func (LookupTableFileState) ElementType() reflect.Type { + return reflect.TypeOf((*lookupTableFileState)(nil)).Elem() +} + +type lookupTableFileArgs struct { + // The app context for the resource. + App string `pulumi:"app"` + // The column header and row value contents for the lookup table file. + FileContents [][]string `pulumi:"fileContents"` + // A name for the lookup table file. Generally ends with ".csv" + FileName string `pulumi:"fileName"` + // User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. + Owner string `pulumi:"owner"` +} + +// The set of arguments for constructing a LookupTableFile resource. +type LookupTableFileArgs struct { + // The app context for the resource. + App pulumi.StringInput + // The column header and row value contents for the lookup table file. + FileContents pulumi.StringArrayArrayInput + // A name for the lookup table file. Generally ends with ".csv" + FileName pulumi.StringInput + // User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. + Owner pulumi.StringInput +} + +func (LookupTableFileArgs) ElementType() reflect.Type { + return reflect.TypeOf((*lookupTableFileArgs)(nil)).Elem() +} + +type LookupTableFileInput interface { + pulumi.Input + + ToLookupTableFileOutput() LookupTableFileOutput + ToLookupTableFileOutputWithContext(ctx context.Context) LookupTableFileOutput +} + +func (*LookupTableFile) ElementType() reflect.Type { + return reflect.TypeOf((**LookupTableFile)(nil)).Elem() +} + +func (i *LookupTableFile) ToLookupTableFileOutput() LookupTableFileOutput { + return i.ToLookupTableFileOutputWithContext(context.Background()) +} + +func (i *LookupTableFile) ToLookupTableFileOutputWithContext(ctx context.Context) LookupTableFileOutput { + return pulumi.ToOutputWithContext(ctx, i).(LookupTableFileOutput) +} + +// LookupTableFileArrayInput is an input type that accepts LookupTableFileArray and LookupTableFileArrayOutput values. +// You can construct a concrete instance of `LookupTableFileArrayInput` via: +// +// LookupTableFileArray{ LookupTableFileArgs{...} } +type LookupTableFileArrayInput interface { + pulumi.Input + + ToLookupTableFileArrayOutput() LookupTableFileArrayOutput + ToLookupTableFileArrayOutputWithContext(context.Context) LookupTableFileArrayOutput +} + +type LookupTableFileArray []LookupTableFileInput + +func (LookupTableFileArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]*LookupTableFile)(nil)).Elem() +} + +func (i LookupTableFileArray) ToLookupTableFileArrayOutput() LookupTableFileArrayOutput { + return i.ToLookupTableFileArrayOutputWithContext(context.Background()) +} + +func (i LookupTableFileArray) ToLookupTableFileArrayOutputWithContext(ctx context.Context) LookupTableFileArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(LookupTableFileArrayOutput) +} + +// LookupTableFileMapInput is an input type that accepts LookupTableFileMap and LookupTableFileMapOutput values. +// You can construct a concrete instance of `LookupTableFileMapInput` via: +// +// LookupTableFileMap{ "key": LookupTableFileArgs{...} } +type LookupTableFileMapInput interface { + pulumi.Input + + ToLookupTableFileMapOutput() LookupTableFileMapOutput + ToLookupTableFileMapOutputWithContext(context.Context) LookupTableFileMapOutput +} + +type LookupTableFileMap map[string]LookupTableFileInput + +func (LookupTableFileMap) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*LookupTableFile)(nil)).Elem() +} + +func (i LookupTableFileMap) ToLookupTableFileMapOutput() LookupTableFileMapOutput { + return i.ToLookupTableFileMapOutputWithContext(context.Background()) +} + +func (i LookupTableFileMap) ToLookupTableFileMapOutputWithContext(ctx context.Context) LookupTableFileMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(LookupTableFileMapOutput) +} + +type LookupTableFileOutput struct{ *pulumi.OutputState } + +func (LookupTableFileOutput) ElementType() reflect.Type { + return reflect.TypeOf((**LookupTableFile)(nil)).Elem() +} + +func (o LookupTableFileOutput) ToLookupTableFileOutput() LookupTableFileOutput { + return o +} + +func (o LookupTableFileOutput) ToLookupTableFileOutputWithContext(ctx context.Context) LookupTableFileOutput { + return o +} + +// The app context for the resource. +func (o LookupTableFileOutput) App() pulumi.StringOutput { + return o.ApplyT(func(v *LookupTableFile) pulumi.StringOutput { return v.App }).(pulumi.StringOutput) +} + +// The column header and row value contents for the lookup table file. +func (o LookupTableFileOutput) FileContents() pulumi.StringArrayArrayOutput { + return o.ApplyT(func(v *LookupTableFile) pulumi.StringArrayArrayOutput { return v.FileContents }).(pulumi.StringArrayArrayOutput) +} + +// A name for the lookup table file. Generally ends with ".csv" +func (o LookupTableFileOutput) FileName() pulumi.StringOutput { + return o.ApplyT(func(v *LookupTableFile) pulumi.StringOutput { return v.FileName }).(pulumi.StringOutput) +} + +// User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. +func (o LookupTableFileOutput) Owner() pulumi.StringOutput { + return o.ApplyT(func(v *LookupTableFile) pulumi.StringOutput { return v.Owner }).(pulumi.StringOutput) +} + +type LookupTableFileArrayOutput struct{ *pulumi.OutputState } + +func (LookupTableFileArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]*LookupTableFile)(nil)).Elem() +} + +func (o LookupTableFileArrayOutput) ToLookupTableFileArrayOutput() LookupTableFileArrayOutput { + return o +} + +func (o LookupTableFileArrayOutput) ToLookupTableFileArrayOutputWithContext(ctx context.Context) LookupTableFileArrayOutput { + return o +} + +func (o LookupTableFileArrayOutput) Index(i pulumi.IntInput) LookupTableFileOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LookupTableFile { + return vs[0].([]*LookupTableFile)[vs[1].(int)] + }).(LookupTableFileOutput) +} + +type LookupTableFileMapOutput struct{ *pulumi.OutputState } + +func (LookupTableFileMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]*LookupTableFile)(nil)).Elem() +} + +func (o LookupTableFileMapOutput) ToLookupTableFileMapOutput() LookupTableFileMapOutput { + return o +} + +func (o LookupTableFileMapOutput) ToLookupTableFileMapOutputWithContext(ctx context.Context) LookupTableFileMapOutput { + return o +} + +func (o LookupTableFileMapOutput) MapIndex(k pulumi.StringInput) LookupTableFileOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LookupTableFile { + return vs[0].(map[string]*LookupTableFile)[vs[1].(string)] + }).(LookupTableFileOutput) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*LookupTableFileInput)(nil)).Elem(), &LookupTableFile{}) + pulumi.RegisterInputType(reflect.TypeOf((*LookupTableFileArrayInput)(nil)).Elem(), LookupTableFileArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*LookupTableFileMapInput)(nil)).Elem(), LookupTableFileMap{}) + pulumi.RegisterOutputType(LookupTableFileOutput{}) + pulumi.RegisterOutputType(LookupTableFileArrayOutput{}) + pulumi.RegisterOutputType(LookupTableFileMapOutput{}) +} diff --git a/sdk/java/src/main/java/com/pulumi/splunk/LookupTableFile.java b/sdk/java/src/main/java/com/pulumi/splunk/LookupTableFile.java new file mode 100644 index 00000000..0509469f --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/splunk/LookupTableFile.java @@ -0,0 +1,191 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.splunk; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Export; +import com.pulumi.core.annotations.ResourceType; +import com.pulumi.core.internal.Codegen; +import com.pulumi.splunk.LookupTableFileArgs; +import com.pulumi.splunk.Utilities; +import com.pulumi.splunk.inputs.LookupTableFileState; +import java.lang.String; +import java.util.List; +import javax.annotation.Nullable; + +/** + * ## # Resource: splunk.LookupTableFile + * + * Create and manage lookup table files. + * + * ## Example Usage + * + * <!--Start PulumiCodeChooser --> + *
+ * {@code
+ * package generated_program;
+ * 
+ * import com.pulumi.Context;
+ * import com.pulumi.Pulumi;
+ * import com.pulumi.core.Output;
+ * import com.pulumi.splunk.LookupTableFile;
+ * import com.pulumi.splunk.LookupTableFileArgs;
+ * 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 lookupTableFile = new LookupTableFile("lookupTableFile", LookupTableFileArgs.builder()
+ *             .app("search")
+ *             .owner("nobody")
+ *             .fileName("lookup.csv")
+ *             .fileContents(            
+ *                                 
+ *                     "status",
+ *                     "status_description",
+ *                     "status_type",
+ *                                 
+ *                     "100",
+ *                     "Continue",
+ *                     "Informational",
+ *                                 
+ *                     "101",
+ *                     "Switching Protocols",
+ *                     "Informational",
+ *                                 
+ *                     "200",
+ *                     "OK",
+ *                     "Successful")
+ *             .build());
+ * 
+ *     }
+ * }
+ * }
+ * 
+ * <!--End PulumiCodeChooser --> + * + */ +@ResourceType(type="splunk:index/lookupTableFile:LookupTableFile") +public class LookupTableFile extends com.pulumi.resources.CustomResource { + /** + * The app context for the resource. + * + */ + @Export(name="app", refs={String.class}, tree="[0]") + private Output app; + + /** + * @return The app context for the resource. + * + */ + public Output app() { + return this.app; + } + /** + * The column header and row value contents for the lookup table file. + * + */ + @Export(name="fileContents", refs={List.class,String.class}, tree="[0,[0,1]]") + private Output>> fileContents; + + /** + * @return The column header and row value contents for the lookup table file. + * + */ + public Output>> fileContents() { + return this.fileContents; + } + /** + * A name for the lookup table file. Generally ends with ".csv" + * + */ + @Export(name="fileName", refs={String.class}, tree="[0]") + private Output fileName; + + /** + * @return A name for the lookup table file. Generally ends with ".csv" + * + */ + public Output fileName() { + return this.fileName; + } + /** + * User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. + * + */ + @Export(name="owner", refs={String.class}, tree="[0]") + private Output owner; + + /** + * @return User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. + * + */ + public Output owner() { + return this.owner; + } + + /** + * + * @param name The _unique_ name of the resulting resource. + */ + public LookupTableFile(java.lang.String name) { + this(name, LookupTableFileArgs.Empty); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + */ + public LookupTableFile(java.lang.String name, LookupTableFileArgs args) { + this(name, args, null); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + * @param options A bag of options that control this resource's behavior. + */ + public LookupTableFile(java.lang.String name, LookupTableFileArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("splunk:index/lookupTableFile:LookupTableFile", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); + } + + private LookupTableFile(java.lang.String name, Output id, @Nullable LookupTableFileState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("splunk:index/lookupTableFile:LookupTableFile", name, state, makeResourceOptions(options, id), false); + } + + private static LookupTableFileArgs makeArgs(LookupTableFileArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? LookupTableFileArgs.Empty : args; + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() + .version(Utilities.getVersion()) + .build(); + return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); + } + + /** + * Get an existing Host 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 + * @param options Optional settings to control the behavior of the CustomResource. + */ + public static LookupTableFile get(java.lang.String name, Output id, @Nullable LookupTableFileState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + return new LookupTableFile(name, id, state, options); + } +} diff --git a/sdk/java/src/main/java/com/pulumi/splunk/LookupTableFileArgs.java b/sdk/java/src/main/java/com/pulumi/splunk/LookupTableFileArgs.java new file mode 100644 index 00000000..0a0667ef --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/splunk/LookupTableFileArgs.java @@ -0,0 +1,216 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.splunk; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.List; +import java.util.Objects; + + +public final class LookupTableFileArgs extends com.pulumi.resources.ResourceArgs { + + public static final LookupTableFileArgs Empty = new LookupTableFileArgs(); + + /** + * The app context for the resource. + * + */ + @Import(name="app", required=true) + private Output app; + + /** + * @return The app context for the resource. + * + */ + public Output app() { + return this.app; + } + + /** + * The column header and row value contents for the lookup table file. + * + */ + @Import(name="fileContents", required=true) + private Output>> fileContents; + + /** + * @return The column header and row value contents for the lookup table file. + * + */ + public Output>> fileContents() { + return this.fileContents; + } + + /** + * A name for the lookup table file. Generally ends with ".csv" + * + */ + @Import(name="fileName", required=true) + private Output fileName; + + /** + * @return A name for the lookup table file. Generally ends with ".csv" + * + */ + public Output fileName() { + return this.fileName; + } + + /** + * User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. + * + */ + @Import(name="owner", required=true) + private Output owner; + + /** + * @return User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. + * + */ + public Output owner() { + return this.owner; + } + + private LookupTableFileArgs() {} + + private LookupTableFileArgs(LookupTableFileArgs $) { + this.app = $.app; + this.fileContents = $.fileContents; + this.fileName = $.fileName; + this.owner = $.owner; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(LookupTableFileArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private LookupTableFileArgs $; + + public Builder() { + $ = new LookupTableFileArgs(); + } + + public Builder(LookupTableFileArgs defaults) { + $ = new LookupTableFileArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param app The app context for the resource. + * + * @return builder + * + */ + public Builder app(Output app) { + $.app = app; + return this; + } + + /** + * @param app The app context for the resource. + * + * @return builder + * + */ + public Builder app(String app) { + return app(Output.of(app)); + } + + /** + * @param fileContents The column header and row value contents for the lookup table file. + * + * @return builder + * + */ + public Builder fileContents(Output>> fileContents) { + $.fileContents = fileContents; + return this; + } + + /** + * @param fileContents The column header and row value contents for the lookup table file. + * + * @return builder + * + */ + public Builder fileContents(List> fileContents) { + return fileContents(Output.of(fileContents)); + } + + /** + * @param fileContents The column header and row value contents for the lookup table file. + * + * @return builder + * + */ + public Builder fileContents(List... fileContents) { + return fileContents(List.of(fileContents)); + } + + /** + * @param fileName A name for the lookup table file. Generally ends with ".csv" + * + * @return builder + * + */ + public Builder fileName(Output fileName) { + $.fileName = fileName; + return this; + } + + /** + * @param fileName A name for the lookup table file. Generally ends with ".csv" + * + * @return builder + * + */ + public Builder fileName(String fileName) { + return fileName(Output.of(fileName)); + } + + /** + * @param owner User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. + * + * @return builder + * + */ + public Builder owner(Output owner) { + $.owner = owner; + return this; + } + + /** + * @param owner User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. + * + * @return builder + * + */ + public Builder owner(String owner) { + return owner(Output.of(owner)); + } + + public LookupTableFileArgs build() { + if ($.app == null) { + throw new MissingRequiredPropertyException("LookupTableFileArgs", "app"); + } + if ($.fileContents == null) { + throw new MissingRequiredPropertyException("LookupTableFileArgs", "fileContents"); + } + if ($.fileName == null) { + throw new MissingRequiredPropertyException("LookupTableFileArgs", "fileName"); + } + if ($.owner == null) { + throw new MissingRequiredPropertyException("LookupTableFileArgs", "owner"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/splunk/inputs/LookupTableFileState.java b/sdk/java/src/main/java/com/pulumi/splunk/inputs/LookupTableFileState.java new file mode 100644 index 00000000..0b1ba79d --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/splunk/inputs/LookupTableFileState.java @@ -0,0 +1,205 @@ +// *** WARNING: this file was generated by pulumi-java-gen. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.splunk.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class LookupTableFileState extends com.pulumi.resources.ResourceArgs { + + public static final LookupTableFileState Empty = new LookupTableFileState(); + + /** + * The app context for the resource. + * + */ + @Import(name="app") + private @Nullable Output app; + + /** + * @return The app context for the resource. + * + */ + public Optional> app() { + return Optional.ofNullable(this.app); + } + + /** + * The column header and row value contents for the lookup table file. + * + */ + @Import(name="fileContents") + private @Nullable Output>> fileContents; + + /** + * @return The column header and row value contents for the lookup table file. + * + */ + public Optional>>> fileContents() { + return Optional.ofNullable(this.fileContents); + } + + /** + * A name for the lookup table file. Generally ends with ".csv" + * + */ + @Import(name="fileName") + private @Nullable Output fileName; + + /** + * @return A name for the lookup table file. Generally ends with ".csv" + * + */ + public Optional> fileName() { + return Optional.ofNullable(this.fileName); + } + + /** + * User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. + * + */ + @Import(name="owner") + private @Nullable Output owner; + + /** + * @return User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. + * + */ + public Optional> owner() { + return Optional.ofNullable(this.owner); + } + + private LookupTableFileState() {} + + private LookupTableFileState(LookupTableFileState $) { + this.app = $.app; + this.fileContents = $.fileContents; + this.fileName = $.fileName; + this.owner = $.owner; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(LookupTableFileState defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private LookupTableFileState $; + + public Builder() { + $ = new LookupTableFileState(); + } + + public Builder(LookupTableFileState defaults) { + $ = new LookupTableFileState(Objects.requireNonNull(defaults)); + } + + /** + * @param app The app context for the resource. + * + * @return builder + * + */ + public Builder app(@Nullable Output app) { + $.app = app; + return this; + } + + /** + * @param app The app context for the resource. + * + * @return builder + * + */ + public Builder app(String app) { + return app(Output.of(app)); + } + + /** + * @param fileContents The column header and row value contents for the lookup table file. + * + * @return builder + * + */ + public Builder fileContents(@Nullable Output>> fileContents) { + $.fileContents = fileContents; + return this; + } + + /** + * @param fileContents The column header and row value contents for the lookup table file. + * + * @return builder + * + */ + public Builder fileContents(List> fileContents) { + return fileContents(Output.of(fileContents)); + } + + /** + * @param fileContents The column header and row value contents for the lookup table file. + * + * @return builder + * + */ + public Builder fileContents(List... fileContents) { + return fileContents(List.of(fileContents)); + } + + /** + * @param fileName A name for the lookup table file. Generally ends with ".csv" + * + * @return builder + * + */ + public Builder fileName(@Nullable Output fileName) { + $.fileName = fileName; + return this; + } + + /** + * @param fileName A name for the lookup table file. Generally ends with ".csv" + * + * @return builder + * + */ + public Builder fileName(String fileName) { + return fileName(Output.of(fileName)); + } + + /** + * @param owner User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. + * + * @return builder + * + */ + public Builder owner(@Nullable Output owner) { + $.owner = owner; + return this; + } + + /** + * @param owner User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. + * + * @return builder + * + */ + public Builder owner(String owner) { + return owner(Output.of(owner)); + } + + public LookupTableFileState build() { + return $; + } + } + +} diff --git a/sdk/nodejs/index.ts b/sdk/nodejs/index.ts index ead51277..9e555edd 100644 --- a/sdk/nodejs/index.ts +++ b/sdk/nodejs/index.ts @@ -90,6 +90,11 @@ export type InputsUdp = import("./inputsUdp").InputsUdp; export const InputsUdp: typeof import("./inputsUdp").InputsUdp = null as any; utilities.lazyLoad(exports, ["InputsUdp"], () => require("./inputsUdp")); +export { LookupTableFileArgs, LookupTableFileState } from "./lookupTableFile"; +export type LookupTableFile = import("./lookupTableFile").LookupTableFile; +export const LookupTableFile: typeof import("./lookupTableFile").LookupTableFile = null as any; +utilities.lazyLoad(exports, ["LookupTableFile"], () => require("./lookupTableFile")); + export { OutputsTcpDefaultArgs, OutputsTcpDefaultState } from "./outputsTcpDefault"; export type OutputsTcpDefault = import("./outputsTcpDefault").OutputsTcpDefault; export const OutputsTcpDefault: typeof import("./outputsTcpDefault").OutputsTcpDefault = null as any; @@ -173,6 +178,8 @@ const _module = { return new InputsTcpSsl(name, undefined, { urn }) case "splunk:index/inputsUdp:InputsUdp": return new InputsUdp(name, undefined, { urn }) + case "splunk:index/lookupTableFile:LookupTableFile": + return new LookupTableFile(name, undefined, { urn }) case "splunk:index/outputsTcpDefault:OutputsTcpDefault": return new OutputsTcpDefault(name, undefined, { urn }) case "splunk:index/outputsTcpGroup:OutputsTcpGroup": @@ -207,6 +214,7 @@ pulumi.runtime.registerResourceModule("splunk", "index/inputsTcpRaw", _module) pulumi.runtime.registerResourceModule("splunk", "index/inputsTcpSplunkTcpToken", _module) pulumi.runtime.registerResourceModule("splunk", "index/inputsTcpSsl", _module) pulumi.runtime.registerResourceModule("splunk", "index/inputsUdp", _module) +pulumi.runtime.registerResourceModule("splunk", "index/lookupTableFile", _module) pulumi.runtime.registerResourceModule("splunk", "index/outputsTcpDefault", _module) pulumi.runtime.registerResourceModule("splunk", "index/outputsTcpGroup", _module) pulumi.runtime.registerResourceModule("splunk", "index/outputsTcpServer", _module) diff --git a/sdk/nodejs/lookupTableFile.ts b/sdk/nodejs/lookupTableFile.ts new file mode 100644 index 00000000..ac8806e4 --- /dev/null +++ b/sdk/nodejs/lookupTableFile.ts @@ -0,0 +1,175 @@ +// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as utilities from "./utilities"; + +/** + * ## # Resource: splunk.LookupTableFile + * + * Create and manage lookup table files. + * + * ## Example Usage + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as splunk from "@pulumi/splunk"; + * + * const lookupTableFile = new splunk.LookupTableFile("lookup_table_file", { + * app: "search", + * owner: "nobody", + * fileName: "lookup.csv", + * fileContents: [ + * [ + * "status", + * "status_description", + * "status_type", + * ], + * [ + * "100", + * "Continue", + * "Informational", + * ], + * [ + * "101", + * "Switching Protocols", + * "Informational", + * ], + * [ + * "200", + * "OK", + * "Successful", + * ], + * ], + * }); + * ``` + */ +export class LookupTableFile extends pulumi.CustomResource { + /** + * Get an existing LookupTableFile 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. + */ + public static get(name: string, id: pulumi.Input, state?: LookupTableFileState, opts?: pulumi.CustomResourceOptions): LookupTableFile { + return new LookupTableFile(name, state, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'splunk:index/lookupTableFile:LookupTableFile'; + + /** + * Returns true if the given object is an instance of LookupTableFile. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is LookupTableFile { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === LookupTableFile.__pulumiType; + } + + /** + * The app context for the resource. + */ + public readonly app!: pulumi.Output; + /** + * The column header and row value contents for the lookup table file. + */ + public readonly fileContents!: pulumi.Output; + /** + * A name for the lookup table file. Generally ends with ".csv" + */ + public readonly fileName!: pulumi.Output; + /** + * User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. + */ + public readonly owner!: pulumi.Output; + + /** + * Create a LookupTableFile 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: LookupTableFileArgs, opts?: pulumi.CustomResourceOptions) + constructor(name: string, argsOrState?: LookupTableFileArgs | LookupTableFileState, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (opts.id) { + const state = argsOrState as LookupTableFileState | undefined; + resourceInputs["app"] = state ? state.app : undefined; + resourceInputs["fileContents"] = state ? state.fileContents : undefined; + resourceInputs["fileName"] = state ? state.fileName : undefined; + resourceInputs["owner"] = state ? state.owner : undefined; + } else { + const args = argsOrState as LookupTableFileArgs | undefined; + if ((!args || args.app === undefined) && !opts.urn) { + throw new Error("Missing required property 'app'"); + } + if ((!args || args.fileContents === undefined) && !opts.urn) { + throw new Error("Missing required property 'fileContents'"); + } + if ((!args || args.fileName === undefined) && !opts.urn) { + throw new Error("Missing required property 'fileName'"); + } + if ((!args || args.owner === undefined) && !opts.urn) { + throw new Error("Missing required property 'owner'"); + } + resourceInputs["app"] = args ? args.app : undefined; + resourceInputs["fileContents"] = args ? args.fileContents : undefined; + resourceInputs["fileName"] = args ? args.fileName : undefined; + resourceInputs["owner"] = args ? args.owner : undefined; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(LookupTableFile.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * Input properties used for looking up and filtering LookupTableFile resources. + */ +export interface LookupTableFileState { + /** + * The app context for the resource. + */ + app?: pulumi.Input; + /** + * The column header and row value contents for the lookup table file. + */ + fileContents?: pulumi.Input[]>[]>; + /** + * A name for the lookup table file. Generally ends with ".csv" + */ + fileName?: pulumi.Input; + /** + * User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. + */ + owner?: pulumi.Input; +} + +/** + * The set of arguments for constructing a LookupTableFile resource. + */ +export interface LookupTableFileArgs { + /** + * The app context for the resource. + */ + app: pulumi.Input; + /** + * The column header and row value contents for the lookup table file. + */ + fileContents: pulumi.Input[]>[]>; + /** + * A name for the lookup table file. Generally ends with ".csv" + */ + fileName: pulumi.Input; + /** + * User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. + */ + owner: pulumi.Input; +} diff --git a/sdk/nodejs/tsconfig.json b/sdk/nodejs/tsconfig.json index c5c8314a..36bf992c 100644 --- a/sdk/nodejs/tsconfig.json +++ b/sdk/nodejs/tsconfig.json @@ -33,6 +33,7 @@ "inputsTcpSplunkTcpToken.ts", "inputsTcpSsl.ts", "inputsUdp.ts", + "lookupTableFile.ts", "outputsTcpDefault.ts", "outputsTcpGroup.ts", "outputsTcpServer.ts", diff --git a/sdk/python/pulumi_splunk/__init__.py b/sdk/python/pulumi_splunk/__init__.py index 5b883841..390a7e02 100644 --- a/sdk/python/pulumi_splunk/__init__.py +++ b/sdk/python/pulumi_splunk/__init__.py @@ -22,6 +22,7 @@ from .inputs_tcp_splunk_tcp_token import * from .inputs_tcp_ssl import * from .inputs_udp import * +from .lookup_table_file import * from .outputs_tcp_default import * from .outputs_tcp_group import * from .outputs_tcp_server import * @@ -178,6 +179,14 @@ "splunk:index/inputsUdp:InputsUdp": "InputsUdp" } }, + { + "pkg": "splunk", + "mod": "index/lookupTableFile", + "fqn": "pulumi_splunk", + "classes": { + "splunk:index/lookupTableFile:LookupTableFile": "LookupTableFile" + } + }, { "pkg": "splunk", "mod": "index/outputsTcpDefault", diff --git a/sdk/python/pulumi_splunk/lookup_table_file.py b/sdk/python/pulumi_splunk/lookup_table_file.py new file mode 100644 index 00000000..63fed2ac --- /dev/null +++ b/sdk/python/pulumi_splunk/lookup_table_file.py @@ -0,0 +1,367 @@ +# coding=utf-8 +# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import sys +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +if sys.version_info >= (3, 11): + from typing import NotRequired, TypedDict, TypeAlias +else: + from typing_extensions import NotRequired, TypedDict, TypeAlias +from . import _utilities + +__all__ = ['LookupTableFileArgs', 'LookupTableFile'] + +@pulumi.input_type +class LookupTableFileArgs: + def __init__(__self__, *, + app: pulumi.Input[str], + file_contents: pulumi.Input[Sequence[pulumi.Input[Sequence[pulumi.Input[str]]]]], + file_name: pulumi.Input[str], + owner: pulumi.Input[str]): + """ + The set of arguments for constructing a LookupTableFile resource. + :param pulumi.Input[str] app: The app context for the resource. + :param pulumi.Input[Sequence[pulumi.Input[Sequence[pulumi.Input[str]]]]] file_contents: The column header and row value contents for the lookup table file. + :param pulumi.Input[str] file_name: A name for the lookup table file. Generally ends with ".csv" + :param pulumi.Input[str] owner: User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. + """ + pulumi.set(__self__, "app", app) + pulumi.set(__self__, "file_contents", file_contents) + pulumi.set(__self__, "file_name", file_name) + pulumi.set(__self__, "owner", owner) + + @property + @pulumi.getter + def app(self) -> pulumi.Input[str]: + """ + The app context for the resource. + """ + return pulumi.get(self, "app") + + @app.setter + def app(self, value: pulumi.Input[str]): + pulumi.set(self, "app", value) + + @property + @pulumi.getter(name="fileContents") + def file_contents(self) -> pulumi.Input[Sequence[pulumi.Input[Sequence[pulumi.Input[str]]]]]: + """ + The column header and row value contents for the lookup table file. + """ + return pulumi.get(self, "file_contents") + + @file_contents.setter + def file_contents(self, value: pulumi.Input[Sequence[pulumi.Input[Sequence[pulumi.Input[str]]]]]): + pulumi.set(self, "file_contents", value) + + @property + @pulumi.getter(name="fileName") + def file_name(self) -> pulumi.Input[str]: + """ + A name for the lookup table file. Generally ends with ".csv" + """ + return pulumi.get(self, "file_name") + + @file_name.setter + def file_name(self, value: pulumi.Input[str]): + pulumi.set(self, "file_name", value) + + @property + @pulumi.getter + def owner(self) -> pulumi.Input[str]: + """ + User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. + """ + return pulumi.get(self, "owner") + + @owner.setter + def owner(self, value: pulumi.Input[str]): + pulumi.set(self, "owner", value) + + +@pulumi.input_type +class _LookupTableFileState: + def __init__(__self__, *, + app: Optional[pulumi.Input[str]] = None, + file_contents: Optional[pulumi.Input[Sequence[pulumi.Input[Sequence[pulumi.Input[str]]]]]] = None, + file_name: Optional[pulumi.Input[str]] = None, + owner: Optional[pulumi.Input[str]] = None): + """ + Input properties used for looking up and filtering LookupTableFile resources. + :param pulumi.Input[str] app: The app context for the resource. + :param pulumi.Input[Sequence[pulumi.Input[Sequence[pulumi.Input[str]]]]] file_contents: The column header and row value contents for the lookup table file. + :param pulumi.Input[str] file_name: A name for the lookup table file. Generally ends with ".csv" + :param pulumi.Input[str] owner: User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. + """ + if app is not None: + pulumi.set(__self__, "app", app) + if file_contents is not None: + pulumi.set(__self__, "file_contents", file_contents) + if file_name is not None: + pulumi.set(__self__, "file_name", file_name) + if owner is not None: + pulumi.set(__self__, "owner", owner) + + @property + @pulumi.getter + def app(self) -> Optional[pulumi.Input[str]]: + """ + The app context for the resource. + """ + return pulumi.get(self, "app") + + @app.setter + def app(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "app", value) + + @property + @pulumi.getter(name="fileContents") + def file_contents(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[Sequence[pulumi.Input[str]]]]]]: + """ + The column header and row value contents for the lookup table file. + """ + return pulumi.get(self, "file_contents") + + @file_contents.setter + def file_contents(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[Sequence[pulumi.Input[str]]]]]]): + pulumi.set(self, "file_contents", value) + + @property + @pulumi.getter(name="fileName") + def file_name(self) -> Optional[pulumi.Input[str]]: + """ + A name for the lookup table file. Generally ends with ".csv" + """ + return pulumi.get(self, "file_name") + + @file_name.setter + def file_name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "file_name", value) + + @property + @pulumi.getter + def owner(self) -> Optional[pulumi.Input[str]]: + """ + User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. + """ + return pulumi.get(self, "owner") + + @owner.setter + def owner(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "owner", value) + + +class LookupTableFile(pulumi.CustomResource): + @overload + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + app: Optional[pulumi.Input[str]] = None, + file_contents: Optional[pulumi.Input[Sequence[pulumi.Input[Sequence[pulumi.Input[str]]]]]] = None, + file_name: Optional[pulumi.Input[str]] = None, + owner: Optional[pulumi.Input[str]] = None, + __props__=None): + """ + ## # Resource: LookupTableFile + + Create and manage lookup table files. + + ## Example Usage + + ```python + import pulumi + import pulumi_splunk as splunk + + lookup_table_file = splunk.LookupTableFile("lookup_table_file", + app="search", + owner="nobody", + file_name="lookup.csv", + file_contents=[ + [ + "status", + "status_description", + "status_type", + ], + [ + "100", + "Continue", + "Informational", + ], + [ + "101", + "Switching Protocols", + "Informational", + ], + [ + "200", + "OK", + "Successful", + ], + ]) + ``` + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[str] app: The app context for the resource. + :param pulumi.Input[Sequence[pulumi.Input[Sequence[pulumi.Input[str]]]]] file_contents: The column header and row value contents for the lookup table file. + :param pulumi.Input[str] file_name: A name for the lookup table file. Generally ends with ".csv" + :param pulumi.Input[str] owner: User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. + """ + ... + @overload + def __init__(__self__, + resource_name: str, + args: LookupTableFileArgs, + opts: Optional[pulumi.ResourceOptions] = None): + """ + ## # Resource: LookupTableFile + + Create and manage lookup table files. + + ## Example Usage + + ```python + import pulumi + import pulumi_splunk as splunk + + lookup_table_file = splunk.LookupTableFile("lookup_table_file", + app="search", + owner="nobody", + file_name="lookup.csv", + file_contents=[ + [ + "status", + "status_description", + "status_type", + ], + [ + "100", + "Continue", + "Informational", + ], + [ + "101", + "Switching Protocols", + "Informational", + ], + [ + "200", + "OK", + "Successful", + ], + ]) + ``` + + :param str resource_name: The name of the resource. + :param LookupTableFileArgs args: The arguments to use to populate this resource's properties. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + ... + def __init__(__self__, resource_name: str, *args, **kwargs): + resource_args, opts = _utilities.get_resource_args_opts(LookupTableFileArgs, pulumi.ResourceOptions, *args, **kwargs) + if resource_args is not None: + __self__._internal_init(resource_name, opts, **resource_args.__dict__) + else: + __self__._internal_init(resource_name, *args, **kwargs) + + def _internal_init(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + app: Optional[pulumi.Input[str]] = None, + file_contents: Optional[pulumi.Input[Sequence[pulumi.Input[Sequence[pulumi.Input[str]]]]]] = None, + file_name: Optional[pulumi.Input[str]] = None, + owner: Optional[pulumi.Input[str]] = None, + __props__=None): + opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = LookupTableFileArgs.__new__(LookupTableFileArgs) + + if app is None and not opts.urn: + raise TypeError("Missing required property 'app'") + __props__.__dict__["app"] = app + if file_contents is None and not opts.urn: + raise TypeError("Missing required property 'file_contents'") + __props__.__dict__["file_contents"] = file_contents + if file_name is None and not opts.urn: + raise TypeError("Missing required property 'file_name'") + __props__.__dict__["file_name"] = file_name + if owner is None and not opts.urn: + raise TypeError("Missing required property 'owner'") + __props__.__dict__["owner"] = owner + super(LookupTableFile, __self__).__init__( + 'splunk:index/lookupTableFile:LookupTableFile', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None, + app: Optional[pulumi.Input[str]] = None, + file_contents: Optional[pulumi.Input[Sequence[pulumi.Input[Sequence[pulumi.Input[str]]]]]] = None, + file_name: Optional[pulumi.Input[str]] = None, + owner: Optional[pulumi.Input[str]] = None) -> 'LookupTableFile': + """ + Get an existing LookupTableFile resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[str] app: The app context for the resource. + :param pulumi.Input[Sequence[pulumi.Input[Sequence[pulumi.Input[str]]]]] file_contents: The column header and row value contents for the lookup table file. + :param pulumi.Input[str] file_name: A name for the lookup table file. Generally ends with ".csv" + :param pulumi.Input[str] owner: User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = _LookupTableFileState.__new__(_LookupTableFileState) + + __props__.__dict__["app"] = app + __props__.__dict__["file_contents"] = file_contents + __props__.__dict__["file_name"] = file_name + __props__.__dict__["owner"] = owner + return LookupTableFile(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter + def app(self) -> pulumi.Output[str]: + """ + The app context for the resource. + """ + return pulumi.get(self, "app") + + @property + @pulumi.getter(name="fileContents") + def file_contents(self) -> pulumi.Output[Sequence[Sequence[str]]]: + """ + The column header and row value contents for the lookup table file. + """ + return pulumi.get(self, "file_contents") + + @property + @pulumi.getter(name="fileName") + def file_name(self) -> pulumi.Output[str]: + """ + A name for the lookup table file. Generally ends with ".csv" + """ + return pulumi.get(self, "file_name") + + @property + @pulumi.getter + def owner(self) -> pulumi.Output[str]: + """ + User name of resource owner. Defaults to the resource creator. Required for updating any knowledge object ACL properties. nobody = All users may access the resource, but write access to the resource might be restricted. + """ + return pulumi.get(self, "owner") +