class FirehoseLogDestination
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.APIGateway.FirehoseLogDestination |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsapigateway#FirehoseLogDestination |
![]() | software.amazon.awscdk.services.apigateway.FirehoseLogDestination |
![]() | aws_cdk.aws_apigateway.FirehoseLogDestination |
![]() | aws-cdk-lib » aws_apigateway » FirehoseLogDestination |
Implements
IAccess
Use a Firehose delivery stream as a custom access log destination for API Gateway.
Example
const destinationBucket = new s3.Bucket(this, 'Bucket');
const deliveryStreamRole = new iam.Role(this, 'Role', {
assumedBy: new iam.ServicePrincipal('firehose.amazonaws.com'),
});
const stream = new firehose.CfnDeliveryStream(this, 'MyStream', {
deliveryStreamName: 'amazon-apigateway-delivery-stream',
s3DestinationConfiguration: {
bucketArn: destinationBucket.bucketArn,
roleArn: deliveryStreamRole.roleArn,
},
});
const api = new apigateway.RestApi(this, 'books', {
deployOptions: {
accessLogDestination: new apigateway.FirehoseLogDestination(stream),
accessLogFormat: apigateway.AccessLogFormat.jsonWithStandardFields(),
},
});
Initializer
new FirehoseLogDestination(stream: CfnDeliveryStream)
Parameters
- stream
Cfn
Delivery Stream
Methods
Name | Description |
---|---|
bind(stage) | Binds this destination to the Firehose delivery stream. |
bind(stage)
public bind(stage: IStage): AccessLogDestinationConfig
Parameters
- stage
IStage
Returns
Binds this destination to the Firehose delivery stream.