aws_sdk_appsync/client/evaluate_code.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 [`EvaluateCode`](crate::operation::evaluate_code::builders::EvaluateCodeFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`runtime(AppSyncRuntime)`](crate::operation::evaluate_code::builders::EvaluateCodeFluentBuilder::runtime) / [`set_runtime(Option<AppSyncRuntime>)`](crate::operation::evaluate_code::builders::EvaluateCodeFluentBuilder::set_runtime):<br>required: **true**<br><p>The runtime to be used when evaluating the code. Currently, only the <code>APPSYNC_JS</code> runtime is supported.</p><br>
7 /// - [`code(impl Into<String>)`](crate::operation::evaluate_code::builders::EvaluateCodeFluentBuilder::code) / [`set_code(Option<String>)`](crate::operation::evaluate_code::builders::EvaluateCodeFluentBuilder::set_code):<br>required: **true**<br><p>The code definition to be evaluated. Note that <code>code</code> and <code>runtime</code> are both required for this action. The <code>runtime</code> value must be <code>APPSYNC_JS</code>.</p><br>
8 /// - [`context(impl Into<String>)`](crate::operation::evaluate_code::builders::EvaluateCodeFluentBuilder::context) / [`set_context(Option<String>)`](crate::operation::evaluate_code::builders::EvaluateCodeFluentBuilder::set_context):<br>required: **true**<br><p>The map that holds all of the contextual information for your resolver invocation. A <code>context</code> is required for this action.</p><br>
9 /// - [`function(impl Into<String>)`](crate::operation::evaluate_code::builders::EvaluateCodeFluentBuilder::function) / [`set_function(Option<String>)`](crate::operation::evaluate_code::builders::EvaluateCodeFluentBuilder::set_function):<br>required: **false**<br><p>The function within the code to be evaluated. If provided, the valid values are <code>request</code> and <code>response</code>.</p><br>
10 /// - On success, responds with [`EvaluateCodeOutput`](crate::operation::evaluate_code::EvaluateCodeOutput) with field(s):
11 /// - [`evaluation_result(Option<String>)`](crate::operation::evaluate_code::EvaluateCodeOutput::evaluation_result): <p>The result of the evaluation operation.</p>
12 /// - [`error(Option<EvaluateCodeErrorDetail>)`](crate::operation::evaluate_code::EvaluateCodeOutput::error): <p>Contains the payload of the response error.</p>
13 /// - [`logs(Option<Vec::<String>>)`](crate::operation::evaluate_code::EvaluateCodeOutput::logs): <p>A list of logs that were generated by calls to <code>util.log.info</code> and <code>util.log.error</code> in the evaluated code.</p>
14 /// - [`stash(Option<String>)`](crate::operation::evaluate_code::EvaluateCodeOutput::stash): <p>An object available inside each resolver and function handler. A single <code>stash</code> object lives through a single resolver run. Therefore, you can use the stash to pass arbitrary data across request and response handlers and across functions in a pipeline resolver.</p>
15 /// - [`out_errors(Option<String>)`](crate::operation::evaluate_code::EvaluateCodeOutput::out_errors): <p>The list of runtime errors that are added to the GraphQL operation response.</p>
16 /// - On failure, responds with [`SdkError<EvaluateCodeError>`](crate::operation::evaluate_code::EvaluateCodeError)
17 pub fn evaluate_code(&self) -> crate::operation::evaluate_code::builders::EvaluateCodeFluentBuilder {
18 crate::operation::evaluate_code::builders::EvaluateCodeFluentBuilder::new(self.handle.clone())
19 }
20}