1. Packages
  2. Aviatrix
  3. API Docs
  4. AviatrixSplunkLogging
Aviatrix v0.0.11 published on Saturday, Jun 17, 2023 by Aviatrix

aviatrix.AviatrixSplunkLogging

Explore with Pulumi AI

The aviatrix_splunk_logging resource allows the enabling and disabling of splunk logging.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Aviatrix = Pulumi.Aviatrix;

return await Deployment.RunAsync(() => 
{
    // Enable splunk logging using server and port combination
    var testSplunkLogging = new Aviatrix.AviatrixSplunkLogging("testSplunkLogging", new()
    {
        Port = 10,
        Server = "1.2.3.4",
    });

});
Copy
package main

import (
	"github.com/astipkovits/pulumi-aviatrix/sdk/go/aviatrix"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := aviatrix.NewAviatrixSplunkLogging(ctx, "testSplunkLogging", &aviatrix.AviatrixSplunkLoggingArgs{
			Port:   pulumi.Int(10),
			Server: pulumi.String("1.2.3.4"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aviatrix.AviatrixSplunkLogging;
import com.pulumi.aviatrix.AviatrixSplunkLoggingArgs;
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 testSplunkLogging = new AviatrixSplunkLogging("testSplunkLogging", AviatrixSplunkLoggingArgs.builder()        
            .port(10)
            .server("1.2.3.4")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as aviatrix from "@pulumi/aviatrix";

// Enable splunk logging using server and port combination
const testSplunkLogging = new aviatrix.AviatrixSplunkLogging("test_splunk_logging", {
    port: 10,
    server: "1.2.3.4",
});
Copy
import pulumi
import pulumi_aviatrix as aviatrix

# Enable splunk logging using server and port combination
test_splunk_logging = aviatrix.AviatrixSplunkLogging("testSplunkLogging",
    port=10,
    server="1.2.3.4")
Copy
resources:
  # Enable splunk logging using server and port combination
  testSplunkLogging:
    type: aviatrix:AviatrixSplunkLogging
    properties:
      port: 10
      server: 1.2.3.4
Copy
using System;
using System.Collections.Generic;
using System.IO;
using Pulumi;
using Aviatrix = Pulumi.Aviatrix;

	private static string ReadFileBase64(string path) {
		return Convert.ToBase64String(Encoding.UTF8.GetBytes(File.ReadAllText(path)))
	}

return await Deployment.RunAsync(() => 
{
    // Enable splunk logging using configuration file
    var testSplunkLogging = new Aviatrix.AviatrixSplunkLogging("testSplunkLogging", new()
    {
        CustomOutputConfigFile = ReadFileBase64("/path/to/configuration.spl"),
    });

});
Copy
package main

import (
	"encoding/base64"
	"io/ioutil"

	"github.com/astipkovits/pulumi-aviatrix/sdk/go/aviatrix"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func filebase64OrPanic(path string) pulumi.StringPtrInput {
	if fileData, err := ioutil.ReadFile(path); err == nil {
		return pulumi.String(base64.StdEncoding.EncodeToString(fileData[:]))
	} else {
		panic(err.Error())
	}
}

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := aviatrix.NewAviatrixSplunkLogging(ctx, "testSplunkLogging", &aviatrix.AviatrixSplunkLoggingArgs{
			CustomOutputConfigFile: filebase64OrPanic("/path/to/configuration.spl"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aviatrix.AviatrixSplunkLogging;
import com.pulumi.aviatrix.AviatrixSplunkLoggingArgs;
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 testSplunkLogging = new AviatrixSplunkLogging("testSplunkLogging", AviatrixSplunkLoggingArgs.builder()        
            .customOutputConfigFile(Base64.getEncoder().encodeToString(Files.readAllBytes(Paths.get("/path/to/configuration.spl"))))
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as aviatrix from "@astipkovits/aviatrix";
import * as fs from "fs";

// Enable splunk logging using configuration file
const testSplunkLogging = new aviatrix.AviatrixSplunkLogging("testSplunkLogging", {customOutputConfigFile: Buffer.from(fs.readFileSync("/path/to/configuration.spl"), 'binary').toString('base64')});
Copy
import pulumi
import base64
import pulumi_aviatrix as aviatrix

# Enable splunk logging using configuration file
test_splunk_logging = aviatrix.AviatrixSplunkLogging("testSplunkLogging", custom_output_config_file=(lambda path: base64.b64encode(open(path).read().encode()).decode())("/path/to/configuration.spl"))
Copy

Coming soon!

Create AviatrixSplunkLogging Resource

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

Constructor syntax

new AviatrixSplunkLogging(name: string, args?: AviatrixSplunkLoggingArgs, opts?: CustomResourceOptions);
@overload
def AviatrixSplunkLogging(resource_name: str,
                          args: Optional[AviatrixSplunkLoggingArgs] = None,
                          opts: Optional[ResourceOptions] = None)

@overload
def AviatrixSplunkLogging(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          custom_input_config: Optional[str] = None,
                          custom_output_config_file: Optional[str] = None,
                          excluded_gateways: Optional[Sequence[str]] = None,
                          port: Optional[int] = None,
                          server: Optional[str] = None)
func NewAviatrixSplunkLogging(ctx *Context, name string, args *AviatrixSplunkLoggingArgs, opts ...ResourceOption) (*AviatrixSplunkLogging, error)
public AviatrixSplunkLogging(string name, AviatrixSplunkLoggingArgs? args = null, CustomResourceOptions? opts = null)
public AviatrixSplunkLogging(String name, AviatrixSplunkLoggingArgs args)
public AviatrixSplunkLogging(String name, AviatrixSplunkLoggingArgs args, CustomResourceOptions options)
type: aviatrix:AviatrixSplunkLogging
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args AviatrixSplunkLoggingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args AviatrixSplunkLoggingArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args AviatrixSplunkLoggingArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args AviatrixSplunkLoggingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. AviatrixSplunkLoggingArgs
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 aviatrixSplunkLoggingResource = new Aviatrix.AviatrixSplunkLogging("aviatrixSplunkLoggingResource", new()
{
    CustomInputConfig = "string",
    CustomOutputConfigFile = "string",
    ExcludedGateways = new[]
    {
        "string",
    },
    Port = 0,
    Server = "string",
});
Copy
example, err := aviatrix.NewAviatrixSplunkLogging(ctx, "aviatrixSplunkLoggingResource", &aviatrix.AviatrixSplunkLoggingArgs{
	CustomInputConfig:      pulumi.String("string"),
	CustomOutputConfigFile: pulumi.String("string"),
	ExcludedGateways: pulumi.StringArray{
		pulumi.String("string"),
	},
	Port:   pulumi.Int(0),
	Server: pulumi.String("string"),
})
Copy
var aviatrixSplunkLoggingResource = new AviatrixSplunkLogging("aviatrixSplunkLoggingResource", AviatrixSplunkLoggingArgs.builder()
    .customInputConfig("string")
    .customOutputConfigFile("string")
    .excludedGateways("string")
    .port(0)
    .server("string")
    .build());
Copy
aviatrix_splunk_logging_resource = aviatrix.AviatrixSplunkLogging("aviatrixSplunkLoggingResource",
    custom_input_config="string",
    custom_output_config_file="string",
    excluded_gateways=["string"],
    port=0,
    server="string")
Copy
const aviatrixSplunkLoggingResource = new aviatrix.AviatrixSplunkLogging("aviatrixSplunkLoggingResource", {
    customInputConfig: "string",
    customOutputConfigFile: "string",
    excludedGateways: ["string"],
    port: 0,
    server: "string",
});
Copy
type: aviatrix:AviatrixSplunkLogging
properties:
    customInputConfig: string
    customOutputConfigFile: string
    excludedGateways:
        - string
    port: 0
    server: string
Copy

AviatrixSplunkLogging Resource Properties

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

Inputs

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

The AviatrixSplunkLogging resource accepts the following input properties:

CustomInputConfig Changes to this property will trigger replacement. string
Custom configuration.
CustomOutputConfigFile Changes to this property will trigger replacement. string
Configuration file. Use the filebase64 function to read from a file.
ExcludedGateways Changes to this property will trigger replacement. List<string>
List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
Port Changes to this property will trigger replacement. int
Port number.
Server Changes to this property will trigger replacement. string
Server IP.
CustomInputConfig Changes to this property will trigger replacement. string
Custom configuration.
CustomOutputConfigFile Changes to this property will trigger replacement. string
Configuration file. Use the filebase64 function to read from a file.
ExcludedGateways Changes to this property will trigger replacement. []string
List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
Port Changes to this property will trigger replacement. int
Port number.
Server Changes to this property will trigger replacement. string
Server IP.
customInputConfig Changes to this property will trigger replacement. String
Custom configuration.
customOutputConfigFile Changes to this property will trigger replacement. String
Configuration file. Use the filebase64 function to read from a file.
excludedGateways Changes to this property will trigger replacement. List<String>
List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
port Changes to this property will trigger replacement. Integer
Port number.
server Changes to this property will trigger replacement. String
Server IP.
customInputConfig Changes to this property will trigger replacement. string
Custom configuration.
customOutputConfigFile Changes to this property will trigger replacement. string
Configuration file. Use the filebase64 function to read from a file.
excludedGateways Changes to this property will trigger replacement. string[]
List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
port Changes to this property will trigger replacement. number
Port number.
server Changes to this property will trigger replacement. string
Server IP.
custom_input_config Changes to this property will trigger replacement. str
Custom configuration.
custom_output_config_file Changes to this property will trigger replacement. str
Configuration file. Use the filebase64 function to read from a file.
excluded_gateways Changes to this property will trigger replacement. Sequence[str]
List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
port Changes to this property will trigger replacement. int
Port number.
server Changes to this property will trigger replacement. str
Server IP.
customInputConfig Changes to this property will trigger replacement. String
Custom configuration.
customOutputConfigFile Changes to this property will trigger replacement. String
Configuration file. Use the filebase64 function to read from a file.
excludedGateways Changes to this property will trigger replacement. List<String>
List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
port Changes to this property will trigger replacement. Number
Port number.
server Changes to this property will trigger replacement. String
Server IP.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Status string
The status of splunk logging.
Id string
The provider-assigned unique ID for this managed resource.
Status string
The status of splunk logging.
id String
The provider-assigned unique ID for this managed resource.
status String
The status of splunk logging.
id string
The provider-assigned unique ID for this managed resource.
status string
The status of splunk logging.
id str
The provider-assigned unique ID for this managed resource.
status str
The status of splunk logging.
id String
The provider-assigned unique ID for this managed resource.
status String
The status of splunk logging.

Look up Existing AviatrixSplunkLogging Resource

Get an existing AviatrixSplunkLogging 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?: AviatrixSplunkLoggingState, opts?: CustomResourceOptions): AviatrixSplunkLogging
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        custom_input_config: Optional[str] = None,
        custom_output_config_file: Optional[str] = None,
        excluded_gateways: Optional[Sequence[str]] = None,
        port: Optional[int] = None,
        server: Optional[str] = None,
        status: Optional[str] = None) -> AviatrixSplunkLogging
func GetAviatrixSplunkLogging(ctx *Context, name string, id IDInput, state *AviatrixSplunkLoggingState, opts ...ResourceOption) (*AviatrixSplunkLogging, error)
public static AviatrixSplunkLogging Get(string name, Input<string> id, AviatrixSplunkLoggingState? state, CustomResourceOptions? opts = null)
public static AviatrixSplunkLogging get(String name, Output<String> id, AviatrixSplunkLoggingState state, CustomResourceOptions options)
resources:  _:    type: aviatrix:AviatrixSplunkLogging    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
CustomInputConfig Changes to this property will trigger replacement. string
Custom configuration.
CustomOutputConfigFile Changes to this property will trigger replacement. string
Configuration file. Use the filebase64 function to read from a file.
ExcludedGateways Changes to this property will trigger replacement. List<string>
List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
Port Changes to this property will trigger replacement. int
Port number.
Server Changes to this property will trigger replacement. string
Server IP.
Status string
The status of splunk logging.
CustomInputConfig Changes to this property will trigger replacement. string
Custom configuration.
CustomOutputConfigFile Changes to this property will trigger replacement. string
Configuration file. Use the filebase64 function to read from a file.
ExcludedGateways Changes to this property will trigger replacement. []string
List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
Port Changes to this property will trigger replacement. int
Port number.
Server Changes to this property will trigger replacement. string
Server IP.
Status string
The status of splunk logging.
customInputConfig Changes to this property will trigger replacement. String
Custom configuration.
customOutputConfigFile Changes to this property will trigger replacement. String
Configuration file. Use the filebase64 function to read from a file.
excludedGateways Changes to this property will trigger replacement. List<String>
List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
port Changes to this property will trigger replacement. Integer
Port number.
server Changes to this property will trigger replacement. String
Server IP.
status String
The status of splunk logging.
customInputConfig Changes to this property will trigger replacement. string
Custom configuration.
customOutputConfigFile Changes to this property will trigger replacement. string
Configuration file. Use the filebase64 function to read from a file.
excludedGateways Changes to this property will trigger replacement. string[]
List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
port Changes to this property will trigger replacement. number
Port number.
server Changes to this property will trigger replacement. string
Server IP.
status string
The status of splunk logging.
custom_input_config Changes to this property will trigger replacement. str
Custom configuration.
custom_output_config_file Changes to this property will trigger replacement. str
Configuration file. Use the filebase64 function to read from a file.
excluded_gateways Changes to this property will trigger replacement. Sequence[str]
List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
port Changes to this property will trigger replacement. int
Port number.
server Changes to this property will trigger replacement. str
Server IP.
status str
The status of splunk logging.
customInputConfig Changes to this property will trigger replacement. String
Custom configuration.
customOutputConfigFile Changes to this property will trigger replacement. String
Configuration file. Use the filebase64 function to read from a file.
excludedGateways Changes to this property will trigger replacement. List<String>
List of gateways to be excluded from logging. e.g.: ["gateway01", "gateway02", "gateway01-hagw"].
port Changes to this property will trigger replacement. Number
Port number.
server Changes to this property will trigger replacement. String
Server IP.
status String
The status of splunk logging.

Import

splunk_logging can be imported using splunk_logging, e.g.

 $ pulumi import aviatrix:index/aviatrixSplunkLogging:AviatrixSplunkLogging test splunk_logging
Copy

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

Package Details

Repository
aviatrix astipkovits/pulumi-aviatrix
License
Apache-2.0
Notes
This Pulumi package is based on the aviatrix Terraform Provider.