Struct aws_sdk_ec2::model::FlowLog

source ·
#[non_exhaustive]
pub struct FlowLog { /* private fields */ }
Expand description

Describes a flow log.

Implementations§

The date and time the flow log was created.

Information about the error that occurred. Rate limited indicates that CloudWatch Logs throttling has been applied for one or more network interfaces, or that you've reached the limit on the number of log groups that you can create. Access error indicates that the IAM role associated with the flow log does not have sufficient permissions to publish to CloudWatch Logs. Unknown error indicates an internal error.

The ARN of the IAM role allows the service to publish logs to CloudWatch Logs.

The ARN of the IAM role that allows the service to publish flow logs across accounts.

The status of the logs delivery (SUCCESS | FAILED).

The ID of the flow log.

The status of the flow log (ACTIVE).

The name of the flow log group.

The ID of the resource being monitored.

The type of traffic captured for the flow log.

The type of destination for the flow log data.

The Amazon Resource Name (ARN) of the destination for the flow log data.

The format of the flow log record.

The tags for the flow log.

The maximum interval of time, in seconds, during which a flow of packets is captured and aggregated into a flow log record.

When a network interface is attached to a Nitro-based instance, the aggregation interval is always 60 seconds (1 minute) or less, regardless of the specified value.

Valid Values: 60 | 600

The destination options.

Creates a new builder-style object to manufacture FlowLog.

Examples found in repository?
src/xml_deser.rs (line 45105)
45101
45102
45103
45104
45105
45106
45107
45108
45109
45110
45111
45112
45113
45114
45115
45116
45117
45118
45119
45120
45121
45122
45123
45124
45125
45126
45127
45128
45129
45130
45131
45132
45133
45134
45135
45136
45137
45138
45139
45140
45141
45142
45143
45144
45145
45146
45147
45148
45149
45150
45151
45152
45153
45154
45155
45156
45157
45158
45159
45160
45161
45162
45163
45164
45165
45166
45167
45168
45169
45170
45171
45172
45173
45174
45175
45176
45177
45178
45179
45180
45181
45182
45183
45184
45185
45186
45187
45188
45189
45190
45191
45192
45193
45194
45195
45196
45197
45198
45199
45200
45201
45202
45203
45204
45205
45206
45207
45208
45209
45210
45211
45212
45213
45214
45215
45216
45217
45218
45219
45220
45221
45222
45223
45224
45225
45226
45227
45228
45229
45230
45231
45232
45233
45234
45235
45236
45237
45238
45239
45240
45241
45242
45243
45244
45245
45246
45247
45248
45249
45250
45251
45252
45253
45254
45255
45256
45257
45258
45259
45260
45261
45262
45263
45264
45265
45266
45267
45268
45269
45270
45271
45272
45273
45274
45275
45276
45277
45278
45279
45280
45281
45282
45283
45284
45285
45286
45287
45288
45289
45290
45291
45292
45293
45294
45295
45296
45297
45298
45299
45300
45301
45302
45303
45304
45305
45306
45307
45308
45309
45310
45311
45312
45313
45314
45315
45316
45317
45318
45319
pub fn deser_structure_crate_model_flow_log(
    decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FlowLog, aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::model::FlowLog::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("creationTime") /* CreationTime com.amazonaws.ec2#FlowLog$CreationTime */ =>  {
                let var_1999 =
                    Some(
                        aws_smithy_types::DateTime::from_str(
                            aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            , aws_smithy_types::date_time::Format::DateTime
                        )
                        .map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
                        ?
                    )
                ;
                builder = builder.set_creation_time(var_1999);
            }
            ,
            s if s.matches("deliverLogsErrorMessage") /* DeliverLogsErrorMessage com.amazonaws.ec2#FlowLog$DeliverLogsErrorMessage */ =>  {
                let var_2000 =
                    Some(
                        Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_deliver_logs_error_message(var_2000);
            }
            ,
            s if s.matches("deliverLogsPermissionArn") /* DeliverLogsPermissionArn com.amazonaws.ec2#FlowLog$DeliverLogsPermissionArn */ =>  {
                let var_2001 =
                    Some(
                        Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_deliver_logs_permission_arn(var_2001);
            }
            ,
            s if s.matches("deliverCrossAccountRole") /* DeliverCrossAccountRole com.amazonaws.ec2#FlowLog$DeliverCrossAccountRole */ =>  {
                let var_2002 =
                    Some(
                        Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_deliver_cross_account_role(var_2002);
            }
            ,
            s if s.matches("deliverLogsStatus") /* DeliverLogsStatus com.amazonaws.ec2#FlowLog$DeliverLogsStatus */ =>  {
                let var_2003 =
                    Some(
                        Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_deliver_logs_status(var_2003);
            }
            ,
            s if s.matches("flowLogId") /* FlowLogId com.amazonaws.ec2#FlowLog$FlowLogId */ =>  {
                let var_2004 =
                    Some(
                        Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_flow_log_id(var_2004);
            }
            ,
            s if s.matches("flowLogStatus") /* FlowLogStatus com.amazonaws.ec2#FlowLog$FlowLogStatus */ =>  {
                let var_2005 =
                    Some(
                        Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_flow_log_status(var_2005);
            }
            ,
            s if s.matches("logGroupName") /* LogGroupName com.amazonaws.ec2#FlowLog$LogGroupName */ =>  {
                let var_2006 =
                    Some(
                        Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_log_group_name(var_2006);
            }
            ,
            s if s.matches("resourceId") /* ResourceId com.amazonaws.ec2#FlowLog$ResourceId */ =>  {
                let var_2007 =
                    Some(
                        Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_resource_id(var_2007);
            }
            ,
            s if s.matches("trafficType") /* TrafficType com.amazonaws.ec2#FlowLog$TrafficType */ =>  {
                let var_2008 =
                    Some(
                        Result::<crate::model::TrafficType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::model::TrafficType::from(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_traffic_type(var_2008);
            }
            ,
            s if s.matches("logDestinationType") /* LogDestinationType com.amazonaws.ec2#FlowLog$LogDestinationType */ =>  {
                let var_2009 =
                    Some(
                        Result::<crate::model::LogDestinationType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::model::LogDestinationType::from(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_log_destination_type(var_2009);
            }
            ,
            s if s.matches("logDestination") /* LogDestination com.amazonaws.ec2#FlowLog$LogDestination */ =>  {
                let var_2010 =
                    Some(
                        Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_log_destination(var_2010);
            }
            ,
            s if s.matches("logFormat") /* LogFormat com.amazonaws.ec2#FlowLog$LogFormat */ =>  {
                let var_2011 =
                    Some(
                        Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_log_format(var_2011);
            }
            ,
            s if s.matches("tagSet") /* Tags com.amazonaws.ec2#FlowLog$Tags */ =>  {
                let var_2012 =
                    Some(
                        crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_tags(var_2012);
            }
            ,
            s if s.matches("maxAggregationInterval") /* MaxAggregationInterval com.amazonaws.ec2#FlowLog$MaxAggregationInterval */ =>  {
                let var_2013 =
                    Some(
                         {
                            <i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                            .map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_max_aggregation_interval(var_2013);
            }
            ,
            s if s.matches("destinationOptions") /* DestinationOptions com.amazonaws.ec2#FlowLog$DestinationOptions */ =>  {
                let var_2014 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_destination_options_response(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_destination_options(var_2014);
            }
            ,
            _ => {}
        }
    }
    Ok(builder.build())
}

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more