aws_sdk_cloudfront/client/test_function.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`TestFunction`](crate::operation::test_function::builders::TestFunctionFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`name(impl Into<String>)`](crate::operation::test_function::builders::TestFunctionFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::test_function::builders::TestFunctionFluentBuilder::set_name):<br>required: **true**<br><p>The name of the function that you are testing.</p><br>
7 /// - [`if_match(impl Into<String>)`](crate::operation::test_function::builders::TestFunctionFluentBuilder::if_match) / [`set_if_match(Option<String>)`](crate::operation::test_function::builders::TestFunctionFluentBuilder::set_if_match):<br>required: **true**<br><p>The current version (<code>ETag</code> value) of the function that you are testing, which you can get using <code>DescribeFunction</code>.</p><br>
8 /// - [`stage(FunctionStage)`](crate::operation::test_function::builders::TestFunctionFluentBuilder::stage) / [`set_stage(Option<FunctionStage>)`](crate::operation::test_function::builders::TestFunctionFluentBuilder::set_stage):<br>required: **false**<br><p>The stage of the function that you are testing, either <code>DEVELOPMENT</code> or <code>LIVE</code>.</p><br>
9 /// - [`event_object(Blob)`](crate::operation::test_function::builders::TestFunctionFluentBuilder::event_object) / [`set_event_object(Option<Blob>)`](crate::operation::test_function::builders::TestFunctionFluentBuilder::set_event_object):<br>required: **true**<br><p>The event object to test the function with. For more information about the structure of the event object, see <a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/managing-functions.html#test-function">Testing functions</a> in the <i>Amazon CloudFront Developer Guide</i>.</p><br>
10 /// - On success, responds with [`TestFunctionOutput`](crate::operation::test_function::TestFunctionOutput) with field(s):
11 /// - [`test_result(Option<TestResult>)`](crate::operation::test_function::TestFunctionOutput::test_result): <p>An object that represents the result of running the function with the provided event object.</p>
12 /// - On failure, responds with [`SdkError<TestFunctionError>`](crate::operation::test_function::TestFunctionError)
13 pub fn test_function(&self) -> crate::operation::test_function::builders::TestFunctionFluentBuilder {
14 crate::operation::test_function::builders::TestFunctionFluentBuilder::new(self.handle.clone())
15 }
16}