Skip to content
v2.277.0

Experimental

@aws-cdk/aws-bedrock-agentcore-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

LoggingDestination Class ​

Represents a logging destination for AgentCore Runtime.

Use the static factory methods to create instances:

  • LoggingDestination.cloudWatchLogs(logGroup) - Send logs to CloudWatch Logs
  • LoggingDestination.s3(bucket) - Send logs to S3
  • LoggingDestination.firehose(stream) - Send logs to Kinesis Data Firehose

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as bedrock_agentcore_alpha from '@aws-cdk/aws-bedrock-agentcore-alpha';
import { aws_logs as logs } from 'aws-cdk-lib';

declare const logGroup: logs.LogGroup;
const loggingDestination = bedrock_agentcore_alpha.LoggingDestination.cloudWatchLogs(logGroup);
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_bedrock_agentcore_alpha as bedrock_agentcore_alpha
from aws_cdk import aws_logs as logs

# log_group: logs.LogGroup

logging_destination = bedrock_agentcore_alpha.LoggingDestination.cloud_watch_logs(log_group)
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.bedrock.agentcore.alpha.*;
import software.amazon.awscdk.services.logs.*;

LogGroup logGroup;

LoggingDestination loggingDestination = LoggingDestination.cloudWatchLogs(logGroup);
csharp
// Install: dotnet add package Amazon.CDK.AWS.Bedrock.Agentcore.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Bedrock.Agentcore.Alpha;
using Amazon.CDK.AWS.Logs;

LogGroup logGroup;

var loggingDestination = LoggingDestination.CloudWatchLogs(logGroup);
go
// Install: go get github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import bedrock_agentcore_alpha "github.com/aws/aws-cdk-go/awsbedrockagentcorealpha"
import "github.com/aws/aws-cdk-go/awscdk"

var logGroup LogGroup

loggingDestination := bedrock_agentcore_alpha.LoggingDestination_CloudWatchLogs(logGroup)

Initializer ​

ts
new LoggingDestination()
python
LoggingDestination()
java
new LoggingDestination()
csharp
new LoggingDestination()
go
NewLoggingDestination()

Methods ​

cloudWatchLogs(logGroup: ILogGroup): LoggingDestination // chainable@staticmethod def cloud_watch_logs(log_group: ILogGroup) -> LoggingDestinationpublic static LoggingDestination cloudWatchLogs(ILogGroup logGroup)public static LoggingDestination CloudWatchLogs(ILogGroup logGroup)func CloudWatchLogs(LogGroup ILogGroup) LoggingDestination static #
Create a logging destination that sends logs to a CloudWatch Log Group.
1 parameter

Parameters

  • logGrouplog_grouplogGrouplogGroupLogGroup — The CloudWatch Log Group to send logs to.
firehose(stream: IDeliveryStream): LoggingDestination // chainable@staticmethod def firehose(stream: IDeliveryStream) -> LoggingDestinationpublic static LoggingDestination firehose(IDeliveryStream stream)public static LoggingDestination Firehose(IDeliveryStream stream)func Firehose(Stream IDeliveryStream) LoggingDestination static #
Create a logging destination that sends logs to a Kinesis Data Firehose delivery stream.
1 parameter

Parameters

  • streamstreamstreamstreamStream — The Firehose delivery stream to send logs to.
s3(bucket: IBucket): LoggingDestination // chainable@staticmethod def s3(bucket: IBucket) -> LoggingDestinationpublic static LoggingDestination s3(IBucket bucket)public static LoggingDestination S3(IBucket bucket)func S3(Bucket IBucket) LoggingDestination static #
Create a logging destination that sends logs to an S3 bucket.
1 parameter

Parameters

  • bucketbucketbucketbucketBucket — The S3 bucket to send logs to.