# ClusterLoggingTypes

EKS cluster logging types.

- Source: [`aws-eks/lib/cluster.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-eks/lib/cluster.ts#L1149)
- Type last changed: v2.10.0 · 29 Jan 2022

## Example

TypeScript:

```ts
import { KubectlV37Layer } from '@aws-cdk/lambda-layer-kubectl-v37';

const cluster = new eks.Cluster(this, 'Cluster', {
  // ...
  version: eks.KubernetesVersion.V1_37,
  clusterLogging: [
    eks.ClusterLoggingTypes.API,
    eks.ClusterLoggingTypes.AUTHENTICATOR,
    eks.ClusterLoggingTypes.SCHEDULER,
  ],
  kubectlLayer: new KubectlV37Layer(this, 'kubectl'),
});
```

Python:

```python
from aws_cdk.lambda_layer_kubectl_v37 import KubectlV37Layer

cluster = eks.Cluster(self, "Cluster",
    # ...
    version=eks.KubernetesVersion.V1_37,
    cluster_logging=[eks.ClusterLoggingTypes.API, eks.ClusterLoggingTypes.AUTHENTICATOR, eks.ClusterLoggingTypes.SCHEDULER
    ],
    kubectl_layer=KubectlV37Layer(self, "kubectl")
)
```

Java:

```java
import software.amazon.awscdk.cdk.lambdalayer.kubectl.v37.KubectlV37Layer;

Cluster cluster = Cluster.Builder.create(this, "Cluster")
        // ...
        .version(KubernetesVersion.V1_37)
        .clusterLogging(List.of(ClusterLoggingTypes.API, ClusterLoggingTypes.AUTHENTICATOR, ClusterLoggingTypes.SCHEDULER))
        .kubectlLayer(new KubectlV37Layer(this, "kubectl"))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
using Amazon.CDK.LambdaLayer.KubectlV37;

var cluster = new Cluster(this, "Cluster", new ClusterProps {
    // ...
    Version = KubernetesVersion.V1_37,
    ClusterLogging = new [] { ClusterLoggingTypes.API, ClusterLoggingTypes.AUTHENTICATOR, ClusterLoggingTypes.SCHEDULER },
    KubectlLayer = new KubectlV37Layer(this, "kubectl")
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
import "github.com/cdklabs/awscdk-kubectl-go/kubectlv37"

cluster := eks.NewCluster(this, jsii.String("Cluster"), &ClusterProps{
	// ...
	Version: eks.KubernetesVersion_V1_37(),
	ClusterLogging: []ClusterLoggingTypes{
		eks.ClusterLoggingTypes_API,
		eks.ClusterLoggingTypes_AUTHENTICATOR,
		eks.ClusterLoggingTypes_SCHEDULER,
	},
	KubectlLayer: kubectlv37.NewKubectlV37Layer(this, jsii.String("kubectl")),
})
```

## Members

| Member | Description |
| --- | --- |
| `API` | Logs pertaining to API requests to the cluster. |
| `AUDIT` | Logs pertaining to cluster access via the Kubernetes API. |
| `AUTHENTICATOR` | Logs pertaining to authentication requests into the cluster. |
| `CONTROLLER_MANAGER` | Logs pertaining to state of cluster controllers. |
| `SCHEDULER` | Logs pertaining to scheduling decisions. |

## Referenced by

- [`ClusterOptions`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_eks.ClusterOptions.html).clusterLogging
