pub struct Builder { /* private fields */ }
Expand description
A builder for LogDestinationConfig
.
Implementations
sourceimpl Builder
impl Builder
sourcepub fn log_type(self, input: LogType) -> Self
pub fn log_type(self, input: LogType) -> Self
The type of log to send. Alert logs report traffic that matches a StatefulRule
with an action setting that sends an alert log message. Flow logs are standard network traffic flow logs.
sourcepub fn set_log_type(self, input: Option<LogType>) -> Self
pub fn set_log_type(self, input: Option<LogType>) -> Self
The type of log to send. Alert logs report traffic that matches a StatefulRule
with an action setting that sends an alert log message. Flow logs are standard network traffic flow logs.
sourcepub fn log_destination_type(self, input: LogDestinationType) -> Self
pub fn log_destination_type(self, input: LogDestinationType) -> Self
The type of storage destination to send these logs to. You can send logs to an Amazon S3 bucket, a CloudWatch log group, or a Kinesis Data Firehose delivery stream.
sourcepub fn set_log_destination_type(self, input: Option<LogDestinationType>) -> Self
pub fn set_log_destination_type(self, input: Option<LogDestinationType>) -> Self
The type of storage destination to send these logs to. You can send logs to an Amazon S3 bucket, a CloudWatch log group, or a Kinesis Data Firehose delivery stream.
sourcepub fn log_destination(self, k: impl Into<String>, v: impl Into<String>) -> Self
pub fn log_destination(self, k: impl Into<String>, v: impl Into<String>) -> Self
Adds a key-value pair to log_destination
.
To override the contents of this collection use set_log_destination
.
The named location for the logs, provided in a key:value mapping that is specific to the chosen destination type.
-
For an Amazon S3 bucket, provide the name of the bucket, with key
bucketName
, and optionally provide a prefix, with keyprefix
. The following example specifies an Amazon S3 bucket namedDOC-EXAMPLE-BUCKET
and the prefixalerts
:"LogDestination": { "bucketName": "DOC-EXAMPLE-BUCKET", "prefix": "alerts" }
-
For a CloudWatch log group, provide the name of the CloudWatch log group, with key
logGroup
. The following example specifies a log group namedalert-log-group
:"LogDestination": { "logGroup": "alert-log-group" }
-
For a Kinesis Data Firehose delivery stream, provide the name of the delivery stream, with key
deliveryStream
. The following example specifies a delivery stream namedalert-delivery-stream
:"LogDestination": { "deliveryStream": "alert-delivery-stream" }
sourcepub fn set_log_destination(self, input: Option<HashMap<String, String>>) -> Self
pub fn set_log_destination(self, input: Option<HashMap<String, String>>) -> Self
The named location for the logs, provided in a key:value mapping that is specific to the chosen destination type.
-
For an Amazon S3 bucket, provide the name of the bucket, with key
bucketName
, and optionally provide a prefix, with keyprefix
. The following example specifies an Amazon S3 bucket namedDOC-EXAMPLE-BUCKET
and the prefixalerts
:"LogDestination": { "bucketName": "DOC-EXAMPLE-BUCKET", "prefix": "alerts" }
-
For a CloudWatch log group, provide the name of the CloudWatch log group, with key
logGroup
. The following example specifies a log group namedalert-log-group
:"LogDestination": { "logGroup": "alert-log-group" }
-
For a Kinesis Data Firehose delivery stream, provide the name of the delivery stream, with key
deliveryStream
. The following example specifies a delivery stream namedalert-delivery-stream
:"LogDestination": { "deliveryStream": "alert-delivery-stream" }
sourcepub fn build(self) -> LogDestinationConfig
pub fn build(self) -> LogDestinationConfig
Consumes the builder and constructs a LogDestinationConfig
.