PatternOperations Class

PatternOperations 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
PatternOperations

Constructor

PatternOperations(client, config, serializer, deserializer)

Parameters

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_pattern

Adds a pattern to a version of the application.

batch_add_patterns

Adds a batch of patterns in a version of the application.

delete_pattern

Deletes the pattern with the specified ID from a version of the application..

delete_patterns

Deletes a list of patterns in a version of the application.

list_intent_patterns

Returns patterns for the specific intent in a version of the application.

list_patterns

Gets patterns in a version of the application.

update_pattern

Updates a pattern in a version of the application.

update_patterns

Updates patterns in a version of the application.

add_pattern

Adds a pattern to a version of the application.

add_pattern(app_id, version_id, pattern=None, intent=None, custom_headers=None, raw=False, **operation_config)

Parameters

app_id
str
Required

The application ID.

version_id
str
Required

The version ID.

pattern
str
default value: None

The pattern text.

intent
str
default value: None

The intent's name which the pattern belongs to.

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

PatternRuleInfo or ClientRawResponse if raw=true

Return type

<xref:msrest.pipeline.ClientRawResponse>

Exceptions

batch_add_patterns

Adds a batch of patterns in a version of the application.

batch_add_patterns(app_id, version_id, patterns, custom_headers=None, raw=False, **operation_config)

Parameters

app_id
str
Required

The application ID.

version_id
str
Required

The version ID.

patterns
list[PatternRuleCreateObject]
Required

A JSON array containing patterns.

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

list or ClientRawResponse if raw=true

Return type

<xref:msrest.pipeline.ClientRawResponse>

Exceptions

delete_pattern

Deletes the pattern with the specified ID from a version of the application..

delete_pattern(app_id, version_id, pattern_id, custom_headers=None, raw=False, **operation_config)

Parameters

app_id
str
Required

The application ID.

version_id
str
Required

The version ID.

pattern_id
str
Required

The pattern ID.

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

OperationStatus or ClientRawResponse if raw=true

Return type

<xref:msrest.pipeline.ClientRawResponse>

Exceptions

delete_patterns

Deletes a list of patterns in a version of the application.

delete_patterns(app_id, version_id, pattern_ids, custom_headers=None, raw=False, **operation_config)

Parameters

app_id
str
Required

The application ID.

version_id
str
Required

The version ID.

pattern_ids
list[str]
Required

The patterns IDs.

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

OperationStatus or ClientRawResponse if raw=true

Return type

<xref:msrest.pipeline.ClientRawResponse>

Exceptions

list_intent_patterns

Returns patterns for the specific intent in a version of the application.

list_intent_patterns(app_id, version_id, intent_id, skip=0, take=100, custom_headers=None, raw=False, **operation_config)

Parameters

app_id
str
Required

The application ID.

version_id
str
Required

The version ID.

intent_id
str
Required

The intent classifier ID.

skip
int
default value: 0

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

take
int
default value: 100

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

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

list or ClientRawResponse if raw=true

Return type

<xref:msrest.pipeline.ClientRawResponse>

Exceptions

list_patterns

Gets patterns in a version of the application.

list_patterns(app_id, version_id, skip=0, take=100, custom_headers=None, raw=False, **operation_config)

Parameters

app_id
str
Required

The application ID.

version_id
str
Required

The version ID.

skip
int
default value: 0

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

take
int
default value: 100

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

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

list or ClientRawResponse if raw=true

Return type

<xref:msrest.pipeline.ClientRawResponse>

Exceptions

update_pattern

Updates a pattern in a version of the application.

update_pattern(app_id, version_id, pattern_id, pattern, custom_headers=None, raw=False, **operation_config)

Parameters

app_id
str
Required

The application ID.

version_id
str
Required

The version ID.

pattern_id
str
Required

The pattern ID.

pattern
PatternRuleUpdateObject
Required

An object representing a pattern.

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

PatternRuleInfo or ClientRawResponse if raw=true

Return type

<xref:msrest.pipeline.ClientRawResponse>

Exceptions

update_patterns

Updates patterns in a version of the application.

update_patterns(app_id, version_id, patterns, custom_headers=None, raw=False, **operation_config)

Parameters

app_id
str
Required

The application ID.

version_id
str
Required

The version ID.

patterns
list[PatternRuleUpdateObject]
Required

An array represents the patterns.

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

list or ClientRawResponse if raw=true

Return type

<xref:msrest.pipeline.ClientRawResponse>

Exceptions

Attributes

models

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