pub struct CreateFlowLogsFluentBuilder { /* private fields */ }
Expand description
Fluent builder constructing a request to CreateFlowLogs
.
Creates one or more flow logs to capture information about IP traffic for a specific network interface, subnet, or VPC.
Flow log data for a monitored network interface is recorded as flow log records, which are log events consisting of fields that describe the traffic flow. For more information, see Flow log records in the Amazon Virtual Private Cloud User Guide.
When publishing to CloudWatch Logs, flow log records are published to a log group, and each network interface has a unique log stream in the log group. When publishing to Amazon S3, flow log records for all of the monitored network interfaces are published to a single log file object that is stored in the specified bucket.
For more information, see VPC Flow Logs in the Amazon Virtual Private Cloud User Guide.
Implementations§
source§impl CreateFlowLogsFluentBuilder
impl CreateFlowLogsFluentBuilder
sourcepub fn as_input(&self) -> &CreateFlowLogsInputBuilder
pub fn as_input(&self) -> &CreateFlowLogsInputBuilder
Access the CreateFlowLogs as a reference.
sourcepub async fn send(
self
) -> Result<CreateFlowLogsOutput, SdkError<CreateFlowLogsError, HttpResponse>>
pub async fn send( self ) -> Result<CreateFlowLogsOutput, SdkError<CreateFlowLogsError, HttpResponse>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn customize(
self
) -> CustomizableOperation<CreateFlowLogsOutput, CreateFlowLogsError, Self>
pub fn customize( self ) -> CustomizableOperation<CreateFlowLogsOutput, CreateFlowLogsError, Self>
Consumes this builder, creating a customizable operation that can be modified before being sent.
sourcepub fn dry_run(self, input: bool) -> Self
pub fn dry_run(self, input: bool) -> Self
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation
. Otherwise, it is UnauthorizedOperation
.
sourcepub fn set_dry_run(self, input: Option<bool>) -> Self
pub fn set_dry_run(self, input: Option<bool>) -> Self
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation
. Otherwise, it is UnauthorizedOperation
.
sourcepub fn get_dry_run(&self) -> &Option<bool>
pub fn get_dry_run(&self) -> &Option<bool>
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation
. Otherwise, it is UnauthorizedOperation
.
sourcepub fn client_token(self, input: impl Into<String>) -> Self
pub fn client_token(self, input: impl Into<String>) -> Self
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.
sourcepub fn set_client_token(self, input: Option<String>) -> Self
pub fn set_client_token(self, input: Option<String>) -> Self
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.
sourcepub fn get_client_token(&self) -> &Option<String>
pub fn get_client_token(&self) -> &Option<String>
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.
sourcepub fn deliver_logs_permission_arn(self, input: impl Into<String>) -> Self
pub fn deliver_logs_permission_arn(self, input: impl Into<String>) -> Self
The ARN of the IAM role that allows Amazon EC2 to publish flow logs to a CloudWatch Logs log group in your account.
This parameter is required if the destination type is cloud-watch-logs
and unsupported otherwise.
sourcepub fn set_deliver_logs_permission_arn(self, input: Option<String>) -> Self
pub fn set_deliver_logs_permission_arn(self, input: Option<String>) -> Self
The ARN of the IAM role that allows Amazon EC2 to publish flow logs to a CloudWatch Logs log group in your account.
This parameter is required if the destination type is cloud-watch-logs
and unsupported otherwise.
sourcepub fn get_deliver_logs_permission_arn(&self) -> &Option<String>
pub fn get_deliver_logs_permission_arn(&self) -> &Option<String>
The ARN of the IAM role that allows Amazon EC2 to publish flow logs to a CloudWatch Logs log group in your account.
This parameter is required if the destination type is cloud-watch-logs
and unsupported otherwise.
sourcepub fn deliver_cross_account_role(self, input: impl Into<String>) -> Self
pub fn deliver_cross_account_role(self, input: impl Into<String>) -> Self
The ARN of the IAM role that allows Amazon EC2 to publish flow logs across accounts.
sourcepub fn set_deliver_cross_account_role(self, input: Option<String>) -> Self
pub fn set_deliver_cross_account_role(self, input: Option<String>) -> Self
The ARN of the IAM role that allows Amazon EC2 to publish flow logs across accounts.
sourcepub fn get_deliver_cross_account_role(&self) -> &Option<String>
pub fn get_deliver_cross_account_role(&self) -> &Option<String>
The ARN of the IAM role that allows Amazon EC2 to publish flow logs across accounts.
sourcepub fn log_group_name(self, input: impl Into<String>) -> Self
pub fn log_group_name(self, input: impl Into<String>) -> Self
The name of a new or existing CloudWatch Logs log group where Amazon EC2 publishes your flow logs.
This parameter is valid only if the destination type is cloud-watch-logs
.
sourcepub fn set_log_group_name(self, input: Option<String>) -> Self
pub fn set_log_group_name(self, input: Option<String>) -> Self
The name of a new or existing CloudWatch Logs log group where Amazon EC2 publishes your flow logs.
This parameter is valid only if the destination type is cloud-watch-logs
.
sourcepub fn get_log_group_name(&self) -> &Option<String>
pub fn get_log_group_name(&self) -> &Option<String>
The name of a new or existing CloudWatch Logs log group where Amazon EC2 publishes your flow logs.
This parameter is valid only if the destination type is cloud-watch-logs
.
sourcepub fn resource_ids(self, input: impl Into<String>) -> Self
pub fn resource_ids(self, input: impl Into<String>) -> Self
Appends an item to ResourceIds
.
To override the contents of this collection use set_resource_ids
.
The IDs of the resources to monitor. For example, if the resource type is VPC
, specify the IDs of the VPCs.
Constraints: Maximum of 25 for transit gateway resource types. Maximum of 1000 for the other resource types.
sourcepub fn set_resource_ids(self, input: Option<Vec<String>>) -> Self
pub fn set_resource_ids(self, input: Option<Vec<String>>) -> Self
The IDs of the resources to monitor. For example, if the resource type is VPC
, specify the IDs of the VPCs.
Constraints: Maximum of 25 for transit gateway resource types. Maximum of 1000 for the other resource types.
sourcepub fn get_resource_ids(&self) -> &Option<Vec<String>>
pub fn get_resource_ids(&self) -> &Option<Vec<String>>
The IDs of the resources to monitor. For example, if the resource type is VPC
, specify the IDs of the VPCs.
Constraints: Maximum of 25 for transit gateway resource types. Maximum of 1000 for the other resource types.
sourcepub fn resource_type(self, input: FlowLogsResourceType) -> Self
pub fn resource_type(self, input: FlowLogsResourceType) -> Self
The type of resource to monitor.
sourcepub fn set_resource_type(self, input: Option<FlowLogsResourceType>) -> Self
pub fn set_resource_type(self, input: Option<FlowLogsResourceType>) -> Self
The type of resource to monitor.
sourcepub fn get_resource_type(&self) -> &Option<FlowLogsResourceType>
pub fn get_resource_type(&self) -> &Option<FlowLogsResourceType>
The type of resource to monitor.
sourcepub fn traffic_type(self, input: TrafficType) -> Self
pub fn traffic_type(self, input: TrafficType) -> Self
The type of traffic to monitor (accepted traffic, rejected traffic, or all traffic). This parameter is not supported for transit gateway resource types. It is required for the other resource types.
sourcepub fn set_traffic_type(self, input: Option<TrafficType>) -> Self
pub fn set_traffic_type(self, input: Option<TrafficType>) -> Self
The type of traffic to monitor (accepted traffic, rejected traffic, or all traffic). This parameter is not supported for transit gateway resource types. It is required for the other resource types.
sourcepub fn get_traffic_type(&self) -> &Option<TrafficType>
pub fn get_traffic_type(&self) -> &Option<TrafficType>
The type of traffic to monitor (accepted traffic, rejected traffic, or all traffic). This parameter is not supported for transit gateway resource types. It is required for the other resource types.
sourcepub fn log_destination_type(self, input: LogDestinationType) -> Self
pub fn log_destination_type(self, input: LogDestinationType) -> Self
The type of destination for the flow log data.
Default: cloud-watch-logs
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 destination for the flow log data.
Default: cloud-watch-logs
sourcepub fn get_log_destination_type(&self) -> &Option<LogDestinationType>
pub fn get_log_destination_type(&self) -> &Option<LogDestinationType>
The type of destination for the flow log data.
Default: cloud-watch-logs
sourcepub fn log_destination(self, input: impl Into<String>) -> Self
pub fn log_destination(self, input: impl Into<String>) -> Self
The destination for the flow log data. The meaning of this parameter depends on the destination type.
-
If the destination type is
cloud-watch-logs
, specify the ARN of a CloudWatch Logs log group. For example:arn:aws:logs:region:account_id:log-group:my_group
Alternatively, use the
LogGroupName
parameter. -
If the destination type is
s3
, specify the ARN of an S3 bucket. For example:arn:aws:s3:::my_bucket/my_subfolder/
The subfolder is optional. Note that you can't use
AWSLogs
as a subfolder name. -
If the destination type is
kinesis-data-firehose
, specify the ARN of a Kinesis Data Firehose delivery stream. For example:arn:aws:firehose:region:account_id:deliverystream:my_stream
sourcepub fn set_log_destination(self, input: Option<String>) -> Self
pub fn set_log_destination(self, input: Option<String>) -> Self
The destination for the flow log data. The meaning of this parameter depends on the destination type.
-
If the destination type is
cloud-watch-logs
, specify the ARN of a CloudWatch Logs log group. For example:arn:aws:logs:region:account_id:log-group:my_group
Alternatively, use the
LogGroupName
parameter. -
If the destination type is
s3
, specify the ARN of an S3 bucket. For example:arn:aws:s3:::my_bucket/my_subfolder/
The subfolder is optional. Note that you can't use
AWSLogs
as a subfolder name. -
If the destination type is
kinesis-data-firehose
, specify the ARN of a Kinesis Data Firehose delivery stream. For example:arn:aws:firehose:region:account_id:deliverystream:my_stream
sourcepub fn get_log_destination(&self) -> &Option<String>
pub fn get_log_destination(&self) -> &Option<String>
The destination for the flow log data. The meaning of this parameter depends on the destination type.
-
If the destination type is
cloud-watch-logs
, specify the ARN of a CloudWatch Logs log group. For example:arn:aws:logs:region:account_id:log-group:my_group
Alternatively, use the
LogGroupName
parameter. -
If the destination type is
s3
, specify the ARN of an S3 bucket. For example:arn:aws:s3:::my_bucket/my_subfolder/
The subfolder is optional. Note that you can't use
AWSLogs
as a subfolder name. -
If the destination type is
kinesis-data-firehose
, specify the ARN of a Kinesis Data Firehose delivery stream. For example:arn:aws:firehose:region:account_id:deliverystream:my_stream
sourcepub fn log_format(self, input: impl Into<String>) -> Self
pub fn log_format(self, input: impl Into<String>) -> Self
The fields to include in the flow log record. List the fields in the order in which they should appear. If you omit this parameter, the flow log is created using the default format. If you specify this parameter, you must include at least one field. For more information about the available fields, see Flow log records in the Amazon VPC User Guide or Transit Gateway Flow Log records in the Amazon Web Services Transit Gateway Guide.
Specify the fields using the ${field-id}
format, separated by spaces.
sourcepub fn set_log_format(self, input: Option<String>) -> Self
pub fn set_log_format(self, input: Option<String>) -> Self
The fields to include in the flow log record. List the fields in the order in which they should appear. If you omit this parameter, the flow log is created using the default format. If you specify this parameter, you must include at least one field. For more information about the available fields, see Flow log records in the Amazon VPC User Guide or Transit Gateway Flow Log records in the Amazon Web Services Transit Gateway Guide.
Specify the fields using the ${field-id}
format, separated by spaces.
sourcepub fn get_log_format(&self) -> &Option<String>
pub fn get_log_format(&self) -> &Option<String>
The fields to include in the flow log record. List the fields in the order in which they should appear. If you omit this parameter, the flow log is created using the default format. If you specify this parameter, you must include at least one field. For more information about the available fields, see Flow log records in the Amazon VPC User Guide or Transit Gateway Flow Log records in the Amazon Web Services Transit Gateway Guide.
Specify the fields using the ${field-id}
format, separated by spaces.
sourcepub fn tag_specifications(self, input: TagSpecification) -> Self
pub fn tag_specifications(self, input: TagSpecification) -> Self
Appends an item to TagSpecifications
.
To override the contents of this collection use set_tag_specifications
.
The tags to apply to the flow logs.
sourcepub fn set_tag_specifications(
self,
input: Option<Vec<TagSpecification>>
) -> Self
pub fn set_tag_specifications( self, input: Option<Vec<TagSpecification>> ) -> Self
The tags to apply to the flow logs.
sourcepub fn get_tag_specifications(&self) -> &Option<Vec<TagSpecification>>
pub fn get_tag_specifications(&self) -> &Option<Vec<TagSpecification>>
The tags to apply to the flow logs.
sourcepub fn max_aggregation_interval(self, input: i32) -> Self
pub fn max_aggregation_interval(self, input: i32) -> Self
The maximum interval of time during which a flow of packets is captured and aggregated into a flow log record. The possible values are 60 seconds (1 minute) or 600 seconds (10 minutes). This parameter must be 60 seconds for transit gateway resource types.
When a network interface is attached to a Nitro-based instance, the aggregation interval is always 60 seconds or less, regardless of the value that you specify.
Default: 600
sourcepub fn set_max_aggregation_interval(self, input: Option<i32>) -> Self
pub fn set_max_aggregation_interval(self, input: Option<i32>) -> Self
The maximum interval of time during which a flow of packets is captured and aggregated into a flow log record. The possible values are 60 seconds (1 minute) or 600 seconds (10 minutes). This parameter must be 60 seconds for transit gateway resource types.
When a network interface is attached to a Nitro-based instance, the aggregation interval is always 60 seconds or less, regardless of the value that you specify.
Default: 600
sourcepub fn get_max_aggregation_interval(&self) -> &Option<i32>
pub fn get_max_aggregation_interval(&self) -> &Option<i32>
The maximum interval of time during which a flow of packets is captured and aggregated into a flow log record. The possible values are 60 seconds (1 minute) or 600 seconds (10 minutes). This parameter must be 60 seconds for transit gateway resource types.
When a network interface is attached to a Nitro-based instance, the aggregation interval is always 60 seconds or less, regardless of the value that you specify.
Default: 600
sourcepub fn destination_options(self, input: DestinationOptionsRequest) -> Self
pub fn destination_options(self, input: DestinationOptionsRequest) -> Self
The destination options.
sourcepub fn set_destination_options(
self,
input: Option<DestinationOptionsRequest>
) -> Self
pub fn set_destination_options( self, input: Option<DestinationOptionsRequest> ) -> Self
The destination options.
sourcepub fn get_destination_options(&self) -> &Option<DestinationOptionsRequest>
pub fn get_destination_options(&self) -> &Option<DestinationOptionsRequest>
The destination options.
Trait Implementations§
source§impl Clone for CreateFlowLogsFluentBuilder
impl Clone for CreateFlowLogsFluentBuilder
source§fn clone(&self) -> CreateFlowLogsFluentBuilder
fn clone(&self) -> CreateFlowLogsFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more