Registry /
cloud / aws-aws-sdk-go-v2-service-cloudwatchlogs
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
cloudwatchlogs
✓ github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs
Lists CloudWatch Logs log groups using the AWS SDK v2.
package main
import (
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs"
)
func main() {
cfg, err := config.LoadDefaultConfig(context.TODO())
if err != nil {
panic(err)
}
client := cloudwatchlogs.NewFromConfig(cfg)
output, err := client.DescribeLogGroups(context.TODO(), &cloudwatchlogs.DescribeLogGroupsInput{})
if err != nil {
panic(err)
}
fmt.Println(output.LogGroups)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
1.40.3latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.