/// <p><p>After you deploy a model into production using Amazon SageMaker hosting services, your client applications use this API to get inferences from the model hosted at the specified endpoint. </p> <p>For an overview of Amazon SageMaker, see <a href="http://docs.aws.amazon.com/sagemaker/latest/dg/how-it-works.html">How It Works</a>. </p> <p>Amazon SageMaker strips all POST headers except those supported by the API. Amazon SageMaker might add additional headers. You should not rely on the behavior of headers outside those enumerated in the request syntax. </p> <p>Cals to <code>InvokeEndpoint</code> are authenticated by using AWS Signature Version 4. For information, see <a href="http://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html">Authenticating Requests (AWS Signature Version 4)</a> in the <i>Amazon S3 API Reference</i>.</p> <note> <p>Endpoints are scoped to an individual account, and are not public. The URL does not contain the account ID, but Amazon SageMaker determines the account ID from the authentication token that is supplied by the caller.</p> </note></p>
After you deploy a model into production using Amazon SageMaker hosting services, your client applications use this API to get inferences from the model hosted at the specified endpoint.  For an overview of Amazon SageMaker, see How It Works.  Amazon SageMaker strips all POST headers except those supported by the API. Amazon SageMaker might add additional headers. You should not rely on the behavior of headers outside those enumerated in the request syntax.  Cals to InvokeEndpoint are authenticated by using AWS Signature Version 4. For information, see Authenticating Requests (AWS Signature Version 4) in the Amazon S3 API Reference.  Endpoints are scoped to an individual account, and are not public. The URL does not contain the account ID, but Amazon SageMaker determines the account ID from the authentication token that is supplied by the caller. 
After you deploy a model into production using Amazon SageMaker hosting services your client applications use this API to get inferences from the model hosted at the specified endpoint . For an overview of Amazon SageMaker see How It Works . Amazon SageMaker strips all POST headers except those supported by the API . Amazon SageMaker might add additional headers . You should not rely on the behavior of headers outside those enumerated in the request syntax . Cals to InvokeEndpoint are authenticated by using AWS Signature Version 4 . For information see Authenticating Requests ( AWS Signature Version 4 ) in the Amazon S3 API Reference . Endpoints are scoped to an individual account and are not public . The URL does not contain the account ID but Amazon SageMaker determines the account ID from the authentication token that is supplied by the caller .
fn invoke_endpoint(
        &self,
        input: InvokeEndpointInput,
    ) -> RusotoFuture<InvokeEndpointOutput, InvokeEndpointError> {
        let request_uri = format!(
            "/endpoints/{endpoint_name}/invocations",
            endpoint_name = input.endpoint_name
        );
        let mut request = SignedRequest::new("POST", "sagemaker", &self.region, &request_uri);
        if input.content_type.is_none() {
            request.set_content_type("application/x-amz-json-1.1".to_owned());
        }
        request.set_endpoint_prefix("runtime.sagemaker".to_string());
        let encoded = Some(input.body.to_owned());
        request.set_payload(encoded);
        if let Some(ref accept) = input.accept {
            request.add_header("Accept", &accept.to_string());
        }
        if let Some(ref content_type) = input.content_type {
            request.add_header("Content-Type", &content_type.to_string());
        }
        if let Some(ref custom_attributes) = input.custom_attributes {
            request.add_header(
                "X-Amzn-SageMaker-Custom-Attributes",
                &custom_attributes.to_string(),
            );
        }
        self.client.sign_and_dispatch(request, |response| {
            if response.status.is_success() {
                Box::new(response.buffer().from_err().and_then(|response| {
                    let mut result = InvokeEndpointOutput::default();
                    result.body = response.body;
                    if let Some(content_type) = response.headers.get("Content-Type") {
                        let value = content_type.to_owned();
                        result.content_type = Some(value)
                    };
                    if let Some(custom_attributes) =
                        response.headers.get("X-Amzn-SageMaker-Custom-Attributes")
                    {
                        let value = custom_attributes.to_owned();
                        result.custom_attributes = Some(value)
                    };
                    if let Some(invoked_production_variant) =
                        response.headers.get("x-Amzn-Invoked-Production-Variant")
                    {
                        let value = invoked_production_variant.to_owned();
                        result.invoked_production_variant = Some(value)
                    };
                    Ok(result)
                }))
            } else {
                Box::new(
                    response
                        .buffer()
                        .from_err()
                        .and_then(|response| Err(InvokeEndpointError::from_response(response))),
                )
            }
        })
    }
fn invoke_endpoint ( & self , input : InvokeEndpointInput , ) -> RusotoFuture < InvokeEndpointOutput , InvokeEndpointError > { let request_uri = format ! ( " " endpoint_name input endpoint_name ) ; let mut request = SignedRequest :: new ( " " , " " , & self . region , & request_uri ) ; if input . content_type . is_none ( ) { request . set_content_type ( " " . to_owned ( ) ) ; } request . set_endpoint_prefix ( " " . to_string ( ) ) ; let encoded = Some ( input . body . to_owned ( ) ) ; request . set_payload ( encoded ) ; if let Some ( ref accept ) = input . accept { request . add_header ( " " , & accept . to_string ( ) ) ; } if let Some ( ref content_type ) = input . content_type { request . add_header ( " " , & content_type . to_string ( ) ) ; } if let Some ( ref custom_attributes ) = input . custom_attributes { request . add_header ( " " , & custom_attributes . to_string ( ) , ) ; } self . client . sign_and_dispatch ( request , | response | { if response . status . is_success ( ) { Box :: new ( response . buffer ( ) . from_err ( ) . and_then ( | response | { let mut result = InvokeEndpointOutput :: default ( ) ; result . body = response . body ; if let Some ( content_type ) = response . headers . get ( " " ) { let value = content_type . to_owned ( ) ; result . content_type = Some ( value ) } ; if let Some ( custom_attributes ) = response . headers . get ( " " ) { let value = custom_attributes . to_owned ( ) ; result . custom_attributes = Some ( value ) } ; if let Some ( invoked_production_variant ) = response . headers . get ( " " ) { let value = invoked_production_variant . to_owned ( ) ; result . invoked_production_variant = Some ( value ) } ; Ok ( result ) } ) ) } else { Box :: new ( response . buffer ( ) . from_err ( ) . and_then ( | response | Err ( InvokeEndpointError :: from_response ( response ) ) ) , ) } } ) }
<p><p>After you deploy a model into production using Amazon SageMaker hosting services, your client applications use this API to get inferences from the model hosted at the specified endpoint.
<p > <p > After you deploy a model into production using Amazon SageMaker hosting services your client applications use this API to get inferences from the model hosted at the specified endpoint .
&self
input
InvokeEndpointInput