Skip to content
v2.275.0

SplunkLogDriver Class ​

A log driver that sends log information to splunk Logs.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';

declare const secret: ecs.Secret;
const splunkLogDriver = new ecs.SplunkLogDriver({
  secretToken: secret,
  url: 'url',

  // the properties below are optional
  caName: 'caName',
  caPath: 'caPath',
  env: ['env'],
  envRegex: 'envRegex',
  format: ecs.SplunkLogFormat.INLINE,
  gzip: false,
  gzipLevel: 123,
  index: 'index',
  insecureSkipVerify: 'insecureSkipVerify',
  labels: ['labels'],
  source: 'source',
  sourceType: 'sourceType',
  tag: 'tag',
  verifyConnection: false,
});
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ecs as ecs

# secret: ecs.Secret

splunk_log_driver = ecs.SplunkLogDriver(
    secret_token=secret,
    url="url",

    # the properties below are optional
    ca_name="caName",
    ca_path="caPath",
    env=["env"],
    env_regex="envRegex",
    format=ecs.SplunkLogFormat.INLINE,
    gzip=False,
    gzip_level=123,
    index="index",
    insecure_skip_verify="insecureSkipVerify",
    labels=["labels"],
    source="source",
    source_type="sourceType",
    tag="tag",
    verify_connection=False
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ecs.*;

Secret secret;

SplunkLogDriver splunkLogDriver = SplunkLogDriver.Builder.create()
        .secretToken(secret)
        .url("url")

        // the properties below are optional
        .caName("caName")
        .caPath("caPath")
        .env(List.of("env"))
        .envRegex("envRegex")
        .format(SplunkLogFormat.INLINE)
        .gzip(false)
        .gzipLevel(123)
        .index("index")
        .insecureSkipVerify("insecureSkipVerify")
        .labels(List.of("labels"))
        .source("source")
        .sourceType("sourceType")
        .tag("tag")
        .verifyConnection(false)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ECS;

Secret secret;

var splunkLogDriver = new SplunkLogDriver(new SplunkLogDriverProps {
    SecretToken = secret,
    Url = "url",

    // the properties below are optional
    CaName = "caName",
    CaPath = "caPath",
    Env = new [] { "env" },
    EnvRegex = "envRegex",
    Format = SplunkLogFormat.INLINE,
    Gzip = false,
    GzipLevel = 123,
    Index = "index",
    InsecureSkipVerify = "insecureSkipVerify",
    Labels = new [] { "labels" },
    Source = "source",
    SourceType = "sourceType",
    Tag = "tag",
    VerifyConnection = false
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var secret Secret

splunkLogDriver := awscdk.Aws_ecs.NewSplunkLogDriver(&SplunkLogDriverProps{
	SecretToken: secret,
	Url: jsii.String("url"),

	// the properties below are optional
	CaName: jsii.String("caName"),
	CaPath: jsii.String("caPath"),
	Env: []*string{
		jsii.String("env"),
	},
	EnvRegex: jsii.String("envRegex"),
	Format: awscdk.*Aws_ecs.SplunkLogFormat_INLINE,
	Gzip: jsii.Boolean(false),
	GzipLevel: jsii.Number(123),
	Index: jsii.String("index"),
	InsecureSkipVerify: jsii.String("insecureSkipVerify"),
	Labels: []*string{
		jsii.String("labels"),
	},
	Source: jsii.String("source"),
	SourceType: jsii.String("sourceType"),
	Tag: jsii.String("tag"),
	VerifyConnection: jsii.Boolean(false),
})

Initializer ​

ts
new SplunkLogDriver(props: SplunkLogDriverProps)
python
SplunkLogDriver(props: SplunkLogDriverProps)
java
new SplunkLogDriver(SplunkLogDriverProps props)
csharp
new SplunkLogDriver(SplunkLogDriverProps props)
go
NewSplunkLogDriver(Props SplunkLogDriverProps)

Methods ​

awsLogs(props: AwsLogDriverProps): LogDriver@staticmethod def aws_logs(props: AwsLogDriverProps) -> LogDriverpublic static LogDriver awsLogs(AwsLogDriverProps props)public static LogDriver AwsLogs(AwsLogDriverProps props)func AwsLogs(Props AwsLogDriverProps) LogDriverstatic#
Creates a log driver configuration that sends log information to CloudWatch Logs.
bind(_scope: Construct, _containerDefinition: ContainerDefinition): LogDriverConfigdef bind(self, _scope: Construct, _container_definition: ContainerDefinition) -> LogDriverConfigpublic LogDriverConfig bind(Construct _scope, ContainerDefinition _containerDefinition)public LogDriverConfig Bind(Construct _scope, ContainerDefinition _containerDefinition)func Bind(_scope Construct, _containerDefinition ContainerDefinition) LogDriverConfig#
Called when the log driver is configured on a container.