aws-sdk-bedrockagentruntime 1.131.0

AWS SDK for Agents for Amazon Bedrock Runtime
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`GetDocumentContent`](crate::operation::get_document_content::builders::GetDocumentContentFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`knowledge_base_id(impl Into<String>)`](crate::operation::get_document_content::builders::GetDocumentContentFluentBuilder::knowledge_base_id) / [`set_knowledge_base_id(Option<String>)`](crate::operation::get_document_content::builders::GetDocumentContentFluentBuilder::set_knowledge_base_id):<br>required: **true**<br><p>The unique identifier of the knowledge base that contains the document.</p><br>
    ///   - [`data_source_id(impl Into<String>)`](crate::operation::get_document_content::builders::GetDocumentContentFluentBuilder::data_source_id) / [`set_data_source_id(Option<String>)`](crate::operation::get_document_content::builders::GetDocumentContentFluentBuilder::set_data_source_id):<br>required: **true**<br><p>The unique identifier of the data source that contains the document.</p><br>
    ///   - [`document_id(impl Into<String>)`](crate::operation::get_document_content::builders::GetDocumentContentFluentBuilder::document_id) / [`set_document_id(Option<String>)`](crate::operation::get_document_content::builders::GetDocumentContentFluentBuilder::set_document_id):<br>required: **true**<br><p>The unique identifier of the document to retrieve content for.</p><br>
    ///   - [`output_format(DocumentOutputFormat)`](crate::operation::get_document_content::builders::GetDocumentContentFluentBuilder::output_format) / [`set_output_format(Option<DocumentOutputFormat>)`](crate::operation::get_document_content::builders::GetDocumentContentFluentBuilder::set_output_format):<br>required: **false**<br><p>The output format for the document content. <code>RAW</code> returns the original file. <code>EXTRACTED</code> returns parsed text as JSON. Defaults to <code>RAW</code>.</p><br>
    ///   - [`user_context(UserContext)`](crate::operation::get_document_content::builders::GetDocumentContentFluentBuilder::user_context) / [`set_user_context(Option<UserContext>)`](crate::operation::get_document_content::builders::GetDocumentContentFluentBuilder::set_user_context):<br>required: **false**<br><p>Contains information about the user making the request. Use this to pass user identity information for access control filtering, so that retrieval results only include documents the user is authorized to access.</p><br>
    /// - On success, responds with [`GetDocumentContentOutput`](crate::operation::get_document_content::GetDocumentContentOutput) with field(s):
    ///   - [`mime_type(String)`](crate::operation::get_document_content::GetDocumentContentOutput::mime_type): <p>The MIME type of the document content. For <code>RAW</code> format, this is the original file type (for example, <code>application/pdf</code>). For <code>EXTRACTED</code> format, this is always <code>application/json</code>.</p>
    ///   - [`presigned_url(String)`](crate::operation::get_document_content::GetDocumentContentOutput::presigned_url): <p>A pre-signed URL for downloading the document content. The URL expires after 5 minutes.</p>
    ///   - [`document_content_length(Option<i64>)`](crate::operation::get_document_content::GetDocumentContentOutput::document_content_length): <p>The size of the document content in bytes available at the pre-signed URL.</p>
    /// - On failure, responds with [`SdkError<GetDocumentContentError>`](crate::operation::get_document_content::GetDocumentContentError)
    pub fn get_document_content(&self) -> crate::operation::get_document_content::builders::GetDocumentContentFluentBuilder {
        crate::operation::get_document_content::builders::GetDocumentContentFluentBuilder::new(self.handle.clone())
    }
}