Class FirehoseLogDestination

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.apigateway.FirehoseLogDestination
All Implemented Interfaces:
IAccessLogDestination, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:33:56.755Z") @Stability(Stable) public class FirehoseLogDestination extends software.amazon.jsii.JsiiObject implements IAccessLogDestination
Use a Firehose delivery stream as a custom access log destination for API Gateway.

Example:

 Bucket destinationBucket = new Bucket(this, "Bucket");
 Role deliveryStreamRole = Role.Builder.create(this, "Role")
         .assumedBy(new ServicePrincipal("firehose.amazonaws.com"))
         .build();
 CfnDeliveryStream stream = CfnDeliveryStream.Builder.create(this, "MyStream")
         .deliveryStreamName("amazon-apigateway-delivery-stream")
         .s3DestinationConfiguration(S3DestinationConfigurationProperty.builder()
                 .bucketArn(destinationBucket.getBucketArn())
                 .roleArn(deliveryStreamRole.getRoleArn())
                 .build())
         .build();
 RestApi api = RestApi.Builder.create(this, "books")
         .deployOptions(StageOptions.builder()
                 .accessLogDestination(new FirehoseLogDestination(stream))
                 .accessLogFormat(AccessLogFormat.jsonWithStandardFields())
                 .build())
         .build();
 
  • Constructor Details

    • FirehoseLogDestination

      protected FirehoseLogDestination(software.amazon.jsii.JsiiObjectRef objRef)
    • FirehoseLogDestination

      protected FirehoseLogDestination(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • FirehoseLogDestination

      @Stability(Stable) public FirehoseLogDestination(@NotNull CfnDeliveryStream stream)
      Parameters:
      stream - This parameter is required.
  • Method Details