Struct aws_sdk_elasticloadbalancing::model::access_log::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for AccessLog
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn enabled(self, input: bool) -> Self
pub fn enabled(self, input: bool) -> Self
Specifies whether access logs are enabled for the load balancer.
sourcepub fn set_enabled(self, input: Option<bool>) -> Self
pub fn set_enabled(self, input: Option<bool>) -> Self
Specifies whether access logs are enabled for the load balancer.
Examples found in repository?
2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254
pub fn deser_structure_crate_model_access_log(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AccessLog, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::AccessLog::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Enabled") /* Enabled com.amazonaws.elasticloadbalancing#AccessLog$Enabled */ => {
let var_61 =
Some(
{
<bool 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 (boolean: `com.amazonaws.elasticloadbalancing#AccessLogEnabled`)"))
}
?
)
;
builder = builder.set_enabled(var_61);
}
,
s if s.matches("S3BucketName") /* S3BucketName com.amazonaws.elasticloadbalancing#AccessLog$S3BucketName */ => {
let var_62 =
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_s3_bucket_name(var_62);
}
,
s if s.matches("EmitInterval") /* EmitInterval com.amazonaws.elasticloadbalancing#AccessLog$EmitInterval */ => {
let var_63 =
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.elasticloadbalancing#AccessLogInterval`)"))
}
?
)
;
builder = builder.set_emit_interval(var_63);
}
,
s if s.matches("S3BucketPrefix") /* S3BucketPrefix com.amazonaws.elasticloadbalancing#AccessLog$S3BucketPrefix */ => {
let var_64 =
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_s3_bucket_prefix(var_64);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn s3_bucket_name(self, input: impl Into<String>) -> Self
pub fn s3_bucket_name(self, input: impl Into<String>) -> Self
The name of the Amazon S3 bucket where the access logs are stored.
sourcepub fn set_s3_bucket_name(self, input: Option<String>) -> Self
pub fn set_s3_bucket_name(self, input: Option<String>) -> Self
The name of the Amazon S3 bucket where the access logs are stored.
Examples found in repository?
2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254
pub fn deser_structure_crate_model_access_log(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AccessLog, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::AccessLog::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Enabled") /* Enabled com.amazonaws.elasticloadbalancing#AccessLog$Enabled */ => {
let var_61 =
Some(
{
<bool 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 (boolean: `com.amazonaws.elasticloadbalancing#AccessLogEnabled`)"))
}
?
)
;
builder = builder.set_enabled(var_61);
}
,
s if s.matches("S3BucketName") /* S3BucketName com.amazonaws.elasticloadbalancing#AccessLog$S3BucketName */ => {
let var_62 =
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_s3_bucket_name(var_62);
}
,
s if s.matches("EmitInterval") /* EmitInterval com.amazonaws.elasticloadbalancing#AccessLog$EmitInterval */ => {
let var_63 =
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.elasticloadbalancing#AccessLogInterval`)"))
}
?
)
;
builder = builder.set_emit_interval(var_63);
}
,
s if s.matches("S3BucketPrefix") /* S3BucketPrefix com.amazonaws.elasticloadbalancing#AccessLog$S3BucketPrefix */ => {
let var_64 =
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_s3_bucket_prefix(var_64);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn emit_interval(self, input: i32) -> Self
pub fn emit_interval(self, input: i32) -> Self
The interval for publishing the access logs. You can specify an interval of either 5 minutes or 60 minutes.
Default: 60 minutes
sourcepub fn set_emit_interval(self, input: Option<i32>) -> Self
pub fn set_emit_interval(self, input: Option<i32>) -> Self
The interval for publishing the access logs. You can specify an interval of either 5 minutes or 60 minutes.
Default: 60 minutes
Examples found in repository?
2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254
pub fn deser_structure_crate_model_access_log(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AccessLog, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::AccessLog::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Enabled") /* Enabled com.amazonaws.elasticloadbalancing#AccessLog$Enabled */ => {
let var_61 =
Some(
{
<bool 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 (boolean: `com.amazonaws.elasticloadbalancing#AccessLogEnabled`)"))
}
?
)
;
builder = builder.set_enabled(var_61);
}
,
s if s.matches("S3BucketName") /* S3BucketName com.amazonaws.elasticloadbalancing#AccessLog$S3BucketName */ => {
let var_62 =
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_s3_bucket_name(var_62);
}
,
s if s.matches("EmitInterval") /* EmitInterval com.amazonaws.elasticloadbalancing#AccessLog$EmitInterval */ => {
let var_63 =
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.elasticloadbalancing#AccessLogInterval`)"))
}
?
)
;
builder = builder.set_emit_interval(var_63);
}
,
s if s.matches("S3BucketPrefix") /* S3BucketPrefix com.amazonaws.elasticloadbalancing#AccessLog$S3BucketPrefix */ => {
let var_64 =
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_s3_bucket_prefix(var_64);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn s3_bucket_prefix(self, input: impl Into<String>) -> Self
pub fn s3_bucket_prefix(self, input: impl Into<String>) -> Self
The logical hierarchy you created for your Amazon S3 bucket, for example my-bucket-prefix/prod
. If the prefix is not provided, the log is placed at the root level of the bucket.
sourcepub fn set_s3_bucket_prefix(self, input: Option<String>) -> Self
pub fn set_s3_bucket_prefix(self, input: Option<String>) -> Self
The logical hierarchy you created for your Amazon S3 bucket, for example my-bucket-prefix/prod
. If the prefix is not provided, the log is placed at the root level of the bucket.
Examples found in repository?
2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254
pub fn deser_structure_crate_model_access_log(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AccessLog, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::AccessLog::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Enabled") /* Enabled com.amazonaws.elasticloadbalancing#AccessLog$Enabled */ => {
let var_61 =
Some(
{
<bool 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 (boolean: `com.amazonaws.elasticloadbalancing#AccessLogEnabled`)"))
}
?
)
;
builder = builder.set_enabled(var_61);
}
,
s if s.matches("S3BucketName") /* S3BucketName com.amazonaws.elasticloadbalancing#AccessLog$S3BucketName */ => {
let var_62 =
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_s3_bucket_name(var_62);
}
,
s if s.matches("EmitInterval") /* EmitInterval com.amazonaws.elasticloadbalancing#AccessLog$EmitInterval */ => {
let var_63 =
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.elasticloadbalancing#AccessLogInterval`)"))
}
?
)
;
builder = builder.set_emit_interval(var_63);
}
,
s if s.matches("S3BucketPrefix") /* S3BucketPrefix com.amazonaws.elasticloadbalancing#AccessLog$S3BucketPrefix */ => {
let var_64 =
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_s3_bucket_prefix(var_64);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> AccessLog
pub fn build(self) -> AccessLog
Consumes the builder and constructs a AccessLog
.
Examples found in repository?
2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254
pub fn deser_structure_crate_model_access_log(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AccessLog, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::AccessLog::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Enabled") /* Enabled com.amazonaws.elasticloadbalancing#AccessLog$Enabled */ => {
let var_61 =
Some(
{
<bool 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 (boolean: `com.amazonaws.elasticloadbalancing#AccessLogEnabled`)"))
}
?
)
;
builder = builder.set_enabled(var_61);
}
,
s if s.matches("S3BucketName") /* S3BucketName com.amazonaws.elasticloadbalancing#AccessLog$S3BucketName */ => {
let var_62 =
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_s3_bucket_name(var_62);
}
,
s if s.matches("EmitInterval") /* EmitInterval com.amazonaws.elasticloadbalancing#AccessLog$EmitInterval */ => {
let var_63 =
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.elasticloadbalancing#AccessLogInterval`)"))
}
?
)
;
builder = builder.set_emit_interval(var_63);
}
,
s if s.matches("S3BucketPrefix") /* S3BucketPrefix com.amazonaws.elasticloadbalancing#AccessLog$S3BucketPrefix */ => {
let var_64 =
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_s3_bucket_prefix(var_64);
}
,
_ => {}
}
}
Ok(builder.build())
}