pub struct TestInvokeMethod { /* private fields */ }
Expand description
Fluent builder constructing a request to TestInvokeMethod
.
Simulate the invocation of a Method in your RestApi with headers, parameters, and an incoming request body.
Implementations§
source§impl TestInvokeMethod
impl TestInvokeMethod
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<TestInvokeMethod, AwsResponseRetryClassifier>, SdkError<TestInvokeMethodError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<TestInvokeMethod, AwsResponseRetryClassifier>, SdkError<TestInvokeMethodError>>
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<TestInvokeMethodOutput, SdkError<TestInvokeMethodError>>
pub async fn send(
self
) -> Result<TestInvokeMethodOutput, SdkError<TestInvokeMethodError>>
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 rest_api_id(self, input: impl Into<String>) -> Self
pub fn rest_api_id(self, input: impl Into<String>) -> Self
The string identifier of the associated RestApi.
sourcepub fn set_rest_api_id(self, input: Option<String>) -> Self
pub fn set_rest_api_id(self, input: Option<String>) -> Self
The string identifier of the associated RestApi.
sourcepub fn resource_id(self, input: impl Into<String>) -> Self
pub fn resource_id(self, input: impl Into<String>) -> Self
Specifies a test invoke method request's resource ID.
sourcepub fn set_resource_id(self, input: Option<String>) -> Self
pub fn set_resource_id(self, input: Option<String>) -> Self
Specifies a test invoke method request's resource ID.
sourcepub fn http_method(self, input: impl Into<String>) -> Self
pub fn http_method(self, input: impl Into<String>) -> Self
Specifies a test invoke method request's HTTP method.
sourcepub fn set_http_method(self, input: Option<String>) -> Self
pub fn set_http_method(self, input: Option<String>) -> Self
Specifies a test invoke method request's HTTP method.
sourcepub fn path_with_query_string(self, input: impl Into<String>) -> Self
pub fn path_with_query_string(self, input: impl Into<String>) -> Self
The URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters.
sourcepub fn set_path_with_query_string(self, input: Option<String>) -> Self
pub fn set_path_with_query_string(self, input: Option<String>) -> Self
The URI path, including query string, of the simulated invocation request. Use this to specify path parameters and query string parameters.
sourcepub fn body(self, input: impl Into<String>) -> Self
pub fn body(self, input: impl Into<String>) -> Self
The simulated request body of an incoming invocation request.
sourcepub fn set_body(self, input: Option<String>) -> Self
pub fn set_body(self, input: Option<String>) -> Self
The simulated request body of an incoming invocation request.
sourcepub fn headers(self, k: impl Into<String>, v: impl Into<String>) -> Self
pub fn headers(self, k: impl Into<String>, v: impl Into<String>) -> Self
Adds a key-value pair to headers
.
To override the contents of this collection use set_headers
.
A key-value map of headers to simulate an incoming invocation request.
sourcepub fn set_headers(self, input: Option<HashMap<String, String>>) -> Self
pub fn set_headers(self, input: Option<HashMap<String, String>>) -> Self
A key-value map of headers to simulate an incoming invocation request.
sourcepub fn multi_value_headers(self, k: impl Into<String>, v: Vec<String>) -> Self
pub fn multi_value_headers(self, k: impl Into<String>, v: Vec<String>) -> Self
Adds a key-value pair to multiValueHeaders
.
To override the contents of this collection use set_multi_value_headers
.
The headers as a map from string to list of values to simulate an incoming invocation request.
sourcepub fn set_multi_value_headers(
self,
input: Option<HashMap<String, Vec<String>>>
) -> Self
pub fn set_multi_value_headers(
self,
input: Option<HashMap<String, Vec<String>>>
) -> Self
The headers as a map from string to list of values to simulate an incoming invocation request.
sourcepub fn client_certificate_id(self, input: impl Into<String>) -> Self
pub fn client_certificate_id(self, input: impl Into<String>) -> Self
A ClientCertificate identifier to use in the test invocation. API Gateway will use the certificate when making the HTTPS request to the defined back-end endpoint.
sourcepub fn set_client_certificate_id(self, input: Option<String>) -> Self
pub fn set_client_certificate_id(self, input: Option<String>) -> Self
A ClientCertificate identifier to use in the test invocation. API Gateway will use the certificate when making the HTTPS request to the defined back-end endpoint.
sourcepub fn stage_variables(self, k: impl Into<String>, v: impl Into<String>) -> Self
pub fn stage_variables(self, k: impl Into<String>, v: impl Into<String>) -> Self
Adds a key-value pair to stageVariables
.
To override the contents of this collection use set_stage_variables
.
A key-value map of stage variables to simulate an invocation on a deployed Stage.
Trait Implementations§
source§impl Clone for TestInvokeMethod
impl Clone for TestInvokeMethod
source§fn clone(&self) -> TestInvokeMethod
fn clone(&self) -> TestInvokeMethod
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more