Struct aws_sdk_textract::Client
source · pub struct Client { /* private fields */ }Expand description
Client for Amazon Textract
Client for invoking operations on Amazon Textract. Each operation on Amazon Textract is a method on this
this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.
Constructing a Client
A Config is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env(), since this will resolve an SdkConfig which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env() instead, which returns a ConfigLoader that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_textract::Client::new(&config);Occasionally, SDKs may have additional service-specific that can be set on the Config that
is absent from SdkConfig, or slightly different settings for a specific client may be desired.
The Config struct implements From<&SdkConfig>, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_textract::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();See the aws-config docs and Config for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
Using the Client
A client has a function for every operation that can be performed by the service.
For example, the GetDocumentAnalysis operation has
a Client::get_document_analysis, function which returns a builder for that operation.
The fluent builder ultimately has a send() function that returns an async future that
returns a result, as illustrated below:
let result = client.get_document_analysis()
.job_id("example")
.send()
.await;The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize module for more
information.
Implementations§
source§impl Client
impl Client
sourcepub fn analyze_document(&self) -> AnalyzeDocumentFluentBuilder
pub fn analyze_document(&self) -> AnalyzeDocumentFluentBuilder
Constructs a fluent builder for the AnalyzeDocument operation.
- The fluent builder is configurable:
document(Document)/set_document(Option<Document>):The input document as base64-encoded bytes or an Amazon S3 object. If you use the AWS CLI to call Amazon Textract operations, you can’t pass image bytes. The document must be an image in JPEG, PNG, PDF, or TIFF format.
If you’re using an AWS SDK to call Amazon Textract, you might not need to base64-encode image bytes that are passed using the
Bytesfield.feature_types(FeatureType)/set_feature_types(Option<Vec<FeatureType>>):A list of the types of analysis to perform. Add TABLES to the list to return information about the tables that are detected in the input document. Add FORMS to return detected form data. Add SIGNATURES to return the locations of detected signatures. Add LAYOUT to the list to return information about the layout of the document. To perform both forms and table analysis, add TABLES and FORMS to
FeatureTypes. To detect signatures within the document and within form data and table data, add SIGNATURES to either TABLES or FORMS. All lines and words detected in the document are included in the response (including text that isn’t related to the value ofFeatureTypes).human_loop_config(HumanLoopConfig)/set_human_loop_config(Option<HumanLoopConfig>):Sets the configuration for the human in the loop workflow for analyzing documents.
queries_config(QueriesConfig)/set_queries_config(Option<QueriesConfig>):Contains Queries and the alias for those Queries, as determined by the input.
- On success, responds with
AnalyzeDocumentOutputwith field(s):document_metadata(Option<DocumentMetadata>):Metadata about the analyzed document. An example is the number of pages.
blocks(Option<Vec<Block>>):The items that are detected and analyzed by
AnalyzeDocument.human_loop_activation_output(Option<HumanLoopActivationOutput>):Shows the results of the human in the loop evaluation.
analyze_document_model_version(Option<String>):The version of the model used to analyze the document.
- On failure, responds with
SdkError<AnalyzeDocumentError>
source§impl Client
impl Client
sourcepub fn analyze_expense(&self) -> AnalyzeExpenseFluentBuilder
pub fn analyze_expense(&self) -> AnalyzeExpenseFluentBuilder
Constructs a fluent builder for the AnalyzeExpense operation.
- The fluent builder is configurable:
document(Document)/set_document(Option<Document>):The input document, either as bytes or as an S3 object.
You pass image bytes to an Amazon Textract API operation by using the
Bytesproperty. For example, you would use theBytesproperty to pass a document loaded from a local file system. Image bytes passed by using theBytesproperty must be base64 encoded. Your code might not need to encode document file bytes if you’re using an AWS SDK to call Amazon Textract API operations.You pass images stored in an S3 bucket to an Amazon Textract API operation by using the
S3Objectproperty. Documents stored in an S3 bucket don’t need to be base64 encoded.The AWS Region for the S3 bucket that contains the S3 object must match the AWS Region that you use for Amazon Textract operations.
If you use the AWS CLI to call Amazon Textract operations, passing image bytes using the Bytes property isn’t supported. You must first upload the document to an Amazon S3 bucket, and then call the operation using the S3Object property.
For Amazon Textract to process an S3 object, the user must have permission to access the S3 object.
- On success, responds with
AnalyzeExpenseOutputwith field(s):document_metadata(Option<DocumentMetadata>):Information about the input document.
expense_documents(Option<Vec<ExpenseDocument>>):The expenses detected by Amazon Textract.
- On failure, responds with
SdkError<AnalyzeExpenseError>
source§impl Client
impl Client
sourcepub fn analyze_id(&self) -> AnalyzeIDFluentBuilder
pub fn analyze_id(&self) -> AnalyzeIDFluentBuilder
Constructs a fluent builder for the AnalyzeID operation.
- The fluent builder is configurable:
document_pages(Document)/set_document_pages(Option<Vec<Document>>):The document being passed to AnalyzeID.
- On success, responds with
AnalyzeIdOutputwith field(s):identity_documents(Option<Vec<IdentityDocument>>):The list of documents processed by AnalyzeID. Includes a number denoting their place in the list and the response structure for the document.
document_metadata(Option<DocumentMetadata>):Information about the input document.
analyze_id_model_version(Option<String>):The version of the AnalyzeIdentity API being used to process documents.
- On failure, responds with
SdkError<AnalyzeIDError>
source§impl Client
impl Client
sourcepub fn detect_document_text(&self) -> DetectDocumentTextFluentBuilder
pub fn detect_document_text(&self) -> DetectDocumentTextFluentBuilder
Constructs a fluent builder for the DetectDocumentText operation.
- The fluent builder is configurable:
document(Document)/set_document(Option<Document>):The input document as base64-encoded bytes or an Amazon S3 object. If you use the AWS CLI to call Amazon Textract operations, you can’t pass image bytes. The document must be an image in JPEG or PNG format.
If you’re using an AWS SDK to call Amazon Textract, you might not need to base64-encode image bytes that are passed using the
Bytesfield.
- On success, responds with
DetectDocumentTextOutputwith field(s):document_metadata(Option<DocumentMetadata>):Metadata about the document. It contains the number of pages that are detected in the document.
blocks(Option<Vec<Block>>):An array of
Blockobjects that contain the text that’s detected in the document.detect_document_text_model_version(Option<String>):
- On failure, responds with
SdkError<DetectDocumentTextError>
source§impl Client
impl Client
sourcepub fn get_document_analysis(&self) -> GetDocumentAnalysisFluentBuilder
pub fn get_document_analysis(&self) -> GetDocumentAnalysisFluentBuilder
Constructs a fluent builder for the GetDocumentAnalysis operation.
- The fluent builder is configurable:
job_id(impl Into<String>)/set_job_id(Option<String>):A unique identifier for the text-detection job. The
JobIdis returned fromStartDocumentAnalysis. AJobIdvalue is only valid for 7 days.max_results(i32)/set_max_results(Option<i32>):The maximum number of results to return per paginated call. The largest value that you can specify is 1,000. If you specify a value greater than 1,000, a maximum of 1,000 results is returned. The default value is 1,000.
next_token(impl Into<String>)/set_next_token(Option<String>):If the previous response was incomplete (because there are more blocks to retrieve), Amazon Textract returns a pagination token in the response. You can use this pagination token to retrieve the next set of blocks.
- On success, responds with
GetDocumentAnalysisOutputwith field(s):document_metadata(Option<DocumentMetadata>):Information about a document that Amazon Textract processed.
DocumentMetadatais returned in every page of paginated responses from an Amazon Textract video operation.job_status(Option<JobStatus>):The current status of the text detection job.
next_token(Option<String>):If the response is truncated, Amazon Textract returns this token. You can use this token in the subsequent request to retrieve the next set of text detection results.
blocks(Option<Vec<Block>>):The results of the text-analysis operation.
warnings(Option<Vec<Warning>>):A list of warnings that occurred during the document-analysis operation.
status_message(Option<String>):Returns if the detection job could not be completed. Contains explanation for what error occured.
analyze_document_model_version(Option<String>):
- On failure, responds with
SdkError<GetDocumentAnalysisError>
source§impl Client
impl Client
sourcepub fn get_document_text_detection(
&self
) -> GetDocumentTextDetectionFluentBuilder
pub fn get_document_text_detection( &self ) -> GetDocumentTextDetectionFluentBuilder
Constructs a fluent builder for the GetDocumentTextDetection operation.
- The fluent builder is configurable:
job_id(impl Into<String>)/set_job_id(Option<String>):A unique identifier for the text detection job. The
JobIdis returned fromStartDocumentTextDetection. AJobIdvalue is only valid for 7 days.max_results(i32)/set_max_results(Option<i32>):The maximum number of results to return per paginated call. The largest value you can specify is 1,000. If you specify a value greater than 1,000, a maximum of 1,000 results is returned. The default value is 1,000.
next_token(impl Into<String>)/set_next_token(Option<String>):If the previous response was incomplete (because there are more blocks to retrieve), Amazon Textract returns a pagination token in the response. You can use this pagination token to retrieve the next set of blocks.
- On success, responds with
GetDocumentTextDetectionOutputwith field(s):document_metadata(Option<DocumentMetadata>):Information about a document that Amazon Textract processed.
DocumentMetadatais returned in every page of paginated responses from an Amazon Textract video operation.job_status(Option<JobStatus>):The current status of the text detection job.
next_token(Option<String>):If the response is truncated, Amazon Textract returns this token. You can use this token in the subsequent request to retrieve the next set of text-detection results.
blocks(Option<Vec<Block>>):The results of the text-detection operation.
warnings(Option<Vec<Warning>>):A list of warnings that occurred during the text-detection operation for the document.
status_message(Option<String>):Returns if the detection job could not be completed. Contains explanation for what error occured.
detect_document_text_model_version(Option<String>):
- On failure, responds with
SdkError<GetDocumentTextDetectionError>
source§impl Client
impl Client
sourcepub fn get_expense_analysis(&self) -> GetExpenseAnalysisFluentBuilder
pub fn get_expense_analysis(&self) -> GetExpenseAnalysisFluentBuilder
Constructs a fluent builder for the GetExpenseAnalysis operation.
- The fluent builder is configurable:
job_id(impl Into<String>)/set_job_id(Option<String>):A unique identifier for the text detection job. The
JobIdis returned fromStartExpenseAnalysis. AJobIdvalue is only valid for 7 days.max_results(i32)/set_max_results(Option<i32>):The maximum number of results to return per paginated call. The largest value you can specify is 20. If you specify a value greater than 20, a maximum of 20 results is returned. The default value is 20.
next_token(impl Into<String>)/set_next_token(Option<String>):If the previous response was incomplete (because there are more blocks to retrieve), Amazon Textract returns a pagination token in the response. You can use this pagination token to retrieve the next set of blocks.
- On success, responds with
GetExpenseAnalysisOutputwith field(s):document_metadata(Option<DocumentMetadata>):Information about a document that Amazon Textract processed.
DocumentMetadatais returned in every page of paginated responses from an Amazon Textract operation.job_status(Option<JobStatus>):The current status of the text detection job.
next_token(Option<String>):If the response is truncated, Amazon Textract returns this token. You can use this token in the subsequent request to retrieve the next set of text-detection results.
expense_documents(Option<Vec<ExpenseDocument>>):The expenses detected by Amazon Textract.
warnings(Option<Vec<Warning>>):A list of warnings that occurred during the text-detection operation for the document.
status_message(Option<String>):Returns if the detection job could not be completed. Contains explanation for what error occured.
analyze_expense_model_version(Option<String>):The current model version of AnalyzeExpense.
- On failure, responds with
SdkError<GetExpenseAnalysisError>
source§impl Client
impl Client
sourcepub fn get_lending_analysis(&self) -> GetLendingAnalysisFluentBuilder
pub fn get_lending_analysis(&self) -> GetLendingAnalysisFluentBuilder
Constructs a fluent builder for the GetLendingAnalysis operation.
- The fluent builder is configurable:
job_id(impl Into<String>)/set_job_id(Option<String>):A unique identifier for the lending or text-detection job. The
JobIdis returned fromStartLendingAnalysis. AJobIdvalue is only valid for 7 days.max_results(i32)/set_max_results(Option<i32>):The maximum number of results to return per paginated call. The largest value that you can specify is 30. If you specify a value greater than 30, a maximum of 30 results is returned. The default value is 30.
next_token(impl Into<String>)/set_next_token(Option<String>):If the previous response was incomplete, Amazon Textract returns a pagination token in the response. You can use this pagination token to retrieve the next set of lending results.
- On success, responds with
GetLendingAnalysisOutputwith field(s):document_metadata(Option<DocumentMetadata>):Information about the input document.
job_status(Option<JobStatus>):The current status of the lending analysis job.
next_token(Option<String>):If the response is truncated, Amazon Textract returns this token. You can use this token in the subsequent request to retrieve the next set of lending results.
results(Option<Vec<LendingResult>>):Holds the information returned by one of AmazonTextract’s document analysis operations for the pinstripe.
warnings(Option<Vec<Warning>>):A list of warnings that occurred during the lending analysis operation.
status_message(Option<String>):Returns if the lending analysis job could not be completed. Contains explanation for what error occurred.
analyze_lending_model_version(Option<String>):The current model version of the Analyze Lending API.
- On failure, responds with
SdkError<GetLendingAnalysisError>
source§impl Client
impl Client
sourcepub fn get_lending_analysis_summary(
&self
) -> GetLendingAnalysisSummaryFluentBuilder
pub fn get_lending_analysis_summary( &self ) -> GetLendingAnalysisSummaryFluentBuilder
Constructs a fluent builder for the GetLendingAnalysisSummary operation.
- The fluent builder is configurable:
job_id(impl Into<String>)/set_job_id(Option<String>):A unique identifier for the lending or text-detection job. The
JobIdis returned from StartLendingAnalysis. AJobIdvalue is only valid for 7 days.
- On success, responds with
GetLendingAnalysisSummaryOutputwith field(s):document_metadata(Option<DocumentMetadata>):Information about the input document.
job_status(Option<JobStatus>):The current status of the lending analysis job.
summary(Option<LendingSummary>):Contains summary information for documents grouped by type.
warnings(Option<Vec<Warning>>):A list of warnings that occurred during the lending analysis operation.
status_message(Option<String>):Returns if the lending analysis could not be completed. Contains explanation for what error occurred.
analyze_lending_model_version(Option<String>):The current model version of the Analyze Lending API.
- On failure, responds with
SdkError<GetLendingAnalysisSummaryError>
source§impl Client
impl Client
sourcepub fn start_document_analysis(&self) -> StartDocumentAnalysisFluentBuilder
pub fn start_document_analysis(&self) -> StartDocumentAnalysisFluentBuilder
Constructs a fluent builder for the StartDocumentAnalysis operation.
- The fluent builder is configurable:
document_location(DocumentLocation)/set_document_location(Option<DocumentLocation>):The location of the document to be processed.
feature_types(FeatureType)/set_feature_types(Option<Vec<FeatureType>>):A list of the types of analysis to perform. Add TABLES to the list to return information about the tables that are detected in the input document. Add FORMS to return detected form data. To perform both types of analysis, add TABLES and FORMS to
FeatureTypes. All lines and words detected in the document are included in the response (including text that isn’t related to the value ofFeatureTypes).client_request_token(impl Into<String>)/set_client_request_token(Option<String>):The idempotent token that you use to identify the start request. If you use the same token with multiple
StartDocumentAnalysisrequests, the sameJobIdis returned. UseClientRequestTokento prevent the same job from being accidentally started more than once. For more information, see Calling Amazon Textract Asynchronous Operations.job_tag(impl Into<String>)/set_job_tag(Option<String>):An identifier that you specify that’s included in the completion notification published to the Amazon SNS topic. For example, you can use
JobTagto identify the type of document that the completion notification corresponds to (such as a tax form or a receipt).notification_channel(NotificationChannel)/set_notification_channel(Option<NotificationChannel>):The Amazon SNS topic ARN that you want Amazon Textract to publish the completion status of the operation to.
output_config(OutputConfig)/set_output_config(Option<OutputConfig>):Sets if the output will go to a customer defined bucket. By default, Amazon Textract will save the results internally to be accessed by the GetDocumentAnalysis operation.
kms_key_id(impl Into<String>)/set_kms_key_id(Option<String>):The KMS key used to encrypt the inference results. This can be in either Key ID or Key Alias format. When a KMS key is provided, the KMS key will be used for server-side encryption of the objects in the customer bucket. When this parameter is not enabled, the result will be encrypted server side,using SSE-S3.
queries_config(QueriesConfig)/set_queries_config(Option<QueriesConfig>):
- On success, responds with
StartDocumentAnalysisOutputwith field(s):job_id(Option<String>):The identifier for the document text detection job. Use
JobIdto identify the job in a subsequent call toGetDocumentAnalysis. AJobIdvalue is only valid for 7 days.
- On failure, responds with
SdkError<StartDocumentAnalysisError>
source§impl Client
impl Client
sourcepub fn start_document_text_detection(
&self
) -> StartDocumentTextDetectionFluentBuilder
pub fn start_document_text_detection( &self ) -> StartDocumentTextDetectionFluentBuilder
Constructs a fluent builder for the StartDocumentTextDetection operation.
- The fluent builder is configurable:
document_location(DocumentLocation)/set_document_location(Option<DocumentLocation>):The location of the document to be processed.
client_request_token(impl Into<String>)/set_client_request_token(Option<String>):The idempotent token that’s used to identify the start request. If you use the same token with multiple
StartDocumentTextDetectionrequests, the sameJobIdis returned. UseClientRequestTokento prevent the same job from being accidentally started more than once. For more information, see Calling Amazon Textract Asynchronous Operations.job_tag(impl Into<String>)/set_job_tag(Option<String>):An identifier that you specify that’s included in the completion notification published to the Amazon SNS topic. For example, you can use
JobTagto identify the type of document that the completion notification corresponds to (such as a tax form or a receipt).notification_channel(NotificationChannel)/set_notification_channel(Option<NotificationChannel>):The Amazon SNS topic ARN that you want Amazon Textract to publish the completion status of the operation to.
output_config(OutputConfig)/set_output_config(Option<OutputConfig>):Sets if the output will go to a customer defined bucket. By default Amazon Textract will save the results internally to be accessed with the GetDocumentTextDetection operation.
kms_key_id(impl Into<String>)/set_kms_key_id(Option<String>):The KMS key used to encrypt the inference results. This can be in either Key ID or Key Alias format. When a KMS key is provided, the KMS key will be used for server-side encryption of the objects in the customer bucket. When this parameter is not enabled, the result will be encrypted server side,using SSE-S3.
- On success, responds with
StartDocumentTextDetectionOutputwith field(s):job_id(Option<String>):The identifier of the text detection job for the document. Use
JobIdto identify the job in a subsequent call toGetDocumentTextDetection. AJobIdvalue is only valid for 7 days.
- On failure, responds with
SdkError<StartDocumentTextDetectionError>
source§impl Client
impl Client
sourcepub fn start_expense_analysis(&self) -> StartExpenseAnalysisFluentBuilder
pub fn start_expense_analysis(&self) -> StartExpenseAnalysisFluentBuilder
Constructs a fluent builder for the StartExpenseAnalysis operation.
- The fluent builder is configurable:
document_location(DocumentLocation)/set_document_location(Option<DocumentLocation>):The location of the document to be processed.
client_request_token(impl Into<String>)/set_client_request_token(Option<String>):The idempotent token that’s used to identify the start request. If you use the same token with multiple
StartDocumentTextDetectionrequests, the sameJobIdis returned. UseClientRequestTokento prevent the same job from being accidentally started more than once. For more information, see Calling Amazon Textract Asynchronous Operationsjob_tag(impl Into<String>)/set_job_tag(Option<String>):An identifier you specify that’s included in the completion notification published to the Amazon SNS topic. For example, you can use
JobTagto identify the type of document that the completion notification corresponds to (such as a tax form or a receipt).notification_channel(NotificationChannel)/set_notification_channel(Option<NotificationChannel>):The Amazon SNS topic ARN that you want Amazon Textract to publish the completion status of the operation to.
output_config(OutputConfig)/set_output_config(Option<OutputConfig>):Sets if the output will go to a customer defined bucket. By default, Amazon Textract will save the results internally to be accessed by the
GetExpenseAnalysisoperation.kms_key_id(impl Into<String>)/set_kms_key_id(Option<String>):The KMS key used to encrypt the inference results. This can be in either Key ID or Key Alias format. When a KMS key is provided, the KMS key will be used for server-side encryption of the objects in the customer bucket. When this parameter is not enabled, the result will be encrypted server side,using SSE-S3.
- On success, responds with
StartExpenseAnalysisOutputwith field(s):job_id(Option<String>):A unique identifier for the text detection job. The
JobIdis returned fromStartExpenseAnalysis. AJobIdvalue is only valid for 7 days.
- On failure, responds with
SdkError<StartExpenseAnalysisError>
source§impl Client
impl Client
sourcepub fn start_lending_analysis(&self) -> StartLendingAnalysisFluentBuilder
pub fn start_lending_analysis(&self) -> StartLendingAnalysisFluentBuilder
Constructs a fluent builder for the StartLendingAnalysis operation.
- The fluent builder is configurable:
document_location(DocumentLocation)/set_document_location(Option<DocumentLocation>):The Amazon S3 bucket that contains the document to be processed. It’s used by asynchronous operations.
The input document can be an image file in JPEG or PNG format. It can also be a file in PDF format.
client_request_token(impl Into<String>)/set_client_request_token(Option<String>):The idempotent token that you use to identify the start request. If you use the same token with multiple
StartLendingAnalysisrequests, the sameJobIdis returned. UseClientRequestTokento prevent the same job from being accidentally started more than once. For more information, see Calling Amazon Textract Asynchronous Operations.job_tag(impl Into<String>)/set_job_tag(Option<String>):An identifier that you specify to be included in the completion notification published to the Amazon SNS topic. For example, you can use
JobTagto identify the type of document that the completion notification corresponds to (such as a tax form or a receipt).notification_channel(NotificationChannel)/set_notification_channel(Option<NotificationChannel>):The Amazon Simple Notification Service (Amazon SNS) topic to which Amazon Textract publishes the completion status of an asynchronous document operation.
output_config(OutputConfig)/set_output_config(Option<OutputConfig>):Sets whether or not your output will go to a user created bucket. Used to set the name of the bucket, and the prefix on the output file.
OutputConfigis an optional parameter which lets you adjust where your output will be placed. By default, Amazon Textract will store the results internally and can only be accessed by the Get API operations. WithOutputConfigenabled, you can set the name of the bucket the output will be sent to the file prefix of the results where you can download your results. Additionally, you can set theKMSKeyIDparameter to a customer master key (CMK) to encrypt your output. Without this parameter set Amazon Textract will encrypt server-side using the AWS managed CMK for Amazon S3.Decryption of Customer Content is necessary for processing of the documents by Amazon Textract. If your account is opted out under an AI services opt out policy then all unencrypted Customer Content is immediately and permanently deleted after the Customer Content has been processed by the service. No copy of of the output is retained by Amazon Textract. For information about how to opt out, see Managing AI services opt-out policy.
For more information on data privacy, see the Data Privacy FAQ.
kms_key_id(impl Into<String>)/set_kms_key_id(Option<String>):The KMS key used to encrypt the inference results. This can be in either Key ID or Key Alias format. When a KMS key is provided, the KMS key will be used for server-side encryption of the objects in the customer bucket. When this parameter is not enabled, the result will be encrypted server side, using SSE-S3.
- On success, responds with
StartLendingAnalysisOutputwith field(s):job_id(Option<String>):A unique identifier for the lending or text-detection job. The
JobIdis returned fromStartLendingAnalysis. AJobIdvalue is only valid for 7 days.
- On failure, responds with
SdkError<StartLendingAnalysisError>
source§impl Client
impl Client
sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
Panics
- This method will panic if the
sdk_configis missing an async sleep implementation. If you experience this panic, set thesleep_implon the Config passed into this function to fix it. - This method will panic if the
sdk_configis missing an HTTP connector. If you experience this panic, set thehttp_connectoron the Config passed into this function to fix it.