# azure.cognitiveservices.knowledge.qnamaker.operations module

class `azure.cognitiveservices.knowledge.qnamaker.operations.``EndpointKeysOperations`(client, config, serializer, deserializer)

  Bases: `object`

  EndpointKeysOperations operations.

  Parameters:

  - client – Client for service requests.
  - config – Configuration of service client.
  - serializer – An object model serializer.
  - deserializer – An object model deserializer.

  `get_keys`(custom_headers=None, raw=False, **operation_config)

    Gets endpoint keys for an endpoint.

    Parameters:

    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Returns: | EndpointKeysDTO or ClientRawResponse if raw=true
    Return type: | EndpointKeysDTO or ClientRawResponse
    Raises: | `ErrorResponseException`

  `refresh_keys`(key_type, custom_headers=None, raw=False, **operation_config)

    Re-generates an endpoint key.

    Parameters:

    - key_type (str) – Type of Key
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Returns: | EndpointKeysDTO or ClientRawResponse if raw=true
    Return type: | EndpointKeysDTO or ClientRawResponse
    Raises: | `ErrorResponseException`

  `models` = <module 'azure.cognitiveservices.knowledge.qnamaker.models' from '/usr/lib/python3/dist-packages/azure/cognitiveservices/knowledge/qnamaker/models/__init__.py'>

class `azure.cognitiveservices.knowledge.qnamaker.operations.``AlterationsOperations`(client, config, serializer, deserializer)

  Bases: `object`

  AlterationsOperations operations.

  Parameters:

  - client – Client for service requests.
  - config – Configuration of service client.
  - serializer – An object model serializer.
  - deserializer – An object model deserializer.

  `get`(custom_headers=None, raw=False, **operation_config)

    Download alterations from runtime.

    Parameters:

    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Returns: | WordAlterationsDTO or ClientRawResponse if raw=true
    Return type: | WordAlterationsDTO or ClientRawResponse
    Raises: | `ErrorResponseException`

  `replace`(word_alterations, custom_headers=None, raw=False, **operation_config)

    Replace alterations data.

    Parameters:

    - word_alterations (list[AlterationsDTO]) – Collection of word alterations.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Returns: | None or ClientRawResponse if raw=true
    Return type: | None or ClientRawResponse
    Raises: | `ErrorResponseException`

  `models` = <module 'azure.cognitiveservices.knowledge.qnamaker.models' from '/usr/lib/python3/dist-packages/azure/cognitiveservices/knowledge/qnamaker/models/__init__.py'>

class `azure.cognitiveservices.knowledge.qnamaker.operations.``KnowledgebaseOperations`(client, config, serializer, deserializer)

  Bases: `object`

  KnowledgebaseOperations operations.

  Parameters:

  - client – Client for service requests.
  - config – Configuration of service client.
  - serializer – An object model serializer.
  - deserializer – An object model deserializer.

  `create`(create_kb_payload, custom_headers=None, raw=False, **operation_config)

    Asynchronous operation to create a new knowledgebase.

    Parameters:

    - create_kb_payload (CreateKbDTO) – Post body of the request.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Returns: | Operation or ClientRawResponse if raw=true
    Return type: | Operation or ClientRawResponse
    Raises: | `ErrorResponseException`

  `delete`(kb_id, custom_headers=None, raw=False, **operation_config)

    Deletes the knowledgebase and all its data.

    Parameters:

    - kb_id (str) – Knowledgebase id.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Returns: | None or ClientRawResponse if raw=true
    Return type: | None or ClientRawResponse
    Raises: | `ErrorResponseException`

  `download`(kb_id, environment, custom_headers=None, raw=False, **operation_config)

    Download the knowledgebase.

    Parameters:

    - kb_id (str) – Knowledgebase id.
    - environment (str or EnvironmentType) – Specifies whether environment is Test or Prod. Possible values include: ‘Prod’, ‘Test’
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Returns: | QnADocumentsDTO or ClientRawResponse if raw=true
    Return type: | QnADocumentsDTO or ClientRawResponse
    Raises: | `ErrorResponseException`

  `get_details`(kb_id, custom_headers=None, raw=False, **operation_config)

    Gets details of a specific knowledgebase.

    Parameters:

    - kb_id (str) – Knowledgebase id.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Returns: | KnowledgebaseDTO or ClientRawResponse if raw=true
    Return type: | KnowledgebaseDTO or ClientRawResponse
    Raises: | `ErrorResponseException`

  `list_all`(custom_headers=None, raw=False, **operation_config)

    Gets all knowledgebases for a user.

    Parameters:

    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Returns: | KnowledgebasesDTO or ClientRawResponse if raw=true
    Return type: | KnowledgebasesDTO or ClientRawResponse
    Raises: | `ErrorResponseException`

  `publish`(kb_id, custom_headers=None, raw=False, **operation_config)

    Publishes all changes in test index of a knowledgebase to its prod index.

    Parameters:

    - kb_id (str) – Knowledgebase id.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Returns: | None or ClientRawResponse if raw=true
    Return type: | None or ClientRawResponse
    Raises: | `ErrorResponseException`

  `replace`(kb_id, qn_alist, custom_headers=None, raw=False, **operation_config)

    Replace knowledgebase contents.

    Parameters:

    - kb_id (str) – Knowledgebase id.
    - qn_alist (list[QnADTO]) – List of Q-A (QnADTO) to be added to the knowledgebase. Q-A Ids are assigned by the service and should be omitted.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Returns: | None or ClientRawResponse if raw=true
    Return type: | None or ClientRawResponse
    Raises: | `ErrorResponseException`

  `update`(kb_id, update_kb, custom_headers=None, raw=False, **operation_config)

    Asynchronous operation to modify a knowledgebase.

    Parameters:

    - kb_id (str) – Knowledgebase id.
    - update_kb (UpdateKbOperationDTO) – Post body of the request.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Returns: | Operation or ClientRawResponse if raw=true
    Return type: | Operation or ClientRawResponse
    Raises: | `ErrorResponseException`

  `models` = <module 'azure.cognitiveservices.knowledge.qnamaker.models' from '/usr/lib/python3/dist-packages/azure/cognitiveservices/knowledge/qnamaker/models/__init__.py'>

class `azure.cognitiveservices.knowledge.qnamaker.operations.``Operations`(client, config, serializer, deserializer)

  Bases: `object`

  Operations operations.

  Parameters:

  - client – Client for service requests.
  - config – Configuration of service client.
  - serializer – An object model serializer.
  - deserializer – An object model deserializer.

  `get_details`(operation_id, custom_headers=None, raw=False, **operation_config)

    Gets details of a specific long running operation.

    Parameters:

    - operation_id (str) – Operation id.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Returns: | Operation or ClientRawResponse if raw=true
    Return type: | Operation or ClientRawResponse
    Raises: | `ErrorResponseException`

  `models` = <module 'azure.cognitiveservices.knowledge.qnamaker.models' from '/usr/lib/python3/dist-packages/azure/cognitiveservices/knowledge/qnamaker/models/__init__.py'>