aws_sdk_lambda/client/
invoke_with_response_stream.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 [`InvokeWithResponseStream`](crate::operation::invoke_with_response_stream::builders::InvokeWithResponseStreamFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`function_name(impl Into<String>)`](crate::operation::invoke_with_response_stream::builders::InvokeWithResponseStreamFluentBuilder::function_name) / [`set_function_name(Option<String>)`](crate::operation::invoke_with_response_stream::builders::InvokeWithResponseStreamFluentBuilder::set_function_name):<br>required: **true**<br><p>The name or ARN of the Lambda function.</p> <p class="title"><b>Name formats</b></p> <ul>  <li>   <p><b>Function name</b> – <code>my-function</code>.</p></li>  <li>   <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p></li>  <li>   <p><b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p></li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p><br>
7    ///   - [`invocation_type(ResponseStreamingInvocationType)`](crate::operation::invoke_with_response_stream::builders::InvokeWithResponseStreamFluentBuilder::invocation_type) / [`set_invocation_type(Option<ResponseStreamingInvocationType>)`](crate::operation::invoke_with_response_stream::builders::InvokeWithResponseStreamFluentBuilder::set_invocation_type):<br>required: **false**<br><p>Use one of the following options:</p> <ul>  <li>   <p><code>RequestResponse</code> (default) – Invoke the function synchronously. Keep the connection open until the function returns a response or times out. The API operation response includes the function response and additional data.</p></li>  <li>   <p><code>DryRun</code> – Validate parameter values and verify that the IAM user or role has permission to invoke the function.</p></li> </ul><br>
8    ///   - [`log_type(LogType)`](crate::operation::invoke_with_response_stream::builders::InvokeWithResponseStreamFluentBuilder::log_type) / [`set_log_type(Option<LogType>)`](crate::operation::invoke_with_response_stream::builders::InvokeWithResponseStreamFluentBuilder::set_log_type):<br>required: **false**<br><p>Set to <code>Tail</code> to include the execution log in the response. Applies to synchronously invoked functions only.</p><br>
9    ///   - [`client_context(impl Into<String>)`](crate::operation::invoke_with_response_stream::builders::InvokeWithResponseStreamFluentBuilder::client_context) / [`set_client_context(Option<String>)`](crate::operation::invoke_with_response_stream::builders::InvokeWithResponseStreamFluentBuilder::set_client_context):<br>required: **false**<br><p>Up to 3,583 bytes of base64-encoded data about the invoking client to pass to the function in the context object.</p><br>
10    ///   - [`qualifier(impl Into<String>)`](crate::operation::invoke_with_response_stream::builders::InvokeWithResponseStreamFluentBuilder::qualifier) / [`set_qualifier(Option<String>)`](crate::operation::invoke_with_response_stream::builders::InvokeWithResponseStreamFluentBuilder::set_qualifier):<br>required: **false**<br><p>The alias name.</p><br>
11    ///   - [`payload(Blob)`](crate::operation::invoke_with_response_stream::builders::InvokeWithResponseStreamFluentBuilder::payload) / [`set_payload(Option<Blob>)`](crate::operation::invoke_with_response_stream::builders::InvokeWithResponseStreamFluentBuilder::set_payload):<br>required: **false**<br><p>The JSON that you want to provide to your Lambda function as input.</p> <p>You can enter the JSON directly. For example, <code>--payload '{ "key": "value" }'</code>. You can also specify a file path. For example, <code>--payload file://payload.json</code>.</p><br>
12    /// - On success, responds with [`InvokeWithResponseStreamOutput`](crate::operation::invoke_with_response_stream::InvokeWithResponseStreamOutput) with field(s):
13    ///   - [`status_code(i32)`](crate::operation::invoke_with_response_stream::InvokeWithResponseStreamOutput::status_code): <p>For a successful request, the HTTP status code is in the 200 range. For the <code>RequestResponse</code> invocation type, this status code is 200. For the <code>DryRun</code> invocation type, this status code is 204.</p>
14    ///   - [`executed_version(Option<String>)`](crate::operation::invoke_with_response_stream::InvokeWithResponseStreamOutput::executed_version): <p>The version of the function that executed. When you invoke a function with an alias, this indicates which version the alias resolved to.</p>
15    ///   - [`event_stream(EventReceiver<InvokeWithResponseStreamResponseEvent, InvokeWithResponseStreamResponseEventError>)`](crate::operation::invoke_with_response_stream::InvokeWithResponseStreamOutput::event_stream): <p>The stream of response payloads.</p>
16    ///   - [`response_stream_content_type(Option<String>)`](crate::operation::invoke_with_response_stream::InvokeWithResponseStreamOutput::response_stream_content_type): <p>The type of data the stream is returning.</p>
17    /// - On failure, responds with [`SdkError<InvokeWithResponseStreamError>`](crate::operation::invoke_with_response_stream::InvokeWithResponseStreamError)
18    pub fn invoke_with_response_stream(&self) -> crate::operation::invoke_with_response_stream::builders::InvokeWithResponseStreamFluentBuilder {
19        crate::operation::invoke_with_response_stream::builders::InvokeWithResponseStreamFluentBuilder::new(self.handle.clone())
20    }
21}