Class LogDriver
The base class for log drivers.
Inheritance
System.Object
LogDriver
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.AWS.ECS.dll
Syntax (csharp)
public abstract class LogDriver : DeputyBase
Syntax (vb)
Public MustInherit Class LogDriver
Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
// Create a Task Definition for the container to start
var taskDefinition = new Ec2TaskDefinition(this, "TaskDef");
taskDefinition.AddContainer("TheContainer", new ContainerDefinitionOptions {
Image = ContainerImage.FromRegistry("example-image"),
MemoryLimitMiB = 256,
Logging = LogDrivers.Splunk(new SplunkLogDriverProps {
Token = SecretValue.SecretsManager("my-splunk-token"),
Url = "my-splunk-url"
})
});
Synopsis
Constructors
LogDriver() | |
LogDriver(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
LogDriver(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
AwsLogs(IAwsLogDriverProps) | Creates a log driver configuration that sends log information to CloudWatch Logs. |
Bind(Construct, ContainerDefinition) | Called when the log driver is configured on a container. |
Constructors
LogDriver()
protected LogDriver()
LogDriver(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected LogDriver(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
LogDriver(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected LogDriver(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
AwsLogs(IAwsLogDriverProps)
Creates a log driver configuration that sends log information to CloudWatch Logs.
public static LogDriver AwsLogs(IAwsLogDriverProps props)
Parameters
- props IAwsLogDriverProps
Returns
Bind(Construct, ContainerDefinition)
Called when the log driver is configured on a container.
public abstract ILogDriverConfig Bind(Construct scope, ContainerDefinition containerDefinition)
Parameters
- scope Construct
- containerDefinition ContainerDefinition
Returns