# LogStreamAttributes

Attributes for importing a LogStream.

Used as argument in: [LogStream.fromLogStreamAttributes](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogStream.html#fromlogstreamattributes)

- Source: [`aws-logs/lib/log-stream.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-logs/lib/log-stream.ts#L22)
- Type last changed: v2.235.0 · 15 Jan 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_logs as logs } from 'aws-cdk-lib';
const logStreamAttributes: logs.LogStreamAttributes = {
  logGroupName: 'logGroupName',
  logStreamName: 'logStreamName',
};
```

Python:

```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_logs as logs

log_stream_attributes = logs.LogStreamAttributes(
    log_group_name="logGroupName",
    log_stream_name="logStreamName"
)
```

Java:

```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.logs.*;

LogStreamAttributes logStreamAttributes = LogStreamAttributes.builder()
        .logGroupName("logGroupName")
        .logStreamName("logStreamName")
        .build();
```

C# / .NET:

```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.Logs;

var logStreamAttributes = new LogStreamAttributes {
    LogGroupName = "logGroupName",
    LogStreamName = "logStreamName"
};
```

Golang:

```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"

logStreamAttributes := &LogStreamAttributes{
	LogGroupName: jsii.String("logGroupName"),
	LogStreamName: jsii.String("logStreamName"),
}
```

## Properties

- `logGroupName`: string (required) — The name of the log group.

  **Default:** When not provided, logStreamRef will throw an error

- `logStreamName`: string (required) — The name of the log stream.
