#[non_exhaustive]pub struct InvokeEndpointAsyncInputBuilder { /* private fields */ }Expand description
A builder for InvokeEndpointAsyncInput.
Implementations§
Source§impl InvokeEndpointAsyncInputBuilder
impl InvokeEndpointAsyncInputBuilder
Sourcepub fn endpoint_name(self, input: impl Into<String>) -> Self
pub fn endpoint_name(self, input: impl Into<String>) -> Self
The name of the endpoint that you specified when you created the endpoint using the CreateEndpoint API.
This field is required.Sourcepub fn set_endpoint_name(self, input: Option<String>) -> Self
pub fn set_endpoint_name(self, input: Option<String>) -> Self
The name of the endpoint that you specified when you created the endpoint using the CreateEndpoint API.
Sourcepub fn get_endpoint_name(&self) -> &Option<String>
pub fn get_endpoint_name(&self) -> &Option<String>
The name of the endpoint that you specified when you created the endpoint using the CreateEndpoint API.
Sourcepub fn content_type(self, input: impl Into<String>) -> Self
pub fn content_type(self, input: impl Into<String>) -> Self
The MIME type of the input data in the request body.
Sourcepub fn set_content_type(self, input: Option<String>) -> Self
pub fn set_content_type(self, input: Option<String>) -> Self
The MIME type of the input data in the request body.
Sourcepub fn get_content_type(&self) -> &Option<String>
pub fn get_content_type(&self) -> &Option<String>
The MIME type of the input data in the request body.
Sourcepub fn accept(self, input: impl Into<String>) -> Self
pub fn accept(self, input: impl Into<String>) -> Self
The desired MIME type of the inference response from the model container.
Sourcepub fn set_accept(self, input: Option<String>) -> Self
pub fn set_accept(self, input: Option<String>) -> Self
The desired MIME type of the inference response from the model container.
Sourcepub fn get_accept(&self) -> &Option<String>
pub fn get_accept(&self) -> &Option<String>
The desired MIME type of the inference response from the model container.
Sourcepub fn custom_attributes(self, input: impl Into<String>) -> Self
pub fn custom_attributes(self, input: impl Into<String>) -> Self
Provides additional information about a request for an inference submitted to a model hosted at an Amazon SageMaker AI endpoint. The information is an opaque value that is forwarded verbatim. You could use this value, for example, to provide an ID that you can use to track a request or to provide other metadata that a service endpoint was programmed to process. The value must consist of no more than 1024 visible US-ASCII characters as specified in Section 3.3.6. Field Value Components of the Hypertext Transfer Protocol (HTTP/1.1).
The code in your model is responsible for setting or updating any custom attributes in the response. If your code does not set this value in the response, an empty value is returned. For example, if a custom attribute represents the trace ID, your model can prepend the custom attribute with Trace ID: in your post-processing function.
This feature is currently supported in the Amazon Web Services SDKs but not in the Amazon SageMaker AI Python SDK.
Sourcepub fn set_custom_attributes(self, input: Option<String>) -> Self
pub fn set_custom_attributes(self, input: Option<String>) -> Self
Provides additional information about a request for an inference submitted to a model hosted at an Amazon SageMaker AI endpoint. The information is an opaque value that is forwarded verbatim. You could use this value, for example, to provide an ID that you can use to track a request or to provide other metadata that a service endpoint was programmed to process. The value must consist of no more than 1024 visible US-ASCII characters as specified in Section 3.3.6. Field Value Components of the Hypertext Transfer Protocol (HTTP/1.1).
The code in your model is responsible for setting or updating any custom attributes in the response. If your code does not set this value in the response, an empty value is returned. For example, if a custom attribute represents the trace ID, your model can prepend the custom attribute with Trace ID: in your post-processing function.
This feature is currently supported in the Amazon Web Services SDKs but not in the Amazon SageMaker AI Python SDK.
Sourcepub fn get_custom_attributes(&self) -> &Option<String>
pub fn get_custom_attributes(&self) -> &Option<String>
Provides additional information about a request for an inference submitted to a model hosted at an Amazon SageMaker AI endpoint. The information is an opaque value that is forwarded verbatim. You could use this value, for example, to provide an ID that you can use to track a request or to provide other metadata that a service endpoint was programmed to process. The value must consist of no more than 1024 visible US-ASCII characters as specified in Section 3.3.6. Field Value Components of the Hypertext Transfer Protocol (HTTP/1.1).
The code in your model is responsible for setting or updating any custom attributes in the response. If your code does not set this value in the response, an empty value is returned. For example, if a custom attribute represents the trace ID, your model can prepend the custom attribute with Trace ID: in your post-processing function.
This feature is currently supported in the Amazon Web Services SDKs but not in the Amazon SageMaker AI Python SDK.
Sourcepub fn inference_id(self, input: impl Into<String>) -> Self
pub fn inference_id(self, input: impl Into<String>) -> Self
The identifier for the inference request. Amazon SageMaker AI will generate an identifier for you if none is specified.
Sourcepub fn set_inference_id(self, input: Option<String>) -> Self
pub fn set_inference_id(self, input: Option<String>) -> Self
The identifier for the inference request. Amazon SageMaker AI will generate an identifier for you if none is specified.
Sourcepub fn get_inference_id(&self) -> &Option<String>
pub fn get_inference_id(&self) -> &Option<String>
The identifier for the inference request. Amazon SageMaker AI will generate an identifier for you if none is specified.
Sourcepub fn input_location(self, input: impl Into<String>) -> Self
pub fn input_location(self, input: impl Into<String>) -> Self
The Amazon S3 URI where the inference request payload is stored.
Sourcepub fn set_input_location(self, input: Option<String>) -> Self
pub fn set_input_location(self, input: Option<String>) -> Self
The Amazon S3 URI where the inference request payload is stored.
Sourcepub fn get_input_location(&self) -> &Option<String>
pub fn get_input_location(&self) -> &Option<String>
The Amazon S3 URI where the inference request payload is stored.
Sourcepub fn s3_output_path_extension(self, input: impl Into<String>) -> Self
pub fn s3_output_path_extension(self, input: impl Into<String>) -> Self
The path extension that is appended to the Amazon S3 output path where the inference response payload is stored.
Sourcepub fn set_s3_output_path_extension(self, input: Option<String>) -> Self
pub fn set_s3_output_path_extension(self, input: Option<String>) -> Self
The path extension that is appended to the Amazon S3 output path where the inference response payload is stored.
Sourcepub fn get_s3_output_path_extension(&self) -> &Option<String>
pub fn get_s3_output_path_extension(&self) -> &Option<String>
The path extension that is appended to the Amazon S3 output path where the inference response payload is stored.
Sourcepub fn filename(self, input: impl Into<String>) -> Self
pub fn filename(self, input: impl Into<String>) -> Self
The filename for the inference response payload stored in Amazon S3. If not specified, Amazon SageMaker AI generates a filename based on the inference ID.
Sourcepub fn set_filename(self, input: Option<String>) -> Self
pub fn set_filename(self, input: Option<String>) -> Self
The filename for the inference response payload stored in Amazon S3. If not specified, Amazon SageMaker AI generates a filename based on the inference ID.
Sourcepub fn get_filename(&self) -> &Option<String>
pub fn get_filename(&self) -> &Option<String>
The filename for the inference response payload stored in Amazon S3. If not specified, Amazon SageMaker AI generates a filename based on the inference ID.
Sourcepub fn request_ttl_seconds(self, input: i32) -> Self
pub fn request_ttl_seconds(self, input: i32) -> Self
Maximum age in seconds a request can be in the queue before it is marked as expired. The default is 6 hours, or 21,600 seconds.
Sourcepub fn set_request_ttl_seconds(self, input: Option<i32>) -> Self
pub fn set_request_ttl_seconds(self, input: Option<i32>) -> Self
Maximum age in seconds a request can be in the queue before it is marked as expired. The default is 6 hours, or 21,600 seconds.
Sourcepub fn get_request_ttl_seconds(&self) -> &Option<i32>
pub fn get_request_ttl_seconds(&self) -> &Option<i32>
Maximum age in seconds a request can be in the queue before it is marked as expired. The default is 6 hours, or 21,600 seconds.
Sourcepub fn invocation_timeout_seconds(self, input: i32) -> Self
pub fn invocation_timeout_seconds(self, input: i32) -> Self
Maximum amount of time in seconds a request can be processed before it is marked as expired. The default is 15 minutes, or 900 seconds.
Sourcepub fn set_invocation_timeout_seconds(self, input: Option<i32>) -> Self
pub fn set_invocation_timeout_seconds(self, input: Option<i32>) -> Self
Maximum amount of time in seconds a request can be processed before it is marked as expired. The default is 15 minutes, or 900 seconds.
Sourcepub fn get_invocation_timeout_seconds(&self) -> &Option<i32>
pub fn get_invocation_timeout_seconds(&self) -> &Option<i32>
Maximum amount of time in seconds a request can be processed before it is marked as expired. The default is 15 minutes, or 900 seconds.
Sourcepub fn body(self, input: Blob) -> Self
pub fn body(self, input: Blob) -> Self
Provides inline input data for the inference request, in the format specified in the ContentType request header. Use this parameter to send the request payload directly in the API call instead of uploading it to Amazon S3 and referencing it with InputLocation. The inline payload can be up to 128,000 bytes.
Body and InputLocation are mutually exclusive. Provide exactly one of them.
For information about the format of the request body, see Common Data Formats-Inference.
Sourcepub fn set_body(self, input: Option<Blob>) -> Self
pub fn set_body(self, input: Option<Blob>) -> Self
Provides inline input data for the inference request, in the format specified in the ContentType request header. Use this parameter to send the request payload directly in the API call instead of uploading it to Amazon S3 and referencing it with InputLocation. The inline payload can be up to 128,000 bytes.
Body and InputLocation are mutually exclusive. Provide exactly one of them.
For information about the format of the request body, see Common Data Formats-Inference.
Sourcepub fn get_body(&self) -> &Option<Blob>
pub fn get_body(&self) -> &Option<Blob>
Provides inline input data for the inference request, in the format specified in the ContentType request header. Use this parameter to send the request payload directly in the API call instead of uploading it to Amazon S3 and referencing it with InputLocation. The inline payload can be up to 128,000 bytes.
Body and InputLocation are mutually exclusive. Provide exactly one of them.
For information about the format of the request body, see Common Data Formats-Inference.
Sourcepub fn build(self) -> Result<InvokeEndpointAsyncInput, BuildError>
pub fn build(self) -> Result<InvokeEndpointAsyncInput, BuildError>
Consumes the builder and constructs a InvokeEndpointAsyncInput.
Source§impl InvokeEndpointAsyncInputBuilder
impl InvokeEndpointAsyncInputBuilder
Sourcepub async fn send_with(
self,
client: &Client,
) -> Result<InvokeEndpointAsyncOutput, SdkError<InvokeEndpointAsyncError, HttpResponse>>
pub async fn send_with( self, client: &Client, ) -> Result<InvokeEndpointAsyncOutput, SdkError<InvokeEndpointAsyncError, HttpResponse>>
Sends a request with this input using the given client.
Trait Implementations§
Source§impl Clone for InvokeEndpointAsyncInputBuilder
impl Clone for InvokeEndpointAsyncInputBuilder
Source§fn clone(&self) -> InvokeEndpointAsyncInputBuilder
fn clone(&self) -> InvokeEndpointAsyncInputBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for InvokeEndpointAsyncInputBuilder
impl Default for InvokeEndpointAsyncInputBuilder
Source§fn default() -> InvokeEndpointAsyncInputBuilder
fn default() -> InvokeEndpointAsyncInputBuilder
impl StructuralPartialEq for InvokeEndpointAsyncInputBuilder
Auto Trait Implementations§
impl !Freeze for InvokeEndpointAsyncInputBuilder
impl RefUnwindSafe for InvokeEndpointAsyncInputBuilder
impl Send for InvokeEndpointAsyncInputBuilder
impl Sync for InvokeEndpointAsyncInputBuilder
impl Unpin for InvokeEndpointAsyncInputBuilder
impl UnsafeUnpin for InvokeEndpointAsyncInputBuilder
impl UnwindSafe for InvokeEndpointAsyncInputBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);