Struct aws_sdk_appsync::client::fluent_builders::EvaluateCode
source · pub struct EvaluateCode { /* private fields */ }
Expand description
Fluent builder constructing a request to EvaluateCode
.
Evaluates the given code and returns the response. The code definition requirements depend on the specified runtime. For APPSYNC_JS
runtimes, the code defines the request and response functions. The request function takes the incoming request after a GraphQL operation is parsed and converts it into a request configuration for the selected data source operation. The response function interprets responses from the data source and maps it to the shape of the GraphQL field output type.
Implementations§
source§impl EvaluateCode
impl EvaluateCode
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<EvaluateCode, AwsResponseRetryClassifier>, SdkError<EvaluateCodeError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<EvaluateCode, AwsResponseRetryClassifier>, SdkError<EvaluateCodeError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<EvaluateCodeOutput, SdkError<EvaluateCodeError>>
pub async fn send(
self
) -> Result<EvaluateCodeOutput, SdkError<EvaluateCodeError>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn runtime(self, input: AppSyncRuntime) -> Self
pub fn runtime(self, input: AppSyncRuntime) -> Self
The runtime to be used when evaluating the code. Currently, only the APPSYNC_JS
runtime is supported.
sourcepub fn set_runtime(self, input: Option<AppSyncRuntime>) -> Self
pub fn set_runtime(self, input: Option<AppSyncRuntime>) -> Self
The runtime to be used when evaluating the code. Currently, only the APPSYNC_JS
runtime is supported.
sourcepub fn code(self, input: impl Into<String>) -> Self
pub fn code(self, input: impl Into<String>) -> Self
The code definition to be evaluated. Note that code
and runtime
are both required for this action. The runtime
value must be APPSYNC_JS
.
sourcepub fn set_code(self, input: Option<String>) -> Self
pub fn set_code(self, input: Option<String>) -> Self
The code definition to be evaluated. Note that code
and runtime
are both required for this action. The runtime
value must be APPSYNC_JS
.
sourcepub fn context(self, input: impl Into<String>) -> Self
pub fn context(self, input: impl Into<String>) -> Self
The map that holds all of the contextual information for your resolver invocation. A context
is required for this action.
sourcepub fn set_context(self, input: Option<String>) -> Self
pub fn set_context(self, input: Option<String>) -> Self
The map that holds all of the contextual information for your resolver invocation. A context
is required for this action.
sourcepub fn function(self, input: impl Into<String>) -> Self
pub fn function(self, input: impl Into<String>) -> Self
The function within the code to be evaluated. If provided, the valid values are request
and response
.
sourcepub fn set_function(self, input: Option<String>) -> Self
pub fn set_function(self, input: Option<String>) -> Self
The function within the code to be evaluated. If provided, the valid values are request
and response
.
Trait Implementations§
source§impl Clone for EvaluateCode
impl Clone for EvaluateCode
source§fn clone(&self) -> EvaluateCode
fn clone(&self) -> EvaluateCode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more