Skip to content

QBusinessClient#

Index > QBusiness > QBusinessClient

Auto-generated documentation for QBusiness type annotations stubs module mypy-boto3-qbusiness.

QBusinessClient#

Type annotations and code completion for boto3.client("qbusiness"). boto3 documentation

# QBusinessClient usage example

from boto3.session import Session
from mypy_boto3_qbusiness.client import QBusinessClient

def get_qbusiness_client() -> QBusinessClient:
    return Session().client("qbusiness")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("qbusiness").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("qbusiness")

try:
    do_something(client)
except (
    client.exceptions.AccessDeniedException,
    client.exceptions.ClientError,
    client.exceptions.ConflictException,
    client.exceptions.InternalServerException,
    client.exceptions.LicenseNotFoundException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.ServiceQuotaExceededException,
    client.exceptions.ThrottlingException,
    client.exceptions.ValidationException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_qbusiness.client import Exceptions

def handle_error(exc: Exceptions.AccessDeniedException) -> None:
    ...

Methods#

batch_delete_document#

Asynchronously deletes one or more documents added using the BatchPutDocument API from an Amazon Q Business index.

Type annotations and code completion for boto3.client("qbusiness").batch_delete_document method. boto3 documentation

# batch_delete_document method definition

def batch_delete_document(
    self,
    *,
    applicationId: str,
    indexId: str,
    documents: Sequence[DeleteDocumentTypeDef],  # (1)
    dataSourceSyncId: str = ...,
) -> BatchDeleteDocumentResponseTypeDef:  # (2)
    ...
  1. See DeleteDocumentTypeDef
  2. See BatchDeleteDocumentResponseTypeDef
# batch_delete_document method usage example with argument unpacking

kwargs: BatchDeleteDocumentRequestRequestTypeDef = {  # (1)
    "applicationId": ...,
    "indexId": ...,
    "documents": ...,
}

parent.batch_delete_document(**kwargs)
  1. See BatchDeleteDocumentRequestRequestTypeDef

batch_put_document#

Adds one or more documents to an Amazon Q Business index.

Type annotations and code completion for boto3.client("qbusiness").batch_put_document method. boto3 documentation

# batch_put_document method definition

def batch_put_document(
    self,
    *,
    applicationId: str,
    indexId: str,
    documents: Sequence[DocumentTypeDef],  # (1)
    roleArn: str = ...,
    dataSourceSyncId: str = ...,
) -> BatchPutDocumentResponseTypeDef:  # (2)
    ...
  1. See DocumentTypeDef
  2. See BatchPutDocumentResponseTypeDef
# batch_put_document method usage example with argument unpacking

kwargs: BatchPutDocumentRequestRequestTypeDef = {  # (1)
    "applicationId": ...,
    "indexId": ...,
    "documents": ...,
}

parent.batch_put_document(**kwargs)
  1. See BatchPutDocumentRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("qbusiness").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

chat_sync#

Starts or continues a non-streaming Amazon Q Business conversation.

Type annotations and code completion for boto3.client("qbusiness").chat_sync method. boto3 documentation

# chat_sync method definition

def chat_sync(
    self,
    *,
    applicationId: str,
    userId: str = ...,
    userGroups: Sequence[str] = ...,
    userMessage: str = ...,
    attachments: Sequence[AttachmentInputTypeDef] = ...,  # (1)
    actionExecution: Union[ActionExecutionTypeDef, ActionExecutionExtraOutputTypeDef] = ...,  # (2)
    authChallengeResponse: AuthChallengeResponseTypeDef = ...,  # (3)
    conversationId: str = ...,
    parentMessageId: str = ...,
    attributeFilter: AttributeFilterTypeDef = ...,  # (4)
    chatMode: ChatModeType = ...,  # (5)
    chatModeConfiguration: ChatModeConfigurationTypeDef = ...,  # (6)
    clientToken: str = ...,
) -> ChatSyncOutputTypeDef:  # (7)
    ...
  1. See AttachmentInputTypeDef
  2. See ActionExecutionTypeDef ActionExecutionExtraOutputTypeDef
  3. See AuthChallengeResponseTypeDef
  4. See AttributeFilterTypeDef
  5. See ChatModeType
  6. See ChatModeConfigurationTypeDef
  7. See ChatSyncOutputTypeDef
# chat_sync method usage example with argument unpacking

kwargs: ChatSyncInputRequestTypeDef = {  # (1)
    "applicationId": ...,
}

parent.chat_sync(**kwargs)
  1. See ChatSyncInputRequestTypeDef

close#

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("qbusiness").close method. boto3 documentation

# close method definition

def close(
    self,
) -> None:
    ...

create_application#

Creates an Amazon Q Business application.

Type annotations and code completion for boto3.client("qbusiness").create_application method. boto3 documentation

# create_application method definition

def create_application(
    self,
    *,
    displayName: str,
    roleArn: str = ...,
    identityCenterInstanceArn: str = ...,
    description: str = ...,
    encryptionConfiguration: EncryptionConfigurationTypeDef = ...,  # (1)
    tags: Sequence[TagTypeDef] = ...,  # (2)
    clientToken: str = ...,
    attachmentsConfiguration: AttachmentsConfigurationTypeDef = ...,  # (3)
) -> CreateApplicationResponseTypeDef:  # (4)
    ...
  1. See EncryptionConfigurationTypeDef
  2. See TagTypeDef
  3. See AttachmentsConfigurationTypeDef
  4. See CreateApplicationResponseTypeDef
# create_application method usage example with argument unpacking

kwargs: CreateApplicationRequestRequestTypeDef = {  # (1)
    "displayName": ...,
}

parent.create_application(**kwargs)
  1. See CreateApplicationRequestRequestTypeDef

create_data_source#

Creates a data source connector for an Amazon Q Business application.

Type annotations and code completion for boto3.client("qbusiness").create_data_source method. boto3 documentation

# create_data_source method definition

def create_data_source(
    self,
    *,
    applicationId: str,
    indexId: str,
    displayName: str,
    configuration: Mapping[str, Any],
    vpcConfiguration: Union[DataSourceVpcConfigurationTypeDef, DataSourceVpcConfigurationOutputTypeDef] = ...,  # (1)
    description: str = ...,
    tags: Sequence[TagTypeDef] = ...,  # (2)
    syncSchedule: str = ...,
    roleArn: str = ...,
    clientToken: str = ...,
    documentEnrichmentConfiguration: Union[DocumentEnrichmentConfigurationTypeDef, DocumentEnrichmentConfigurationOutputTypeDef] = ...,  # (3)
) -> CreateDataSourceResponseTypeDef:  # (4)
    ...
  1. See DataSourceVpcConfigurationTypeDef DataSourceVpcConfigurationOutputTypeDef
  2. See TagTypeDef
  3. See DocumentEnrichmentConfigurationTypeDef DocumentEnrichmentConfigurationOutputTypeDef
  4. See CreateDataSourceResponseTypeDef
# create_data_source method usage example with argument unpacking

kwargs: CreateDataSourceRequestRequestTypeDef = {  # (1)
    "applicationId": ...,
    "indexId": ...,
    "displayName": ...,
    "configuration": ...,
}

parent.create_data_source(**kwargs)
  1. See CreateDataSourceRequestRequestTypeDef

create_index#

Creates an Amazon Q Business index.

Type annotations and code completion for boto3.client("qbusiness").create_index method. boto3 documentation

# create_index method definition

def create_index(
    self,
    *,
    applicationId: str,
    displayName: str,
    type: IndexTypeType = ...,  # (1)
    description: str = ...,
    tags: Sequence[TagTypeDef] = ...,  # (2)
    capacityConfiguration: IndexCapacityConfigurationTypeDef = ...,  # (3)
    clientToken: str = ...,
) -> CreateIndexResponseTypeDef:  # (4)
    ...
  1. See IndexTypeType
  2. See TagTypeDef
  3. See IndexCapacityConfigurationTypeDef
  4. See