# InsightType

Util element for InsightSelector.

Obtainable from: InsightType.API_CALL_RATE, InsightType.API_ERROR_RATE

- Source: [`aws-cloudtrail/lib/cloudtrail.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-cloudtrail/lib/cloudtrail.ts#L188)
- Type last changed: v2.54.0 · 7 Dec 2022

## Example

TypeScript:

```ts
new cloudtrail.Trail(this, 'Insights', {
    insightTypes: [
      cloudtrail.InsightType.API_CALL_RATE,
      cloudtrail.InsightType.API_ERROR_RATE,
    ],
});
```

Python:

```python
cloudtrail.Trail(self, "Insights",
    insight_types=[cloudtrail.InsightType.API_CALL_RATE, cloudtrail.InsightType.API_ERROR_RATE
    ]
)
```

Java:

```java
Trail.Builder.create(this, "Insights")
        .insightTypes(List.of(InsightType.API_CALL_RATE, InsightType.API_ERROR_RATE))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
new Trail(this, "Insights", new TrailProps {
    InsightTypes = new [] { InsightType.API_CALL_RATE, InsightType.API_ERROR_RATE }
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
cloudtrail.NewTrail(this, jsii.String("Insights"), &TrailProps{
	InsightTypes: []InsightType{
		cloudtrail.InsightType_API_CALL_RATE(),
		cloudtrail.InsightType_API_ERROR_RATE(),
	},
})
```

## Properties

- `API_CALL_RATE`: [InsightType](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudtrail.InsightType.html) (static) — The type of insights to log on a trail.

  (API Call Rate)

- `API_ERROR_RATE`: [InsightType](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudtrail.InsightType.html) (static) — The type of insights to log on a trail.

  (API Error Rate)

- `value`: string
