共用方式為


AppsOperations Class

AppsOperations operations.

You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.

Inheritance
builtins.object
AppsOperations

Constructor

AppsOperations(client, config, serializer, deserializer)

Parameters

Name Description
client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

An object model deserializer.

Methods

add

Creates a new LUIS app.

add_custom_prebuilt_domain

Adds a prebuilt domain along with its intent and entity models as a new application.

delete

Deletes an application.

download_query_logs

Gets the logs of the past month's endpoint queries for the application.

get

Gets the application info.

get_publish_settings

Get the application publish settings including 'UseAllTrainingData'.

get_settings

Get the application settings including 'UseAllTrainingData'.

import_lu_format

Imports an application to LUIS, the application's structure is included in the request body.

import_method

Imports an application to LUIS, the application's structure is included in the request body.

import_v2_app

Imports an application to LUIS, the application's structure is included in the request body.

list

Lists all of the user's applications.

list_available_custom_prebuilt_domains

Gets all the available custom prebuilt domains for all cultures.

list_available_custom_prebuilt_domains_for_culture

Gets all the available prebuilt domains for a specific culture.

list_cortana_endpoints

Gets the endpoint URLs for the prebuilt Cortana applications.

list_domains

Gets the available application domains.

list_endpoints

Returns the available endpoint deployment regions and URLs.

list_supported_cultures

Gets a list of supported cultures. Cultures are equivalent to the written language and locale. For example,"en-us" represents the U.S. variation of English.

list_usage_scenarios

Gets the application available usage scenarios.

package_published_application_as_gzip

package - Gets published LUIS application package in binary stream GZip format.

Packages a published LUIS application as a GZip file to be used in the LUIS container.

package_trained_application_as_gzip

package - Gets trained LUIS application package in binary stream GZip format.

Packages trained LUIS application as GZip file to be used in the LUIS container.

publish

Publishes a specific version of the application.

update

Updates the name or description of the application.

update_publish_settings

Updates the application publish settings including 'UseAllTrainingData'.

update_settings

Updates the application settings including 'UseAllTrainingData'.

add

Creates a new LUIS app.

add(application_create_object, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
application_create_object
Required

An application containing Name, Description (optional), Culture, Usage Scenario (optional), Domain (optional) and initial version ID (optional) of the application. Default value for the version ID is "0.1". Note: the culture cannot be changed after the app is created.

custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
str,
<xref:msrest.pipeline.ClientRawResponse>

str or ClientRawResponse if raw=true

Exceptions

Type Description

add_custom_prebuilt_domain

Adds a prebuilt domain along with its intent and entity models as a new application.

add_custom_prebuilt_domain(domain_name=None, culture=None, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
domain_name
str

The domain name.

Default value: None
culture
str

The culture of the new domain.

Default value: None
custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
str,
<xref:msrest.pipeline.ClientRawResponse>

str or ClientRawResponse if raw=true

Exceptions

Type Description

delete

Deletes an application.

delete(app_id, force=False, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
app_id
Required
str

The application ID.

force

A flag to indicate whether to force an operation.

Default value: False
custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
<xref:msrest.pipeline.ClientRawResponse>

OperationStatus or ClientRawResponse if raw=true

Exceptions

Type Description

download_query_logs

Gets the logs of the past month's endpoint queries for the application.

download_query_logs(app_id, custom_headers=None, raw=False, callback=None, **operation_config)

Parameters

Name Description
app_id
Required
str

The application ID.

custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
callback
Callable[<xref:Bytes>, <xref:response=None>]

When specified, will be called with each chunk of data that is streamed. The callback should take two arguments, the bytes of the current chunk of data and the response object. If the data is uploading, response will be None.

Default value: None
operation_config
Required

Operation configuration overrides.

Returns

Type Description
<xref:msrest.pipeline.ClientRawResponse>

object or ClientRawResponse if raw=true

Exceptions

Type Description
msrest.exceptions.HttpOperationError

get

Gets the application info.

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

Parameters

Name Description
app_id
Required
str

The application ID.

custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
<xref:msrest.pipeline.ClientRawResponse>

ApplicationInfoResponse or ClientRawResponse if raw=true

Exceptions

Type Description

get_publish_settings

Get the application publish settings including 'UseAllTrainingData'.

get_publish_settings(app_id, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
app_id
Required
str

The application ID.

custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
<xref:msrest.pipeline.ClientRawResponse>

PublishSettings or ClientRawResponse if raw=true

Exceptions

Type Description

get_settings

Get the application settings including 'UseAllTrainingData'.

get_settings(app_id, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
app_id
Required
str

The application ID.

custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
<xref:msrest.pipeline.ClientRawResponse>

ApplicationSettings or ClientRawResponse if raw=true

Exceptions

Type Description

import_lu_format

Imports an application to LUIS, the application's structure is included in the request body.

import_lu_format(luis_app_lu, app_name=None, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
luis_app_lu
Required
str

A LUIS application structure.

app_name
str

The application name to create. If not specified, the application name will be read from the imported object. If the application name already exists, an error is returned.

Default value: None
custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
str,
<xref:msrest.pipeline.ClientRawResponse>

str or ClientRawResponse if raw=true

Exceptions

Type Description

import_method

Imports an application to LUIS, the application's structure is included in the request body.

import_method(luis_app, app_name=None, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
luis_app
Required

A LUIS application structure.

app_name
str

The application name to create. If not specified, the application name will be read from the imported object. If the application name already exists, an error is returned.

Default value: None
custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
str,
<xref:msrest.pipeline.ClientRawResponse>

str or ClientRawResponse if raw=true

Exceptions

Type Description

import_v2_app

Imports an application to LUIS, the application's structure is included in the request body.

import_v2_app(luis_app_v2, app_name=None, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
luis_app_v2
Required

A LUIS application structure.

app_name
str

The application name to create. If not specified, the application name will be read from the imported object. If the application name already exists, an error is returned.

Default value: None
custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
str,
<xref:msrest.pipeline.ClientRawResponse>

str or ClientRawResponse if raw=true

Exceptions

Type Description

list

Lists all of the user's applications.

list(skip=0, take=100, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
skip
int

The number of entries to skip. Default value is 0.

Default value: 0
take
int

The number of entries to return. Maximum page size is 500. Default is 100.

Default value: 100
custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
<xref:msrest.pipeline.ClientRawResponse>

list or ClientRawResponse if raw=true

Exceptions

Type Description

list_available_custom_prebuilt_domains

Gets all the available custom prebuilt domains for all cultures.

list_available_custom_prebuilt_domains(custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
<xref:msrest.pipeline.ClientRawResponse>

list or ClientRawResponse if raw=true

Exceptions

Type Description

list_available_custom_prebuilt_domains_for_culture

Gets all the available prebuilt domains for a specific culture.

list_available_custom_prebuilt_domains_for_culture(culture, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
culture
Required
str

Culture.

custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
<xref:msrest.pipeline.ClientRawResponse>

list or ClientRawResponse if raw=true

Exceptions

Type Description

list_cortana_endpoints

Gets the endpoint URLs for the prebuilt Cortana applications.

list_cortana_endpoints(custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
<xref:msrest.pipeline.ClientRawResponse>

PersonalAssistantsResponse or ClientRawResponse if raw=true

Exceptions

Type Description

list_domains

Gets the available application domains.

list_domains(custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
list[str],
<xref:msrest.pipeline.ClientRawResponse>

list or ClientRawResponse if raw=true

Exceptions

Type Description

list_endpoints

Returns the available endpoint deployment regions and URLs.

list_endpoints(app_id, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
app_id
Required
str

The application ID.

custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
dict[str, str],
<xref:msrest.pipeline.ClientRawResponse>

dict or ClientRawResponse if raw=true

Exceptions

Type Description

list_supported_cultures

Gets a list of supported cultures. Cultures are equivalent to the written language and locale. For example,"en-us" represents the U.S. variation of English.

list_supported_cultures(custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
<xref:msrest.pipeline.ClientRawResponse>

list or ClientRawResponse if raw=true

Exceptions

Type Description

list_usage_scenarios

Gets the application available usage scenarios.

list_usage_scenarios(custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
list[str],
<xref:msrest.pipeline.ClientRawResponse>

list or ClientRawResponse if raw=true

Exceptions

Type Description

package_published_application_as_gzip

package - Gets published LUIS application package in binary stream GZip format.

Packages a published LUIS application as a GZip file to be used in the LUIS container.

package_published_application_as_gzip(app_id, slot_name, custom_headers=None, raw=False, callback=None, **operation_config)

Parameters

Name Description
app_id
Required
str

The application ID.

slot_name
Required
str

The publishing slot name.

custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
callback
Callable[<xref:Bytes>, <xref:response=None>]

When specified, will be called with each chunk of data that is streamed. The callback should take two arguments, the bytes of the current chunk of data and the response object. If the data is uploading, response will be None.

Default value: None
operation_config
Required

Operation configuration overrides.

Returns

Type Description
<xref:msrest.pipeline.ClientRawResponse>

object or ClientRawResponse if raw=true

Exceptions

Type Description

package_trained_application_as_gzip

package - Gets trained LUIS application package in binary stream GZip format.

Packages trained LUIS application as GZip file to be used in the LUIS container.

package_trained_application_as_gzip(app_id, version_id, custom_headers=None, raw=False, callback=None, **operation_config)

Parameters

Name Description
app_id
Required
str

The application ID.

version_id
Required
str

The version ID.

custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
callback
Callable[<xref:Bytes>, <xref:response=None>]

When specified, will be called with each chunk of data that is streamed. The callback should take two arguments, the bytes of the current chunk of data and the response object. If the data is uploading, response will be None.

Default value: None
operation_config
Required

Operation configuration overrides.

Returns

Type Description
<xref:msrest.pipeline.ClientRawResponse>

object or ClientRawResponse if raw=true

Exceptions

Type Description

publish

Publishes a specific version of the application.

publish(app_id, version_id=None, is_staging=False, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
app_id
Required
str

The application ID.

version_id
str

The version ID to publish.

Default value: None
is_staging

Indicates if the staging slot should be used, instead of the Production one.

Default value: False
custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
<xref:msrest.pipeline.ClientRawResponse>

ProductionOrStagingEndpointInfo or ClientRawResponse if raw=true

Exceptions

Type Description

update

Updates the name or description of the application.

update(app_id, name=None, description=None, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
app_id
Required
str

The application ID.

name
str

The application's new name.

Default value: None
description
str

The application's new description.

Default value: None
custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
<xref:msrest.pipeline.ClientRawResponse>

OperationStatus or ClientRawResponse if raw=true

Exceptions

Type Description

update_publish_settings

Updates the application publish settings including 'UseAllTrainingData'.

update_publish_settings(app_id, publish_setting_update_object, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
app_id
Required
str

The application ID.

publish_setting_update_object
Required

An object containing the new publish application settings.

custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
<xref:msrest.pipeline.ClientRawResponse>

OperationStatus or ClientRawResponse if raw=true

Exceptions

Type Description

update_settings

Updates the application settings including 'UseAllTrainingData'.

update_settings(app_id, is_public=None, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
app_id
Required
str

The application ID.

is_public

Setting your application as public allows other people to use your application's endpoint using their own keys.

Default value: None
custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
<xref:msrest.pipeline.ClientRawResponse>

OperationStatus or ClientRawResponse if raw=true

Exceptions

Type Description

Attributes

models

models = <module 'azure.cognitiveservices.language.luis.authoring.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\cognitiveservices\\language\\luis\\authoring\\models\\__init__.py'>