Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions azure-mgmt-cognitiveservices/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
recursive-include tests *.py *.yaml
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py
Expand Down
22 changes: 3 additions & 19 deletions azure-mgmt-cognitiveservices/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see
For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Compatibility
=============

**IMPORTANT**: If you have an earlier version of the azure package
(version < 1.0), you should uninstall it before installing this package.

You can check the version using pip:

.. code:: shell

pip freeze

If you see azure==0.11.0 (or any version below 1.0), uninstall it first:

.. code:: shell

pip uninstall azure


Usage
=====

Expand All @@ -47,3 +28,6 @@ Provide Feedback
If you encounter any bugs or have suggestions, please file an issue in the
`Issues <https://github.com/Azure/azure-sdk-for-python/issues>`__
section of the project.


.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-cognitiveservices%2FREADME.png
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,19 @@ class CognitiveServicesAccountUpdateParameters(Model):
resource. Each tag must have a key no greater than 128 characters and
value no greater than 256 characters.
:type tags: dict[str, str]
:param properties: Additional properties for Account. Only provided fields
will be updated.
:type properties: object
"""

_attribute_map = {
'sku': {'key': 'sku', 'type': 'Sku'},
'tags': {'key': 'tags', 'type': '{str}'},
'properties': {'key': 'properties', 'type': 'object'},
}

def __init__(self, **kwargs):
super(CognitiveServicesAccountUpdateParameters, self).__init__(**kwargs)
self.sku = kwargs.get('sku', None)
self.tags = kwargs.get('tags', None)
self.properties = kwargs.get('properties', None)
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,19 @@ class CognitiveServicesAccountUpdateParameters(Model):
resource. Each tag must have a key no greater than 128 characters and
value no greater than 256 characters.
:type tags: dict[str, str]
:param properties: Additional properties for Account. Only provided fields
will be updated.
:type properties: object
"""

_attribute_map = {
'sku': {'key': 'sku', 'type': 'Sku'},
'tags': {'key': 'tags', 'type': '{str}'},
'properties': {'key': 'properties', 'type': 'object'},
}

def __init__(self, *, sku=None, tags=None, **kwargs) -> None:
def __init__(self, *, sku=None, tags=None, properties=None, **kwargs) -> None:
super(CognitiveServicesAccountUpdateParameters, self).__init__(**kwargs)
self.sku = sku
self.tags = tags
self.properties = properties
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def create(
create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}'}

def update(
self, resource_group_name, account_name, sku=None, tags=None, custom_headers=None, raw=False, **operation_config):
self, resource_group_name, account_name, sku=None, tags=None, properties=None, custom_headers=None, raw=False, **operation_config):
"""Updates a Cognitive Services account.

:param resource_group_name: The name of the resource group within the
Expand All @@ -126,6 +126,9 @@ def update(
resource. Each tag must have a key no greater than 128 characters and
value no greater than 256 characters.
:type tags: dict[str, str]
:param properties: Additional properties for Account. Only provided
fields will be updated.
:type properties: object
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
Expand All @@ -137,7 +140,7 @@ def update(
:raises:
:class:`ErrorException<azure.mgmt.cognitiveservices.models.ErrorException>`
"""
parameters = models.CognitiveServicesAccountUpdateParameters(sku=sku, tags=tags)
parameters = models.CognitiveServicesAccountUpdateParameters(sku=sku, tags=tags, properties=properties)

# Construct URL
url = self.update.metadata['url']
Expand Down
1 change: 1 addition & 0 deletions azure-mgmt-cognitiveservices/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
version=version,
description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME),
long_description=readme + '\n\n' + history,
long_description_content_type='text/x-rst',
license='MIT License',
author='Microsoft Corporation',
author_email='[email protected]',
Expand Down