#[non_exhaustive]pub struct LambdaFunctionAssociation { /* private fields */ }
Expand description
A complex type that contains a Lambda@Edge function association.
Implementations§
source§impl LambdaFunctionAssociation
impl LambdaFunctionAssociation
sourcepub fn lambda_function_arn(&self) -> Option<&str>
pub fn lambda_function_arn(&self) -> Option<&str>
The ARN of the Lambda@Edge function. You must specify the ARN of a function version; you can't specify an alias or $LATEST.
sourcepub fn event_type(&self) -> Option<&EventType>
pub fn event_type(&self) -> Option<&EventType>
Specifies the event type that triggers a Lambda@Edge function invocation. You can specify the following values:
-
viewer-request
: The function executes when CloudFront receives a request from a viewer and before it checks to see whether the requested object is in the edge cache. -
origin-request
: The function executes only when CloudFront sends a request to your origin. When the requested object is in the edge cache, the function doesn't execute. -
origin-response
: The function executes after CloudFront receives a response from the origin and before it caches the object in the response. When the requested object is in the edge cache, the function doesn't execute. -
viewer-response
: The function executes before CloudFront returns the requested object to the viewer. The function executes regardless of whether the object was already in the edge cache.If the origin returns an HTTP status code other than HTTP 200 (OK), the function doesn't execute.
sourcepub fn include_body(&self) -> Option<bool>
pub fn include_body(&self) -> Option<bool>
A flag that allows a Lambda@Edge function to have read access to the body content. For more information, see Accessing the Request Body by Choosing the Include Body Option in the Amazon CloudFront Developer Guide.
source§impl LambdaFunctionAssociation
impl LambdaFunctionAssociation
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture LambdaFunctionAssociation
.
Examples found in repository?
15178 15179 15180 15181 15182 15183 15184 15185 15186 15187 15188 15189 15190 15191 15192 15193 15194 15195 15196 15197 15198 15199 15200 15201 15202 15203 15204 15205 15206 15207 15208 15209 15210 15211 15212 15213 15214 15215 15216 15217 15218 15219 15220 15221 15222 15223 15224 15225 15226 15227 15228 15229 15230 15231
pub fn deser_structure_crate_model_lambda_function_association(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LambdaFunctionAssociation, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::LambdaFunctionAssociation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("LambdaFunctionARN") /* LambdaFunctionARN com.amazonaws.cloudfront#LambdaFunctionAssociation$LambdaFunctionARN */ => {
let var_645 =
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_lambda_function_arn(var_645);
}
,
s if s.matches("EventType") /* EventType com.amazonaws.cloudfront#LambdaFunctionAssociation$EventType */ => {
let var_646 =
Some(
Result::<crate::model::EventType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::EventType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_event_type(var_646);
}
,
s if s.matches("IncludeBody") /* IncludeBody com.amazonaws.cloudfront#LambdaFunctionAssociation$IncludeBody */ => {
let var_647 =
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.cloudfront#boolean`)"))
}
?
)
;
builder = builder.set_include_body(var_647);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for LambdaFunctionAssociation
impl Clone for LambdaFunctionAssociation
source§fn clone(&self) -> LambdaFunctionAssociation
fn clone(&self) -> LambdaFunctionAssociation
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more