diff --git a/doc/dev/mgmt/coverage.md b/doc/dev/mgmt/coverage.md index 1f41b3b4ca57..fc1c7dde7702 100644 --- a/doc/dev/mgmt/coverage.md +++ b/doc/dev/mgmt/coverage.md @@ -11,7 +11,7 @@ | azure-mgmt-appconfiguration | 30.00 | | azure-mgmt-applicationinsights | - | | azure-mgmt-appplatform | - | -| azure-mgmt-attestation | M | +| azure-mgmt-attestation | 100.00 | | azure-mgmt-authorization | M | | azure-mgmt-automation | 98.72 | | azure-mgmt-azurestack | - | @@ -22,7 +22,7 @@ | azure-mgmt-blueprint | - (S) | | azure-mgmt-botservice | M | | azure-mgmt-cdn | 100.00 | -| azure-mgmt-cognitiveservices | - | +| azure-mgmt-cognitiveservices | 87.00 | | azure-mgmt-commerce | M | | azure-mgmt-compute | 48.28 | | azure-mgmt-consumption | M | @@ -32,6 +32,7 @@ | azure-mgmt-core | M | | azure-mgmt-cosmosdb | M | | azure-mgmt-costmanagement | - | +| azure-mgmt-customerlockbox | - (S) | | azure-mgmt-customproviders | - | | azure-mgmt-databox | 100.00 | | azure-mgmt-databoxedge | 100.00 | @@ -46,6 +47,7 @@ | azure-mgmt-devops | - (S) | | azure-mgmt-devspaces | - | | azure-mgmt-devtestlabs | M | +| azure-mgmt-digitaltwins | - (S) | | azure-mgmt-dns | M | | azure-mgmt-documentdb | M | | azure-mgmt-edgegateway | - | @@ -58,11 +60,12 @@ | azure-mgmt-healthcareapis | 100.00 | | azure-mgmt-hybridcompute | M | | azure-mgmt-hybriddatamanager | - (S) | +| azure-mgmt-hybridkubernetes | - (S) | | azure-mgmt-imagebuilder | 90.00 | | azure-mgmt-iotcentral | M | | azure-mgmt-iothub | M | | azure-mgmt-iothubprovisioningservices | - | -| azure-mgmt-keyvault | M | +| azure-mgmt-keyvault | 100.00 | | azure-mgmt-kubernetesconfiguration | - | | azure-mgmt-kusto | 100.00 | | azure-mgmt-labservices | - | @@ -88,6 +91,7 @@ | azure-mgmt-operationsmanagement | - | | azure-mgmt-peering | 47.00 | | azure-mgmt-policyinsights | - | +| azure-mgmt-portal | - (S) | | azure-mgmt-powerbidedicated | - | | azure-mgmt-powerbiembedded | - | | azure-mgmt-privatedns | - | @@ -123,15 +127,13 @@ | azure-mgmt-trafficmanager | M | | azure-mgmt-vmwarecloudsimple | - | | azure-mgmt-vmwarevirtustream | - (S) | -| azure-mgmt-web | M | +| azure-mgmt-web | 1.00 | | azure-mgmt-windowsiot | - (S) | | azure-mgmt-workloadmonitor | - (S) | | azureactivedirectory | - (S) | | azuredata | - (S) | | customer-insights | - (R) | -| customerlockbox | - (S) | | datacatalog | - (R) | -| digitaltwins | - (S) | | domainservices | - (R) | | dynamicstelemetry | - (R) | | guestconfiguration | - (R) | @@ -143,7 +145,6 @@ | marketplace | - (R) | | migrate | - (R) | | migrateprojects | - (R) | -| portal | - (S) | | recoveryservicessiterecovery | - (R) | | resourcehealth | - (R) | | service-map | - (R) | @@ -154,17 +155,21 @@ | visualstudio | - (R) | | windowsesu | - (S) | | | | -| **TOTAL RPS** | **149** | +| **TOTAL RPS** | **150** | | **TOTAL PACKAGES** | **109** | -| **MANUAL** | **53** | -| **MANUAL %** | **48.62** | -| **AUTO** | **18** | -| **AUTO %** | **16.51** | -| **NONE** | **40** | -| **NONE %** | **36.70** | +| **MANUAL** | **50** | +| **MANUAL %** | **45.87** | +| **AUTO** | **22** | +| **AUTO %** | **20.18** | +| **NONE** | **39** | +| **NONE %** | **35.78** | "nn.nn" - coverage (%) of automatic test from swagger + "-" - no test coverage + "M" - manual only test coverage + "- (S)" - no package generated + "- (R)" - no Python readme settings, no package generated diff --git a/eng/tox/mypy_hard_failure_packages.py b/eng/tox/mypy_hard_failure_packages.py index a78a183d523d..4d9932a98916 100644 --- a/eng/tox/mypy_hard_failure_packages.py +++ b/eng/tox/mypy_hard_failure_packages.py @@ -8,5 +8,6 @@ MYPY_HARD_FAILURE_OPTED = [ "azure-core", "azure-eventhub", - "azure-ai-textanalytics" + "azure-ai-textanalytics", + "azure-ai-formrecognizer" ] diff --git a/scripts/pylint_custom_plugin/README.md b/scripts/pylint_custom_plugin/README.md index 7e2b912c62bf..adb1e0e4a694 100644 --- a/scripts/pylint_custom_plugin/README.md +++ b/scripts/pylint_custom_plugin/README.md @@ -56,5 +56,6 @@ In the case of a false positive, use the disable command to remove the pylint er | client-method-name-no-double-underscore | Don't use method names prefixed with "__". | # pylint:disable=client-method-name-no-double-underscore | [link](https://azure.github.io/azure-sdk/python_introduction.html#public-vs-private) | | specify-parameter-names-in-call | Specify the parameter names when calling methods with more than 2 required positional parameters. e.g. self.get_foo(one, two, three=three, four=four, five=five) | # pylint:disable=specify-parameter-names-in-call | [link](https://azure.github.io/azure-sdk/python_introduction.html#method-signatures) | | connection-string-should-not-be-constructor-param | Remove connection string parameter from client constructor. Create a method that creates the client using a connection string. | # pylint:disable=connection-string-should-not-be-constructor-param | [link](https://azure.github.io/azure-sdk/python_design.html#constructors-and-factory-methods) | -| package-name-incorrect | Change your distribution package name to only include dashes, e.g. azure-storage-file-share | # pylint:disable=package-name-incorrect | [link](https://azure.github.io/azure-sdk/python_implementation.html#packaging) | -| client-suffix-needed | Service client types should use a "Client" suffix, e.g. BlobClient. | # pylint:disable=client-suffix-needed | [link](https://azure.github.io/azure-sdk/python_design.html#clients) | \ No newline at end of file +| package-name-incorrect | Change your distribution package name to only include dashes, e.g. azure-storage-file-share | # pylint:disable=package-name-incorrect | [link](https://azure.github.io/azure-sdk/python_implementation.html#packaging) | +| client-suffix-needed | Service client types should use a "Client" suffix, e.g. BlobClient. | # pylint:disable=client-suffix-needed | [link](https://azure.github.io/azure-sdk/python_design.html#clients) | +| docstring-admonition-needs-newline | Add a blank newline above the .. literalinclude statement. | # pylint:disable=docstring-admonition-needs-newline | No guideline, just helps our docs get built correctly for microsoft docs. | \ No newline at end of file diff --git a/scripts/pylint_custom_plugin/pylint_guidelines_checker.py b/scripts/pylint_custom_plugin/pylint_guidelines_checker.py index 24e7b75064e5..cd1bd4920a7d 100644 --- a/scripts/pylint_custom_plugin/pylint_guidelines_checker.py +++ b/scripts/pylint_custom_plugin/pylint_guidelines_checker.py @@ -4,7 +4,7 @@ # ------------------------------------ """ -Pylint custom checkers for SDK guidelines: C4717 - C4738 +Pylint custom checkers for SDK guidelines: C4717 - C4744 """ import logging @@ -1621,6 +1621,91 @@ def close(self): ) +class CheckDocstringAdmonitionNewline(BaseChecker): + __implements__ = IAstroidChecker + + name = "check-admonition" + priority = -1 + msgs = { + "C4744": ( + "The .. literalinclude statement needs a blank line above it. ", + "docstring-admonition-needs-newline", + "Put a newline after the example and before the literalinclude.", + ), + } + options = ( + ( + "ignore-docstring-admonition-needs-newline", + { + "default": False, + "type": "yn", + "metavar": "", + "help": "Allow a docstring to not have newline after admonition example.", + }, + ), + ) + + def __init__(self, linter=None): + super(CheckDocstringAdmonitionNewline, self).__init__(linter) + + def check_for_admonition(self, node): + """Parse the docstring for an admonition statement. + If found, checks that the literalinclude statement has + two newlines above it. + + :param node: ast.ClassDef or ast.FunctionDef + :return: None + """ + + try: + # not every class/method will have a docstring so don't crash here, just return + if node.doc.find("admonition") != -1 and node.doc.find(".. literalinclude") != -1: + literal_include = node.doc.split(".. literalinclude")[0] + chars_list = list(reversed(literal_include)) + for idx, char in enumerate(chars_list): + if char == '\n': + if chars_list[idx+1] == '\n': + break + else: + self.add_message( + "docstring-admonition-needs-newline", node=node, confidence=None + ) + break + except Exception: + return + + def visit_classdef(self, node): + """Visits every class docstring. + + :param node: ast.ClassDef + :return: None + """ + try: + for func in node.body: + if isinstance(func, astroid.FunctionDef) and func.name == "__init__": + self.check_for_admonition(node) + except Exception: + logger.debug("Pylint custom checker failed to check docstrings.") + pass + + def visit_functiondef(self, node): + """Visits every method docstring. + + :param node: ast.FunctionDef + :return: None + """ + try: + if node.name == "__init__": + return + self.check_for_admonition(node) + except Exception: + logger.debug("Pylint custom checker failed to check docstrings.") + pass + + # this line makes it work for async functions + visit_asyncfunctiondef = visit_functiondef + + # if a linter is registered in this function then it will be checked with pylint def register(linter): linter.register_checker(ClientsDoNotUseStaticMethods(linter)) @@ -1637,6 +1722,7 @@ def register(linter): linter.register_checker(ClientConstructorDoesNotHaveConnectionStringParam(linter)) linter.register_checker(PackageNameDoesNotUseUnderscoreOrPeriod(linter)) linter.register_checker(ServiceClientUsesNameWithClientSuffix(linter)) + linter.register_checker(CheckDocstringAdmonitionNewline(linter)) # disabled by default, use pylint --enable=check-docstrings if you want to use it linter.register_checker(CheckDocstringParameters(linter)) @@ -1649,5 +1735,3 @@ def register(linter): # linter.register_checker(ClientListMethodsUseCorePaging(linter)) # linter.register_checker(ClientLROMethodsUseCorePolling(linter)) # linter.register_checker(ClientLROMethodsUseCorrectNaming(linter)) - - diff --git a/scripts/pylint_custom_plugin/tests/test_pylint_custom_plugins.py b/scripts/pylint_custom_plugin/tests/test_pylint_custom_plugins.py index d866a1309c90..ef54894d996d 100644 --- a/scripts/pylint_custom_plugin/tests/test_pylint_custom_plugins.py +++ b/scripts/pylint_custom_plugin/tests/test_pylint_custom_plugins.py @@ -2340,4 +2340,232 @@ def test_guidelines_link_active(self): client = PipelineClient(url, config=config) request = client.get(url) response = client._pipeline.run(request) - assert response.http_response.status_code == 200 \ No newline at end of file + assert response.http_response.status_code == 200 + + +class TestCheckDocstringAdmonitionNewline(pylint.testutils.CheckerTestCase): + CHECKER_CLASS = checker.CheckDocstringAdmonitionNewline + + def test_ignores_correct_admonition_statement_in_function(self): + function_node = astroid.extract_node( + """ + def function_foo(x, y, z): + '''docstring + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_detect_language.py + ''' + """ + ) + + with self.assertNoMessages(): + self.checker.visit_functiondef(function_node) + + def test_ignores_correct_admonition_statement_in_function_with_comments(self): + function_node = astroid.extract_node( + """ + def function_foo(x, y, z): + '''docstring + .. admonition:: Example: + This is Example content. + Should support multi-line. + Can also include file: + + .. literalinclude:: ../samples/sample_detect_language.py + ''' + """ + ) + + with self.assertNoMessages(): + self.checker.visit_functiondef(function_node) + + def test_bad_admonition_statement_in_function(self): + function_node = astroid.extract_node( + """ + def function_foo(x, y, z): + '''docstring + .. admonition:: Example: + .. literalinclude:: ../samples/sample_detect_language.py + ''' + """ + ) + + with self.assertAddsMessages( + pylint.testutils.Message( + msg_id="docstring-admonition-needs-newline", node=function_node + ) + ): + self.checker.visit_functiondef(function_node) + + def test_bad_admonition_statement_in_function_with_comments(self): + function_node = astroid.extract_node( + """ + def function_foo(x, y, z): + '''docstring + .. admonition:: Example: + This is Example content. + Should support multi-line. + Can also include file: + .. literalinclude:: ../samples/sample_detect_language.py + ''' + """ + ) + + with self.assertAddsMessages( + pylint.testutils.Message( + msg_id="docstring-admonition-needs-newline", node=function_node + ) + ): + self.checker.visit_functiondef(function_node) + + def test_ignores_correct_admonition_statement_in_function_async(self): + function_node = astroid.extract_node( + """ + async def function_foo(x, y, z): + '''docstring + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_detect_language.py + ''' + """ + ) + + with self.assertNoMessages(): + self.checker.visit_asyncfunctiondef(function_node) + + def test_ignores_correct_admonition_statement_in_function_with_comments_async(self): + function_node = astroid.extract_node( + """ + async def function_foo(x, y, z): + '''docstring + .. admonition:: Example: + This is Example content. + Should support multi-line. + Can also include file: + + .. literalinclude:: ../samples/sample_detect_language.py + ''' + """ + ) + + with self.assertNoMessages(): + self.checker.visit_asyncfunctiondef(function_node) + + def test_bad_admonition_statement_in_function_async(self): + function_node = astroid.extract_node( + """ + async def function_foo(x, y, z): + '''docstring + .. admonition:: Example: + .. literalinclude:: ../samples/sample_detect_language.py + ''' + """ + ) + + with self.assertAddsMessages( + pylint.testutils.Message( + msg_id="docstring-admonition-needs-newline", node=function_node + ) + ): + self.checker.visit_asyncfunctiondef(function_node) + + def test_bad_admonition_statement_in_function_with_comments_async(self): + function_node = astroid.extract_node( + """ + async def function_foo(x, y, z): + '''docstring + .. admonition:: Example: + This is Example content. + Should support multi-line. + Can also include file: + .. literalinclude:: ../samples/sample_detect_language.py + ''' + """ + ) + + with self.assertAddsMessages( + pylint.testutils.Message( + msg_id="docstring-admonition-needs-newline", node=function_node + ) + ): + self.checker.visit_asyncfunctiondef(function_node) + + def test_ignores_correct_admonition_statement_in_class(self): + class_node = astroid.extract_node( + """ + class SomeClient(object): + '''docstring + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_detect_language.py + ''' + def __init__(self): + pass + """ + ) + + with self.assertNoMessages(): + self.checker.visit_classdef(class_node) + + def test_ignores_correct_admonition_statement_in_class_with_comments(self): + class_node = astroid.extract_node( + """ + class SomeClient(object): + '''docstring + .. admonition:: Example: + This is Example content. + Should support multi-line. + Can also include file: + + .. literalinclude:: ../samples/sample_detect_language.py + ''' + def __init__(self): + pass + """ + ) + + with self.assertNoMessages(): + self.checker.visit_classdef(class_node) + + def test_bad_admonition_statement_in_class(self): + class_node = astroid.extract_node( + """ + class SomeClient(object): + '''docstring + .. admonition:: Example: + .. literalinclude:: ../samples/sample_detect_language.py + ''' + def __init__(self): + pass + """ + ) + + with self.assertAddsMessages( + pylint.testutils.Message( + msg_id="docstring-admonition-needs-newline", node=class_node + ) + ): + self.checker.visit_classdef(class_node) + + def test_bad_admonition_statement_in_class_with_comments(self): + class_node = astroid.extract_node( + """ + class SomeClient(object): + '''docstring + .. admonition:: Example: + This is Example content. + Should support multi-line. + Can also include file: + .. literalinclude:: ../samples/sample_detect_language.py + ''' + def __init__(self): + pass + """ + ) + + with self.assertAddsMessages( + pylint.testutils.Message( + msg_id="docstring-admonition-needs-newline", node=class_node + ) + ): + self.checker.visit_classdef(class_node) \ No newline at end of file diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/README.md b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/README.md index 8c554228f5c6..5724be969c5c 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/README.md +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/README.md @@ -1,29 +1,21 @@ -## Microsoft Azure SDK for Python +# Microsoft Azure SDK for Python This is the Microsoft Azure Alerts Management Client Library. +This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. +For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/) -Azure Resource Manager (ARM) is the next generation of management APIs -that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. +# Usage -For the older Azure Service Management (ASM) libraries, see -[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy) -library. +For code examples, see [Alerts Management](https://docs.microsoft.com/python/api/overview/azure/) +on docs.microsoft.com. -For a more complete set of Azure libraries, see the -[azure](https://pypi.python.org/pypi/azure) bundle package. -## Usage +# Provide Feedback -For code examples, see [Alerts -Management](https://docs.microsoft.com/python/api/overview/azure/) on -docs.microsoft.com. - -## 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) +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-alertsmanagement%2FREADME.png) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-alertsmanagement%2FREADME.png) diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py index 39c723ae63b7..014f250f6e3f 100644 --- a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/setup.py @@ -67,6 +67,7 @@ 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'License :: OSI Approved :: MIT License', ], zip_safe=False, diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/tests/recordings/test_cli_mgmt_alertsmanagement.test_alertsmanagement.yaml b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/tests/recordings/test_cli_mgmt_alertsmanagement.test_alertsmanagement.yaml new file mode 100644 index 000000000000..2ae89831dfeb --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/tests/recordings/test_cli_mgmt_alertsmanagement.test_alertsmanagement.yaml @@ -0,0 +1,217 @@ +interactions: +- request: + body: 'b''b\''{"location": "Global", "properties": {"scope": {"scopeType": "ResourceGroup", + "values": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_alertsmanagement_test_alertsmanagement37c21568"]}, + "conditions": {"severity": {"operator": "Equals", "values": ["Sev0", "Sev2"]}, + "monitorService": {"operator": "Equals", "values": ["Platform", "Application + Insights"]}, "monitorCondition": {"operator": "Equals", "values": ["Fired"]}, + "targetResourceType": {"operator": "NotEquals", "values": ["Microsoft.Compute/VirtualMachines"]}}, + "description": "Action rule on resource group for daily suppression", "status": + "Enabled", "type": "Suppression", "suppressionConfig": {"recurrenceType": "Daily", + "schedule": {"startDate": "12/09/2018", "endDate": "12/18/2018", "startTime": + "06:00:00", "endTime": "14:00:00"}}}}\''''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '833' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-alertsmanagement/0.2.0rc2 Azure-SDK-For-Python + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_alertsmanagement_test_alertsmanagement37c21568/providers/Microsoft.AlertsManagement/actionRules/myActionRule?api-version=2019-05-05-preview + response: + body: + string: '{"properties":{"conditions":{"severity":{"operator":"Equals","values":["Sev0","Sev2"]},"monitorService":{"operator":"Equals","values":["Platform","Application + Insights"]},"monitorCondition":{"operator":"Equals","values":["Fired"]},"targetResourceType":{"operator":"NotEquals","values":["Microsoft.Compute/VirtualMachines"]}},"status":"Enabled","type":"Suppression","scope":{"scopeType":"ResourceGroup","values":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_alertsmanagement_test_alertsmanagement37c21568"]},"suppressionConfig":{"recurrenceType":"Daily","schedule":{"startDate":"12/09/2018","endDate":"12/18/2018","startTime":"06:00:00","endTime":"14:00:00"}},"description":"Action + rule on resource group for daily suppression","createdAt":"2020-04-19T10:14:03.4377945Z","createdBy":"User","lastModifiedAt":"2020-04-19T10:14:03.4377945Z","lastModifiedBy":"User"},"location":"Global","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_alertsmanagement_test_alertsmanagement37c21568/providers/Microsoft.AlertsManagement/actionRules/myActionRule","type":"Microsoft.AlertsManagement/actionRules","name":"myActionRule"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1186' + content-security-policy: + - script-src 'self' + content-type: + - application/json; charset=utf-8 + date: + - Sun, 19 Apr 2020 10:14:03 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-alertsmanagement/0.2.0rc2 Azure-SDK-For-Python + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_alertsmanagement_test_alertsmanagement37c21568/providers/Microsoft.AlertsManagement/actionRules/myActionRule?api-version=2019-05-05-preview + response: + body: + string: '{"properties":{"conditions":{"severity":{"operator":"Equals","values":["Sev0","Sev2"]},"monitorService":{"operator":"Equals","values":["Platform","Application + Insights"]},"monitorCondition":{"operator":"Equals","values":["Fired"]},"targetResourceType":{"operator":"NotEquals","values":["Microsoft.Compute/VirtualMachines"]}},"status":"Enabled","type":"Suppression","scope":{"scopeType":"ResourceGroup","values":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_alertsmanagement_test_alertsmanagement37c21568"]},"suppressionConfig":{"recurrenceType":"Daily","schedule":{"startDate":"12/09/2018","endDate":"12/18/2018","startTime":"06:00:00","endTime":"14:00:00"}},"description":"Action + rule on resource group for daily suppression","createdAt":"2020-04-19T10:14:03.4377945Z","createdBy":"User","lastModifiedAt":"2020-04-19T10:14:03.4377945Z","lastModifiedBy":"User"},"location":"Global","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_alertsmanagement_test_alertsmanagement37c21568/providers/Microsoft.AlertsManagement/actionRules/myActionRule","type":"Microsoft.AlertsManagement/actionRules","name":"myActionRule"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '1186' + content-security-policy: + - script-src 'self' + content-type: + - application/json; charset=utf-8 + date: + - Sun, 19 Apr 2020 10:14:04 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '999' + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-alertsmanagement/0.2.0rc2 Azure-SDK-For-Python + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AlertsManagement/alertsSummary?groupby=severity%2CalertState&api-version=2019-05-05-preview + response: + body: + string: '{"properties":{"groupedby":"severity","total":0,"values":[{"name":"Sev0","count":0,"groupedby":"alertState","values":[{"name":"New","count":0},{"name":"Acknowledged","count":0},{"name":"Closed","count":0}]},{"name":"Sev1","count":0,"groupedby":"alertState","values":[{"name":"New","count":0},{"name":"Acknowledged","count":0},{"name":"Closed","count":0}]},{"name":"Sev2","count":0,"groupedby":"alertState","values":[{"name":"New","count":0},{"name":"Acknowledged","count":0},{"name":"Closed","count":0}]},{"name":"Sev3","count":0,"groupedby":"alertState","values":[{"name":"New","count":0},{"name":"Acknowledged","count":0},{"name":"Closed","count":0}]},{"name":"Sev4","count":0,"groupedby":"alertState","values":[{"name":"New","count":0},{"name":"Acknowledged","count":0},{"name":"Closed","count":0}]}]},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AlertsManagement/alertsSummary/current","type":"Microsoft.AlertsManagement/alertsSummary","name":"current"}' + headers: + cache-control: + - no-store, no-cache + content-length: + - '990' + content-security-policy: + - script-src 'self' + content-type: + - application/json; charset=utf-8 + date: + - Sun, 19 Apr 2020 10:14:04 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '999' + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-alertsmanagement/0.2.0rc2 Azure-SDK-For-Python + accept-language: + - en-US + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_alertsmanagement_test_alertsmanagement37c21568/providers/Microsoft.AlertsManagement/actionRules/myActionRule?api-version=2019-05-05-preview + response: + body: + string: 'true' + headers: + cache-control: + - no-store, no-cache + content-length: + - '4' + content-security-policy: + - script-src 'self' + content-type: + - application/json; charset=utf-8 + date: + - Sun, 19 Apr 2020 10:14:07 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/alertsmanagement/azure-mgmt-alertsmanagement/tests/test_cli_mgmt_alertsmanagement.py b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/tests/test_cli_mgmt_alertsmanagement.py new file mode 100644 index 000000000000..572c559e2b17 --- /dev/null +++ b/sdk/alertsmanagement/azure-mgmt-alertsmanagement/tests/test_cli_mgmt_alertsmanagement.py @@ -0,0 +1,203 @@ +# coding: utf-8 + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + + +# TEST SCENARIO COVERAGE +# ---------------------- +# Methods Total : 23 +# Methods Covered : 22 +# Examples Total : 22 +# Examples Tested : 21 +# Coverage % : 91 +# ---------------------- + +import unittest + +import azure.mgmt.alertsmanagement +from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer + +AZURE_LOCATION = 'eastus' + +class MgmtAlertsTest(AzureMgmtTestCase): + + def setUp(self): + super(MgmtAlertsTest, self).setUp() + self.mgmt_client = self.create_mgmt_client( + azure.mgmt.alertsmanagement.AlertsManagementClient + ) + + @ResourceGroupPreparer(location=AZURE_LOCATION) + def test_alertsmanagement(self, resource_group): + + SUBSCRIPTION_ID = self.settings.SUBSCRIPTION_ID + RESOURCE_GROUP = resource_group.name + ALERT_ID = "myAlertId" + SMART_GROUP_ID = "mySmartGroupId" + ACTION_RULE_NAME = "myActionRule" + ALERT_RULE_NAME = "myAlertRule" + + # /ActionRules/put/PutActionRule[put] + BODY = { + "location": "Global", + "properties": { + "scope": { + "scope_type": "ResourceGroup", + "values": [ + "/subscriptions/" + SUBSCRIPTION_ID + "/resourceGroups/" + RESOURCE_GROUP + ] + }, + "conditions": { + "severity": { + "operator": "Equals", + "values": [ + "Sev0", + "Sev2" + ] + }, + "monitor_service": { + "operator": "Equals", + "values": [ + "Platform", + "Application Insights" + ] + }, + "monitor_condition": { + "operator": "Equals", + "values": [ + "Fired" + ] + }, + "target_resource_type": { + "operator": "NotEquals", + "values": [ + "Microsoft.Compute/VirtualMachines" + ] + } + }, + "type": "Suppression", + "suppression_config": { + "recurrence_type": "Daily", + "schedule": { + "start_date": "12/09/2018", + "end_date": "12/18/2018", + "start_time": "06:00:00", + "end_time": "14:00:00" + } + }, + "description": "Action rule on resource group for daily suppression", + "status": "Enabled" + } + } + result = self.mgmt_client.action_rules.create_update(resource_group_name=RESOURCE_GROUP, action_rule_name=ACTION_RULE_NAME, action_rule=BODY) + + # /SmartDetectorAlertRules/put/Create or update a Smart Detector alert rule[put] + BODY = { + "description": "Sample smart detector alert rule description", + "state": "Enabled", + "severity": "Sev3", + "frequency": "PT5M", + "detector": { + "id": "VMMemoryLeak" + }, + "scope": [ + "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyVms/providers/Microsoft.Compute/virtualMachines/vm1" + ], + "action_groups": { + "custom_email_subject": "My custom email subject", + "custom_webhook_payload": "{\"AlertRuleName\":\"#alertrulename\"}", + "group_ids": [ + "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourcegroups/actionGroups/providers/microsoft.insights/actiongroups/MyActionGroup" + ] + }, + "throttling": { + "duration": "PT20M" + } + } + # result = self.mgmt_client.smart_detector_alert_rules.create_or_update(resource_group_name=RESOURCE_GROUP, alert_rule_name=ALERT_RULE_NAME, parameters=BODY) + + # /SmartDetectorAlertRules/get/Get a Smart Detector alert rule[get] + # result = self.mgmt_client.smart_detector_alert_rules.get(resource_group_name=RESOURCE_GROUP, alert_rule_name=ALERT_RULE_NAME) + + # /ActionRules/get/GetActionRuleById[get] + result = self.mgmt_client.action_rules.get_by_name(resource_group_name=RESOURCE_GROUP, action_rule_name=ACTION_RULE_NAME) + + # /SmartDetectorAlertRules/get/List alert rules[get] + result = self.mgmt_client.smart_detector_alert_rules.list_by_resource_group(resource_group_name=RESOURCE_GROUP) + + # /ActionRules/get/GetActionRulesResourceGroupWide[get] + result = self.mgmt_client.action_rules.list_by_resource_group(resource_group_name=RESOURCE_GROUP) + + # /SmartGroups/get/Resolve[get] + # result = self.mgmt_client.smart_groups.get_history(smart_group_id=SMART_GROUP_ID) + + # /SmartGroups/get/Get[get] + # result = self.mgmt_client.smart_groups.get_by_id(smart_group_id=SMART_GROUP_ID) + + # /SmartDetectorAlertRules/get/List Smart Detector alert rules[get] + result = self.mgmt_client.smart_detector_alert_rules.list() + + # /Alerts/get/GetById[get] + # result = self.mgmt_client.alerts.get_by_id(alert_id=ALERT_ID) + + # /Alerts/get/Summary[get] + result = self.mgmt_client.alerts.get_summary(groupby="severity,alertState") + + # /SmartGroups/get/List[get] + result = self.mgmt_client.smart_groups.get_all() + + # /ActionRules/get/GetActionRulesSubscriptionWide[get] + result = self.mgmt_client.action_rules.list_by_subscription() + + # /Alerts/get/ListAlerts[get] + result = self.mgmt_client.alerts.get_all() + + # /Alerts/get/MonService[get] + # result = self.mgmt_client.alerts.meta_data(identifier="MonitorServiceList") + + # /SmartDetectorAlertRules/patch/Patch alert rules[patch] + BODY = { + "tags": { + "new_key": "newVal" + }, + "description": "New description for patching", + "frequency": "PT1M" + } + # result = self.mgmt_client.smart_detector_alert_rules.patch(resource_group_name=RESOURCE_GROUP, alert_rule_name=ALERT_RULE_NAME, parameters=BODY) + + # /ActionRules/patch/PatchActionRule[patch] + BODY = { + "tags": { + "key1": "value1", + "key2": "value2" + }, + "status": "Disabled" + } + # result = self.mgmt_client.action_rules.update(resource_group_name=RESOURCE_GROUP, action_rule_name=ACTION_RULE_NAME, action_rule_patch=BODY) + + # /SmartGroups/post/changestate[post] + BODY = { + "comments": "Acknowledging smart group" + } + # result = self.mgmt_client.smart_groups.change_state(smart_group_id=SMART_GROUP_ID, body=BODY, new_state="Acknowledged") + + # /Alerts/post/Resolve[post] + BODY = { + "comments": "Acknowledging alert" + } + # result = self.mgmt_client.alerts.change_state(alert_id=ALERT_ID, body=BODY, new_state="Acknowledged") + + # /SmartDetectorAlertRules/delete/Delete a Smart Detector alert rule[delete] + # result = self.mgmt_client.smart_detector_alert_rules.delete(resource_group_name=RESOURCE_GROUP, alert_rule_name=ALERT_RULE_NAME) + + # /ActionRules/delete/DeleteActionRule[delete] + result = self.mgmt_client.action_rules.delete(resource_group_name=RESOURCE_GROUP, action_rule_name=ACTION_RULE_NAME) + + +#------------------------------------------------------------------------------ +if __name__ == '__main__': + unittest.main() diff --git a/sdk/appservice/azure-mgmt-web/tests/recordings/test_cli_mgmt_web.test_web.yaml b/sdk/appservice/azure-mgmt-web/tests/recordings/test_cli_mgmt_web.test_web.yaml new file mode 100644 index 000000000000..5ef3ab7e5b66 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/recordings/test_cli_mgmt_web.test_web.yaml @@ -0,0 +1,158 @@ +interactions: +- request: + body: '{"kind": "app", "location": "westus2", "sku": {"name": "P1", "tier": "Premium", + "size": "P1", "family": "P", "capacity": 1}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '124' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-web/0.42.0 Azure-SDK-For-Python + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_web_test_web90230a94/providers/Microsoft.Web/serverfarms/myappxyza?api-version=2018-02-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_web_test_web90230a94/providers/Microsoft.Web/serverfarms/myappxyza","name":"myappxyza","type":"Microsoft.Web/serverfarms","kind":"app","location":"West + US 2","properties":{"serverFarmId":9497,"name":"myappxyza","workerSize":"Default","workerSizeId":0,"workerTierName":null,"numberOfWorkers":1,"currentWorkerSize":"Default","currentWorkerSizeId":0,"currentNumberOfWorkers":1,"status":"Ready","webSpace":"test_cli_mgmt_web_test_web90230a94-WestUS2webspace","subscription":"00000000-0000-0000-0000-000000000000","adminSiteName":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"maximumNumberOfWorkers":20,"planName":"VirtualDedicatedPlan","adminRuntimeSiteName":null,"computeMode":"Dedicated","siteMode":null,"geoRegion":"West + US 2","perSiteScaling":false,"maximumElasticWorkerCount":1,"numberOfSites":0,"hostingEnvironmentId":null,"isSpot":false,"spotExpirationTime":null,"freeOfferExpirationTime":null,"tags":null,"kind":"app","resourceGroup":"test_cli_mgmt_web_test_web90230a94","reserved":false,"isXenon":false,"hyperV":false,"mdmId":"waws-prod-mwh-045_9497","targetWorkerCount":0,"targetWorkerSizeId":0,"provisioningState":"Succeeded","webSiteId":null,"existingServerFarmIds":null},"sku":{"name":"P1","tier":"Premium","size":"P1","family":"P","capacity":1}}' + headers: + cache-control: + - no-cache + content-length: + - '1362' + content-type: + - application/json + date: + - Sun, 19 Apr 2020 07:49:52 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-web/0.42.0 Azure-SDK-For-Python + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_web_test_web90230a94/providers/Microsoft.Web/serverfarms/myappxyza?api-version=2018-02-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_web_test_web90230a94/providers/Microsoft.Web/serverfarms/myappxyza","name":"myappxyza","type":"Microsoft.Web/serverfarms","kind":"app","location":"West + US 2","properties":{"serverFarmId":9497,"name":"myappxyza","workerSize":"Default","workerSizeId":0,"workerTierName":null,"numberOfWorkers":1,"currentWorkerSize":"Default","currentWorkerSizeId":0,"currentNumberOfWorkers":1,"status":"Ready","webSpace":"test_cli_mgmt_web_test_web90230a94-WestUS2webspace","subscription":"00000000-0000-0000-0000-000000000000","adminSiteName":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"maximumNumberOfWorkers":20,"planName":"VirtualDedicatedPlan","adminRuntimeSiteName":null,"computeMode":"Dedicated","siteMode":null,"geoRegion":"West + US 2","perSiteScaling":false,"maximumElasticWorkerCount":1,"numberOfSites":0,"hostingEnvironmentId":null,"isSpot":false,"spotExpirationTime":null,"freeOfferExpirationTime":null,"tags":null,"kind":"app","resourceGroup":"test_cli_mgmt_web_test_web90230a94","reserved":false,"isXenon":false,"hyperV":false,"mdmId":"waws-prod-mwh-045_9497","targetWorkerCount":0,"targetWorkerSizeId":0,"provisioningState":"Succeeded","webSiteId":null,"existingServerFarmIds":null},"sku":{"name":"P1","tier":"Premium","size":"P1","family":"P","capacity":1}}' + headers: + cache-control: + - no-cache + content-length: + - '1362' + content-type: + - application/json + date: + - Sun, 19 Apr 2020 07:49:55 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-web/0.42.0 Azure-SDK-For-Python + accept-language: + - en-US + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_web_test_web90230a94/providers/Microsoft.Web/serverfarms/myappxyza?api-version=2018-02-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Sun, 19 Apr 2020 07:50:00 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/appservice/azure-mgmt-web/tests/recordings/test_mgmt_appservice.test_appservice.yaml b/sdk/appservice/azure-mgmt-web/tests/recordings/test_mgmt_appservice.test_appservice.yaml deleted file mode 100644 index 02640b73bc1b..000000000000 --- a/sdk/appservice/azure-mgmt-web/tests/recordings/test_mgmt_appservice.test_appservice.yaml +++ /dev/null @@ -1,101 +0,0 @@ -interactions: -- request: - body: '{"kind": "app", "location": "East US", "sku": {"name": "P1", "tier": "Premium", - "size": "P1", "family": "P", "capacity": 1}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '124' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.8 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-web/0.43.1 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_appservice_test_appservice14d70ee5/providers/Microsoft.Web/serverfarms/myapimrndxyz?api-version=2019-08-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_appservice_test_appservice14d70ee5/providers/Microsoft.Web/serverfarms/myapimrndxyz","name":"myapimrndxyz","type":"Microsoft.Web/serverfarms","kind":"app","location":"East - US","properties":{"serverFarmId":6270,"name":"myapimrndxyz","workerSize":"Default","workerSizeId":0,"workerTierName":null,"numberOfWorkers":1,"currentWorkerSize":"Default","currentWorkerSizeId":0,"currentNumberOfWorkers":1,"status":"Ready","webSpace":"test_mgmt_appservice_test_appservice14d70ee5-EastUSwebspace","subscription":"00000000-0000-0000-0000-000000000000","adminSiteName":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"maximumNumberOfWorkers":20,"planName":"VirtualDedicatedPlan","adminRuntimeSiteName":null,"computeMode":"Dedicated","siteMode":null,"geoRegion":"East - US","perSiteScaling":false,"maximumElasticWorkerCount":1,"numberOfSites":0,"hostingEnvironmentId":null,"isSpot":false,"spotExpirationTime":null,"freeOfferExpirationTime":null,"tags":null,"kind":"app","resourceGroup":"test_mgmt_appservice_test_appservice14d70ee5","reserved":false,"isXenon":false,"hyperV":false,"mdmId":"waws-prod-blu-157_6270","targetWorkerCount":0,"targetWorkerSizeId":0,"provisioningState":"Succeeded","webSiteId":null,"existingServerFarmIds":null},"sku":{"name":"P1","tier":"Premium","size":"P1","family":"P","capacity":1}}' - headers: - cache-control: - - no-cache - content-length: - - '1396' - content-type: - - application/json - date: - - Fri, 08 Nov 2019 10:00:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.8 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-web/0.43.1 Azure-SDK-For-Python - accept-language: - - en-US - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/skus?api-version=2019-08-01 - response: - body: - string: '{"value":[]}' - headers: - cache-control: - - no-cache - content-length: - - '12' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 08 Nov 2019 10:00:59 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/appservice/azure-mgmt-web/tests/recordings/test_mgmt_appservice.test_web.yaml b/sdk/appservice/azure-mgmt-web/tests/recordings/test_mgmt_appservice.test_web.yaml deleted file mode 100644 index 7d371bb42987..000000000000 --- a/sdk/appservice/azure-mgmt-web/tests/recordings/test_mgmt_appservice.test_web.yaml +++ /dev/null @@ -1,60 +0,0 @@ -interactions: -- request: - body: '{"kind": "app", "location": "East US", "sku": {"name": "P1", "tier": "Premium", - "size": "P1", "family": "P", "capacity": 1}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '124' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.8 (Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.8 - msrest_azure/0.4.34 azure-mgmt-web/0.43.1 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_appservice_test_webb53f0bf1/providers/Microsoft.Web/serverfarms/myapimrndxyz?api-version=2018-02-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_appservice_test_webb53f0bf1/providers/Microsoft.Web/serverfarms/myapimrndxyz","name":"myapimrndxyz","type":"Microsoft.Web/serverfarms","kind":"app","location":"East - US","properties":{"serverFarmId":34778,"name":"myapimrndxyz","workerSize":"Default","workerSizeId":0,"workerTierName":null,"numberOfWorkers":1,"currentWorkerSize":"Default","currentWorkerSizeId":0,"currentNumberOfWorkers":1,"status":"Ready","webSpace":"test_mgmt_appservice_test_webb53f0bf1-EastUSwebspace","subscription":"00000000-0000-0000-0000-000000000000","adminSiteName":null,"hostingEnvironment":null,"hostingEnvironmentProfile":null,"maximumNumberOfWorkers":20,"planName":"VirtualDedicatedPlan","adminRuntimeSiteName":null,"computeMode":"Dedicated","siteMode":null,"geoRegion":"East - US","perSiteScaling":false,"maximumElasticWorkerCount":1,"numberOfSites":0,"hostingEnvironmentId":null,"isSpot":false,"spotExpirationTime":null,"freeOfferExpirationTime":null,"tags":null,"kind":"app","resourceGroup":"test_mgmt_appservice_test_webb53f0bf1","reserved":false,"isXenon":false,"hyperV":false,"mdmId":"waws-prod-blu-115_34778","targetWorkerCount":0,"targetWorkerSizeId":0,"provisioningState":"Succeeded","webSiteId":null,"existingServerFarmIds":null},"sku":{"name":"P1","tier":"Premium","size":"P1","family":"P","capacity":1}}' - headers: - cache-control: - - no-cache - content-length: - - '1377' - content-type: - - application/json - date: - - Wed, 23 Oct 2019 00:13:04 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/appservice/azure-mgmt-web/tests/test_cli_mgmt_web.py b/sdk/appservice/azure-mgmt-web/tests/test_cli_mgmt_web.py new file mode 100644 index 000000000000..e899d9eb2219 --- /dev/null +++ b/sdk/appservice/azure-mgmt-web/tests/test_cli_mgmt_web.py @@ -0,0 +1,508 @@ +# coding: utf-8 + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + + +# TEST SCENARIO COVERAGE +# ---------------------- +# Methods Total : 567 +# Methods Covered : 106 +# Examples Total : 126 +# Examples Tested : 7 +# Coverage % : 1 +# ---------------------- + +import unittest + +import azure.mgmt.web +from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer + +AZURE_LOCATION = 'eastus' + +class MgmtWebSiteTest(AzureMgmtTestCase): + + def setUp(self): + super(MgmtWebSiteTest, self).setUp() + self.mgmt_client = self.create_mgmt_client( + azure.mgmt.web.WebSiteManagementClient + ) + + @ResourceGroupPreparer(location=AZURE_LOCATION) + def test_web(self, resource_group): + + SUBSCRIPTION_ID = self.settings.SUBSCRIPTION_ID + RESOURCE_GROUP = resource_group.name + DOMAIN_NAME = "myDomain" + NAME = "myappxyza" + LOCATION = "myLocation" + DELETED_SITE_ID = "myDeletedSiteId" + DETECTOR_NAME = "myDetector" + SITE_NAME = "mySite" + DIAGNOSTIC_CATEGORY = "myDiagnosticCategory" + ANALYSIS_NAME = "myAnalysis" + SLOT = "mySlot" + APP_SETTING_KEY = "myAppSettingKey" + INSTANCE_ID = "myInstanceId" + OPERATION_ID = "myOperationId" + PRIVATE_ENDPOINT_CONNECTION_NAME = "myPrivateEndpointConnection" + AUTHPROVIDER = "myAuthprovider" + USERID = "myUserid" + PR_ID = "myPrId" + + # /StaticSites/put/Create or update a static site[put] + BODY = { + "location": "West US 2", + "sku": { + "name": "Basic", + "tier": "Basic" + }, + "repository_url": "https://github.com/username/RepoName", + "branch": "master", + "repository_token": "repoToken123", + "build_properties": { + "app_location": "app", + "api_location": "api", + "app_artifact_location": "build" + } + } + # result = self.mgmt_client.static_sites.create_or_update_static_site(resource_group_name=RESOURCE_GROUP, name=NAME, static_site_envelope=BODY) + + # /AppServicePlans/put/Create Or Update App Service plan[put] + BODY = { + "kind": "app", + "location": "westus2", + "sku": { + "name": "P1", + "tier": "Premium", + "size": "P1", + "family": "P", + "capacity": "1" + } + } + result = self.mgmt_client.app_service_plans.create_or_update(resource_group_name=RESOURCE_GROUP, name=NAME, app_service_plan=BODY) + result = result.result() + + # /Certificates/put/Create Or Update Certificate[put] + BODY = { + "location": "East US", + "host_names": [ + "ServerCert" + ], + "password": "SWsSsd__233$Sdsds#%Sd!" + } + # result = self.mgmt_client.certificates.create_or_update(resource_group_name=RESOURCE_GROUP, name=NAME, certificate_envelope=BODY) + + # /StaticSites/put/Creates or updates the function app settings of a static site.[put] + # result = self.mgmt_client.static_sites.create_or_update_static_site_function_app_settings(resource_group_name=RESOURCE_GROUP, name=NAME, setting1="someval", setting2="someval2") + + # /StaticSites/put/Create or update a custom domain for a static site[put] + # result = self.mgmt_client.static_sites.create_or_update_static_site_custom_domain(resource_group_name=RESOURCE_GROUP, name=NAME, domain_name=DOMAIN_NAME) + + # /StaticSites/put/Creates or updates the function app settings of a static site build.[put] + # result = self.mgmt_client.static_sites.create_or_update_static_site_build_function_app_settings(resource_group_name=RESOURCE_GROUP, name=NAME, pr_id=PR_ID, setting1="someval", setting2="someval2") + + # /WebApps/put/Approves or rejects a private endpoint connection for a site.[put] + PRIVATE_LINK_SERVICE_CONNECTION_STATE = { + "status": "Approved", + "description": "Approved by admin.", + "actions_required": "" + } + # result = self.mgmt_client.web_apps.approve_or_reject_private_endpoint_connection(resource_group_name=RESOURCE_GROUP, name=NAME, private_endpoint_connection_name=PRIVATE_ENDPOINT_CONNECTION_NAME, private_link_service_connection_state= PRIVATE_LINK_SERVICE_CONNECTION_STATE) + # result = result.result() + + # /Diagnostics/get/Get App Detector[get] + # result = self.mgmt_client.diagnostics.get_site_detector(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, detector_name=DETECTOR_NAME) + + # /Diagnostics/get/Get App Slot Detector[get] + # result = self.mgmt_client.diagnostics.get_site_detector(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, detector_name=DETECTOR_NAME) + + # /Diagnostics/get/Get App Analysis[get] + # result = self.mgmt_client.diagnostics.get_site_analysis(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, analysis_name=ANALYSIS_NAME) + + # /Diagnostics/get/Get App Slot Analysis[get] + # result = self.mgmt_client.diagnostics.get_site_analysis(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, analysis_name=ANALYSIS_NAME) + + # /WebApps/get/Get the current status of a network trace operation for a site[get] + # result = self.mgmt_client.web_apps.get_network_trace_operation(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /Diagnostics/get/Get App Slot Detector[get] + # result = self.mgmt_client.diagnostics.get_site_detector(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, detector_name=DETECTOR_NAME) + + # /Diagnostics/get/Get App Detector[get] + # result = self.mgmt_client.diagnostics.get_site_detector(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, detector_name=DETECTOR_NAME) + + # /Diagnostics/get/Get App Analysis[get] + # result = self.mgmt_client.diagnostics.get_site_analysis(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, analysis_name=ANALYSIS_NAME) + + # /Diagnostics/get/Get App Slot Analysis[get] + # result = self.mgmt_client.diagnostics.get_site_analysis(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, analysis_name=ANALYSIS_NAME) + + # /Diagnostics/get/List App Slot Detectors[get] + # result = self.mgmt_client.diagnostics.list_site_detectors(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY) + + # /Diagnostics/get/List App Detectors[get] + # result = self.mgmt_client.diagnostics.list_site_detectors(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY) + + # /Diagnostics/get/List App Slot Analyses[get] + # result = self.mgmt_client.diagnostics.list_site_analyses(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY) + + # /Diagnostics/get/List App Analyses[get] + # result = self.mgmt_client.diagnostics.list_site_analyses(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY) + + # /WebApps/get/Get a private endpoint connection for a site.[get] + # result = self.mgmt_client.web_apps.get_private_endpoint_connection(resource_group_name=RESOURCE_GROUP, name=NAME, private_endpoint_connection_name=PRIVATE_ENDPOINT_CONNECTION_NAME) + + # /WebApps/get/Get the current status of a network trace operation for a site[get] + # result = self.mgmt_client.web_apps.get_network_trace_operation(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /Diagnostics/get/Get App Slot Diagnostic Category[get] + # result = self.mgmt_client.diagnostics.get_site_diagnostic_category(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY) + + # /Diagnostics/get/Get App Diagnostic Category[get] + # result = self.mgmt_client.diagnostics.get_site_diagnostic_category(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY) + + # /WebApps/get/Get the current status of a network trace operation for a site[get] + # result = self.mgmt_client.web_apps.get_network_trace_operation(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /WebApps/get/Get Azure Key Vault app setting reference[get] + # result = self.mgmt_client.web_apps.get_app_setting_key_vault_reference(resource_group_name=RESOURCE_GROUP, name=NAME, app_setting_key=APP_SETTING_KEY) + + # /Diagnostics/get/List App Slot Detectors[get] + # result = self.mgmt_client.diagnostics.list_site_detectors(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY) + + # /Diagnostics/get/List App Detectors[get] + # result = self.mgmt_client.diagnostics.list_site_detectors(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY) + + # /Diagnostics/get/Get App Slot Detector Response[get] + # result = self.mgmt_client.diagnostics.get_site_detector_response(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, detector_name=DETECTOR_NAME) + + # /Diagnostics/get/List App Slot Analyses[get] + # result = self.mgmt_client.diagnostics.list_site_analyses(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY) + + # /Diagnostics/get/Get App Detector Response[get] + # result = self.mgmt_client.diagnostics.get_site_detector_response(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, detector_name=DETECTOR_NAME) + + # /Diagnostics/get/List App Analyses[get] + # result = self.mgmt_client.diagnostics.list_site_analyses(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY) + + # /AppServiceEnvironments/get/Get Outbound Network Dependencies Endpoints[get] + # result = self.mgmt_client.app_service_environments.get_outbound_network_dependencies_endpoints(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /WebApps/get/Get NetworkTraces for a site[get] + # result = self.mgmt_client.web_apps.get_network_traces(resource_group_name=RESOURCE_GROUP, name=NAME, operation_id=OPERATION_ID) + + # /AppServiceEnvironments/get/Get Inbound Network Dependencies Endpoints[get] + # result = self.mgmt_client.app_service_environments.get_inbound_network_dependencies_endpoints(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /WebApps/get/Get NetworkTraces for a site[get] + # result = self.mgmt_client.web_apps.get_network_traces(resource_group_name=RESOURCE_GROUP, name=NAME, operation_id=OPERATION_ID) + + # /ResourceHealthMetadata/get/Get ResourceHealthMetadata[get] + # result = self.mgmt_client.resource_health_metadata.get_by_site(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /WebApps/get/Get site instance info[get] + # result = self.mgmt_client.web_apps.get_instance_info(resource_group_name=RESOURCE_GROUP, name=NAME, instance_id=INSTANCE_ID) + + # /Diagnostics/get/Get App Service Environment Detector Responses[get] + # result = self.mgmt_client.diagnostics.list_hosting_environment_detector_responses(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /Diagnostics/get/Get App Slot Diagnostic Category[get] + # result = self.mgmt_client.diagnostics.get_site_diagnostic_category(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY) + + # /Diagnostics/get/Get App Diagnostic Category[get] + # result = self.mgmt_client.diagnostics.get_site_diagnostic_category(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY) + + # /WebApps/get/Get the current status of a network trace operation for a site[get] + # result = self.mgmt_client.web_apps.get_network_trace_operation(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /ResourceHealthMetadata/get/List ResourceHealthMetadata for a site[get] + # result = self.mgmt_client.resource_health_metadata.list_by_site(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /StaticSites/get/Gets the functions of a particular static site build[get] + # result = self.mgmt_client.static_sites.list_static_site_build_functions(resource_group_name=RESOURCE_GROUP, name=NAME, pr_id=PR_ID) + + # /WebApps/get/Get Azure Key Vault references for app settings[get] + # result = self.mgmt_client.web_apps.get_app_settings_key_vault_references(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /Diagnostics/get/Get App Detector Response[get] + # result = self.mgmt_client.diagnostics.get_site_detector_response(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, detector_name=DETECTOR_NAME) + + # /Diagnostics/get/Get App Slot Detector Response[get] + # result = self.mgmt_client.diagnostics.get_site_detector_response(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, detector_name=DETECTOR_NAME) + + # /Diagnostics/get/List App Slot Diagnostic Categories[get] + # result = self.mgmt_client.diagnostics.list_site_diagnostic_categories(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME) + + # /Diagnostics/get/List App Diagnostic Categories[get] + # result = self.mgmt_client.diagnostics.list_site_diagnostic_categories(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME) + + # /WebApps/get/Get NetworkTraces for a site[get] + # result = self.mgmt_client.web_apps.get_network_traces(resource_group_name=RESOURCE_GROUP, name=NAME, operation_id=OPERATION_ID) + + # /Diagnostics/get/Get App Detector Responses[get] + # result = self.mgmt_client.diagnostics.list_site_detector_responses(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME) + + # /Diagnostics/get/Get App Slot Detector Responses[get] + # result = self.mgmt_client.diagnostics.list_site_detector_responses(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME) + + # /WebApps/get/Get NetworkTraces for a site[get] + # result = self.mgmt_client.web_apps.get_network_traces(resource_group_name=RESOURCE_GROUP, name=NAME, operation_id=OPERATION_ID) + + # /ResourceHealthMetadata/get/Get ResourceHealthMetadata[get] + # result = self.mgmt_client.resource_health_metadata.get_by_site(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /WebApps/get/Get site instance info[get] + # result = self.mgmt_client.web_apps.get_instance_info(resource_group_name=RESOURCE_GROUP, name=NAME, instance_id=INSTANCE_ID) + + # /StaticSites/get/Get a static site build[get] + # result = self.mgmt_client.static_sites.get_static_site_build(resource_group_name=RESOURCE_GROUP, name=NAME, pr_id=PR_ID) + + # /Diagnostics/get/Get App Service Environment Detector Responses[get] + # result = self.mgmt_client.diagnostics.list_hosting_environment_detector_responses(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /ResourceHealthMetadata/get/List ResourceHealthMetadata for a site[get] + # result = self.mgmt_client.resource_health_metadata.list_by_site(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /WebApps/get/Get private link resources of a site[get] + # result = self.mgmt_client.web_apps.get_private_link_resources(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /StaticSites/get/List custom domains for a static site[get] + # result = self.mgmt_client.static_sites.list_static_site_custom_domains(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /Diagnostics/get/List App Slot Diagnostic Categories[get] + # result = self.mgmt_client.diagnostics.list_site_diagnostic_categories(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME) + + # /Diagnostics/get/List App Diagnostic Categories[get] + # result = self.mgmt_client.diagnostics.list_site_diagnostic_categories(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME) + + # /StaticSites/get/Gets the functions of a static site[get] + # result = self.mgmt_client.static_sites.list_static_site_functions(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /Diagnostics/get/Get App Slot Detector Responses[get] + # result = self.mgmt_client.diagnostics.list_site_detector_responses(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME) + + # /Diagnostics/get/Get App Detector Responses[get] + # result = self.mgmt_client.diagnostics.list_site_detector_responses(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME) + + # /StaticSites/get/Get all builds for a static site[get] + # result = self.mgmt_client.static_sites.get_static_site_builds(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /DeletedWebApps/get/Get Deleted Web App by Location[get] + # result = self.mgmt_client.deleted_web_apps.get_deleted_web_app_by_location(location=LOCATION, deleted_site_id=DELETED_SITE_ID) + + # /Certificates/get/Get Certificate[get] + # result = self.mgmt_client.certificates.get(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /ResourceHealthMetadata/get/List ResourceHealthMetadata for a resource group[get] + # result = self.mgmt_client.resource_health_metadata.list_by_resource_group(resource_group_name=RESOURCE_GROUP) + + # /StaticSites/get/Get details for a static site[get] + # result = self.mgmt_client.static_sites.get_static_site(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /AppServicePlans/get/Get App Service plan[get] + result = self.mgmt_client.app_service_plans.get(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /Certificates/get/List Certificates by resource group[get] + # result = self.mgmt_client.certificates.list_by_resource_group(resource_group_name=RESOURCE_GROUP) + + # /StaticSites/get/Get static sites for a resource group[get] + # result = self.mgmt_client.static_sites.get_static_sites_by_resource_group(resource_group_name=RESOURCE_GROUP) + + # /AppServicePlans/get/List App Service plans by resource group[get] + result = self.mgmt_client.app_service_plans.list_by_resource_group(resource_group_name=RESOURCE_GROUP) + + # /TopLevelDomains/get/Get Top Level Domain[get] + # result = self.mgmt_client.top_level_domains.get(name=NAME) + + # /DeletedWebApps/get/List Deleted Web App by Location[get] + # result = self.mgmt_client.deleted_web_apps.list_by_location(location=LOCATION) + + # /TopLevelDomains/get/List Top Level Domains[get] + # result = self.mgmt_client.top_level_domains.list() + + # /ResourceHealthMetadata/get/List ResourceHealthMetadata for a subscription[get] + # result = self.mgmt_client.resource_health_metadata.list() + + # /Certificates/get/List Certificates for subscription[get] + # result = self.mgmt_client.certificates.list() + + # /StaticSites/get/Get all static sites in a subscription[get] + # result = self.mgmt_client.static_sites.list() + + # /AppServicePlans/get/List App Service plans[get] + result = self.mgmt_client.app_service_plans.list() + + # /CertificateRegistrationProvider/get/List operations[get] + result = self.mgmt_client.certificate_registration_provider.list_operations() + + # /DomainRegistrationProvider/get/List operations[get] + result = self.mgmt_client.domain_registration_provider.list_operations() + + # /Provider/get/List operations[get] + result = self.mgmt_client.provider.list_operations() + + # /Diagnostics/post/Execute site detector[post] + # result = self.mgmt_client.diagnostics.execute_site_detector(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, detector_name=DETECTOR_NAME) + + # /Diagnostics/post/Execute site slot detector[post] + # result = self.mgmt_client.diagnostics.execute_site_detector(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, detector_name=DETECTOR_NAME) + + # /Diagnostics/post/Execute site slot analysis[post] + # result = self.mgmt_client.diagnostics.execute_site_analysis(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, analysis_name=ANALYSIS_NAME) + + # /Diagnostics/post/Execute site analysis[post] + # result = self.mgmt_client.diagnostics.execute_site_analysis(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, analysis_name=ANALYSIS_NAME) + + # /Diagnostics/post/Execute site detector[post] + # result = self.mgmt_client.diagnostics.execute_site_detector(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, detector_name=DETECTOR_NAME) + + # /Diagnostics/post/Execute site slot detector[post] + # result = self.mgmt_client.diagnostics.execute_site_detector(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, detector_name=DETECTOR_NAME) + + # /Diagnostics/post/Execute site slot analysis[post] + # result = self.mgmt_client.diagnostics.execute_site_analysis(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, analysis_name=ANALYSIS_NAME) + + # /Diagnostics/post/Execute site analysis[post] + # result = self.mgmt_client.diagnostics.execute_site_analysis(resource_group_name=RESOURCE_GROUP, site_name=SITE_NAME, diagnostic_category=DIAGNOSTIC_CATEGORY, analysis_name=ANALYSIS_NAME) + + # /StaticSites/patch/Create or update a user for a static site[patch] + BODY = { + "roles": "contributor" + } + # result = self.mgmt_client.static_sites.update_static_site_user(resource_group_name=RESOURCE_GROUP, name=NAME, authprovider=AUTHPROVIDER, userid=USERID, static_site_user_envelope=BODY) + + # /StaticSites/post/Get function app settings of a static site build[post] + # result = self.mgmt_client.static_sites.list_static_site_build_function_app_settings(resource_group_name=RESOURCE_GROUP, name=NAME, pr_id=PR_ID) + + # /StaticSites/post/List users for a static site[post] + # result = self.mgmt_client.static_sites.list_static_site_users(resource_group_name=RESOURCE_GROUP, name=NAME, authprovider=AUTHPROVIDER) + + # /StaticSites/post/Validate a custom domain for a static site[post] + # result = self.mgmt_client.static_sites.validate_custom_domain_can_be_added_to_static_site(resource_group_name=RESOURCE_GROUP, name=NAME, domain_name=DOMAIN_NAME) + + # /WebApps/post/Start a new network trace operation for a site[post] + # result = self.mgmt_client.web_apps.start_web_site_network_trace_operation(resource_group_name=RESOURCE_GROUP, name=NAME, duration_in_seconds="60") + # result = result.result() + + # /WebApps/post/Start a new network trace operation for a site[post] + # result = self.mgmt_client.web_apps.start_web_site_network_trace_operation(resource_group_name=RESOURCE_GROUP, name=NAME, duration_in_seconds="60") + # result = result.result() + + # /WebApps/post/Stop a currently running network trace operation for a site[post] + # result = self.mgmt_client.web_apps.stop_web_site_network_trace(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /WebApps/post/Stop a currently running network trace operation for a site[post] + # result = self.mgmt_client.web_apps.stop_web_site_network_trace(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /StaticSites/post/Get function app settings of a static site[post] + # result = self.mgmt_client.static_sites.list_static_site_function_app_settings(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /Domains/post/Renew an existing domain[post] + # result = self.mgmt_client.domains.renew(resource_group_name=RESOURCE_GROUP, domain_name=DOMAIN_NAME) + + # /WebApps/post/List backups[post] + # result = self.mgmt_client.web_apps.list_site_backups(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /WebApps/post/Start a new network trace operation for a site[post] + # result = self.mgmt_client.web_apps.start_web_site_network_trace_operation(resource_group_name=RESOURCE_GROUP, name=NAME, duration_in_seconds="60") + # result = result.result() + + # /StaticSites/post/Create an invitation link for a user for a static site[post] + BODY = { + "domain": "happy-sea-15afae3e.azurestaticwebsites.net", + "provider": "aad", + "user_details": "username", + "roles": "admin,contributor", + "num_hours_to_expiration": "1" + } + # result = self.mgmt_client.static_sites.create_user_roles_invitation_link(resource_group_name=RESOURCE_GROUP, name=NAME, static_site_user_roles_invitation_envelope=BODY) + + # /WebApps/post/Copy slot[post] + SITE_CONFIG = { + "number_of_workers": "1", + "http_logging_enabled": True + } + # result = self.mgmt_client.web_apps.copy_production_slot(resource_group_name=RESOURCE_GROUP, name=NAME, target_slot="staging", site_config= SITE_CONFIG) + # result = result.result() + + # /StaticSites/post/List secrets for a static site[post] + # result = self.mgmt_client.static_sites.list_static_site_secrets(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /StaticSites/post/Reset the api key for a static site[post] + # result = self.mgmt_client.static_sites.reset_static_site_api_key(resource_group_name=RESOURCE_GROUP, name=NAME, should_update_repository="true", repository_token="repoToken123") + + # /WebApps/post/Start a new network trace operation for a site[post] + # result = self.mgmt_client.web_apps.start_web_site_network_trace_operation(resource_group_name=RESOURCE_GROUP, name=NAME, duration_in_seconds="60") + # result = result.result() + + # /WebApps/post/Stop a currently running network trace operation for a site[post] + # result = self.mgmt_client.web_apps.stop_web_site_network_trace(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /WebApps/post/Stop a currently running network trace operation for a site[post] + # result = self.mgmt_client.web_apps.stop_web_site_network_trace(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /StaticSites/post/Detach a static site[post] + # result = self.mgmt_client.static_sites.detach_static_site(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /WebApps/post/List backups[post] + # result = self.mgmt_client.web_apps.list_site_backups(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /WebApps/post/Copy slot[post] + SITE_CONFIG = { + "number_of_workers": "1", + "http_logging_enabled": True + } + # result = self.mgmt_client.web_apps.copy_production_slot(resource_group_name=RESOURCE_GROUP, name=NAME, target_slot="staging", site_config= SITE_CONFIG) + # result = result.result() + + # /AppServicePlans/patch/Patch Service plan[patch] + BODY = { + "kind": "app" + } + # result = self.mgmt_client.app_service_plans.update(resource_group_name=RESOURCE_GROUP, name=NAME, app_service_plan=BODY) + + # /StaticSites/patch/Patch a static site[patch] + BODY = {} + # result = self.mgmt_client.static_sites.update_static_site(resource_group_name=RESOURCE_GROUP, name=NAME, static_site_envelope=BODY) + + # /TopLevelDomains/post/List Top Level Domain Agreements[post] + # result = self.mgmt_client.top_level_domains.list_agreements(name=NAME, include_privacy="true", for_transfer="false") + + # //post/VerifyHostingEnvironmentVnet[post] + BODY = { + "vnet_resource_group": "vNet123rg", + "vnet_name": "vNet123", + "vnet_subnet_name": "vNet123SubNet" + } + # result = self.mgmt_client.verify_hosting_environment_vnet(parameters=BODY) + + # /WebApps/delete/Delete a private endpoint connection for a site.[delete] + # result = self.mgmt_client.web_apps.delete_private_endpoint_connection(resource_group_name=RESOURCE_GROUP, name=NAME, private_endpoint_connection_name=PRIVATE_ENDPOINT_CONNECTION_NAME) + # result = result.result() + + # /StaticSites/delete/Delete a user for a static site[delete] + # result = self.mgmt_client.static_sites.delete_static_site_user(resource_group_name=RESOURCE_GROUP, name=NAME, authprovider=AUTHPROVIDER, userid=USERID) + + # /StaticSites/delete/Delete a custom domain for a static site[delete] + # result = self.mgmt_client.static_sites.delete_static_site_custom_domain(resource_group_name=RESOURCE_GROUP, name=NAME, domain_name=DOMAIN_NAME) + + # /StaticSites/delete/Delete a static site build[delete] + # result = self.mgmt_client.static_sites.delete_static_site_build(resource_group_name=RESOURCE_GROUP, name=NAME, pr_id=PR_ID) + + # /Certificates/delete/Delete Certificate[delete] + # result = self.mgmt_client.certificates.delete(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /AppServicePlans/delete/Delete App Service plan[delete] + result = self.mgmt_client.app_service_plans.delete(resource_group_name=RESOURCE_GROUP, name=NAME) + + # /StaticSites/delete/Delete a static site[delete] + # result = self.mgmt_client.static_sites.delete_static_site(resource_group_name=RESOURCE_GROUP, name=NAME) + + +#------------------------------------------------------------------------------ +if __name__ == '__main__': + unittest.main() diff --git a/sdk/appservice/azure-mgmt-web/tests/test_mgmt_appservice.py b/sdk/appservice/azure-mgmt-web/tests/test_mgmt_appservice.py deleted file mode 100644 index 107e45ce0260..000000000000 --- a/sdk/appservice/azure-mgmt-web/tests/test_mgmt_appservice.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding: utf-8 - -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -import unittest - -import azure.mgmt.web -from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer - -AZURE_LOCATION = 'eastus' - -class MgmtWebSiteTest(AzureMgmtTestCase): - - def setUp(self): - super(MgmtWebSiteTest, self).setUp() - self.mgmt_client = self.create_mgmt_client( - azure.mgmt.web.WebSiteManagementClient - ) - - @ResourceGroupPreparer(location=AZURE_LOCATION) - def test_appservice(self, resource_group): - - SERVERFARM_NAME = "myapimrndxyz" - BODY = { - "kind": "app", - "location": "East US", - "sku": { - "name": "P1", - "tier": "Premium", - "size": "P1", - "family": "P", - "capacity": "1" - } - } - azure_operation_poller = self.mgmt_client.app_service_plans.create_or_update(resource_group.name, SERVERFARM_NAME, BODY) - result_create = azure_operation_poller.result() - - self.mgmt_client.list_skus() - - -#------------------------------------------------------------------------------ -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/sdk/appservice/azure-mgmt-web/tests/test_mgmt_web.py b/sdk/appservice/azure-mgmt-web/tests/test_mgmt_web.py deleted file mode 100644 index eb0e51867e6b..000000000000 --- a/sdk/appservice/azure-mgmt-web/tests/test_mgmt_web.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- -import unittest - -import azure.mgmt.web -from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer - -class MgmtAppsTest(AzureMgmtTestCase): - - def setUp(self): - super(MgmtAppsTest, self).setUp() - self.web_client = self.create_mgmt_client( - azure.mgmt.web.WebSiteManagementClient - ) - - @ResourceGroupPreparer() - def test_webapp(self, resource_group, location): - raise unittest.SkipTest("Skipping WebApp test") - - app_service_plan_name = self.get_resource_name('pyarmappserviceplan') - site_name = self.get_resource_name('pyarmsite') - - server_farm_async_operation = self.web_client.server_farms.create_or_update_server_farm( - resource_group.name, - app_service_plan_name, - azure.mgmt.web.models.ServerFarmWithRichSku( - location=location, - sku=azure.mgmt.web.models.SkuDescription( - name='S1', - capacity=1, - tier='Standard' - ) - ) - ) - server_farm = server_farm_async_operation.result() - - # Create a Site to be hosted in the Server Farm - site_async_operation = self.web_client.sites.create_or_update_site( - self.group_name, - site_name, - azure.mgmt.web.models.Site( - location=self.region, - server_farm_id=server_farm.id - ) - ) - site = site_async_operation.result() - self.assertEqual(site.name, site_name) - - # List Sites by Resource Group - for site in self.web_client.sites.get_sites(self.group_name): - self.assertIsNotNone(site) - - # Get a single Site - site = self.web_client.sites.get_site(self.group_name, site_name) - self.assertIsNotNone(site) - - # Restart a site - self.web_client.sites.restart_site(self.group_name, site_name) - - # Stop a site - self.web_client.sites.stop_site(self.group_name, site_name) - - # Start a site - self.web_client.sites.start_site(self.group_name, site_name) - - # Delete a Site - self.web_client.sites.delete_site(self.group_name, site_name) - -#------------------------------------------------------------------------------ -if __name__ == '__main__': - unittest.main() diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/CHANGELOG.md b/sdk/cosmos/azure-mgmt-cosmosdb/CHANGELOG.md index fb7ee8771f84..ff4e7c401d0a 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/CHANGELOG.md +++ b/sdk/cosmos/azure-mgmt-cosmosdb/CHANGELOG.md @@ -1,5 +1,34 @@ # Release History +## 0.13.0 (2020-04-18) + +**Features** + + - Model DatabaseAccountUpdateParameters has a new parameter public_network_access + - Model DatabaseAccountCreateUpdateParameters has a new parameter public_network_access + - Model GremlinGraphGetResults has a new parameter options + - Model PrivateLinkResource has a new parameter required_zone_names + - Model ThroughputSettingsGetPropertiesResource has a new parameter provisioned_throughput_settings + - Model PrivateEndpointConnection has a new parameter group_id + - Model PrivateEndpointConnection has a new parameter provisioning_state + - Model MongoDBDatabaseGetResults has a new parameter options + - Model SqlContainerGetResults has a new parameter options + - Model TableGetResults has a new parameter options + - Model SqlDatabaseGetResults has a new parameter options + - Model CassandraKeyspaceGetResults has a new parameter options + - Model ThroughputSettingsResource has a new parameter provisioned_throughput_settings + - Model DatabaseAccountGetResults has a new parameter public_network_access + - Model GremlinDatabaseGetResults has a new parameter options + - Model MongoDBCollectionGetResults has a new parameter options + - Model CassandraTableGetResults has a new parameter options + - Added operation group NotebookWorkspacesOperations + +**Breaking changes** + + - Model ThroughputSettingsGetPropertiesResource no longer has parameter autopilot_settings + - Model ThroughputSettingsResource no longer has parameter autopilot_settings + - Operation PrivateEndpointConnectionsOperations.create_or_update has a new signature + ## 0.12.0 (2020-02-27) **Features** diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/README.md b/sdk/cosmos/azure-mgmt-cosmosdb/README.md index 04f4a7cbc410..9933f9f294c2 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/README.md +++ b/sdk/cosmos/azure-mgmt-cosmosdb/README.md @@ -2,7 +2,7 @@ This is the Microsoft Azure Cosmos DB Management Client Library. This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. -For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/sdk) +For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/) # Usage diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_configuration.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_configuration.py index bcd1a6c706ea..56e6d9005aa1 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_configuration.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_configuration.py @@ -23,8 +23,6 @@ class CosmosDBManagementClientConfiguration(AzureConfiguration): object` :param subscription_id: Azure subscription ID. :type subscription_id: str - :param subscription_id1: The ID of the target subscription. - :type subscription_id1: str :param str base_url: Service URL """ diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_cosmos_db_management_client.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_cosmos_db_management_client.py index a54d59f8452d..01db9d4b3ca9 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_cosmos_db_management_client.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_cosmos_db_management_client.py @@ -31,6 +31,7 @@ from .operations import TableResourcesOperations from .operations import CassandraResourcesOperations from .operations import GremlinResourcesOperations +from .operations import NotebookWorkspacesOperations from .operations import PrivateLinkResourcesOperations from .operations import PrivateEndpointConnectionsOperations from . import models @@ -78,6 +79,8 @@ class CosmosDBManagementClient(SDKClient): :vartype cassandra_resources: azure.mgmt.cosmosdb.operations.CassandraResourcesOperations :ivar gremlin_resources: GremlinResources operations :vartype gremlin_resources: azure.mgmt.cosmosdb.operations.GremlinResourcesOperations + :ivar notebook_workspaces: NotebookWorkspaces operations + :vartype notebook_workspaces: azure.mgmt.cosmosdb.operations.NotebookWorkspacesOperations :ivar private_link_resources: PrivateLinkResources operations :vartype private_link_resources: azure.mgmt.cosmosdb.operations.PrivateLinkResourcesOperations :ivar private_endpoint_connections: PrivateEndpointConnections operations @@ -137,6 +140,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.gremlin_resources = GremlinResourcesOperations( self._client, self.config, self._serialize, self._deserialize) + self.notebook_workspaces = NotebookWorkspacesOperations( + self._client, self.config, self._serialize, self._deserialize) self.private_link_resources = PrivateLinkResourcesOperations( self._client, self.config, self._serialize, self._deserialize) self.private_endpoint_connections = PrivateEndpointConnectionsOperations( diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py index 5200f9fe8ef6..5753cb99dfef 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py @@ -12,17 +12,18 @@ try: from ._models_py3 import ARMProxyResource from ._models_py3 import ARMResourceProperties - from ._models_py3 import AutopilotSettingsResource from ._models_py3 import AutoUpgradePolicyResource from ._models_py3 import AzureEntityResource from ._models_py3 import Capability from ._models_py3 import CassandraKeyspaceCreateUpdateParameters + from ._models_py3 import CassandraKeyspaceGetPropertiesOptions from ._models_py3 import CassandraKeyspaceGetPropertiesResource from ._models_py3 import CassandraKeyspaceGetResults from ._models_py3 import CassandraKeyspaceResource from ._models_py3 import CassandraPartitionKey from ._models_py3 import CassandraSchema from ._models_py3 import CassandraTableCreateUpdateParameters + from ._models_py3 import CassandraTableGetPropertiesOptions from ._models_py3 import CassandraTableGetPropertiesResource from ._models_py3 import CassandraTableGetResults from ._models_py3 import CassandraTableResource @@ -47,10 +48,12 @@ from ._models_py3 import FailoverPolicies from ._models_py3 import FailoverPolicy from ._models_py3 import GremlinDatabaseCreateUpdateParameters + from ._models_py3 import GremlinDatabaseGetPropertiesOptions from ._models_py3 import GremlinDatabaseGetPropertiesResource from ._models_py3 import GremlinDatabaseGetResults from ._models_py3 import GremlinDatabaseResource from ._models_py3 import GremlinGraphCreateUpdateParameters + from ._models_py3 import GremlinGraphGetPropertiesOptions from ._models_py3 import GremlinGraphGetPropertiesResource from ._models_py3 import GremlinGraphGetResults from ._models_py3 import GremlinGraphResource @@ -64,18 +67,24 @@ from ._models_py3 import MetricName from ._models_py3 import MetricValue from ._models_py3 import MongoDBCollectionCreateUpdateParameters + from ._models_py3 import MongoDBCollectionGetPropertiesOptions from ._models_py3 import MongoDBCollectionGetPropertiesResource from ._models_py3 import MongoDBCollectionGetResults from ._models_py3 import MongoDBCollectionResource from ._models_py3 import MongoDBDatabaseCreateUpdateParameters + from ._models_py3 import MongoDBDatabaseGetPropertiesOptions from ._models_py3 import MongoDBDatabaseGetPropertiesResource from ._models_py3 import MongoDBDatabaseGetResults from ._models_py3 import MongoDBDatabaseResource from ._models_py3 import MongoIndex from ._models_py3 import MongoIndexKeys from ._models_py3 import MongoIndexOptions + from ._models_py3 import NotebookWorkspace + from ._models_py3 import NotebookWorkspaceConnectionInfoResult + from ._models_py3 import NotebookWorkspaceCreateUpdateParameters from ._models_py3 import Operation from ._models_py3 import OperationDisplay + from ._models_py3 import OptionsResource from ._models_py3 import PartitionMetric from ._models_py3 import PartitionUsage from ._models_py3 import PercentileMetric @@ -84,15 +93,18 @@ from ._models_py3 import PrivateEndpointProperty from ._models_py3 import PrivateLinkResource from ._models_py3 import PrivateLinkServiceConnectionStateProperty + from ._models_py3 import ProvisionedThroughputSettingsResource from ._models_py3 import ProxyResource from ._models_py3 import RegionForOnlineOffline from ._models_py3 import Resource from ._models_py3 import SpatialSpec from ._models_py3 import SqlContainerCreateUpdateParameters + from ._models_py3 import SqlContainerGetPropertiesOptions from ._models_py3 import SqlContainerGetPropertiesResource from ._models_py3 import SqlContainerGetResults from ._models_py3 import SqlContainerResource from ._models_py3 import SqlDatabaseCreateUpdateParameters + from ._models_py3 import SqlDatabaseGetPropertiesOptions from ._models_py3 import SqlDatabaseGetPropertiesResource from ._models_py3 import SqlDatabaseGetResults from ._models_py3 import SqlDatabaseResource @@ -109,6 +121,7 @@ from ._models_py3 import SqlUserDefinedFunctionGetResults from ._models_py3 import SqlUserDefinedFunctionResource from ._models_py3 import TableCreateUpdateParameters + from ._models_py3 import TableGetPropertiesOptions from ._models_py3 import TableGetPropertiesResource from ._models_py3 import TableGetResults from ._models_py3 import TableResource @@ -125,17 +138,18 @@ except (SyntaxError, ImportError): from ._models import ARMProxyResource from ._models import ARMResourceProperties - from ._models import AutopilotSettingsResource from ._models import AutoUpgradePolicyResource from ._models import AzureEntityResource from ._models import Capability from ._models import CassandraKeyspaceCreateUpdateParameters + from ._models import CassandraKeyspaceGetPropertiesOptions from ._models import CassandraKeyspaceGetPropertiesResource from ._models import CassandraKeyspaceGetResults from ._models import CassandraKeyspaceResource from ._models import CassandraPartitionKey from ._models import CassandraSchema from ._models import CassandraTableCreateUpdateParameters + from ._models import CassandraTableGetPropertiesOptions from ._models import CassandraTableGetPropertiesResource from ._models import CassandraTableGetResults from ._models import CassandraTableResource @@ -160,10 +174,12 @@ from ._models import FailoverPolicies from ._models import FailoverPolicy from ._models import GremlinDatabaseCreateUpdateParameters + from ._models import GremlinDatabaseGetPropertiesOptions from ._models import GremlinDatabaseGetPropertiesResource from ._models import GremlinDatabaseGetResults from ._models import GremlinDatabaseResource from ._models import GremlinGraphCreateUpdateParameters + from ._models import GremlinGraphGetPropertiesOptions from ._models import GremlinGraphGetPropertiesResource from ._models import GremlinGraphGetResults from ._models import GremlinGraphResource @@ -177,18 +193,24 @@ from ._models import MetricName from ._models import MetricValue from ._models import MongoDBCollectionCreateUpdateParameters + from ._models import MongoDBCollectionGetPropertiesOptions from ._models import MongoDBCollectionGetPropertiesResource from ._models import MongoDBCollectionGetResults from ._models import MongoDBCollectionResource from ._models import MongoDBDatabaseCreateUpdateParameters + from ._models import MongoDBDatabaseGetPropertiesOptions from ._models import MongoDBDatabaseGetPropertiesResource from ._models import MongoDBDatabaseGetResults from ._models import MongoDBDatabaseResource from ._models import MongoIndex from ._models import MongoIndexKeys from ._models import MongoIndexOptions + from ._models import NotebookWorkspace + from ._models import NotebookWorkspaceConnectionInfoResult + from ._models import NotebookWorkspaceCreateUpdateParameters from ._models import Operation from ._models import OperationDisplay + from ._models import OptionsResource from ._models import PartitionMetric from ._models import PartitionUsage from ._models import PercentileMetric @@ -197,15 +219,18 @@ from ._models import PrivateEndpointProperty from ._models import PrivateLinkResource from ._models import PrivateLinkServiceConnectionStateProperty + from ._models import ProvisionedThroughputSettingsResource from ._models import ProxyResource from ._models import RegionForOnlineOffline from ._models import Resource from ._models import SpatialSpec from ._models import SqlContainerCreateUpdateParameters + from ._models import SqlContainerGetPropertiesOptions from ._models import SqlContainerGetPropertiesResource from ._models import SqlContainerGetResults from ._models import SqlContainerResource from ._models import SqlDatabaseCreateUpdateParameters + from ._models import SqlDatabaseGetPropertiesOptions from ._models import SqlDatabaseGetPropertiesResource from ._models import SqlDatabaseGetResults from ._models import SqlDatabaseResource @@ -222,6 +247,7 @@ from ._models import SqlUserDefinedFunctionGetResults from ._models import SqlUserDefinedFunctionResource from ._models import TableCreateUpdateParameters + from ._models import TableGetPropertiesOptions from ._models import TableGetPropertiesResource from ._models import TableGetResults from ._models import TableResource @@ -244,6 +270,7 @@ from ._paged_models import MetricPaged from ._paged_models import MongoDBCollectionGetResultsPaged from ._paged_models import MongoDBDatabaseGetResultsPaged +from ._paged_models import NotebookWorkspacePaged from ._paged_models import OperationPaged from ._paged_models import PartitionMetricPaged from ._paged_models import PartitionUsagePaged @@ -262,6 +289,7 @@ DatabaseAccountOfferType, DefaultConsistencyLevel, ConnectorOffer, + PublicNetworkAccess, IndexingMode, DataType, IndexKind, @@ -279,17 +307,18 @@ __all__ = [ 'ARMProxyResource', 'ARMResourceProperties', - 'AutopilotSettingsResource', 'AutoUpgradePolicyResource', 'AzureEntityResource', 'Capability', 'CassandraKeyspaceCreateUpdateParameters', + 'CassandraKeyspaceGetPropertiesOptions', 'CassandraKeyspaceGetPropertiesResource', 'CassandraKeyspaceGetResults', 'CassandraKeyspaceResource', 'CassandraPartitionKey', 'CassandraSchema', 'CassandraTableCreateUpdateParameters', + 'CassandraTableGetPropertiesOptions', 'CassandraTableGetPropertiesResource', 'CassandraTableGetResults', 'CassandraTableResource', @@ -314,10 +343,12 @@ 'FailoverPolicies', 'FailoverPolicy', 'GremlinDatabaseCreateUpdateParameters', + 'GremlinDatabaseGetPropertiesOptions', 'GremlinDatabaseGetPropertiesResource', 'GremlinDatabaseGetResults', 'GremlinDatabaseResource', 'GremlinGraphCreateUpdateParameters', + 'GremlinGraphGetPropertiesOptions', 'GremlinGraphGetPropertiesResource', 'GremlinGraphGetResults', 'GremlinGraphResource', @@ -331,18 +362,24 @@ 'MetricName', 'MetricValue', 'MongoDBCollectionCreateUpdateParameters', + 'MongoDBCollectionGetPropertiesOptions', 'MongoDBCollectionGetPropertiesResource', 'MongoDBCollectionGetResults', 'MongoDBCollectionResource', 'MongoDBDatabaseCreateUpdateParameters', + 'MongoDBDatabaseGetPropertiesOptions', 'MongoDBDatabaseGetPropertiesResource', 'MongoDBDatabaseGetResults', 'MongoDBDatabaseResource', 'MongoIndex', 'MongoIndexKeys', 'MongoIndexOptions', + 'NotebookWorkspace', + 'NotebookWorkspaceConnectionInfoResult', + 'NotebookWorkspaceCreateUpdateParameters', 'Operation', 'OperationDisplay', + 'OptionsResource', 'PartitionMetric', 'PartitionUsage', 'PercentileMetric', @@ -351,15 +388,18 @@ 'PrivateEndpointProperty', 'PrivateLinkResource', 'PrivateLinkServiceConnectionStateProperty', + 'ProvisionedThroughputSettingsResource', 'ProxyResource', 'RegionForOnlineOffline', 'Resource', 'SpatialSpec', 'SqlContainerCreateUpdateParameters', + 'SqlContainerGetPropertiesOptions', 'SqlContainerGetPropertiesResource', 'SqlContainerGetResults', 'SqlContainerResource', 'SqlDatabaseCreateUpdateParameters', + 'SqlDatabaseGetPropertiesOptions', 'SqlDatabaseGetPropertiesResource', 'SqlDatabaseGetResults', 'SqlDatabaseResource', @@ -376,6 +416,7 @@ 'SqlUserDefinedFunctionGetResults', 'SqlUserDefinedFunctionResource', 'TableCreateUpdateParameters', + 'TableGetPropertiesOptions', 'TableGetPropertiesResource', 'TableGetResults', 'TableResource', @@ -409,12 +450,14 @@ 'CassandraTableGetResultsPaged', 'GremlinDatabaseGetResultsPaged', 'GremlinGraphGetResultsPaged', + 'NotebookWorkspacePaged', 'PrivateLinkResourcePaged', 'PrivateEndpointConnectionPaged', 'DatabaseAccountKind', 'DatabaseAccountOfferType', 'DefaultConsistencyLevel', 'ConnectorOffer', + 'PublicNetworkAccess', 'IndexingMode', 'DataType', 'IndexKind', diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_cosmos_db_management_client_enums.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_cosmos_db_management_client_enums.py index f9d4a719a2dc..79f465a82de8 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_cosmos_db_management_client_enums.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_cosmos_db_management_client_enums.py @@ -38,6 +38,12 @@ class ConnectorOffer(str, Enum): small = "Small" +class PublicNetworkAccess(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + class IndexingMode(str, Enum): consistent = "Consistent" diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models.py index 48901a798c8c..387f3d03c7d4 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models.py @@ -89,43 +89,6 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) -class AutopilotSettingsResource(Model): - """Cosmos DB autopilot settings object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param max_throughput: Required. Represents max throughput an autopilot - container can operate at. - :type max_throughput: int - :param auto_upgrade_policy: Cosmos DB resource auto-upgrade policy - :type auto_upgrade_policy: - ~azure.mgmt.cosmosdb.models.AutoUpgradePolicyResource - :ivar target_max_throughput: Represents target max throughput an autopilot - container should operate at once offer is no longer in pending state. - :vartype target_max_throughput: int - """ - - _validation = { - 'max_throughput': {'required': True}, - 'target_max_throughput': {'readonly': True}, - } - - _attribute_map = { - 'max_throughput': {'key': 'maxThroughput', 'type': 'int'}, - 'auto_upgrade_policy': {'key': 'autoUpgradePolicy', 'type': 'AutoUpgradePolicyResource'}, - 'target_max_throughput': {'key': 'targetMaxThroughput', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(AutopilotSettingsResource, self).__init__(**kwargs) - self.max_throughput = kwargs.get('max_throughput', None) - self.auto_upgrade_policy = kwargs.get('auto_upgrade_policy', None) - self.target_max_throughput = None - - class AutoUpgradePolicyResource(Model): """Cosmos DB resource auto-upgrade policy. @@ -286,6 +249,39 @@ def __init__(self, **kwargs): self.options = kwargs.get('options', None) +class OptionsResource(Model): + """Cosmos DB options resource object. + + :param throughput: Value of the Cosmos DB resource throughput. Use the + ThroughputSetting resource when retrieving offer details. + :type throughput: int + """ + + _attribute_map = { + 'throughput': {'key': 'throughput', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(OptionsResource, self).__init__(**kwargs) + self.throughput = kwargs.get('throughput', None) + + +class CassandraKeyspaceGetPropertiesOptions(OptionsResource): + """CassandraKeyspaceGetPropertiesOptions. + + :param throughput: Value of the Cosmos DB resource throughput. Use the + ThroughputSetting resource when retrieving offer details. + :type throughput: int + """ + + _attribute_map = { + 'throughput': {'key': 'throughput', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(CassandraKeyspaceGetPropertiesOptions, self).__init__(**kwargs) + + class CassandraKeyspaceGetPropertiesResource(Model): """CassandraKeyspaceGetPropertiesResource. @@ -348,6 +344,9 @@ class CassandraKeyspaceGetResults(ARMResourceProperties): :param resource: :type resource: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceGetPropertiesResource + :param options: + :type options: + ~azure.mgmt.cosmosdb.models.CassandraKeyspaceGetPropertiesOptions """ _validation = { @@ -363,11 +362,13 @@ class CassandraKeyspaceGetResults(ARMResourceProperties): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'resource': {'key': 'properties.resource', 'type': 'CassandraKeyspaceGetPropertiesResource'}, + 'options': {'key': 'properties.options', 'type': 'CassandraKeyspaceGetPropertiesOptions'}, } def __init__(self, **kwargs): super(CassandraKeyspaceGetResults, self).__init__(**kwargs) self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) class CassandraKeyspaceResource(Model): @@ -483,6 +484,22 @@ def __init__(self, **kwargs): self.options = kwargs.get('options', None) +class CassandraTableGetPropertiesOptions(OptionsResource): + """CassandraTableGetPropertiesOptions. + + :param throughput: Value of the Cosmos DB resource throughput. Use the + ThroughputSetting resource when retrieving offer details. + :type throughput: int + """ + + _attribute_map = { + 'throughput': {'key': 'throughput', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(CassandraTableGetPropertiesOptions, self).__init__(**kwargs) + + class CassandraTableGetPropertiesResource(Model): """CassandraTableGetPropertiesResource. @@ -553,6 +570,9 @@ class CassandraTableGetResults(ARMResourceProperties): :param resource: :type resource: ~azure.mgmt.cosmosdb.models.CassandraTableGetPropertiesResource + :param options: + :type options: + ~azure.mgmt.cosmosdb.models.CassandraTableGetPropertiesOptions """ _validation = { @@ -568,11 +588,13 @@ class CassandraTableGetResults(ARMResourceProperties): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'resource': {'key': 'properties.resource', 'type': 'CassandraTableGetPropertiesResource'}, + 'options': {'key': 'properties.options', 'type': 'CassandraTableGetPropertiesOptions'}, } def __init__(self, **kwargs): super(CassandraTableGetResults, self).__init__(**kwargs) self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) class CassandraTableResource(Model): @@ -893,6 +915,10 @@ class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): :type disable_key_based_metadata_write_access: bool :param key_vault_key_uri: The URI of the key vault :type key_vault_key_uri: str + :param public_network_access: Whether requests from Public Network are + allowed. Possible values include: 'Enabled', 'Disabled' + :type public_network_access: str or + ~azure.mgmt.cosmosdb.models.PublicNetworkAccess """ _validation = { @@ -923,6 +949,7 @@ class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, } database_account_offer_type = "Standard" @@ -942,6 +969,7 @@ def __init__(self, **kwargs): self.connector_offer = kwargs.get('connector_offer', None) self.disable_key_based_metadata_write_access = kwargs.get('disable_key_based_metadata_write_access', None) self.key_vault_key_uri = kwargs.get('key_vault_key_uri', None) + self.public_network_access = kwargs.get('public_network_access', None) class DatabaseAccountGetResults(ARMResourceProperties): @@ -1024,6 +1052,10 @@ class DatabaseAccountGetResults(ARMResourceProperties): :type disable_key_based_metadata_write_access: bool :param key_vault_key_uri: The URI of the key vault :type key_vault_key_uri: str + :param public_network_access: Whether requests from Public Network are + allowed. Possible values include: 'Enabled', 'Disabled' + :type public_network_access: str or + ~azure.mgmt.cosmosdb.models.PublicNetworkAccess """ _validation = { @@ -1063,6 +1095,7 @@ class DatabaseAccountGetResults(ARMResourceProperties): 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, } def __init__(self, **kwargs): @@ -1086,6 +1119,7 @@ def __init__(self, **kwargs): self.connector_offer = kwargs.get('connector_offer', None) self.disable_key_based_metadata_write_access = kwargs.get('disable_key_based_metadata_write_access', None) self.key_vault_key_uri = kwargs.get('key_vault_key_uri', None) + self.public_network_access = kwargs.get('public_network_access', None) class DatabaseAccountListConnectionStringsResult(Model): @@ -1246,6 +1280,10 @@ class DatabaseAccountUpdateParameters(Model): :type disable_key_based_metadata_write_access: bool :param key_vault_key_uri: The URI of the key vault :type key_vault_key_uri: str + :param public_network_access: Whether requests from Public Network are + allowed. Possible values include: 'Enabled', 'Disabled' + :type public_network_access: str or + ~azure.mgmt.cosmosdb.models.PublicNetworkAccess """ _attribute_map = { @@ -1263,6 +1301,7 @@ class DatabaseAccountUpdateParameters(Model): 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, } def __init__(self, **kwargs): @@ -1281,6 +1320,7 @@ def __init__(self, **kwargs): self.connector_offer = kwargs.get('connector_offer', None) self.disable_key_based_metadata_write_access = kwargs.get('disable_key_based_metadata_write_access', None) self.key_vault_key_uri = kwargs.get('key_vault_key_uri', None) + self.public_network_access = kwargs.get('public_network_access', None) class ErrorResponse(Model): @@ -1477,6 +1517,22 @@ def __init__(self, **kwargs): self.options = kwargs.get('options', None) +class GremlinDatabaseGetPropertiesOptions(OptionsResource): + """GremlinDatabaseGetPropertiesOptions. + + :param throughput: Value of the Cosmos DB resource throughput. Use the + ThroughputSetting resource when retrieving offer details. + :type throughput: int + """ + + _attribute_map = { + 'throughput': {'key': 'throughput', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(GremlinDatabaseGetPropertiesOptions, self).__init__(**kwargs) + + class GremlinDatabaseGetPropertiesResource(Model): """GremlinDatabaseGetPropertiesResource. @@ -1539,6 +1595,9 @@ class GremlinDatabaseGetResults(ARMResourceProperties): :param resource: :type resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseGetPropertiesResource + :param options: + :type options: + ~azure.mgmt.cosmosdb.models.GremlinDatabaseGetPropertiesOptions """ _validation = { @@ -1554,11 +1613,13 @@ class GremlinDatabaseGetResults(ARMResourceProperties): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'resource': {'key': 'properties.resource', 'type': 'GremlinDatabaseGetPropertiesResource'}, + 'options': {'key': 'properties.options', 'type': 'GremlinDatabaseGetPropertiesOptions'}, } def __init__(self, **kwargs): super(GremlinDatabaseGetResults, self).__init__(**kwargs) self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) class GremlinDatabaseResource(Model): @@ -1633,6 +1694,22 @@ def __init__(self, **kwargs): self.options = kwargs.get('options', None) +class GremlinGraphGetPropertiesOptions(OptionsResource): + """GremlinGraphGetPropertiesOptions. + + :param throughput: Value of the Cosmos DB resource throughput. Use the + ThroughputSetting resource when retrieving offer details. + :type throughput: int + """ + + _attribute_map = { + 'throughput': {'key': 'throughput', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(GremlinGraphGetPropertiesOptions, self).__init__(**kwargs) + + class GremlinGraphGetPropertiesResource(Model): """GremlinGraphGetPropertiesResource. @@ -1721,6 +1798,9 @@ class GremlinGraphGetResults(ARMResourceProperties): :param resource: :type resource: ~azure.mgmt.cosmosdb.models.GremlinGraphGetPropertiesResource + :param options: + :type options: + ~azure.mgmt.cosmosdb.models.GremlinGraphGetPropertiesOptions """ _validation = { @@ -1736,11 +1816,13 @@ class GremlinGraphGetResults(ARMResourceProperties): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'resource': {'key': 'properties.resource', 'type': 'GremlinGraphGetPropertiesResource'}, + 'options': {'key': 'properties.options', 'type': 'GremlinGraphGetPropertiesOptions'}, } def __init__(self, **kwargs): super(GremlinGraphGetResults, self).__init__(**kwargs) self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) class GremlinGraphResource(Model): @@ -2185,6 +2267,22 @@ def __init__(self, **kwargs): self.options = kwargs.get('options', None) +class MongoDBCollectionGetPropertiesOptions(OptionsResource): + """MongoDBCollectionGetPropertiesOptions. + + :param throughput: Value of the Cosmos DB resource throughput. Use the + ThroughputSetting resource when retrieving offer details. + :type throughput: int + """ + + _attribute_map = { + 'throughput': {'key': 'throughput', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(MongoDBCollectionGetPropertiesOptions, self).__init__(**kwargs) + + class MongoDBCollectionGetPropertiesResource(Model): """MongoDBCollectionGetPropertiesResource. @@ -2256,6 +2354,9 @@ class MongoDBCollectionGetResults(ARMResourceProperties): :param resource: :type resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionGetPropertiesResource + :param options: + :type options: + ~azure.mgmt.cosmosdb.models.MongoDBCollectionGetPropertiesOptions """ _validation = { @@ -2271,11 +2372,13 @@ class MongoDBCollectionGetResults(ARMResourceProperties): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'resource': {'key': 'properties.resource', 'type': 'MongoDBCollectionGetPropertiesResource'}, + 'options': {'key': 'properties.options', 'type': 'MongoDBCollectionGetPropertiesOptions'}, } def __init__(self, **kwargs): super(MongoDBCollectionGetResults, self).__init__(**kwargs) self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) class MongoDBCollectionResource(Model): @@ -2359,6 +2462,22 @@ def __init__(self, **kwargs): self.options = kwargs.get('options', None) +class MongoDBDatabaseGetPropertiesOptions(OptionsResource): + """MongoDBDatabaseGetPropertiesOptions. + + :param throughput: Value of the Cosmos DB resource throughput. Use the + ThroughputSetting resource when retrieving offer details. + :type throughput: int + """ + + _attribute_map = { + 'throughput': {'key': 'throughput', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(MongoDBDatabaseGetPropertiesOptions, self).__init__(**kwargs) + + class MongoDBDatabaseGetPropertiesResource(Model): """MongoDBDatabaseGetPropertiesResource. @@ -2421,6 +2540,9 @@ class MongoDBDatabaseGetResults(ARMResourceProperties): :param resource: :type resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetPropertiesResource + :param options: + :type options: + ~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetPropertiesOptions """ _validation = { @@ -2436,11 +2558,13 @@ class MongoDBDatabaseGetResults(ARMResourceProperties): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'resource': {'key': 'properties.resource', 'type': 'MongoDBDatabaseGetPropertiesResource'}, + 'options': {'key': 'properties.options', 'type': 'MongoDBDatabaseGetPropertiesOptions'}, } def __init__(self, **kwargs): super(MongoDBDatabaseGetResults, self).__init__(**kwargs) self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) class MongoDBDatabaseResource(Model): @@ -2522,6 +2646,106 @@ def __init__(self, **kwargs): self.unique = kwargs.get('unique', None) +class NotebookWorkspace(ARMProxyResource): + """A notebook workspace resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :ivar notebook_server_endpoint: Specifies the endpoint of Notebook server. + :vartype notebook_server_endpoint: str + :ivar status: Status of the notebook workspace. Possible values are: + Creating, Online, Deleting, Failed, Updating. + :vartype status: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'notebook_server_endpoint': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'notebook_server_endpoint': {'key': 'properties.notebookServerEndpoint', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NotebookWorkspace, self).__init__(**kwargs) + self.notebook_server_endpoint = None + self.status = None + + +class NotebookWorkspaceConnectionInfoResult(Model): + """The connection info for the given notebook workspace. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar auth_token: Specifies auth token used for connecting to Notebook + server (uses token-based auth). + :vartype auth_token: str + :ivar notebook_server_endpoint: Specifies the endpoint of Notebook server. + :vartype notebook_server_endpoint: str + """ + + _validation = { + 'auth_token': {'readonly': True}, + 'notebook_server_endpoint': {'readonly': True}, + } + + _attribute_map = { + 'auth_token': {'key': 'authToken', 'type': 'str'}, + 'notebook_server_endpoint': {'key': 'notebookServerEndpoint', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NotebookWorkspaceConnectionInfoResult, self).__init__(**kwargs) + self.auth_token = None + self.notebook_server_endpoint = None + + +class NotebookWorkspaceCreateUpdateParameters(ARMProxyResource): + """Parameters to create a notebook workspace resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NotebookWorkspaceCreateUpdateParameters, self).__init__(**kwargs) + + class Operation(Model): """REST API operation. @@ -2905,6 +3129,10 @@ class PrivateEndpointConnection(ProxyResource): Private Endpoint Connection. :type private_link_service_connection_state: ~azure.mgmt.cosmosdb.models.PrivateLinkServiceConnectionStateProperty + :param group_id: Group id of the private endpoint. + :type group_id: str + :param provisioning_state: Provisioning state of the private endpoint. + :type provisioning_state: str """ _validation = { @@ -2919,12 +3147,16 @@ class PrivateEndpointConnection(ProxyResource): 'type': {'key': 'type', 'type': 'str'}, 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpointProperty'}, 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionStateProperty'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } def __init__(self, **kwargs): super(PrivateEndpointConnection, self).__init__(**kwargs) self.private_endpoint = kwargs.get('private_endpoint', None) self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + self.group_id = kwargs.get('group_id', None) + self.provisioning_state = kwargs.get('provisioning_state', None) class PrivateEndpointProperty(Model): @@ -2959,6 +3191,8 @@ class PrivateLinkResource(ARMProxyResource): :vartype group_id: str :ivar required_members: The private link resource required member names. :vartype required_members: list[str] + :ivar required_zone_names: The private link resource required zone names. + :vartype required_zone_names: list[str] """ _validation = { @@ -2967,6 +3201,7 @@ class PrivateLinkResource(ARMProxyResource): 'type': {'readonly': True}, 'group_id': {'readonly': True}, 'required_members': {'readonly': True}, + 'required_zone_names': {'readonly': True}, } _attribute_map = { @@ -2975,12 +3210,14 @@ class PrivateLinkResource(ARMProxyResource): 'type': {'key': 'type', 'type': 'str'}, 'group_id': {'key': 'properties.groupId', 'type': 'str'}, 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, } def __init__(self, **kwargs): super(PrivateLinkResource, self).__init__(**kwargs) self.group_id = None self.required_members = None + self.required_zone_names = None class PrivateLinkServiceConnectionStateProperty(Model): @@ -3015,6 +3252,43 @@ def __init__(self, **kwargs): self.actions_required = None +class ProvisionedThroughputSettingsResource(Model): + """Cosmos DB provisioned throughput settings object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param max_throughput: Required. Represents maximum throughput container + can scale up to. + :type max_throughput: int + :param auto_upgrade_policy: Cosmos DB resource auto-upgrade policy + :type auto_upgrade_policy: + ~azure.mgmt.cosmosdb.models.AutoUpgradePolicyResource + :ivar target_max_throughput: Represents target maximum throughput + container can scale up to once offer is no longer in pending state. + :vartype target_max_throughput: int + """ + + _validation = { + 'max_throughput': {'required': True}, + 'target_max_throughput': {'readonly': True}, + } + + _attribute_map = { + 'max_throughput': {'key': 'maxThroughput', 'type': 'int'}, + 'auto_upgrade_policy': {'key': 'autoUpgradePolicy', 'type': 'AutoUpgradePolicyResource'}, + 'target_max_throughput': {'key': 'targetMaxThroughput', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ProvisionedThroughputSettingsResource, self).__init__(**kwargs) + self.max_throughput = kwargs.get('max_throughput', None) + self.auto_upgrade_policy = kwargs.get('auto_upgrade_policy', None) + self.target_max_throughput = None + + class RegionForOnlineOffline(Model): """Cosmos DB region to online or offline. @@ -3109,6 +3383,22 @@ def __init__(self, **kwargs): self.options = kwargs.get('options', None) +class SqlContainerGetPropertiesOptions(OptionsResource): + """SqlContainerGetPropertiesOptions. + + :param throughput: Value of the Cosmos DB resource throughput. Use the + ThroughputSetting resource when retrieving offer details. + :type throughput: int + """ + + _attribute_map = { + 'throughput': {'key': 'throughput', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(SqlContainerGetPropertiesOptions, self).__init__(**kwargs) + + class SqlContainerGetPropertiesResource(Model): """SqlContainerGetPropertiesResource. @@ -3198,6 +3488,9 @@ class SqlContainerGetResults(ARMResourceProperties): :param resource: :type resource: ~azure.mgmt.cosmosdb.models.SqlContainerGetPropertiesResource + :param options: + :type options: + ~azure.mgmt.cosmosdb.models.SqlContainerGetPropertiesOptions """ _validation = { @@ -3213,11 +3506,13 @@ class SqlContainerGetResults(ARMResourceProperties): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'resource': {'key': 'properties.resource', 'type': 'SqlContainerGetPropertiesResource'}, + 'options': {'key': 'properties.options', 'type': 'SqlContainerGetPropertiesOptions'}, } def __init__(self, **kwargs): super(SqlContainerGetResults, self).__init__(**kwargs) self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) class SqlContainerResource(Model): @@ -3319,6 +3614,22 @@ def __init__(self, **kwargs): self.options = kwargs.get('options', None) +class SqlDatabaseGetPropertiesOptions(OptionsResource): + """SqlDatabaseGetPropertiesOptions. + + :param throughput: Value of the Cosmos DB resource throughput. Use the + ThroughputSetting resource when retrieving offer details. + :type throughput: int + """ + + _attribute_map = { + 'throughput': {'key': 'throughput', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(SqlDatabaseGetPropertiesOptions, self).__init__(**kwargs) + + class SqlDatabaseGetPropertiesResource(Model): """SqlDatabaseGetPropertiesResource. @@ -3391,6 +3702,8 @@ class SqlDatabaseGetResults(ARMResourceProperties): :param resource: :type resource: ~azure.mgmt.cosmosdb.models.SqlDatabaseGetPropertiesResource + :param options: + :type options: ~azure.mgmt.cosmosdb.models.SqlDatabaseGetPropertiesOptions """ _validation = { @@ -3406,11 +3719,13 @@ class SqlDatabaseGetResults(ARMResourceProperties): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'resource': {'key': 'properties.resource', 'type': 'SqlDatabaseGetPropertiesResource'}, + 'options': {'key': 'properties.options', 'type': 'SqlDatabaseGetPropertiesOptions'}, } def __init__(self, **kwargs): super(SqlDatabaseGetResults, self).__init__(**kwargs) self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) class SqlDatabaseResource(Model): @@ -4000,6 +4315,22 @@ def __init__(self, **kwargs): self.options = kwargs.get('options', None) +class TableGetPropertiesOptions(OptionsResource): + """TableGetPropertiesOptions. + + :param throughput: Value of the Cosmos DB resource throughput. Use the + ThroughputSetting resource when retrieving offer details. + :type throughput: int + """ + + _attribute_map = { + 'throughput': {'key': 'throughput', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(TableGetPropertiesOptions, self).__init__(**kwargs) + + class TableGetPropertiesResource(Model): """TableGetPropertiesResource. @@ -4061,6 +4392,8 @@ class TableGetResults(ARMResourceProperties): :type tags: dict[str, str] :param resource: :type resource: ~azure.mgmt.cosmosdb.models.TableGetPropertiesResource + :param options: + :type options: ~azure.mgmt.cosmosdb.models.TableGetPropertiesOptions """ _validation = { @@ -4076,11 +4409,13 @@ class TableGetResults(ARMResourceProperties): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'resource': {'key': 'properties.resource', 'type': 'TableGetPropertiesResource'}, + 'options': {'key': 'properties.options', 'type': 'TableGetPropertiesOptions'}, } def __init__(self, **kwargs): super(TableGetResults, self).__init__(**kwargs) self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) class TableResource(Model): @@ -4134,13 +4469,14 @@ class ThroughputSettingsGetPropertiesResource(Model): sending a request. :param throughput: Value of the Cosmos DB resource throughput. Either - throughput is required or autopilotSettings is required, but not both. + throughput is required or provisionedThroughputSettings is required, but + not both. :type throughput: int - :param autopilot_settings: Cosmos DB resource for Autopilot settings. - Either throughput is required or autopilotSettings is required, but not - both. - :type autopilot_settings: - ~azure.mgmt.cosmosdb.models.AutopilotSettingsResource + :param provisioned_throughput_settings: Cosmos DB resource for provisioned + throughput settings. Either throughput is required or + provisionedThroughputSettings is required, but not both. + :type provisioned_throughput_settings: + ~azure.mgmt.cosmosdb.models.ProvisionedThroughputSettingsResource :ivar minimum_throughput: The minimum throughput of the resource :vartype minimum_throughput: str :ivar offer_replace_pending: The throughput replace is pending @@ -4165,7 +4501,7 @@ class ThroughputSettingsGetPropertiesResource(Model): _attribute_map = { 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autopilot_settings': {'key': 'autopilotSettings', 'type': 'AutopilotSettingsResource'}, + 'provisioned_throughput_settings': {'key': 'provisionedThroughputSettings', 'type': 'ProvisionedThroughputSettingsResource'}, 'minimum_throughput': {'key': 'minimumThroughput', 'type': 'str'}, 'offer_replace_pending': {'key': 'offerReplacePending', 'type': 'str'}, '_rid': {'key': '_rid', 'type': 'str'}, @@ -4176,7 +4512,7 @@ class ThroughputSettingsGetPropertiesResource(Model): def __init__(self, **kwargs): super(ThroughputSettingsGetPropertiesResource, self).__init__(**kwargs) self.throughput = kwargs.get('throughput', None) - self.autopilot_settings = kwargs.get('autopilot_settings', None) + self.provisioned_throughput_settings = kwargs.get('provisioned_throughput_settings', None) self.minimum_throughput = None self.offer_replace_pending = None self._rid = None @@ -4228,19 +4564,20 @@ def __init__(self, **kwargs): class ThroughputSettingsResource(Model): """Cosmos DB resource throughput object. Either throughput is required or - autopilotSettings is required, but not both. + provisionedThroughputSettings is required, but not both. Variables are only populated by the server, and will be ignored when sending a request. :param throughput: Value of the Cosmos DB resource throughput. Either - throughput is required or autopilotSettings is required, but not both. + throughput is required or provisionedThroughputSettings is required, but + not both. :type throughput: int - :param autopilot_settings: Cosmos DB resource for Autopilot settings. - Either throughput is required or autopilotSettings is required, but not - both. - :type autopilot_settings: - ~azure.mgmt.cosmosdb.models.AutopilotSettingsResource + :param provisioned_throughput_settings: Cosmos DB resource for provisioned + throughput settings. Either throughput is required or + provisionedThroughputSettings is required, but not both. + :type provisioned_throughput_settings: + ~azure.mgmt.cosmosdb.models.ProvisionedThroughputSettingsResource :ivar minimum_throughput: The minimum throughput of the resource :vartype minimum_throughput: str :ivar offer_replace_pending: The throughput replace is pending @@ -4254,7 +4591,7 @@ class ThroughputSettingsResource(Model): _attribute_map = { 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autopilot_settings': {'key': 'autopilotSettings', 'type': 'AutopilotSettingsResource'}, + 'provisioned_throughput_settings': {'key': 'provisionedThroughputSettings', 'type': 'ProvisionedThroughputSettingsResource'}, 'minimum_throughput': {'key': 'minimumThroughput', 'type': 'str'}, 'offer_replace_pending': {'key': 'offerReplacePending', 'type': 'str'}, } @@ -4262,7 +4599,7 @@ class ThroughputSettingsResource(Model): def __init__(self, **kwargs): super(ThroughputSettingsResource, self).__init__(**kwargs) self.throughput = kwargs.get('throughput', None) - self.autopilot_settings = kwargs.get('autopilot_settings', None) + self.provisioned_throughput_settings = kwargs.get('provisioned_throughput_settings', None) self.minimum_throughput = None self.offer_replace_pending = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models_py3.py index 962ba48fb534..1b798d7d192c 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models_py3.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models_py3.py @@ -89,43 +89,6 @@ def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: self.tags = tags -class AutopilotSettingsResource(Model): - """Cosmos DB autopilot settings object. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param max_throughput: Required. Represents max throughput an autopilot - container can operate at. - :type max_throughput: int - :param auto_upgrade_policy: Cosmos DB resource auto-upgrade policy - :type auto_upgrade_policy: - ~azure.mgmt.cosmosdb.models.AutoUpgradePolicyResource - :ivar target_max_throughput: Represents target max throughput an autopilot - container should operate at once offer is no longer in pending state. - :vartype target_max_throughput: int - """ - - _validation = { - 'max_throughput': {'required': True}, - 'target_max_throughput': {'readonly': True}, - } - - _attribute_map = { - 'max_throughput': {'key': 'maxThroughput', 'type': 'int'}, - 'auto_upgrade_policy': {'key': 'autoUpgradePolicy', 'type': 'AutoUpgradePolicyResource'}, - 'target_max_throughput': {'key': 'targetMaxThroughput', 'type': 'int'}, - } - - def __init__(self, *, max_throughput: int, auto_upgrade_policy=None, **kwargs) -> None: - super(AutopilotSettingsResource, self).__init__(**kwargs) - self.max_throughput = max_throughput - self.auto_upgrade_policy = auto_upgrade_policy - self.target_max_throughput = None - - class AutoUpgradePolicyResource(Model): """Cosmos DB resource auto-upgrade policy. @@ -286,6 +249,39 @@ def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs self.options = options +class OptionsResource(Model): + """Cosmos DB options resource object. + + :param throughput: Value of the Cosmos DB resource throughput. Use the + ThroughputSetting resource when retrieving offer details. + :type throughput: int + """ + + _attribute_map = { + 'throughput': {'key': 'throughput', 'type': 'int'}, + } + + def __init__(self, *, throughput: int=None, **kwargs) -> None: + super(OptionsResource, self).__init__(**kwargs) + self.throughput = throughput + + +class CassandraKeyspaceGetPropertiesOptions(OptionsResource): + """CassandraKeyspaceGetPropertiesOptions. + + :param throughput: Value of the Cosmos DB resource throughput. Use the + ThroughputSetting resource when retrieving offer details. + :type throughput: int + """ + + _attribute_map = { + 'throughput': {'key': 'throughput', 'type': 'int'}, + } + + def __init__(self, *, throughput: int=None, **kwargs) -> None: + super(CassandraKeyspaceGetPropertiesOptions, self).__init__(throughput=throughput, **kwargs) + + class CassandraKeyspaceGetPropertiesResource(Model): """CassandraKeyspaceGetPropertiesResource. @@ -348,6 +344,9 @@ class CassandraKeyspaceGetResults(ARMResourceProperties): :param resource: :type resource: ~azure.mgmt.cosmosdb.models.CassandraKeyspaceGetPropertiesResource + :param options: + :type options: + ~azure.mgmt.cosmosdb.models.CassandraKeyspaceGetPropertiesOptions """ _validation = { @@ -363,11 +362,13 @@ class CassandraKeyspaceGetResults(ARMResourceProperties): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'resource': {'key': 'properties.resource', 'type': 'CassandraKeyspaceGetPropertiesResource'}, + 'options': {'key': 'properties.options', 'type': 'CassandraKeyspaceGetPropertiesOptions'}, } - def __init__(self, *, location: str=None, tags=None, resource=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, resource=None, options=None, **kwargs) -> None: super(CassandraKeyspaceGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource + self.options = options class CassandraKeyspaceResource(Model): @@ -483,6 +484,22 @@ def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs self.options = options +class CassandraTableGetPropertiesOptions(OptionsResource): + """CassandraTableGetPropertiesOptions. + + :param throughput: Value of the Cosmos DB resource throughput. Use the + ThroughputSetting resource when retrieving offer details. + :type throughput: int + """ + + _attribute_map = { + 'throughput': {'key': 'throughput', 'type': 'int'}, + } + + def __init__(self, *, throughput: int=None, **kwargs) -> None: + super(CassandraTableGetPropertiesOptions, self).__init__(throughput=throughput, **kwargs) + + class CassandraTableGetPropertiesResource(Model): """CassandraTableGetPropertiesResource. @@ -553,6 +570,9 @@ class CassandraTableGetResults(ARMResourceProperties): :param resource: :type resource: ~azure.mgmt.cosmosdb.models.CassandraTableGetPropertiesResource + :param options: + :type options: + ~azure.mgmt.cosmosdb.models.CassandraTableGetPropertiesOptions """ _validation = { @@ -568,11 +588,13 @@ class CassandraTableGetResults(ARMResourceProperties): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'resource': {'key': 'properties.resource', 'type': 'CassandraTableGetPropertiesResource'}, + 'options': {'key': 'properties.options', 'type': 'CassandraTableGetPropertiesOptions'}, } - def __init__(self, *, location: str=None, tags=None, resource=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, resource=None, options=None, **kwargs) -> None: super(CassandraTableGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource + self.options = options class CassandraTableResource(Model): @@ -893,6 +915,10 @@ class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): :type disable_key_based_metadata_write_access: bool :param key_vault_key_uri: The URI of the key vault :type key_vault_key_uri: str + :param public_network_access: Whether requests from Public Network are + allowed. Possible values include: 'Enabled', 'Disabled' + :type public_network_access: str or + ~azure.mgmt.cosmosdb.models.PublicNetworkAccess """ _validation = { @@ -923,11 +949,12 @@ class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, } database_account_offer_type = "Standard" - def __init__(self, *, locations, location: str=None, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter: str=None, is_virtual_network_filter_enabled: bool=None, enable_automatic_failover: bool=None, capabilities=None, virtual_network_rules=None, enable_multiple_write_locations: bool=None, enable_cassandra_connector: bool=None, connector_offer=None, disable_key_based_metadata_write_access: bool=None, key_vault_key_uri: str=None, **kwargs) -> None: + def __init__(self, *, locations, location: str=None, tags=None, kind="GlobalDocumentDB", consistency_policy=None, ip_range_filter: str=None, is_virtual_network_filter_enabled: bool=None, enable_automatic_failover: bool=None, capabilities=None, virtual_network_rules=None, enable_multiple_write_locations: bool=None, enable_cassandra_connector: bool=None, connector_offer=None, disable_key_based_metadata_write_access: bool=None, key_vault_key_uri: str=None, public_network_access=None, **kwargs) -> None: super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) self.kind = kind self.consistency_policy = consistency_policy @@ -942,6 +969,7 @@ def __init__(self, *, locations, location: str=None, tags=None, kind="GlobalDocu self.connector_offer = connector_offer self.disable_key_based_metadata_write_access = disable_key_based_metadata_write_access self.key_vault_key_uri = key_vault_key_uri + self.public_network_access = public_network_access class DatabaseAccountGetResults(ARMResourceProperties): @@ -1024,6 +1052,10 @@ class DatabaseAccountGetResults(ARMResourceProperties): :type disable_key_based_metadata_write_access: bool :param key_vault_key_uri: The URI of the key vault :type key_vault_key_uri: str + :param public_network_access: Whether requests from Public Network are + allowed. Possible values include: 'Enabled', 'Disabled' + :type public_network_access: str or + ~azure.mgmt.cosmosdb.models.PublicNetworkAccess """ _validation = { @@ -1063,9 +1095,10 @@ class DatabaseAccountGetResults(ARMResourceProperties): 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, } - def __init__(self, *, location: str=None, tags=None, kind="GlobalDocumentDB", provisioning_state: str=None, ip_range_filter: str=None, is_virtual_network_filter_enabled: bool=None, enable_automatic_failover: bool=None, consistency_policy=None, capabilities=None, virtual_network_rules=None, enable_multiple_write_locations: bool=None, enable_cassandra_connector: bool=None, connector_offer=None, disable_key_based_metadata_write_access: bool=None, key_vault_key_uri: str=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, kind="GlobalDocumentDB", provisioning_state: str=None, ip_range_filter: str=None, is_virtual_network_filter_enabled: bool=None, enable_automatic_failover: bool=None, consistency_policy=None, capabilities=None, virtual_network_rules=None, enable_multiple_write_locations: bool=None, enable_cassandra_connector: bool=None, connector_offer=None, disable_key_based_metadata_write_access: bool=None, key_vault_key_uri: str=None, public_network_access=None, **kwargs) -> None: super(DatabaseAccountGetResults, self).__init__(location=location, tags=tags, **kwargs) self.kind = kind self.provisioning_state = provisioning_state @@ -1086,6 +1119,7 @@ def __init__(self, *, location: str=None, tags=None, kind="GlobalDocumentDB", pr self.connector_offer = connector_offer self.disable_key_based_metadata_write_access = disable_key_based_metadata_write_access self.key_vault_key_uri = key_vault_key_uri + self.public_network_access = public_network_access class DatabaseAccountListConnectionStringsResult(Model): @@ -1246,6 +1280,10 @@ class DatabaseAccountUpdateParameters(Model): :type disable_key_based_metadata_write_access: bool :param key_vault_key_uri: The URI of the key vault :type key_vault_key_uri: str + :param public_network_access: Whether requests from Public Network are + allowed. Possible values include: 'Enabled', 'Disabled' + :type public_network_access: str or + ~azure.mgmt.cosmosdb.models.PublicNetworkAccess """ _attribute_map = { @@ -1263,9 +1301,10 @@ class DatabaseAccountUpdateParameters(Model): 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, } - def __init__(self, *, tags=None, location: str=None, consistency_policy=None, locations=None, ip_range_filter: str=None, is_virtual_network_filter_enabled: bool=None, enable_automatic_failover: bool=None, capabilities=None, virtual_network_rules=None, enable_multiple_write_locations: bool=None, enable_cassandra_connector: bool=None, connector_offer=None, disable_key_based_metadata_write_access: bool=None, key_vault_key_uri: str=None, **kwargs) -> None: + def __init__(self, *, tags=None, location: str=None, consistency_policy=None, locations=None, ip_range_filter: str=None, is_virtual_network_filter_enabled: bool=None, enable_automatic_failover: bool=None, capabilities=None, virtual_network_rules=None, enable_multiple_write_locations: bool=None, enable_cassandra_connector: bool=None, connector_offer=None, disable_key_based_metadata_write_access: bool=None, key_vault_key_uri: str=None, public_network_access=None, **kwargs) -> None: super(DatabaseAccountUpdateParameters, self).__init__(**kwargs) self.tags = tags self.location = location @@ -1281,6 +1320,7 @@ def __init__(self, *, tags=None, location: str=None, consistency_policy=None, lo self.connector_offer = connector_offer self.disable_key_based_metadata_write_access = disable_key_based_metadata_write_access self.key_vault_key_uri = key_vault_key_uri + self.public_network_access = public_network_access class ErrorResponse(Model): @@ -1477,6 +1517,22 @@ def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs self.options = options +class GremlinDatabaseGetPropertiesOptions(OptionsResource): + """GremlinDatabaseGetPropertiesOptions. + + :param throughput: Value of the Cosmos DB resource throughput. Use the + ThroughputSetting resource when retrieving offer details. + :type throughput: int + """ + + _attribute_map = { + 'throughput': {'key': 'throughput', 'type': 'int'}, + } + + def __init__(self, *, throughput: int=None, **kwargs) -> None: + super(GremlinDatabaseGetPropertiesOptions, self).__init__(throughput=throughput, **kwargs) + + class GremlinDatabaseGetPropertiesResource(Model): """GremlinDatabaseGetPropertiesResource. @@ -1539,6 +1595,9 @@ class GremlinDatabaseGetResults(ARMResourceProperties): :param resource: :type resource: ~azure.mgmt.cosmosdb.models.GremlinDatabaseGetPropertiesResource + :param options: + :type options: + ~azure.mgmt.cosmosdb.models.GremlinDatabaseGetPropertiesOptions """ _validation = { @@ -1554,11 +1613,13 @@ class GremlinDatabaseGetResults(ARMResourceProperties): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'resource': {'key': 'properties.resource', 'type': 'GremlinDatabaseGetPropertiesResource'}, + 'options': {'key': 'properties.options', 'type': 'GremlinDatabaseGetPropertiesOptions'}, } - def __init__(self, *, location: str=None, tags=None, resource=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, resource=None, options=None, **kwargs) -> None: super(GremlinDatabaseGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource + self.options = options class GremlinDatabaseResource(Model): @@ -1633,6 +1694,22 @@ def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs self.options = options +class GremlinGraphGetPropertiesOptions(OptionsResource): + """GremlinGraphGetPropertiesOptions. + + :param throughput: Value of the Cosmos DB resource throughput. Use the + ThroughputSetting resource when retrieving offer details. + :type throughput: int + """ + + _attribute_map = { + 'throughput': {'key': 'throughput', 'type': 'int'}, + } + + def __init__(self, *, throughput: int=None, **kwargs) -> None: + super(GremlinGraphGetPropertiesOptions, self).__init__(throughput=throughput, **kwargs) + + class GremlinGraphGetPropertiesResource(Model): """GremlinGraphGetPropertiesResource. @@ -1721,6 +1798,9 @@ class GremlinGraphGetResults(ARMResourceProperties): :param resource: :type resource: ~azure.mgmt.cosmosdb.models.GremlinGraphGetPropertiesResource + :param options: + :type options: + ~azure.mgmt.cosmosdb.models.GremlinGraphGetPropertiesOptions """ _validation = { @@ -1736,11 +1816,13 @@ class GremlinGraphGetResults(ARMResourceProperties): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'resource': {'key': 'properties.resource', 'type': 'GremlinGraphGetPropertiesResource'}, + 'options': {'key': 'properties.options', 'type': 'GremlinGraphGetPropertiesOptions'}, } - def __init__(self, *, location: str=None, tags=None, resource=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, resource=None, options=None, **kwargs) -> None: super(GremlinGraphGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource + self.options = options class GremlinGraphResource(Model): @@ -2185,6 +2267,22 @@ def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs self.options = options +class MongoDBCollectionGetPropertiesOptions(OptionsResource): + """MongoDBCollectionGetPropertiesOptions. + + :param throughput: Value of the Cosmos DB resource throughput. Use the + ThroughputSetting resource when retrieving offer details. + :type throughput: int + """ + + _attribute_map = { + 'throughput': {'key': 'throughput', 'type': 'int'}, + } + + def __init__(self, *, throughput: int=None, **kwargs) -> None: + super(MongoDBCollectionGetPropertiesOptions, self).__init__(throughput=throughput, **kwargs) + + class MongoDBCollectionGetPropertiesResource(Model): """MongoDBCollectionGetPropertiesResource. @@ -2256,6 +2354,9 @@ class MongoDBCollectionGetResults(ARMResourceProperties): :param resource: :type resource: ~azure.mgmt.cosmosdb.models.MongoDBCollectionGetPropertiesResource + :param options: + :type options: + ~azure.mgmt.cosmosdb.models.MongoDBCollectionGetPropertiesOptions """ _validation = { @@ -2271,11 +2372,13 @@ class MongoDBCollectionGetResults(ARMResourceProperties): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'resource': {'key': 'properties.resource', 'type': 'MongoDBCollectionGetPropertiesResource'}, + 'options': {'key': 'properties.options', 'type': 'MongoDBCollectionGetPropertiesOptions'}, } - def __init__(self, *, location: str=None, tags=None, resource=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, resource=None, options=None, **kwargs) -> None: super(MongoDBCollectionGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource + self.options = options class MongoDBCollectionResource(Model): @@ -2359,6 +2462,22 @@ def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs self.options = options +class MongoDBDatabaseGetPropertiesOptions(OptionsResource): + """MongoDBDatabaseGetPropertiesOptions. + + :param throughput: Value of the Cosmos DB resource throughput. Use the + ThroughputSetting resource when retrieving offer details. + :type throughput: int + """ + + _attribute_map = { + 'throughput': {'key': 'throughput', 'type': 'int'}, + } + + def __init__(self, *, throughput: int=None, **kwargs) -> None: + super(MongoDBDatabaseGetPropertiesOptions, self).__init__(throughput=throughput, **kwargs) + + class MongoDBDatabaseGetPropertiesResource(Model): """MongoDBDatabaseGetPropertiesResource. @@ -2421,6 +2540,9 @@ class MongoDBDatabaseGetResults(ARMResourceProperties): :param resource: :type resource: ~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetPropertiesResource + :param options: + :type options: + ~azure.mgmt.cosmosdb.models.MongoDBDatabaseGetPropertiesOptions """ _validation = { @@ -2436,11 +2558,13 @@ class MongoDBDatabaseGetResults(ARMResourceProperties): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'resource': {'key': 'properties.resource', 'type': 'MongoDBDatabaseGetPropertiesResource'}, + 'options': {'key': 'properties.options', 'type': 'MongoDBDatabaseGetPropertiesOptions'}, } - def __init__(self, *, location: str=None, tags=None, resource=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, resource=None, options=None, **kwargs) -> None: super(MongoDBDatabaseGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource + self.options = options class MongoDBDatabaseResource(Model): @@ -2522,6 +2646,106 @@ def __init__(self, *, expire_after_seconds: int=None, unique: bool=None, **kwarg self.unique = unique +class NotebookWorkspace(ARMProxyResource): + """A notebook workspace resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :ivar notebook_server_endpoint: Specifies the endpoint of Notebook server. + :vartype notebook_server_endpoint: str + :ivar status: Status of the notebook workspace. Possible values are: + Creating, Online, Deleting, Failed, Updating. + :vartype status: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'notebook_server_endpoint': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'notebook_server_endpoint': {'key': 'properties.notebookServerEndpoint', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(NotebookWorkspace, self).__init__(**kwargs) + self.notebook_server_endpoint = None + self.status = None + + +class NotebookWorkspaceConnectionInfoResult(Model): + """The connection info for the given notebook workspace. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar auth_token: Specifies auth token used for connecting to Notebook + server (uses token-based auth). + :vartype auth_token: str + :ivar notebook_server_endpoint: Specifies the endpoint of Notebook server. + :vartype notebook_server_endpoint: str + """ + + _validation = { + 'auth_token': {'readonly': True}, + 'notebook_server_endpoint': {'readonly': True}, + } + + _attribute_map = { + 'auth_token': {'key': 'authToken', 'type': 'str'}, + 'notebook_server_endpoint': {'key': 'notebookServerEndpoint', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(NotebookWorkspaceConnectionInfoResult, self).__init__(**kwargs) + self.auth_token = None + self.notebook_server_endpoint = None + + +class NotebookWorkspaceCreateUpdateParameters(ARMProxyResource): + """Parameters to create a notebook workspace resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(NotebookWorkspaceCreateUpdateParameters, self).__init__(**kwargs) + + class Operation(Model): """REST API operation. @@ -2905,6 +3129,10 @@ class PrivateEndpointConnection(ProxyResource): Private Endpoint Connection. :type private_link_service_connection_state: ~azure.mgmt.cosmosdb.models.PrivateLinkServiceConnectionStateProperty + :param group_id: Group id of the private endpoint. + :type group_id: str + :param provisioning_state: Provisioning state of the private endpoint. + :type provisioning_state: str """ _validation = { @@ -2919,12 +3147,16 @@ class PrivateEndpointConnection(ProxyResource): 'type': {'key': 'type', 'type': 'str'}, 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpointProperty'}, 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionStateProperty'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, *, private_endpoint=None, private_link_service_connection_state=None, **kwargs) -> None: + def __init__(self, *, private_endpoint=None, private_link_service_connection_state=None, group_id: str=None, provisioning_state: str=None, **kwargs) -> None: super(PrivateEndpointConnection, self).__init__(**kwargs) self.private_endpoint = private_endpoint self.private_link_service_connection_state = private_link_service_connection_state + self.group_id = group_id + self.provisioning_state = provisioning_state class PrivateEndpointProperty(Model): @@ -2959,6 +3191,8 @@ class PrivateLinkResource(ARMProxyResource): :vartype group_id: str :ivar required_members: The private link resource required member names. :vartype required_members: list[str] + :ivar required_zone_names: The private link resource required zone names. + :vartype required_zone_names: list[str] """ _validation = { @@ -2967,6 +3201,7 @@ class PrivateLinkResource(ARMProxyResource): 'type': {'readonly': True}, 'group_id': {'readonly': True}, 'required_members': {'readonly': True}, + 'required_zone_names': {'readonly': True}, } _attribute_map = { @@ -2975,12 +3210,14 @@ class PrivateLinkResource(ARMProxyResource): 'type': {'key': 'type', 'type': 'str'}, 'group_id': {'key': 'properties.groupId', 'type': 'str'}, 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, } def __init__(self, **kwargs) -> None: super(PrivateLinkResource, self).__init__(**kwargs) self.group_id = None self.required_members = None + self.required_zone_names = None class PrivateLinkServiceConnectionStateProperty(Model): @@ -3015,6 +3252,43 @@ def __init__(self, *, status: str=None, description: str=None, **kwargs) -> None self.actions_required = None +class ProvisionedThroughputSettingsResource(Model): + """Cosmos DB provisioned throughput settings object. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param max_throughput: Required. Represents maximum throughput container + can scale up to. + :type max_throughput: int + :param auto_upgrade_policy: Cosmos DB resource auto-upgrade policy + :type auto_upgrade_policy: + ~azure.mgmt.cosmosdb.models.AutoUpgradePolicyResource + :ivar target_max_throughput: Represents target maximum throughput + container can scale up to once offer is no longer in pending state. + :vartype target_max_throughput: int + """ + + _validation = { + 'max_throughput': {'required': True}, + 'target_max_throughput': {'readonly': True}, + } + + _attribute_map = { + 'max_throughput': {'key': 'maxThroughput', 'type': 'int'}, + 'auto_upgrade_policy': {'key': 'autoUpgradePolicy', 'type': 'AutoUpgradePolicyResource'}, + 'target_max_throughput': {'key': 'targetMaxThroughput', 'type': 'int'}, + } + + def __init__(self, *, max_throughput: int, auto_upgrade_policy=None, **kwargs) -> None: + super(ProvisionedThroughputSettingsResource, self).__init__(**kwargs) + self.max_throughput = max_throughput + self.auto_upgrade_policy = auto_upgrade_policy + self.target_max_throughput = None + + class RegionForOnlineOffline(Model): """Cosmos DB region to online or offline. @@ -3109,6 +3383,22 @@ def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs self.options = options +class SqlContainerGetPropertiesOptions(OptionsResource): + """SqlContainerGetPropertiesOptions. + + :param throughput: Value of the Cosmos DB resource throughput. Use the + ThroughputSetting resource when retrieving offer details. + :type throughput: int + """ + + _attribute_map = { + 'throughput': {'key': 'throughput', 'type': 'int'}, + } + + def __init__(self, *, throughput: int=None, **kwargs) -> None: + super(SqlContainerGetPropertiesOptions, self).__init__(throughput=throughput, **kwargs) + + class SqlContainerGetPropertiesResource(Model): """SqlContainerGetPropertiesResource. @@ -3198,6 +3488,9 @@ class SqlContainerGetResults(ARMResourceProperties): :param resource: :type resource: ~azure.mgmt.cosmosdb.models.SqlContainerGetPropertiesResource + :param options: + :type options: + ~azure.mgmt.cosmosdb.models.SqlContainerGetPropertiesOptions """ _validation = { @@ -3213,11 +3506,13 @@ class SqlContainerGetResults(ARMResourceProperties): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'resource': {'key': 'properties.resource', 'type': 'SqlContainerGetPropertiesResource'}, + 'options': {'key': 'properties.options', 'type': 'SqlContainerGetPropertiesOptions'}, } - def __init__(self, *, location: str=None, tags=None, resource=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, resource=None, options=None, **kwargs) -> None: super(SqlContainerGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource + self.options = options class SqlContainerResource(Model): @@ -3319,6 +3614,22 @@ def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs self.options = options +class SqlDatabaseGetPropertiesOptions(OptionsResource): + """SqlDatabaseGetPropertiesOptions. + + :param throughput: Value of the Cosmos DB resource throughput. Use the + ThroughputSetting resource when retrieving offer details. + :type throughput: int + """ + + _attribute_map = { + 'throughput': {'key': 'throughput', 'type': 'int'}, + } + + def __init__(self, *, throughput: int=None, **kwargs) -> None: + super(SqlDatabaseGetPropertiesOptions, self).__init__(throughput=throughput, **kwargs) + + class SqlDatabaseGetPropertiesResource(Model): """SqlDatabaseGetPropertiesResource. @@ -3391,6 +3702,8 @@ class SqlDatabaseGetResults(ARMResourceProperties): :param resource: :type resource: ~azure.mgmt.cosmosdb.models.SqlDatabaseGetPropertiesResource + :param options: + :type options: ~azure.mgmt.cosmosdb.models.SqlDatabaseGetPropertiesOptions """ _validation = { @@ -3406,11 +3719,13 @@ class SqlDatabaseGetResults(ARMResourceProperties): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'resource': {'key': 'properties.resource', 'type': 'SqlDatabaseGetPropertiesResource'}, + 'options': {'key': 'properties.options', 'type': 'SqlDatabaseGetPropertiesOptions'}, } - def __init__(self, *, location: str=None, tags=None, resource=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, resource=None, options=None, **kwargs) -> None: super(SqlDatabaseGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource + self.options = options class SqlDatabaseResource(Model): @@ -4000,6 +4315,22 @@ def __init__(self, *, resource, options, location: str=None, tags=None, **kwargs self.options = options +class TableGetPropertiesOptions(OptionsResource): + """TableGetPropertiesOptions. + + :param throughput: Value of the Cosmos DB resource throughput. Use the + ThroughputSetting resource when retrieving offer details. + :type throughput: int + """ + + _attribute_map = { + 'throughput': {'key': 'throughput', 'type': 'int'}, + } + + def __init__(self, *, throughput: int=None, **kwargs) -> None: + super(TableGetPropertiesOptions, self).__init__(throughput=throughput, **kwargs) + + class TableGetPropertiesResource(Model): """TableGetPropertiesResource. @@ -4061,6 +4392,8 @@ class TableGetResults(ARMResourceProperties): :type tags: dict[str, str] :param resource: :type resource: ~azure.mgmt.cosmosdb.models.TableGetPropertiesResource + :param options: + :type options: ~azure.mgmt.cosmosdb.models.TableGetPropertiesOptions """ _validation = { @@ -4076,11 +4409,13 @@ class TableGetResults(ARMResourceProperties): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'resource': {'key': 'properties.resource', 'type': 'TableGetPropertiesResource'}, + 'options': {'key': 'properties.options', 'type': 'TableGetPropertiesOptions'}, } - def __init__(self, *, location: str=None, tags=None, resource=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, resource=None, options=None, **kwargs) -> None: super(TableGetResults, self).__init__(location=location, tags=tags, **kwargs) self.resource = resource + self.options = options class TableResource(Model): @@ -4134,13 +4469,14 @@ class ThroughputSettingsGetPropertiesResource(Model): sending a request. :param throughput: Value of the Cosmos DB resource throughput. Either - throughput is required or autopilotSettings is required, but not both. + throughput is required or provisionedThroughputSettings is required, but + not both. :type throughput: int - :param autopilot_settings: Cosmos DB resource for Autopilot settings. - Either throughput is required or autopilotSettings is required, but not - both. - :type autopilot_settings: - ~azure.mgmt.cosmosdb.models.AutopilotSettingsResource + :param provisioned_throughput_settings: Cosmos DB resource for provisioned + throughput settings. Either throughput is required or + provisionedThroughputSettings is required, but not both. + :type provisioned_throughput_settings: + ~azure.mgmt.cosmosdb.models.ProvisionedThroughputSettingsResource :ivar minimum_throughput: The minimum throughput of the resource :vartype minimum_throughput: str :ivar offer_replace_pending: The throughput replace is pending @@ -4165,7 +4501,7 @@ class ThroughputSettingsGetPropertiesResource(Model): _attribute_map = { 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autopilot_settings': {'key': 'autopilotSettings', 'type': 'AutopilotSettingsResource'}, + 'provisioned_throughput_settings': {'key': 'provisionedThroughputSettings', 'type': 'ProvisionedThroughputSettingsResource'}, 'minimum_throughput': {'key': 'minimumThroughput', 'type': 'str'}, 'offer_replace_pending': {'key': 'offerReplacePending', 'type': 'str'}, '_rid': {'key': '_rid', 'type': 'str'}, @@ -4173,10 +4509,10 @@ class ThroughputSettingsGetPropertiesResource(Model): '_etag': {'key': '_etag', 'type': 'str'}, } - def __init__(self, *, throughput: int=None, autopilot_settings=None, **kwargs) -> None: + def __init__(self, *, throughput: int=None, provisioned_throughput_settings=None, **kwargs) -> None: super(ThroughputSettingsGetPropertiesResource, self).__init__(**kwargs) self.throughput = throughput - self.autopilot_settings = autopilot_settings + self.provisioned_throughput_settings = provisioned_throughput_settings self.minimum_throughput = None self.offer_replace_pending = None self._rid = None @@ -4228,19 +4564,20 @@ def __init__(self, *, location: str=None, tags=None, resource=None, **kwargs) -> class ThroughputSettingsResource(Model): """Cosmos DB resource throughput object. Either throughput is required or - autopilotSettings is required, but not both. + provisionedThroughputSettings is required, but not both. Variables are only populated by the server, and will be ignored when sending a request. :param throughput: Value of the Cosmos DB resource throughput. Either - throughput is required or autopilotSettings is required, but not both. + throughput is required or provisionedThroughputSettings is required, but + not both. :type throughput: int - :param autopilot_settings: Cosmos DB resource for Autopilot settings. - Either throughput is required or autopilotSettings is required, but not - both. - :type autopilot_settings: - ~azure.mgmt.cosmosdb.models.AutopilotSettingsResource + :param provisioned_throughput_settings: Cosmos DB resource for provisioned + throughput settings. Either throughput is required or + provisionedThroughputSettings is required, but not both. + :type provisioned_throughput_settings: + ~azure.mgmt.cosmosdb.models.ProvisionedThroughputSettingsResource :ivar minimum_throughput: The minimum throughput of the resource :vartype minimum_throughput: str :ivar offer_replace_pending: The throughput replace is pending @@ -4254,15 +4591,15 @@ class ThroughputSettingsResource(Model): _attribute_map = { 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autopilot_settings': {'key': 'autopilotSettings', 'type': 'AutopilotSettingsResource'}, + 'provisioned_throughput_settings': {'key': 'provisionedThroughputSettings', 'type': 'ProvisionedThroughputSettingsResource'}, 'minimum_throughput': {'key': 'minimumThroughput', 'type': 'str'}, 'offer_replace_pending': {'key': 'offerReplacePending', 'type': 'str'}, } - def __init__(self, *, throughput: int=None, autopilot_settings=None, **kwargs) -> None: + def __init__(self, *, throughput: int=None, provisioned_throughput_settings=None, **kwargs) -> None: super(ThroughputSettingsResource, self).__init__(**kwargs) self.throughput = throughput - self.autopilot_settings = autopilot_settings + self.provisioned_throughput_settings = provisioned_throughput_settings self.minimum_throughput = None self.offer_replace_pending = None diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_paged_models.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_paged_models.py index b519e101f881..3ea4f5d46a00 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_paged_models.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_paged_models.py @@ -272,6 +272,19 @@ class GremlinGraphGetResultsPaged(Paged): def __init__(self, *args, **kwargs): super(GremlinGraphGetResultsPaged, self).__init__(*args, **kwargs) +class NotebookWorkspacePaged(Paged): + """ + A paging container for iterating over a list of :class:`NotebookWorkspace ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[NotebookWorkspace]'} + } + + def __init__(self, *args, **kwargs): + + super(NotebookWorkspacePaged, self).__init__(*args, **kwargs) class PrivateLinkResourcePaged(Paged): """ A paging container for iterating over a list of :class:`PrivateLinkResource ` object diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/__init__.py index e95f28e83a62..bf6987802bed 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/__init__.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/__init__.py @@ -27,6 +27,7 @@ from ._table_resources_operations import TableResourcesOperations from ._cassandra_resources_operations import CassandraResourcesOperations from ._gremlin_resources_operations import GremlinResourcesOperations +from ._notebook_workspaces_operations import NotebookWorkspacesOperations from ._private_link_resources_operations import PrivateLinkResourcesOperations from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations @@ -49,6 +50,7 @@ 'TableResourcesOperations', 'CassandraResourcesOperations', 'GremlinResourcesOperations', + 'NotebookWorkspacesOperations', 'PrivateLinkResourcesOperations', 'PrivateEndpointConnectionsOperations', ] diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_resources_operations.py index ad836ef533e2..aa8dc7e6ff40 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_resources_operations.py @@ -27,7 +27,7 @@ class CassandraResourcesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-12-12". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2020-03-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-12" + self.api_version = "2020-03-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_operations.py index 8842120f320b..62acb5ed9172 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_operations.py @@ -25,7 +25,7 @@ class CollectionOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-12-12". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2020-03-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-12" + self.api_version = "2020-03-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_operations.py index d25527c3ccdc..3a94d3fa3546 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_operations.py @@ -25,7 +25,7 @@ class CollectionPartitionOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-12-12". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2020-03-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-12" + self.api_version = "2020-03-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_region_operations.py index fcd52bd117e6..cb4d246ea44d 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_region_operations.py @@ -25,7 +25,7 @@ class CollectionPartitionRegionOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-12-12". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2020-03-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-12" + self.api_version = "2020-03-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_region_operations.py index 9180263a19a7..dfacbe0fd915 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_region_operations.py @@ -25,7 +25,7 @@ class CollectionRegionOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-12-12". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2020-03-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-12" + self.api_version = "2020-03-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_account_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_account_region_operations.py index dfb7aaa49da3..a2a3172db14e 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_account_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_account_region_operations.py @@ -25,7 +25,7 @@ class DatabaseAccountRegionOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-12-12". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2020-03-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-12" + self.api_version = "2020-03-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_accounts_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_accounts_operations.py index 3645fa2359d0..c825709d9e86 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_accounts_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_accounts_operations.py @@ -27,7 +27,7 @@ class DatabaseAccountsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-12-12". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2020-03-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-12" + self.api_version = "2020-03-01" self.config = config @@ -87,7 +87,7 @@ def get( request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 404]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_operations.py index 2460e649729e..c62c6e33094e 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_operations.py @@ -25,7 +25,7 @@ class DatabaseOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-12-12". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2020-03-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-12" + self.api_version = "2020-03-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_gremlin_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_gremlin_resources_operations.py index 310532a6233c..b423e5cfd820 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_gremlin_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_gremlin_resources_operations.py @@ -27,7 +27,7 @@ class GremlinResourcesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-12-12". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2020-03-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-12" + self.api_version = "2020-03-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_mongo_db_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_mongo_db_resources_operations.py index df71938db559..93da0b0a09d3 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_mongo_db_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_mongo_db_resources_operations.py @@ -27,7 +27,7 @@ class MongoDBResourcesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-12-12". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2020-03-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-12" + self.api_version = "2020-03-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_notebook_workspaces_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_notebook_workspaces_operations.py new file mode 100644 index 000000000000..14466ff12082 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_notebook_workspaces_operations.py @@ -0,0 +1,574 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class NotebookWorkspacesOperations(object): + """NotebookWorkspacesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-08-01". + :ivar notebook_workspace_name: The name of the notebook workspace resource. Constant value: "default". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-01" + self.notebook_workspace_name = "default" + + self.config = config + + def list_by_database_account( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Gets the notebook workspace resources of an existing Cosmos DB account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of NotebookWorkspace + :rtype: + ~azure.mgmt.cosmosdb.models.NotebookWorkspacePaged[~azure.mgmt.cosmosdb.models.NotebookWorkspace] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_database_account.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.NotebookWorkspacePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_database_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces'} + + def get( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Gets the notebook workspace for a Cosmos DB account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NotebookWorkspace or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.cosmosdb.models.NotebookWorkspace or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'notebookWorkspaceName': self._serialize.url("self.notebook_workspace_name", self.notebook_workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NotebookWorkspace', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}'} + + + def _create_or_update_initial( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + notebook_create_update_parameters = None + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'notebookWorkspaceName': self._serialize.url("self.notebook_workspace_name", self.notebook_workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(notebook_create_update_parameters, 'NotebookWorkspaceCreateUpdateParameters') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('NotebookWorkspace', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, account_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates the notebook workspace for a Cosmos DB account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns NotebookWorkspace or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.cosmosdb.models.NotebookWorkspace] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.cosmosdb.models.NotebookWorkspace]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + account_name=account_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('NotebookWorkspace', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}'} + + + def _delete_initial( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'notebookWorkspaceName': self._serialize.url("self.notebook_workspace_name", self.notebook_workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, account_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the notebook workspace for a Cosmos DB account. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}'} + + def list_connection_info( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + """Retrieves the connection info for the notebook workspace. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NotebookWorkspaceConnectionInfoResult or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.cosmosdb.models.NotebookWorkspaceConnectionInfoResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_connection_info.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'notebookWorkspaceName': self._serialize.url("self.notebook_workspace_name", self.notebook_workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NotebookWorkspaceConnectionInfoResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_connection_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/listConnectionInfo'} + + + def _regenerate_auth_token_initial( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.regenerate_auth_token.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'notebookWorkspaceName': self._serialize.url("self.notebook_workspace_name", self.notebook_workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def regenerate_auth_token( + self, resource_group_name, account_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Regenerates the auth token for the notebook workspace. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._regenerate_auth_token_initial( + resource_group_name=resource_group_name, + account_name=account_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + regenerate_auth_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/regenerateAuthToken'} + + + def _start_initial( + self, resource_group_name, account_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'notebookWorkspaceName': self._serialize.url("self.notebook_workspace_name", self.notebook_workspace_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start( + self, resource_group_name, account_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Starts the notebook workspace. + + :param resource_group_name: Name of an Azure resource group. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._start_initial( + resource_group_name=resource_group_name, + account_name=account_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/start'} diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_operations.py index b1075244124e..073d55146faa 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_operations.py @@ -25,7 +25,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-12-12". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2020-03-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-12" + self.api_version = "2020-03-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_operations.py index 43b3d9f7cf9d..539b4bdc34a2 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_operations.py @@ -25,7 +25,7 @@ class PartitionKeyRangeIdOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-12-12". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2020-03-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-12" + self.api_version = "2020-03-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_region_operations.py index 4817b3a96c5f..5661f1427ecf 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_region_operations.py @@ -25,7 +25,7 @@ class PartitionKeyRangeIdRegionOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-12-12". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2020-03-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-12" + self.api_version = "2020-03-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_operations.py index 54c862d5c341..c083d5f21dac 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_operations.py @@ -25,7 +25,7 @@ class PercentileOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-12-12". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2020-03-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-12" + self.api_version = "2020-03-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_source_target_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_source_target_operations.py index 0675e8c2b0dd..1333805058ec 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_source_target_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_source_target_operations.py @@ -25,7 +25,7 @@ class PercentileSourceTargetOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-12-12". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2020-03-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-12" + self.api_version = "2020-03-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_target_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_target_operations.py index 7626209064c5..d83db549e7d2 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_target_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_target_operations.py @@ -25,7 +25,7 @@ class PercentileTargetOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-12-12". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2020-03-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-12" + self.api_version = "2020-03-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_private_endpoint_connections_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_private_endpoint_connections_operations.py index 8db4c846d2ed..1e3d19ffc9fc 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_private_endpoint_connections_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_private_endpoint_connections_operations.py @@ -182,9 +182,7 @@ def get( def _create_or_update_initial( - self, resource_group_name, account_name, private_endpoint_connection_name, private_endpoint=None, private_link_service_connection_state=None, custom_headers=None, raw=False, **operation_config): - parameters = models.PrivateEndpointConnection(private_endpoint=private_endpoint, private_link_service_connection_state=private_link_service_connection_state) - + self, resource_group_name, account_name, private_endpoint_connection_name, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { @@ -232,7 +230,7 @@ def _create_or_update_initial( return deserialized def create_or_update( - self, resource_group_name, account_name, private_endpoint_connection_name, private_endpoint=None, private_link_service_connection_state=None, custom_headers=None, raw=False, polling=True, **operation_config): + self, resource_group_name, account_name, private_endpoint_connection_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Approve or reject a private endpoint connection with a given name. :param resource_group_name: The name of the resource group. The name @@ -243,14 +241,9 @@ def create_or_update( :param private_endpoint_connection_name: The name of the private endpoint connection. :type private_endpoint_connection_name: str - :param private_endpoint: Private endpoint which the connection belongs - to. - :type private_endpoint: - ~azure.mgmt.cosmosdb.models.PrivateEndpointProperty - :param private_link_service_connection_state: Connection State of the - Private Endpoint Connection. - :type private_link_service_connection_state: - ~azure.mgmt.cosmosdb.models.PrivateLinkServiceConnectionStateProperty + :param parameters: + :type parameters: + ~azure.mgmt.cosmosdb.models.PrivateEndpointConnection :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -270,8 +263,7 @@ def create_or_update( resource_group_name=resource_group_name, account_name=account_name, private_endpoint_connection_name=private_endpoint_connection_name, - private_endpoint=private_endpoint, - private_link_service_connection_state=private_link_service_connection_state, + parameters=parameters, custom_headers=custom_headers, raw=True, **operation_config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_sql_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_sql_resources_operations.py index c32445f872de..6a3c7be532bc 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_sql_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_sql_resources_operations.py @@ -27,7 +27,7 @@ class SqlResourcesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-12-12". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2020-03-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-12" + self.api_version = "2020-03-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_table_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_table_resources_operations.py index 88d83483f18c..dcc793ae68a0 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_table_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_table_resources_operations.py @@ -27,7 +27,7 @@ class TableResourcesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2019-12-12". + :ivar api_version: Version of the API to be used with the client request. The current version is 2019-08-01. Constant value: "2020-03-01". """ models = models @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-12-12" + self.api_version = "2020-03-01" self.config = config diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/version.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/version.py index 0572370bbea0..aeae719acfc3 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/version.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.12.0" +VERSION = "0.13.0" diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/tests/recordings/test_mgmt_cosmosdb.test_accounts_create.yaml b/sdk/cosmos/azure-mgmt-cosmosdb/tests/recordings/test_mgmt_cosmosdb.test_accounts_create.yaml index 2d2700978817..8484a5b7b99a 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/tests/recordings/test_mgmt_cosmosdb.test_accounts_create.yaml +++ b/sdk/cosmos/azure-mgmt-cosmosdb/tests/recordings/test_mgmt_cosmosdb.test_accounts_create.yaml @@ -10,11 +10,11 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python accept-language: - en-US method: HEAD - uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pycosmosdbx1427b100e?api-version=2019-12-12 + uri: https://management.azure.com/providers/Microsoft.DocumentDB/databaseAccountNames/pycosmosdbx1427b100e?api-version=2020-03-01 response: body: string: '' @@ -22,9 +22,9 @@ interactions: cache-control: - no-store, no-cache content-length: - - '147' + - '148' date: - - Thu, 27 Feb 2020 18:34:15 GMT + - Sat, 18 Apr 2020 06:49:03 GMT pragma: - no-cache server: @@ -52,34 +52,34 @@ interactions: - application/json; charset=utf-8 User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python accept-language: - en-US method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_create427b100e/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx1427b100e?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_create427b100e/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx1427b100e?api-version=2020-03-01 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_create427b100e/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx1427b100e","name":"pycosmosdbx1427b100e","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"pycosmosdbx1427b100e-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"pycosmosdbx1427b100e-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"pycosmosdbx1427b100e-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"pycosmosdbx1427b100e-westus","locationName":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Creating","ipRangeFilter":"","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"apiProperties":null,"databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"pycosmosdbx1427b100e-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"pycosmosdbx1427b100e-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"pycosmosdbx1427b100e-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"pycosmosdbx1427b100e-westus","locationName":"West US","failoverPriority":0}],"cors":[],"capabilities":[]}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 cache-control: - no-store, no-cache content-length: - - '1411' + - '1471' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_cosmosdb_test_accounts_create427b100e/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx1427b100e?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_cosmosdb_test_accounts_create427b100e/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx1427b100e?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:34:24 GMT + - Sat, 18 Apr 2020 06:49:12 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_create427b100e/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx1427b100e/operationResults/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_create427b100e/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx1427b100e/operationResults/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 pragma: - no-cache server: @@ -93,7 +93,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 x-ms-ratelimit-remaining-subscription-writes: - '1199' status: @@ -110,9 +110,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -122,11 +122,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:34:56 GMT + - Sat, 18 Apr 2020 06:49:44 GMT pragma: - no-cache server: @@ -140,7 +140,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -155,9 +155,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -167,11 +167,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:35:27 GMT + - Sat, 18 Apr 2020 06:50:14 GMT pragma: - no-cache server: @@ -185,7 +185,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -200,9 +200,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -212,11 +212,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:35:57 GMT + - Sat, 18 Apr 2020 06:50:44 GMT pragma: - no-cache server: @@ -230,7 +230,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -245,9 +245,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -257,11 +257,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:36:27 GMT + - Sat, 18 Apr 2020 06:51:14 GMT pragma: - no-cache server: @@ -275,7 +275,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -290,9 +290,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -302,11 +302,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:36:57 GMT + - Sat, 18 Apr 2020 06:51:47 GMT pragma: - no-cache server: @@ -320,7 +320,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -335,9 +335,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -347,11 +347,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:37:29 GMT + - Sat, 18 Apr 2020 06:52:17 GMT pragma: - no-cache server: @@ -365,7 +365,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -380,9 +380,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -392,11 +392,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:37:59 GMT + - Sat, 18 Apr 2020 06:52:47 GMT pragma: - no-cache server: @@ -410,7 +410,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -425,9 +425,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -437,11 +437,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:38:29 GMT + - Sat, 18 Apr 2020 06:53:18 GMT pragma: - no-cache server: @@ -455,7 +455,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -470,9 +470,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -482,11 +482,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:38:59 GMT + - Sat, 18 Apr 2020 06:53:49 GMT pragma: - no-cache server: @@ -500,7 +500,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -515,9 +515,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -527,11 +527,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:39:30 GMT + - Sat, 18 Apr 2020 06:54:19 GMT pragma: - no-cache server: @@ -545,7 +545,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -560,9 +560,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -572,11 +572,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:40:01 GMT + - Sat, 18 Apr 2020 06:54:49 GMT pragma: - no-cache server: @@ -590,7 +590,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -605,9 +605,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -617,11 +617,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:40:31 GMT + - Sat, 18 Apr 2020 06:55:21 GMT pragma: - no-cache server: @@ -635,7 +635,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -650,9 +650,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -662,11 +662,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:41:01 GMT + - Sat, 18 Apr 2020 06:55:51 GMT pragma: - no-cache server: @@ -680,7 +680,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -695,9 +695,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -707,11 +707,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:41:32 GMT + - Sat, 18 Apr 2020 06:56:21 GMT pragma: - no-cache server: @@ -725,7 +725,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -740,9 +740,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -752,11 +752,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:42:02 GMT + - Sat, 18 Apr 2020 06:56:52 GMT pragma: - no-cache server: @@ -770,7 +770,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -785,9 +785,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -797,11 +797,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:42:33 GMT + - Sat, 18 Apr 2020 06:57:22 GMT pragma: - no-cache server: @@ -815,7 +815,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -830,9 +830,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -842,11 +842,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:43:03 GMT + - Sat, 18 Apr 2020 06:57:54 GMT pragma: - no-cache server: @@ -860,7 +860,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -875,9 +875,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -887,11 +887,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:43:34 GMT + - Sat, 18 Apr 2020 06:58:24 GMT pragma: - no-cache server: @@ -905,7 +905,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -920,9 +920,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -932,11 +932,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:44:04 GMT + - Sat, 18 Apr 2020 06:58:54 GMT pragma: - no-cache server: @@ -950,7 +950,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -965,234 +965,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 - content-type: - - application/json - date: - - Thu, 27 Feb 2020 18:44:35 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.9.2 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 - content-type: - - application/json - date: - - Thu, 27 Feb 2020 18:45:05 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.9.2 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 - content-type: - - application/json - date: - - Thu, 27 Feb 2020 18:45:36 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.9.2 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 - content-type: - - application/json - date: - - Thu, 27 Feb 2020 18:46:07 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.9.2 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 - content-type: - - application/json - date: - - Thu, 27 Feb 2020 18:46:37 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.9.2 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 response: body: string: '{"status":"Succeeded"}' @@ -1202,11 +977,11 @@ interactions: content-length: - '22' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4fad8b75-d309-44ad-b6aa-cac7b89741a5?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/8a60bf73-dbfc-4db5-bc4d-8851cea491ba?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:47:08 GMT + - Sat, 18 Apr 2020 06:59:25 GMT pragma: - no-cache server: @@ -1220,7 +995,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -1235,13 +1010,13 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_create427b100e/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx1427b100e?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_create427b100e/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx1427b100e?api-version=2020-03-01 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_create427b100e/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx1427b100e","name":"pycosmosdbx1427b100e","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pycosmosdbx1427b100e.documents.azure.com:443/","ipRangeFilter":"","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"pycosmosdbx1427b100e-westus","locationName":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pycosmosdbx1427b100e.documents.azure.com:443/","ipRangeFilter":"","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"apiProperties":null,"databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"pycosmosdbx1427b100e-westus","locationName":"West US","documentEndpoint":"https://pycosmosdbx1427b100e-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"pycosmosdbx1427b100e-westus","locationName":"West US","documentEndpoint":"https://pycosmosdbx1427b100e-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"pycosmosdbx1427b100e-westus","locationName":"West US","documentEndpoint":"https://pycosmosdbx1427b100e-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"pycosmosdbx1427b100e-westus","locationName":"West @@ -1250,13 +1025,13 @@ interactions: cache-control: - no-store, no-cache content-length: - - '1720' + - '1796' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_cosmosdb_test_accounts_create427b100e/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx1427b100e?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_cosmosdb_test_accounts_create427b100e/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx1427b100e?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:47:08 GMT + - Sat, 18 Apr 2020 06:59:25 GMT pragma: - no-cache server: @@ -1270,7 +1045,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/tests/recordings/test_mgmt_cosmosdb.test_accounts_delete.yaml b/sdk/cosmos/azure-mgmt-cosmosdb/tests/recordings/test_mgmt_cosmosdb.test_accounts_delete.yaml index c18dd7b175d4..ffcd82888f14 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/tests/recordings/test_mgmt_cosmosdb.test_accounts_delete.yaml +++ b/sdk/cosmos/azure-mgmt-cosmosdb/tests/recordings/test_mgmt_cosmosdb.test_accounts_delete.yaml @@ -15,34 +15,34 @@ interactions: - application/json; charset=utf-8 User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python accept-language: - en-US method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_delete4268100d/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbx34268100d?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_delete4268100d/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbx34268100d?api-version=2020-03-01 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_delete4268100d/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbx34268100d","name":"pydocumentdbx34268100d","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"pydocumentdbx34268100d-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"pydocumentdbx34268100d-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"pydocumentdbx34268100d-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"pydocumentdbx34268100d-westus","locationName":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Creating","ipRangeFilter":"","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"apiProperties":null,"databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"pydocumentdbx34268100d-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"pydocumentdbx34268100d-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"pydocumentdbx34268100d-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"pydocumentdbx34268100d-westus","locationName":"West US","failoverPriority":0}],"cors":[],"capabilities":[]}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 cache-control: - no-store, no-cache content-length: - - '1423' + - '1483' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_cosmosdb_test_accounts_delete4268100d/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbx34268100d?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_cosmosdb_test_accounts_delete4268100d/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbx34268100d?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:47:31 GMT + - Sat, 18 Apr 2020 06:59:48 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_delete4268100d/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbx34268100d/operationResults/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_delete4268100d/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbx34268100d/operationResults/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 pragma: - no-cache server: @@ -56,7 +56,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 x-ms-ratelimit-remaining-subscription-writes: - '1199' status: @@ -73,9 +73,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -85,11 +85,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:48:01 GMT + - Sat, 18 Apr 2020 07:00:20 GMT pragma: - no-cache server: @@ -103,7 +103,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -118,9 +118,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -130,11 +130,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:48:31 GMT + - Sat, 18 Apr 2020 07:00:50 GMT pragma: - no-cache server: @@ -148,7 +148,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -163,9 +163,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -175,11 +175,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:49:01 GMT + - Sat, 18 Apr 2020 07:01:20 GMT pragma: - no-cache server: @@ -193,7 +193,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -208,9 +208,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -220,11 +220,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:49:33 GMT + - Sat, 18 Apr 2020 07:01:50 GMT pragma: - no-cache server: @@ -238,7 +238,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -253,9 +253,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -265,11 +265,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:50:03 GMT + - Sat, 18 Apr 2020 07:02:21 GMT pragma: - no-cache server: @@ -283,7 +283,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -298,9 +298,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -310,11 +310,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:50:34 GMT + - Sat, 18 Apr 2020 07:02:52 GMT pragma: - no-cache server: @@ -328,7 +328,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -343,9 +343,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -355,11 +355,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:51:09 GMT + - Sat, 18 Apr 2020 07:03:22 GMT pragma: - no-cache server: @@ -373,7 +373,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -388,9 +388,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -400,11 +400,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:51:40 GMT + - Sat, 18 Apr 2020 07:03:53 GMT pragma: - no-cache server: @@ -418,7 +418,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -433,9 +433,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -445,11 +445,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:52:10 GMT + - Sat, 18 Apr 2020 07:04:24 GMT pragma: - no-cache server: @@ -463,7 +463,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -478,9 +478,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -490,11 +490,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:52:40 GMT + - Sat, 18 Apr 2020 07:04:54 GMT pragma: - no-cache server: @@ -508,7 +508,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -523,9 +523,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -535,11 +535,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:53:10 GMT + - Sat, 18 Apr 2020 07:05:24 GMT pragma: - no-cache server: @@ -553,7 +553,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -568,9 +568,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -580,11 +580,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:53:42 GMT + - Sat, 18 Apr 2020 07:05:56 GMT pragma: - no-cache server: @@ -598,7 +598,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -613,9 +613,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -625,11 +625,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:54:12 GMT + - Sat, 18 Apr 2020 07:06:26 GMT pragma: - no-cache server: @@ -643,7 +643,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -658,9 +658,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -670,11 +670,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:54:42 GMT + - Sat, 18 Apr 2020 07:06:57 GMT pragma: - no-cache server: @@ -688,7 +688,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -703,9 +703,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -715,11 +715,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:55:13 GMT + - Sat, 18 Apr 2020 07:07:27 GMT pragma: - no-cache server: @@ -733,7 +733,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -748,9 +748,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -760,11 +760,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:55:44 GMT + - Sat, 18 Apr 2020 07:07:58 GMT pragma: - no-cache server: @@ -778,7 +778,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -793,9 +793,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -805,11 +805,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:56:16 GMT + - Sat, 18 Apr 2020 07:08:29 GMT pragma: - no-cache server: @@ -823,7 +823,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -838,9 +838,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -850,11 +850,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:56:46 GMT + - Sat, 18 Apr 2020 07:08:59 GMT pragma: - no-cache server: @@ -868,7 +868,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -883,9 +883,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -895,11 +895,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:57:17 GMT + - Sat, 18 Apr 2020 07:09:30 GMT pragma: - no-cache server: @@ -913,7 +913,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -928,144 +928,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 - content-type: - - application/json - date: - - Thu, 27 Feb 2020 18:57:47 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.9.2 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 - content-type: - - application/json - date: - - Thu, 27 Feb 2020 18:58:17 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.9.2 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 - content-type: - - application/json - date: - - Thu, 27 Feb 2020 18:58:47 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.9.2 - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 response: body: string: '{"status":"Succeeded"}' @@ -1075,11 +940,11 @@ interactions: content-length: - '22' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/4caadc7b-13ab-4054-ac45-9b3876d1825e?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/0421e989-bb1f-4e62-9cf9-3620b4730854?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:59:19 GMT + - Sat, 18 Apr 2020 07:10:00 GMT pragma: - no-cache server: @@ -1093,7 +958,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -1108,13 +973,13 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_delete4268100d/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbx34268100d?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_delete4268100d/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbx34268100d?api-version=2020-03-01 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_delete4268100d/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbx34268100d","name":"pydocumentdbx34268100d","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocumentdbx34268100d.documents.azure.com:443/","ipRangeFilter":"","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"pydocumentdbx34268100d-westus","locationName":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pydocumentdbx34268100d.documents.azure.com:443/","ipRangeFilter":"","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"apiProperties":null,"databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"pydocumentdbx34268100d-westus","locationName":"West US","documentEndpoint":"https://pydocumentdbx34268100d-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"pydocumentdbx34268100d-westus","locationName":"West US","documentEndpoint":"https://pydocumentdbx34268100d-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"pydocumentdbx34268100d-westus","locationName":"West US","documentEndpoint":"https://pydocumentdbx34268100d-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"pydocumentdbx34268100d-westus","locationName":"West @@ -1123,13 +988,13 @@ interactions: cache-control: - no-store, no-cache content-length: - - '1740' + - '1816' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_cosmosdb_test_accounts_delete4268100d/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbx34268100d?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_cosmosdb_test_accounts_delete4268100d/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbx34268100d?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:59:19 GMT + - Sat, 18 Apr 2020 07:10:00 GMT pragma: - no-cache server: @@ -1143,7 +1008,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -1160,29 +1025,29 @@ interactions: - '0' User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python accept-language: - en-US method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_delete4268100d/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbx34268100d?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_delete4268100d/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbx34268100d?api-version=2020-03-01 response: body: string: '{"status":"Enqueued"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d52040-a162-4f10-ab9c-e7199bbb71e7?api-version=2019-12-12 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1cc8bcf4-8e9d-4981-b2ba-1573135b1d7b?api-version=2020-03-01 cache-control: - no-store, no-cache content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_cosmosdb_test_accounts_delete4268100d/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbx34268100d?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_cosmosdb_test_accounts_delete4268100d/providers/Microsoft.DocumentDB/databaseAccounts/pydocumentdbx34268100d?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:59:22 GMT + - Sat, 18 Apr 2020 07:10:04 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/operationResults/54d52040-a162-4f10-ab9c-e7199bbb71e7?api-version=2019-12-12 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/operationResults/1cc8bcf4-8e9d-4981-b2ba-1573135b1d7b?api-version=2020-03-01 pragma: - no-cache server: @@ -1192,9 +1057,9 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 x-ms-ratelimit-remaining-subscription-deletes: - - '14997' + - '14999' status: code: 202 message: Accepted @@ -1209,9 +1074,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d52040-a162-4f10-ab9c-e7199bbb71e7?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1cc8bcf4-8e9d-4981-b2ba-1573135b1d7b?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -1221,11 +1086,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d52040-a162-4f10-ab9c-e7199bbb71e7?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1cc8bcf4-8e9d-4981-b2ba-1573135b1d7b?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 18:59:53 GMT + - Sat, 18 Apr 2020 07:10:35 GMT pragma: - no-cache server: @@ -1239,7 +1104,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -1254,9 +1119,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d52040-a162-4f10-ab9c-e7199bbb71e7?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1cc8bcf4-8e9d-4981-b2ba-1573135b1d7b?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -1266,11 +1131,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d52040-a162-4f10-ab9c-e7199bbb71e7?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1cc8bcf4-8e9d-4981-b2ba-1573135b1d7b?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:00:23 GMT + - Sat, 18 Apr 2020 07:11:05 GMT pragma: - no-cache server: @@ -1284,7 +1149,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -1299,9 +1164,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d52040-a162-4f10-ab9c-e7199bbb71e7?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1cc8bcf4-8e9d-4981-b2ba-1573135b1d7b?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -1311,11 +1176,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d52040-a162-4f10-ab9c-e7199bbb71e7?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1cc8bcf4-8e9d-4981-b2ba-1573135b1d7b?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:00:53 GMT + - Sat, 18 Apr 2020 07:11:36 GMT pragma: - no-cache server: @@ -1329,7 +1194,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -1344,9 +1209,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d52040-a162-4f10-ab9c-e7199bbb71e7?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1cc8bcf4-8e9d-4981-b2ba-1573135b1d7b?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -1356,11 +1221,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d52040-a162-4f10-ab9c-e7199bbb71e7?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1cc8bcf4-8e9d-4981-b2ba-1573135b1d7b?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:01:24 GMT + - Sat, 18 Apr 2020 07:12:07 GMT pragma: - no-cache server: @@ -1374,7 +1239,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -1389,9 +1254,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d52040-a162-4f10-ab9c-e7199bbb71e7?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1cc8bcf4-8e9d-4981-b2ba-1573135b1d7b?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -1401,11 +1266,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d52040-a162-4f10-ab9c-e7199bbb71e7?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1cc8bcf4-8e9d-4981-b2ba-1573135b1d7b?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:01:54 GMT + - Sat, 18 Apr 2020 07:12:38 GMT pragma: - no-cache server: @@ -1419,7 +1284,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -1434,9 +1299,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d52040-a162-4f10-ab9c-e7199bbb71e7?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1cc8bcf4-8e9d-4981-b2ba-1573135b1d7b?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -1446,11 +1311,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d52040-a162-4f10-ab9c-e7199bbb71e7?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1cc8bcf4-8e9d-4981-b2ba-1573135b1d7b?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:02:24 GMT + - Sat, 18 Apr 2020 07:13:08 GMT pragma: - no-cache server: @@ -1464,7 +1329,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -1479,9 +1344,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d52040-a162-4f10-ab9c-e7199bbb71e7?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1cc8bcf4-8e9d-4981-b2ba-1573135b1d7b?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -1491,11 +1356,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d52040-a162-4f10-ab9c-e7199bbb71e7?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1cc8bcf4-8e9d-4981-b2ba-1573135b1d7b?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:02:54 GMT + - Sat, 18 Apr 2020 07:13:38 GMT pragma: - no-cache server: @@ -1509,7 +1374,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -1524,9 +1389,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d52040-a162-4f10-ab9c-e7199bbb71e7?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1cc8bcf4-8e9d-4981-b2ba-1573135b1d7b?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -1536,11 +1401,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d52040-a162-4f10-ab9c-e7199bbb71e7?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1cc8bcf4-8e9d-4981-b2ba-1573135b1d7b?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:03:26 GMT + - Sat, 18 Apr 2020 07:14:09 GMT pragma: - no-cache server: @@ -1554,7 +1419,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -1569,9 +1434,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d52040-a162-4f10-ab9c-e7199bbb71e7?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1cc8bcf4-8e9d-4981-b2ba-1573135b1d7b?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -1581,11 +1446,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d52040-a162-4f10-ab9c-e7199bbb71e7?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1cc8bcf4-8e9d-4981-b2ba-1573135b1d7b?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:03:56 GMT + - Sat, 18 Apr 2020 07:14:40 GMT pragma: - no-cache server: @@ -1599,7 +1464,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -1614,9 +1479,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d52040-a162-4f10-ab9c-e7199bbb71e7?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1cc8bcf4-8e9d-4981-b2ba-1573135b1d7b?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -1626,11 +1491,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d52040-a162-4f10-ab9c-e7199bbb71e7?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1cc8bcf4-8e9d-4981-b2ba-1573135b1d7b?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:04:27 GMT + - Sat, 18 Apr 2020 07:15:10 GMT pragma: - no-cache server: @@ -1644,7 +1509,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -1659,9 +1524,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d52040-a162-4f10-ab9c-e7199bbb71e7?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1cc8bcf4-8e9d-4981-b2ba-1573135b1d7b?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -1671,11 +1536,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d52040-a162-4f10-ab9c-e7199bbb71e7?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1cc8bcf4-8e9d-4981-b2ba-1573135b1d7b?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:04:57 GMT + - Sat, 18 Apr 2020 07:15:40 GMT pragma: - no-cache server: @@ -1689,7 +1554,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -1704,9 +1569,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d52040-a162-4f10-ab9c-e7199bbb71e7?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1cc8bcf4-8e9d-4981-b2ba-1573135b1d7b?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -1716,11 +1581,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d52040-a162-4f10-ab9c-e7199bbb71e7?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1cc8bcf4-8e9d-4981-b2ba-1573135b1d7b?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:05:28 GMT + - Sat, 18 Apr 2020 07:16:10 GMT pragma: - no-cache server: @@ -1734,7 +1599,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -1749,9 +1614,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d52040-a162-4f10-ab9c-e7199bbb71e7?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1cc8bcf4-8e9d-4981-b2ba-1573135b1d7b?api-version=2020-03-01 response: body: string: '{"status":"Succeeded"}' @@ -1761,11 +1626,11 @@ interactions: content-length: - '22' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/54d52040-a162-4f10-ab9c-e7199bbb71e7?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1cc8bcf4-8e9d-4981-b2ba-1573135b1d7b?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:05:58 GMT + - Sat, 18 Apr 2020 07:16:42 GMT pragma: - no-cache server: @@ -1779,7 +1644,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/tests/recordings/test_mgmt_cosmosdb.test_accounts_features.yaml b/sdk/cosmos/azure-mgmt-cosmosdb/tests/recordings/test_mgmt_cosmosdb.test_accounts_features.yaml index b749a63224f1..dcd88071f42d 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/tests/recordings/test_mgmt_cosmosdb.test_accounts_features.yaml +++ b/sdk/cosmos/azure-mgmt-cosmosdb/tests/recordings/test_mgmt_cosmosdb.test_accounts_features.yaml @@ -15,34 +15,34 @@ interactions: - application/json; charset=utf-8 User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python accept-language: - en-US method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9?api-version=2020-03-01 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9","name":"pycosmosdbx2640310f9","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Initializing","ipRangeFilter":"","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"pycosmosdbx2640310f9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"pycosmosdbx2640310f9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"pycosmosdbx2640310f9-westus","locationName":"West - US","provisioningState":"Initializing","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"pycosmosdbx2640310f9-westus","locationName":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Creating","ipRangeFilter":"","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"apiProperties":null,"databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"pycosmosdbx2640310f9-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"pycosmosdbx2640310f9-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"pycosmosdbx2640310f9-westus","locationName":"West + US","provisioningState":"Creating","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"pycosmosdbx2640310f9-westus","locationName":"West US","failoverPriority":0}],"cors":[],"capabilities":[]}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 cache-control: - no-store, no-cache content-length: - - '1413' + - '1473' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:06:18 GMT + - Sat, 18 Apr 2020 07:17:06 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9/operationResults/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9/operationResults/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 pragma: - no-cache server: @@ -56,54 +56,9 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 200 - message: Ok -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 - response: - body: - string: '{"status":"Dequeued"}' - headers: - cache-control: - - no-store, no-cache - content-length: - - '21' - content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 - content-type: - - application/json - date: - - Thu, 27 Feb 2020 19:06:48 GMT - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-gatewayversion: - - version=2.9.2 + - '1198' status: code: 200 message: Ok @@ -118,9 +73,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -130,11 +85,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:07:19 GMT + - Sat, 18 Apr 2020 07:17:37 GMT pragma: - no-cache server: @@ -148,7 +103,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -163,9 +118,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -175,11 +130,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:07:49 GMT + - Sat, 18 Apr 2020 07:18:08 GMT pragma: - no-cache server: @@ -193,7 +148,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -208,9 +163,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -220,11 +175,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:08:20 GMT + - Sat, 18 Apr 2020 07:18:38 GMT pragma: - no-cache server: @@ -238,7 +193,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -253,9 +208,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -265,11 +220,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:08:50 GMT + - Sat, 18 Apr 2020 07:19:09 GMT pragma: - no-cache server: @@ -283,7 +238,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -298,9 +253,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -310,11 +265,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:09:21 GMT + - Sat, 18 Apr 2020 07:19:39 GMT pragma: - no-cache server: @@ -328,7 +283,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -343,9 +298,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -355,11 +310,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:09:51 GMT + - Sat, 18 Apr 2020 07:20:10 GMT pragma: - no-cache server: @@ -373,7 +328,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -388,9 +343,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -400,11 +355,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:10:21 GMT + - Sat, 18 Apr 2020 07:20:40 GMT pragma: - no-cache server: @@ -418,7 +373,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -433,9 +388,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -445,11 +400,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:10:51 GMT + - Sat, 18 Apr 2020 07:21:11 GMT pragma: - no-cache server: @@ -463,7 +418,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -478,9 +433,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -490,11 +445,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:11:22 GMT + - Sat, 18 Apr 2020 07:21:42 GMT pragma: - no-cache server: @@ -508,7 +463,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -523,9 +478,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -535,11 +490,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:11:52 GMT + - Sat, 18 Apr 2020 07:22:12 GMT pragma: - no-cache server: @@ -553,7 +508,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -568,9 +523,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -580,11 +535,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:12:22 GMT + - Sat, 18 Apr 2020 07:22:42 GMT pragma: - no-cache server: @@ -598,7 +553,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -613,9 +568,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -625,11 +580,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:12:52 GMT + - Sat, 18 Apr 2020 07:23:12 GMT pragma: - no-cache server: @@ -643,7 +598,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -658,9 +613,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -670,11 +625,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:13:23 GMT + - Sat, 18 Apr 2020 07:23:43 GMT pragma: - no-cache server: @@ -688,7 +643,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -703,9 +658,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -715,11 +670,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:13:54 GMT + - Sat, 18 Apr 2020 07:24:14 GMT pragma: - no-cache server: @@ -733,7 +688,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -748,9 +703,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -760,11 +715,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:14:35 GMT + - Sat, 18 Apr 2020 07:24:45 GMT pragma: - no-cache server: @@ -778,7 +733,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -793,9 +748,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -805,11 +760,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:15:09 GMT + - Sat, 18 Apr 2020 07:25:14 GMT pragma: - no-cache server: @@ -823,7 +778,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -838,9 +793,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -850,11 +805,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:15:41 GMT + - Sat, 18 Apr 2020 07:25:45 GMT pragma: - no-cache server: @@ -868,7 +823,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -883,9 +838,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -895,11 +850,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:16:12 GMT + - Sat, 18 Apr 2020 07:26:16 GMT pragma: - no-cache server: @@ -913,7 +868,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -928,9 +883,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -940,11 +895,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:16:43 GMT + - Sat, 18 Apr 2020 07:26:46 GMT pragma: - no-cache server: @@ -958,7 +913,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -973,9 +928,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 response: body: string: '{"status":"Succeeded"}' @@ -985,11 +940,11 @@ interactions: content-length: - '22' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/fd98490a-dfab-4d91-bb85-71e2e6c2143a?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/c1616476-c8cf-434e-99c3-6dadc5993172?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:17:15 GMT + - Sat, 18 Apr 2020 07:27:16 GMT pragma: - no-cache server: @@ -1003,7 +958,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -1018,13 +973,13 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9?api-version=2020-03-01 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9","name":"pycosmosdbx2640310f9","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pycosmosdbx2640310f9.documents.azure.com:443/","ipRangeFilter":"","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"pycosmosdbx2640310f9-westus","locationName":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pycosmosdbx2640310f9.documents.azure.com:443/","ipRangeFilter":"","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"apiProperties":null,"databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"pycosmosdbx2640310f9-westus","locationName":"West US","documentEndpoint":"https://pycosmosdbx2640310f9-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"pycosmosdbx2640310f9-westus","locationName":"West US","documentEndpoint":"https://pycosmosdbx2640310f9-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"pycosmosdbx2640310f9-westus","locationName":"West US","documentEndpoint":"https://pycosmosdbx2640310f9-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"pycosmosdbx2640310f9-westus","locationName":"West @@ -1033,13 +988,13 @@ interactions: cache-control: - no-store, no-cache content-length: - - '1722' + - '1798' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:17:15 GMT + - Sat, 18 Apr 2020 07:27:16 GMT pragma: - no-cache server: @@ -1053,7 +1008,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -1068,15 +1023,15 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9?api-version=2020-03-01 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9","name":"pycosmosdbx2640310f9","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pycosmosdbx2640310f9.documents.azure.com:443/","ipRangeFilter":"","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"pycosmosdbx2640310f9-westus","locationName":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pycosmosdbx2640310f9.documents.azure.com:443/","ipRangeFilter":"","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"apiProperties":null,"databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"pycosmosdbx2640310f9-westus","locationName":"West US","documentEndpoint":"https://pycosmosdbx2640310f9-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"pycosmosdbx2640310f9-westus","locationName":"West US","documentEndpoint":"https://pycosmosdbx2640310f9-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"pycosmosdbx2640310f9-westus","locationName":"West US","documentEndpoint":"https://pycosmosdbx2640310f9-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"pycosmosdbx2640310f9-westus","locationName":"West @@ -1085,13 +1040,13 @@ interactions: cache-control: - no-store, no-cache content-length: - - '1722' + - '1798' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:17:16 GMT + - Sat, 18 Apr 2020 07:27:17 GMT pragma: - no-cache server: @@ -1105,7 +1060,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -1120,15 +1075,15 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2020-03-01 response: body: string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9","name":"pycosmosdbx2640310f9","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pycosmosdbx2640310f9.documents.azure.com:443/","ipRangeFilter":"","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"pycosmosdbx2640310f9-westus","locationName":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pycosmosdbx2640310f9.documents.azure.com:443/","ipRangeFilter":"","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"apiProperties":null,"databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"pycosmosdbx2640310f9-westus","locationName":"West US","documentEndpoint":"https://pycosmosdbx2640310f9-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"pycosmosdbx2640310f9-westus","locationName":"West US","documentEndpoint":"https://pycosmosdbx2640310f9-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"pycosmosdbx2640310f9-westus","locationName":"West US","documentEndpoint":"https://pycosmosdbx2640310f9-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"pycosmosdbx2640310f9-westus","locationName":"West @@ -1137,13 +1092,13 @@ interactions: cache-control: - no-store, no-cache content-length: - - '1734' + - '1810' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:17:16 GMT + - Sat, 18 Apr 2020 07:27:17 GMT pragma: - no-cache server: @@ -1157,7 +1112,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -1172,15 +1127,15 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python accept-language: - en-US method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2020-03-01 response: body: string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9","name":"pycosmosdbx2640310f9","location":"West - US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pycosmosdbx2640310f9.documents.azure.com:443/","ipRangeFilter":"","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"pycosmosdbx2640310f9-westus","locationName":"West + US","type":"Microsoft.DocumentDB/databaseAccounts","kind":"GlobalDocumentDB","tags":{},"properties":{"provisioningState":"Succeeded","documentEndpoint":"https://pycosmosdbx2640310f9.documents.azure.com:443/","ipRangeFilter":"","publicNetworkAccess":"Enabled","enableAutomaticFailover":false,"enableMultipleWriteLocations":false,"enablePartitionKeyMonitor":false,"isVirtualNetworkFilterEnabled":false,"virtualNetworkRules":[],"EnabledApiTypes":"Sql","disableKeyBasedMetadataWriteAccess":false,"enableFreeTier":false,"apiProperties":null,"databaseAccountOfferType":"Standard","consistencyPolicy":{"defaultConsistencyLevel":"Session","maxIntervalInSeconds":5,"maxStalenessPrefix":100},"configurationOverrides":{},"writeLocations":[{"id":"pycosmosdbx2640310f9-westus","locationName":"West US","documentEndpoint":"https://pycosmosdbx2640310f9-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"readLocations":[{"id":"pycosmosdbx2640310f9-westus","locationName":"West US","documentEndpoint":"https://pycosmosdbx2640310f9-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"locations":[{"id":"pycosmosdbx2640310f9-westus","locationName":"West US","documentEndpoint":"https://pycosmosdbx2640310f9-westus.documents.azure.com:443/","provisioningState":"Succeeded","failoverPriority":0,"isZoneRedundant":false}],"failoverPolicies":[{"id":"pycosmosdbx2640310f9-westus","locationName":"West @@ -1189,13 +1144,13 @@ interactions: cache-control: - no-store, no-cache content-length: - - '1734' + - '1810' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:17:16 GMT + - Sat, 18 Apr 2020 07:27:18 GMT pragma: - no-cache server: @@ -1209,7 +1164,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -1228,17 +1183,17 @@ interactions: - application/json; charset=utf-8 User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python accept-language: - en-US method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9/failoverPriorityChange?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9/failoverPriorityChange?api-version=2020-03-01 response: body: string: '{"status":"Enqueued"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/a8c5ac9a-6f05-42aa-9579-e0725f9354f1?api-version=2019-12-12 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1ac3c66a-8a4d-4906-9029-e8a6688b6ba9?api-version=2020-03-01 cache-control: - no-store, no-cache content-length: @@ -1246,9 +1201,9 @@ interactions: content-type: - application/json date: - - Thu, 27 Feb 2020 19:17:18 GMT + - Sat, 18 Apr 2020 07:27:19 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9/failoverPriorityChange/operationResults/a8c5ac9a-6f05-42aa-9579-e0725f9354f1?api-version=2019-12-12 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9/failoverPriorityChange/operationResults/1ac3c66a-8a4d-4906-9029-e8a6688b6ba9?api-version=2020-03-01 pragma: - no-cache server: @@ -1258,7 +1213,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 x-ms-ratelimit-remaining-subscription-writes: - '1199' status: @@ -1275,9 +1230,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/a8c5ac9a-6f05-42aa-9579-e0725f9354f1?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1ac3c66a-8a4d-4906-9029-e8a6688b6ba9?api-version=2020-03-01 response: body: string: '{"status":"Succeeded"}' @@ -1287,11 +1242,11 @@ interactions: content-length: - '22' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/a8c5ac9a-6f05-42aa-9579-e0725f9354f1?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/1ac3c66a-8a4d-4906-9029-e8a6688b6ba9?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:17:49 GMT + - Sat, 18 Apr 2020 07:27:51 GMT pragma: - no-cache server: @@ -1305,7 +1260,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -1322,14 +1277,14 @@ interactions: - '0' User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python accept-language: - en-US method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9/listKeys?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9/listKeys?api-version=2020-03-01 response: body: - string: '{"primaryMasterKey":"I79flnoINY2GAuB1VzMyRfqn4l7S4w73LLyQBarJpMAxjaGh1eCrYXXM8GN4os4CgmTtZ6YDwCcS1WmACbLD1w==","secondaryMasterKey":"xeBVSZG89v1EfRlT8JFGxwQlpjcX8gBSNYVxfAYztWzjLuB8a8o7pJUr0P6e8obbgNh4k0gynMGU1j3x6dDF5A==","primaryReadonlyMasterKey":"eBxOUSFIyGNSvChoFiZQJe4hjlvNiqPSdsFEFeeO9ex07g8sINxGxKidO2NSGv3uBq36uXqkwm7MVBo4AVZ9UA==","secondaryReadonlyMasterKey":"EtSVHJrWYl5LpGUhtCcjYc3GuZs03UdsUgD9CFxiAAEgHDJTonuPMfdlC6Y00Mj6hndBvhCTucBU1KfJOIRcZQ=="}' + string: '{"primaryMasterKey":"7TZ0zz3yFP4xMBI3XtLlVBuE4oQTmMdC6rNgEnUJQx7wzOKllxto4Bj3OQCOM4KnTicdpr44qMH0NWFqHW71Jw==","secondaryMasterKey":"fo3gvCw9ExcMhCWaWdjWBANNMXTgsfQwzktlLISqXIJBIVCVETYtPT5BXvXZNaxQ3OfNzdM6W28yTssYQMa1jA==","primaryReadonlyMasterKey":"EfV5HPt6qmp3KCTg91rvFEuOwDf0xMPJsoVViKmiUmQQkaf17SBD5rGYCMP5MvmaHFK3p9x6VhuRUHCf8ByEHQ==","secondaryReadonlyMasterKey":"rRKY4ToCiFJSsNvxrHQXaioLVzWw6PrB4MsNT15cuJmVhwTa0VibIMRG9wLnj0CFxND5Zj9L3MdW3T1rK7t0vw=="}' headers: cache-control: - no-store, no-cache @@ -1338,7 +1293,7 @@ interactions: content-type: - application/json date: - - Thu, 27 Feb 2020 19:17:50 GMT + - Sat, 18 Apr 2020 07:27:52 GMT pragma: - no-cache server: @@ -1352,7 +1307,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 x-ms-ratelimit-remaining-subscription-writes: - '1198' status: @@ -1371,14 +1326,14 @@ interactions: - '0' User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python accept-language: - en-US method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9/readonlykeys?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9/readonlykeys?api-version=2020-03-01 response: body: - string: '{"primaryReadonlyMasterKey":"eBxOUSFIyGNSvChoFiZQJe4hjlvNiqPSdsFEFeeO9ex07g8sINxGxKidO2NSGv3uBq36uXqkwm7MVBo4AVZ9UA==","secondaryReadonlyMasterKey":"EtSVHJrWYl5LpGUhtCcjYc3GuZs03UdsUgD9CFxiAAEgHDJTonuPMfdlC6Y00Mj6hndBvhCTucBU1KfJOIRcZQ=="}' + string: '{"primaryReadonlyMasterKey":"EfV5HPt6qmp3KCTg91rvFEuOwDf0xMPJsoVViKmiUmQQkaf17SBD5rGYCMP5MvmaHFK3p9x6VhuRUHCf8ByEHQ==","secondaryReadonlyMasterKey":"rRKY4ToCiFJSsNvxrHQXaioLVzWw6PrB4MsNT15cuJmVhwTa0VibIMRG9wLnj0CFxND5Zj9L3MdW3T1rK7t0vw=="}' headers: cache-control: - no-store, no-cache @@ -1387,7 +1342,7 @@ interactions: content-type: - application/json date: - - Thu, 27 Feb 2020 19:17:51 GMT + - Sat, 18 Apr 2020 07:27:53 GMT pragma: - no-cache server: @@ -1401,7 +1356,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 x-ms-ratelimit-remaining-subscription-writes: - '1197' status: @@ -1422,17 +1377,17 @@ interactions: - application/json; charset=utf-8 User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python accept-language: - en-US method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9/regenerateKey?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9/regenerateKey?api-version=2020-03-01 response: body: string: '{"status":"Enqueued"}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/34ab3d3a-aca9-48f3-b16c-3174f8abcecb?api-version=2019-12-12 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/25a175ac-5ff1-4221-b8c5-e5f572e1bfaa?api-version=2020-03-01 cache-control: - no-store, no-cache content-length: @@ -1440,9 +1395,9 @@ interactions: content-type: - application/json date: - - Thu, 27 Feb 2020 19:17:52 GMT + - Sat, 18 Apr 2020 07:27:55 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9/regenerateKey/operationResults/34ab3d3a-aca9-48f3-b16c-3174f8abcecb?api-version=2019-12-12 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_cosmosdb_test_accounts_features640310f9/providers/Microsoft.DocumentDB/databaseAccounts/pycosmosdbx2640310f9/regenerateKey/operationResults/25a175ac-5ff1-4221-b8c5-e5f572e1bfaa?api-version=2020-03-01 pragma: - no-cache server: @@ -1452,7 +1407,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 x-ms-ratelimit-remaining-subscription-writes: - '1196' status: @@ -1469,9 +1424,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/34ab3d3a-aca9-48f3-b16c-3174f8abcecb?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/25a175ac-5ff1-4221-b8c5-e5f572e1bfaa?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -1481,11 +1436,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/34ab3d3a-aca9-48f3-b16c-3174f8abcecb?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/25a175ac-5ff1-4221-b8c5-e5f572e1bfaa?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:18:24 GMT + - Sat, 18 Apr 2020 07:28:25 GMT pragma: - no-cache server: @@ -1499,7 +1454,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -1514,9 +1469,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/34ab3d3a-aca9-48f3-b16c-3174f8abcecb?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/25a175ac-5ff1-4221-b8c5-e5f572e1bfaa?api-version=2020-03-01 response: body: string: '{"status":"Dequeued"}' @@ -1526,11 +1481,11 @@ interactions: content-length: - '21' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/34ab3d3a-aca9-48f3-b16c-3174f8abcecb?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/25a175ac-5ff1-4221-b8c5-e5f572e1bfaa?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:18:55 GMT + - Sat, 18 Apr 2020 07:28:56 GMT pragma: - no-cache server: @@ -1544,7 +1499,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok @@ -1559,9 +1514,9 @@ interactions: - keep-alive User-Agent: - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.12.0 Azure-SDK-For-Python + msrest_azure/0.6.2 azure-mgmt-cosmosdb/0.13.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/34ab3d3a-aca9-48f3-b16c-3174f8abcecb?api-version=2019-12-12 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/25a175ac-5ff1-4221-b8c5-e5f572e1bfaa?api-version=2020-03-01 response: body: string: '{"status":"Succeeded"}' @@ -1571,11 +1526,11 @@ interactions: content-length: - '22' content-location: - - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/34ab3d3a-aca9-48f3-b16c-3174f8abcecb?api-version=2019-12-12 + - https://management.documents.azure.com:450/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.DocumentDB/locations/westus/operationsStatus/25a175ac-5ff1-4221-b8c5-e5f572e1bfaa?api-version=2020-03-01 content-type: - application/json date: - - Thu, 27 Feb 2020 19:19:25 GMT + - Sat, 18 Apr 2020 07:29:27 GMT pragma: - no-cache server: @@ -1589,7 +1544,7 @@ interactions: x-content-type-options: - nosniff x-ms-gatewayversion: - - version=2.9.2 + - version=2.10.0 status: code: 200 message: Ok diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/__init__.py index 69e3be50dac4..0d1f7edf5dc6 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/__init__.py index 69e3be50dac4..0d1f7edf5dc6 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/__init__.py @@ -1 +1 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) +__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_recognizer_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_recognizer_client.py index 6ff86d7f2676..4dc98b812604 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_recognizer_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_recognizer_client.py @@ -6,7 +6,7 @@ # pylint: disable=protected-access -from typing import ( # pylint: disable=unused-import +from typing import ( Any, IO, Union, @@ -42,6 +42,15 @@ class FormRecognizerClient(object): :param credential: Credentials needed for the client to connect to Azure. This is an instance of AzureKeyCredential if using an API key. :type credential: ~azure.core.credentials.AzureKeyCredential + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_get_manual_validation_info.py + :start-after: [START create_form_recognizer_client] + :end-before: [END create_form_recognizer_client] + :language: python + :dedent: 8 + :caption: Creating the FormRecognizerClient with an endpoint and API key. """ def __init__(self, endpoint, credential, **kwargs): @@ -74,12 +83,24 @@ def begin_recognize_receipts(self, stream, **kwargs): :keyword str content_type: Media type of the body sent to the API. Content-type is auto-detected, but can be overridden by passing this keyword argument. For options, see :class:`~azure.ai.formrecognizer.FormContentType`. + :keyword int polling_interval: Waiting time between two polls for LRO operations + if no Retry-After header is present. Defaults to 5 seconds. :return: An instance of an LROPoller. Call `result()` on the poller object to return a list[:class:`~azure.ai.formrecognizer.USReceipt`]. :rtype: ~azure.core.polling.LROPoller[list[~azure.ai.formrecognizer.USReceipt]] :raises ~azure.core.exceptions.HttpResponseError: + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_recognize_receipts.py + :start-after: [START recognize_receipts] + :end-before: [END recognize_receipts] + :language: python + :dedent: 8 + :caption: Recognize US sales receipt fields. """ + polling_interval = kwargs.pop("polling_interval", POLLING_INTERVAL) content_type = kwargs.pop("content_type", None) if content_type == "application/json": raise TypeError("Call begin_recognize_receipts_from_url() to analyze a receipt from a url.") @@ -94,7 +115,7 @@ def begin_recognize_receipts(self, stream, **kwargs): content_type=content_type, include_text_details=include_text_content, cls=kwargs.pop("cls", self._receipt_callback), - polling=LROBasePolling(timeout=POLLING_INTERVAL, **kwargs), + polling=LROBasePolling(timeout=polling_interval, **kwargs), error_map=error_map, **kwargs ) @@ -108,19 +129,31 @@ def begin_recognize_receipts_from_url(self, url, **kwargs): :param url: The url of the receipt. Currently only supports US sales receipts. :type url: str :keyword bool include_text_content: Include text lines and text content references in the result. + :keyword int polling_interval: Waiting time between two polls for LRO operations + if no Retry-After header is present. Defaults to 5 seconds. :return: An instance of an LROPoller. Call `result()` on the poller object to return a list[:class:`~azure.ai.formrecognizer.USReceipt`]. :rtype: ~azure.core.polling.LROPoller[list[~azure.ai.formrecognizer.USReceipt]] :raises ~azure.core.exceptions.HttpResponseError: + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_recognize_receipts_from_url.py + :start-after: [START recognize_receipts_from_url] + :end-before: [END recognize_receipts_from_url] + :language: python + :dedent: 8 + :caption: Recognize US sales receipt fields from a URL. """ + polling_interval = kwargs.pop("polling_interval", POLLING_INTERVAL) include_text_content = kwargs.pop("include_text_content", False) return self._client.begin_analyze_receipt_async( file_stream={"source": url}, include_text_details=include_text_content, cls=kwargs.pop("cls", self._receipt_callback), - polling=LROBasePolling(timeout=POLLING_INTERVAL, **kwargs), + polling=LROBasePolling(timeout=polling_interval, **kwargs), error_map=error_map, **kwargs ) @@ -141,12 +174,24 @@ def begin_recognize_content(self, stream, **kwargs): :keyword str content_type: Media type of the body sent to the API. Content-type is auto-detected, but can be overridden by passing this keyword argument. For options, see :class:`~azure.ai.formrecognizer.FormContentType`. + :keyword int polling_interval: Waiting time between two polls for LRO operations + if no Retry-After header is present. Defaults to 5 seconds. :return: An instance of an LROPoller. Call `result()` on the poller object to return a list[:class:`~azure.ai.formrecognizer.FormPage`]. :rtype: ~azure.core.polling.LROPoller[list[~azure.ai.formrecognizer.FormPage]] :raises ~azure.core.exceptions.HttpResponseError: + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_recognize_content.py + :start-after: [START recognize_content] + :end-before: [END recognize_content] + :language: python + :dedent: 8 + :caption: Recognize text and content/layout information from a form. """ + polling_interval = kwargs.pop("polling_interval", POLLING_INTERVAL) content_type = kwargs.pop("content_type", None) if content_type == "application/json": raise TypeError("Call begin_recognize_content_from_url() to analyze a document from a url.") @@ -158,7 +203,7 @@ def begin_recognize_content(self, stream, **kwargs): file_stream=stream, content_type=content_type, cls=kwargs.pop("cls", self._content_callback), - polling=LROBasePolling(timeout=POLLING_INTERVAL, **kwargs), + polling=LROBasePolling(timeout=polling_interval, **kwargs), error_map=error_map, **kwargs ) @@ -171,16 +216,20 @@ def begin_recognize_content_from_url(self, url, **kwargs): :param url: The url of the document. :type url: str + :keyword int polling_interval: Waiting time between two polls for LRO operations + if no Retry-After header is present. Defaults to 5 seconds. :return: An instance of an LROPoller. Call `result()` on the poller object to return a list[:class:`~azure.ai.formrecognizer.FormPage`]. :rtype: ~azure.core.polling.LROPoller[list[~azure.ai.formrecognizer.FormPage]] :raises ~azure.core.exceptions.HttpResponseError: """ + polling_interval = kwargs.pop("polling_interval", POLLING_INTERVAL) + return self._client.begin_analyze_layout_async( file_stream={"source": url}, cls=kwargs.pop("cls", self._content_callback), - polling=LROBasePolling(timeout=POLLING_INTERVAL, **kwargs), + polling=LROBasePolling(timeout=polling_interval, **kwargs), error_map=error_map, **kwargs ) @@ -200,13 +249,25 @@ def begin_recognize_custom_forms(self, model_id, stream, **kwargs): :keyword str content_type: Media type of the body sent to the API. Content-type is auto-detected, but can be overridden by passing this keyword argument. For options, see :class:`~azure.ai.formrecognizer.FormContentType`. + :keyword int polling_interval: Waiting time between two polls for LRO operations + if no Retry-After header is present. Defaults to 5 seconds. :return: An instance of an LROPoller. Call `result()` on the poller object to return a list[:class:`~azure.ai.formrecognizer.RecognizedForm`]. :rtype: ~azure.core.polling.LROPoller[list[~azure.ai.formrecognizer.RecognizedForm] :raises ~azure.core.exceptions.HttpResponseError: + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_recognize_custom_forms.py + :start-after: [START recognize_custom_forms] + :end-before: [END recognize_custom_forms] + :language: python + :dedent: 8 + :caption: Recognize fields and values from a custom form. """ cls = kwargs.pop("cls", None) + polling_interval = kwargs.pop("polling_interval", POLLING_INTERVAL) content_type = kwargs.pop("content_type", None) if content_type == "application/json": raise TypeError("Call begin_recognize_custom_forms_from_url() to analyze a document from a url.") @@ -226,7 +287,7 @@ def analyze_callback(raw_response, _, headers): # pylint: disable=unused-argume include_text_details=include_text_content, content_type=content_type, cls=deserialization_callback, - polling=LROBasePolling(timeout=POLLING_INTERVAL, lro_algorithms=[AnalyzePolling()], **kwargs), + polling=LROBasePolling(timeout=polling_interval, lro_algorithms=[AnalyzePolling()], **kwargs), error_map=error_map, **kwargs ) @@ -242,6 +303,8 @@ def begin_recognize_custom_forms_from_url(self, model_id, url, **kwargs): :param url: The url of the document. :type url: str :keyword bool include_text_content: Include text lines and element references in the result. + :keyword int polling_interval: Waiting time between two polls for LRO operations + if no Retry-After header is present. Defaults to 5 seconds. :return: An instance of an LROPoller. Call `result()` on the poller object to return a list[:class:`~azure.ai.formrecognizer.RecognizedForm`]. :rtype: ~azure.core.polling.LROPoller[list[~azure.ai.formrecognizer.RecognizedForm] @@ -249,6 +312,7 @@ def begin_recognize_custom_forms_from_url(self, model_id, url, **kwargs): """ cls = kwargs.pop("cls", None) + polling_interval = kwargs.pop("polling_interval", POLLING_INTERVAL) include_text_content = kwargs.pop("include_text_content", False) def analyze_callback(raw_response, _, headers): # pylint: disable=unused-argument @@ -261,7 +325,7 @@ def analyze_callback(raw_response, _, headers): # pylint: disable=unused-argume model_id=model_id, include_text_details=include_text_content, cls=deserialization_callback, - polling=LROBasePolling(timeout=POLLING_INTERVAL, lro_algorithms=[AnalyzePolling()], **kwargs), + polling=LROBasePolling(timeout=polling_interval, lro_algorithms=[AnalyzePolling()], **kwargs), error_map=error_map, **kwargs ) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_training_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_training_client.py index a17d3995d5d4..1bc7133657da 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_training_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_training_client.py @@ -6,7 +6,7 @@ # pylint: disable=protected-access -from typing import ( # pylint: disable=unused-import +from typing import ( Optional, Any, Iterable, @@ -29,6 +29,8 @@ from ._user_agent import USER_AGENT if TYPE_CHECKING: from azure.core.credentials import AzureKeyCredential + from azure.core.pipeline.transport import HttpResponse + PipelineResponseType = HttpResponse class FormTrainingClient(object): @@ -42,6 +44,15 @@ class FormTrainingClient(object): :param credential: Credentials needed for the client to connect to Azure. This is an instance of AzureKeyCredential if using an API key. :type credential: ~azure.core.credentials.AzureKeyCredential + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_train_labeled_model.py + :start-after: [START create_form_training_client] + :end-before: [END create_form_training_client] + :language: python + :dedent: 8 + :caption: Creating the FormTrainingClient with an endpoint and API key. """ def __init__(self, endpoint, credential, **kwargs): @@ -55,9 +66,9 @@ def __init__(self, endpoint, credential, **kwargs): ) @distributed_trace - def begin_training(self, training_files, use_labels=False, **kwargs): + def begin_train_model(self, training_files, use_labels=False, **kwargs): # type: (str, Optional[bool], Any) -> LROPoller - """Create and train a custom model. The request must include a training_files parameter that is an + """Create and train a custom model. The request must include a `training_files` parameter that is an externally accessible Azure storage blob container Uri (preferably a Shared Access Signature Uri). Models are trained using documents that are of the following content type - 'application/pdf', 'image/jpeg', 'image/png', 'image/tiff'. Other type of content in the container is ignored. @@ -66,19 +77,31 @@ def begin_training(self, training_files, use_labels=False, **kwargs): :param bool use_labels: Whether to train with labels or not. Corresponding labeled files must exist in the blob container. :keyword str prefix: A case-sensitive prefix string to filter documents for training. - Use prefix to filter documents themselves, or to restrict sub folders for training + Use `prefix` to filter documents themselves, or to restrict sub folders for training when `include_sub_folders` is set to True. Not supported if training with labels. :keyword bool include_sub_folders: A flag to indicate if sub folders will also need to be included when searching for content to be preprocessed. - Use with prefix to filter for only certain sub folders. Not supported if training with labels. + Use with `prefix` to filter for only certain sub folders. Not supported if training with labels. + :keyword int polling_interval: Waiting time between two polls for LRO operations + if no Retry-After header is present. Defaults to 5 seconds. :return: An instance of an LROPoller. Call `result()` on the poller object to return a :class:`~azure.ai.formrecognizer.CustomFormModel`. :rtype: ~azure.core.polling.LROPoller[~azure.ai.formrecognizer.CustomFormModel] :raises ~azure.core.exceptions.HttpResponseError: + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_train_unlabeled_model.py + :start-after: [START training] + :end-before: [END training] + :language: python + :dedent: 8 + :caption: Training a model with your custom forms. """ cls = kwargs.pop("cls", None) - response = self._client.train_custom_model_async( + polling_interval = kwargs.pop("polling_interval", POLLING_INTERVAL) + response = self._client.train_custom_model_async( # type: ignore train_request=TrainRequest( source=training_files, use_label_file=use_labels, @@ -90,7 +113,7 @@ def begin_training(self, training_files, use_labels=False, **kwargs): cls=lambda pipeline_response, _, response_headers: pipeline_response, error_map=error_map, **kwargs - ) + ) # type: PipelineResponseType def callback(raw_response): model = self._client._deserialize(Model, raw_response) @@ -101,7 +124,7 @@ def callback(raw_response): self._client._client, response, deserialization_callback, - LROBasePolling(timeout=POLLING_INTERVAL, lro_algorithms=[TrainingPolling()], **kwargs) + LROBasePolling(timeout=polling_interval, lro_algorithms=[TrainingPolling()], **kwargs) ) @distributed_trace @@ -114,6 +137,15 @@ def delete_model(self, model_id, **kwargs): :type model_id: str :rtype: None :raises ~azure.core.exceptions.HttpResponseError or ~azure.core.exceptions.ResourceNotFoundError: + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_manage_custom_models.py + :start-after: [START delete_model] + :end-before: [END delete_model] + :language: python + :dedent: 8 + :caption: Delete a custom model. """ self._client.delete_custom_model( @@ -128,8 +160,18 @@ def list_model_infos(self, **kwargs): """List information for each model, including model id, model status, and when it was created and last modified. - :return: ItemPaged[~azure.ai.formrecognizer.CustomFormModelInfo] + :return: ItemPaged[:class:`~azure.ai.formrecognizer.CustomFormModelInfo`] + :rtype: ~azure.core.paging.ItemPaged :raises ~azure.core.exceptions.HttpResponseError: + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_manage_custom_models.py + :start-after: [START list_model_infos] + :end-before: [END list_model_infos] + :language: python + :dedent: 8 + :caption: List model information for each model on the account. """ return self._client.list_custom_models( cls=kwargs.pop("cls", lambda objs: [CustomFormModelInfo._from_generated(x) for x in objs]), @@ -142,9 +184,19 @@ def get_account_properties(self, **kwargs): # type: (Any) -> AccountProperties """Get information about the models on the form recognizer account. - :return: Summary of models on account - count, limit. + :return: Summary of models on account - custom model count, + custom model limit. :rtype: ~azure.ai.formrecognizer.AccountProperties :raises ~azure.core.exceptions.HttpResponseError: + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_manage_custom_models.py + :start-after: [START get_account_properties] + :end-before: [END get_account_properties] + :language: python + :dedent: 8 + :caption: Get properties for the form recognizer account. """ response = self._client.get_custom_models(error_map=error_map, **kwargs) return AccountProperties._from_generated(response.summary) @@ -159,6 +211,15 @@ def get_custom_model(self, model_id, **kwargs): :return: CustomFormModel :rtype: ~azure.ai.formrecognizer.CustomFormModel :raises ~azure.core.exceptions.HttpResponseError or ~azure.core.exceptions.ResourceNotFoundError: + + .. admonition:: Example: + + .. literalinclude:: ../samples/sample_manage_custom_models.py + :start-after: [START get_custom_model] + :end-before: [END get_custom_model] + :language: python + :dedent: 8 + :caption: Get a custom model with a model ID. """ response = self._client.get_custom_model(model_id=model_id, include_keys=True, error_map=error_map, **kwargs) return CustomFormModel._from_generated(response) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/__init__.py index 8bbe507675d2..cddb554367aa 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/__init__.py @@ -11,7 +11,7 @@ __all__ = ['FormRecognizerClient'] try: - from .patch import patch_sdk + from ._patch import patch_sdk patch_sdk() except ImportError: pass diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_configuration.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_configuration.py index 36935c9e8fc1..2a292d8c068a 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_configuration.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_configuration.py @@ -4,13 +4,19 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any +from typing import TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies from ._version import VERSION +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + class FormRecognizerClientConfiguration(Configuration): """Configuration for FormRecognizerClient. diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_form_recognizer_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_form_recognizer_client.py index 4a6510ef8272..be5f79b99ff9 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_form_recognizer_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/_form_recognizer_client.py @@ -4,11 +4,15 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any +from typing import TYPE_CHECKING from azure.core import PipelineClient from msrest import Deserializer, Serializer +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + from ._configuration import FormRecognizerClientConfiguration from .operations import FormRecognizerClientOperationsMixin from . import models @@ -21,6 +25,7 @@ class FormRecognizerClient(FormRecognizerClientOperationsMixin): :type credential: ~azure.core.credentials.TokenCredential :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com). :type endpoint: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ def __init__( diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_configuration_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_configuration_async.py index d2d7f3e6dc09..44cffe657f45 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_configuration_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_configuration_async.py @@ -4,13 +4,17 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any +from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies from .._version import VERSION +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials import TokenCredential + class FormRecognizerClientConfiguration(Configuration): """Configuration for FormRecognizerClient. diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_form_recognizer_client_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_form_recognizer_client_async.py index 9c3f5f4d87cb..5ede3dadd72c 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_form_recognizer_client_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/_form_recognizer_client_async.py @@ -21,6 +21,7 @@ class FormRecognizerClient(FormRecognizerClientOperationsMixin): :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com). :type endpoint: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ def __init__( diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/operations_async/_form_recognizer_client_operations_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/operations_async/_form_recognizer_client_operations_async.py index 6a9e19b42194..cf80151ed32b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/operations_async/_form_recognizer_client_operations_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/aio/operations_async/_form_recognizer_client_operations_async.py @@ -3,7 +3,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6246, generator: {generator}) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -11,6 +11,7 @@ from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.core.polling import AsyncNoPolling, AsyncPollingMethod, async_poller +from azure.core.polling.async_base_polling import AsyncLROBasePolling from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async @@ -43,7 +44,7 @@ async def train_custom_model_async( content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self.train_custom_model_async.metadata['url'] + url = self.train_custom_model_async.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } @@ -76,7 +77,7 @@ async def train_custom_model_async( if cls: return cls(pipeline_response, None, response_headers) - train_custom_model_async.metadata = {'url': '/custom/models'} + train_custom_model_async.metadata = {'url': '/custom/models'} # type: ignore @distributed_trace_async async def get_custom_model( @@ -102,7 +103,7 @@ async def get_custom_model( error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) # Construct URL - url = self.get_custom_model.metadata['url'] + url = self.get_custom_model.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), 'modelId': self._serialize.url("model_id", model_id, 'str'), @@ -134,7 +135,7 @@ async def get_custom_model( return cls(pipeline_response, deserialized, {}) return deserialized - get_custom_model.metadata = {'url': '/custom/models/{modelId}'} + get_custom_model.metadata = {'url': '/custom/models/{modelId}'} # type: ignore @distributed_trace_async async def delete_custom_model( @@ -157,7 +158,7 @@ async def delete_custom_model( error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) # Construct URL - url = self.delete_custom_model.metadata['url'] + url = self.delete_custom_model.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), 'modelId': self._serialize.url("model_id", model_id, 'str'), @@ -183,7 +184,7 @@ async def delete_custom_model( if cls: return cls(pipeline_response, None, {}) - delete_custom_model.metadata = {'url': '/custom/models/{modelId}'} + delete_custom_model.metadata = {'url': '/custom/models/{modelId}'} # type: ignore async def _analyze_with_custom_model_initial( self, @@ -197,7 +198,7 @@ async def _analyze_with_custom_model_initial( content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self._analyze_with_custom_model_initial.metadata['url'] + url = self._analyze_with_custom_model_initial.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), 'modelId': self._serialize.url("model_id", model_id, 'str'), @@ -243,7 +244,7 @@ async def _analyze_with_custom_model_initial( if cls: return cls(pipeline_response, None, response_headers) - _analyze_with_custom_model_initial.metadata = {'url': '/custom/models/{modelId}/analyze'} + _analyze_with_custom_model_initial.metadata = {'url': '/custom/models/{modelId}/analyze'} # type: ignore @distributed_trace_async async def analyze_with_custom_model( @@ -267,13 +268,17 @@ async def analyze_with_custom_model( :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: None + :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) raw_result = await self._analyze_with_custom_model_initial( model_id=model_id, include_text_details=include_text_details, @@ -286,15 +291,11 @@ def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - lro_delay = kwargs.get( - 'polling_interval', - self._config.polling_interval - ) - if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + if polling is True: polling_method = AsyncLROBasePolling(lro_delay, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling return await async_poller(self._client, raw_result, get_long_running_output, polling_method) - analyze_with_custom_model.metadata = {'url': '/custom/models/{modelId}/analyze'} + analyze_with_custom_model.metadata = {'url': '/custom/models/{modelId}/analyze'} # type: ignore @distributed_trace_async async def get_analyze_form_result( @@ -320,7 +321,7 @@ async def get_analyze_form_result( error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) # Construct URL - url = self.get_analyze_form_result.metadata['url'] + url = self.get_analyze_form_result.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), 'modelId': self._serialize.url("model_id", model_id, 'str'), @@ -351,7 +352,7 @@ async def get_analyze_form_result( return cls(pipeline_response, deserialized, {}) return deserialized - get_analyze_form_result.metadata = {'url': '/custom/models/{modelId}/analyzeResults/{resultId}'} + get_analyze_form_result.metadata = {'url': '/custom/models/{modelId}/analyzeResults/{resultId}'} # type: ignore async def _analyze_receipt_async_initial( self, @@ -364,7 +365,7 @@ async def _analyze_receipt_async_initial( content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self._analyze_receipt_async_initial.metadata['url'] + url = self._analyze_receipt_async_initial.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } @@ -409,7 +410,7 @@ async def _analyze_receipt_async_initial( if cls: return cls(pipeline_response, None, response_headers) - _analyze_receipt_async_initial.metadata = {'url': '/prebuilt/receipt/analyze'} + _analyze_receipt_async_initial.metadata = {'url': '/prebuilt/receipt/analyze'} # type: ignore @distributed_trace_async async def analyze_receipt_async( @@ -430,13 +431,17 @@ async def analyze_receipt_async( :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: None + :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) raw_result = await self._analyze_receipt_async_initial( include_text_details=include_text_details, file_stream=file_stream, @@ -448,15 +453,11 @@ def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - lro_delay = kwargs.get( - 'polling_interval', - self._config.polling_interval - ) - if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + if polling is True: polling_method = AsyncLROBasePolling(lro_delay, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling return await async_poller(self._client, raw_result, get_long_running_output, polling_method) - analyze_receipt_async.metadata = {'url': '/prebuilt/receipt/analyze'} + analyze_receipt_async.metadata = {'url': '/prebuilt/receipt/analyze'} # type: ignore @distributed_trace_async async def get_analyze_receipt_result( @@ -479,7 +480,7 @@ async def get_analyze_receipt_result( error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) # Construct URL - url = self.get_analyze_receipt_result.metadata['url'] + url = self.get_analyze_receipt_result.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), 'resultId': self._serialize.url("result_id", result_id, 'str'), @@ -509,7 +510,7 @@ async def get_analyze_receipt_result( return cls(pipeline_response, deserialized, {}) return deserialized - get_analyze_receipt_result.metadata = {'url': '/prebuilt/receipt/analyzeResults/{resultId}'} + get_analyze_receipt_result.metadata = {'url': '/prebuilt/receipt/analyzeResults/{resultId}'} # type: ignore async def _analyze_layout_async_initial( self, @@ -521,7 +522,7 @@ async def _analyze_layout_async_initial( content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self._analyze_layout_async_initial.metadata['url'] + url = self._analyze_layout_async_initial.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } @@ -564,7 +565,7 @@ async def _analyze_layout_async_initial( if cls: return cls(pipeline_response, None, response_headers) - _analyze_layout_async_initial.metadata = {'url': '/layout/analyze'} + _analyze_layout_async_initial.metadata = {'url': '/layout/analyze'} # type: ignore @distributed_trace_async async def analyze_layout_async( @@ -582,13 +583,17 @@ async def analyze_layout_async( :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: None + :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) raw_result = await self._analyze_layout_async_initial( file_stream=file_stream, cls=lambda x,y,z: x, @@ -599,15 +604,11 @@ def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - lro_delay = kwargs.get( - 'polling_interval', - self._config.polling_interval - ) - if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + if polling is True: polling_method = AsyncLROBasePolling(lro_delay, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling return await async_poller(self._client, raw_result, get_long_running_output, polling_method) - analyze_layout_async.metadata = {'url': '/layout/analyze'} + analyze_layout_async.metadata = {'url': '/layout/analyze'} # type: ignore @distributed_trace_async async def get_analyze_layout_result( @@ -630,7 +631,7 @@ async def get_analyze_layout_result( error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) # Construct URL - url = self.get_analyze_layout_result.metadata['url'] + url = self.get_analyze_layout_result.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), 'resultId': self._serialize.url("result_id", result_id, 'str'), @@ -660,20 +661,20 @@ async def get_analyze_layout_result( return cls(pipeline_response, deserialized, {}) return deserialized - get_analyze_layout_result.metadata = {'url': '/layout/analyzeResults/{resultId}'} + get_analyze_layout_result.metadata = {'url': '/layout/analyzeResults/{resultId}'} # type: ignore @distributed_trace def list_custom_models( self, **kwargs - ) -> "models.Models": + ) -> AsyncIterable["models.Models"]: """Get information about all custom models. List Custom Models. :keyword callable cls: A custom type or function that will be passed the direct response - :return: Models or the result of cls(response) - :rtype: ~azure.ai.formrecognizer.models.Models + :return: An iterator like instance of Models or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.ai.formrecognizer.models.Models] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Models"] @@ -683,7 +684,7 @@ def list_custom_models( def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_custom_models.metadata['url'] + url = self.list_custom_models.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } @@ -730,7 +731,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_custom_models.metadata = {'url': '/custom/models'} + list_custom_models.metadata = {'url': '/custom/models'} # type: ignore @distributed_trace_async async def get_custom_models( @@ -751,7 +752,7 @@ async def get_custom_models( op = "summary" # Construct URL - url = self.get_custom_models.metadata['url'] + url = self.get_custom_models.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } @@ -781,4 +782,4 @@ async def get_custom_models( return cls(pipeline_response, deserialized, {}) return deserialized - get_custom_models.metadata = {'url': '/custom/models'} + get_custom_models.metadata = {'url': '/custom/models'} # type: ignore diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/models/_form_recognizer_client_enums.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/models/_form_recognizer_client_enums.py index 7e271be3703b..2bc1b585740d 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/models/_form_recognizer_client_enums.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/models/_form_recognizer_client_enums.py @@ -6,13 +6,27 @@ from enum import Enum -class TrainStatus(str, Enum): - """Status of the training operation. +class ContentType(str, Enum): + """Content type for upload """ - succeeded = "succeeded" - partially_succeeded = "partiallySucceeded" - failed = "failed" + application_pdf = "application/pdf" #: Content Type 'application/pdf'. + image_jpeg = "image/jpeg" #: Content Type 'image/jpeg'. + image_png = "image/png" #: Content Type 'image/png'. + image_tiff = "image/tiff" #: Content Type 'image/tiff'. + +class FieldValueType(str, Enum): + """Semantic data type of the field value. + """ + + string = "string" + date = "date" + time = "time" + phone_number = "phoneNumber" + number = "number" + integer = "integer" + array = "array" + object = "object" class Language(str, Enum): """Language code @@ -29,19 +43,6 @@ class LengthUnit(str, Enum): pixel = "pixel" inch = "inch" -class FieldValueType(str, Enum): - """Semantic data type of the field value. - """ - - string = "string" - date = "date" - time = "time" - phone_number = "phoneNumber" - number = "number" - integer = "integer" - array = "array" - object = "object" - class ModelStatus(str, Enum): """Status of the model. """ @@ -59,11 +60,10 @@ class OperationStatus(str, Enum): succeeded = "succeeded" failed = "failed" -class ContentType(str, Enum): - """Content type for upload +class TrainStatus(str, Enum): + """Status of the training operation. """ - application_pdf = "application/pdf" #: Content Type 'application/pdf'. - image_jpeg = "image/jpeg" #: Content Type 'image/jpeg'. - image_png = "image/png" #: Content Type 'image/png'. - image_tiff = "image/tiff" #: Content Type 'image/tiff'. + succeeded = "succeeded" + partially_succeeded = "partiallySucceeded" + failed = "failed" diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/models/_models_py3.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/models/_models_py3.py index f9868b63a3e1..ca0f1f97dce0 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/models/_models_py3.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/models/_models_py3.py @@ -10,6 +10,8 @@ from azure.core.exceptions import HttpResponseError import msrest.serialization +from ._form_recognizer_client_enums import * + class AnalyzeOperationResult(msrest.serialization.Model): """Status and result of the queued analyze operation. diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/operations/_form_recognizer_client_operations.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/operations/_form_recognizer_client_operations.py index e1ae3474669e..57731e914413 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/operations/_form_recognizer_client_operations.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_generated/operations/_form_recognizer_client_operations.py @@ -3,7 +3,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6246, generator: {generator}) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import TYPE_CHECKING import warnings from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -11,12 +11,17 @@ from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.polling.base_polling import LROBasePolling from azure.core.tracing.decorator import distributed_trace from .. import models -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class FormRecognizerClientOperationsMixin(object): @@ -43,7 +48,7 @@ def train_custom_model_async( content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self.train_custom_model_async.metadata['url'] + url = self.train_custom_model_async.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } @@ -76,7 +81,7 @@ def train_custom_model_async( if cls: return cls(pipeline_response, None, response_headers) - train_custom_model_async.metadata = {'url': '/custom/models'} + train_custom_model_async.metadata = {'url': '/custom/models'} # type: ignore @distributed_trace def get_custom_model( @@ -103,7 +108,7 @@ def get_custom_model( error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) # Construct URL - url = self.get_custom_model.metadata['url'] + url = self.get_custom_model.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), 'modelId': self._serialize.url("model_id", model_id, 'str'), @@ -135,7 +140,7 @@ def get_custom_model( return cls(pipeline_response, deserialized, {}) return deserialized - get_custom_model.metadata = {'url': '/custom/models/{modelId}'} + get_custom_model.metadata = {'url': '/custom/models/{modelId}'} # type: ignore @distributed_trace def delete_custom_model( @@ -159,7 +164,7 @@ def delete_custom_model( error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) # Construct URL - url = self.delete_custom_model.metadata['url'] + url = self.delete_custom_model.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), 'modelId': self._serialize.url("model_id", model_id, 'str'), @@ -185,7 +190,7 @@ def delete_custom_model( if cls: return cls(pipeline_response, None, {}) - delete_custom_model.metadata = {'url': '/custom/models/{modelId}'} + delete_custom_model.metadata = {'url': '/custom/models/{modelId}'} # type: ignore def _analyze_with_custom_model_initial( self, @@ -200,7 +205,7 @@ def _analyze_with_custom_model_initial( content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self._analyze_with_custom_model_initial.metadata['url'] + url = self._analyze_with_custom_model_initial.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), 'modelId': self._serialize.url("model_id", model_id, 'str'), @@ -246,7 +251,7 @@ def _analyze_with_custom_model_initial( if cls: return cls(pipeline_response, None, response_headers) - _analyze_with_custom_model_initial.metadata = {'url': '/custom/models/{modelId}/analyze'} + _analyze_with_custom_model_initial.metadata = {'url': '/custom/models/{modelId}/analyze'} # type: ignore @distributed_trace def begin_analyze_with_custom_model( @@ -256,7 +261,7 @@ def begin_analyze_with_custom_model( file_stream=None, # type: Optional[Union[str, "models.SourcePath"]] **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> LROPoller """Extract key-value pairs, tables, and semantic values from a given document. The input document must be of one of the supported content types - 'application/pdf', 'image/jpeg', 'image/png' or 'image/tiff'. Alternatively, use 'application/json' type to specify the location (Uri or local path) of the document to be analyzed. Analyze Form. @@ -271,13 +276,17 @@ def begin_analyze_with_custom_model( :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', False) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) raw_result = self._analyze_with_custom_model_initial( model_id=model_id, include_text_details=include_text_details, @@ -290,15 +299,11 @@ def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - lro_delay = kwargs.get( - 'polling_interval', - self._config.polling_interval - ) - if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + if polling is True: polling_method = LROBasePolling(lro_delay, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_with_custom_model.metadata = {'url': '/custom/models/{modelId}/analyze'} + begin_analyze_with_custom_model.metadata = {'url': '/custom/models/{modelId}/analyze'} # type: ignore @distributed_trace def get_analyze_form_result( @@ -325,7 +330,7 @@ def get_analyze_form_result( error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) # Construct URL - url = self.get_analyze_form_result.metadata['url'] + url = self.get_analyze_form_result.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), 'modelId': self._serialize.url("model_id", model_id, 'str'), @@ -356,7 +361,7 @@ def get_analyze_form_result( return cls(pipeline_response, deserialized, {}) return deserialized - get_analyze_form_result.metadata = {'url': '/custom/models/{modelId}/analyzeResults/{resultId}'} + get_analyze_form_result.metadata = {'url': '/custom/models/{modelId}/analyzeResults/{resultId}'} # type: ignore def _analyze_receipt_async_initial( self, @@ -370,7 +375,7 @@ def _analyze_receipt_async_initial( content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self._analyze_receipt_async_initial.metadata['url'] + url = self._analyze_receipt_async_initial.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } @@ -415,7 +420,7 @@ def _analyze_receipt_async_initial( if cls: return cls(pipeline_response, None, response_headers) - _analyze_receipt_async_initial.metadata = {'url': '/prebuilt/receipt/analyze'} + _analyze_receipt_async_initial.metadata = {'url': '/prebuilt/receipt/analyze'} # type: ignore @distributed_trace def begin_analyze_receipt_async( @@ -424,7 +429,7 @@ def begin_analyze_receipt_async( file_stream=None, # type: Optional[Union[str, "models.SourcePath"]] **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> LROPoller """Extract field text and semantic values from a given receipt document. The input document must be of one of the supported content types - 'application/pdf', 'image/jpeg', 'image/png' or 'image/tiff'. Alternatively, use 'application/json' type to specify the location (Uri or local path) of the document to be analyzed. Analyze Receipt. @@ -437,13 +442,17 @@ def begin_analyze_receipt_async( :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', False) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) raw_result = self._analyze_receipt_async_initial( include_text_details=include_text_details, file_stream=file_stream, @@ -455,15 +464,11 @@ def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - lro_delay = kwargs.get( - 'polling_interval', - self._config.polling_interval - ) - if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + if polling is True: polling_method = LROBasePolling(lro_delay, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_receipt_async.metadata = {'url': '/prebuilt/receipt/analyze'} + begin_analyze_receipt_async.metadata = {'url': '/prebuilt/receipt/analyze'} # type: ignore @distributed_trace def get_analyze_receipt_result( @@ -487,7 +492,7 @@ def get_analyze_receipt_result( error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) # Construct URL - url = self.get_analyze_receipt_result.metadata['url'] + url = self.get_analyze_receipt_result.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), 'resultId': self._serialize.url("result_id", result_id, 'str'), @@ -517,7 +522,7 @@ def get_analyze_receipt_result( return cls(pipeline_response, deserialized, {}) return deserialized - get_analyze_receipt_result.metadata = {'url': '/prebuilt/receipt/analyzeResults/{resultId}'} + get_analyze_receipt_result.metadata = {'url': '/prebuilt/receipt/analyzeResults/{resultId}'} # type: ignore def _analyze_layout_async_initial( self, @@ -530,7 +535,7 @@ def _analyze_layout_async_initial( content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self._analyze_layout_async_initial.metadata['url'] + url = self._analyze_layout_async_initial.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } @@ -573,7 +578,7 @@ def _analyze_layout_async_initial( if cls: return cls(pipeline_response, None, response_headers) - _analyze_layout_async_initial.metadata = {'url': '/layout/analyze'} + _analyze_layout_async_initial.metadata = {'url': '/layout/analyze'} # type: ignore @distributed_trace def begin_analyze_layout_async( @@ -581,7 +586,7 @@ def begin_analyze_layout_async( file_stream=None, # type: Optional[Union[str, "models.SourcePath"]] **kwargs # type: Any ): - # type: (...) -> None + # type: (...) -> LROPoller """Extract text and layout information from a given document. The input document must be of one of the supported content types - 'application/pdf', 'image/jpeg', 'image/png' or 'image/tiff'. Alternatively, use 'application/json' type to specify the location (Uri or local path) of the document to be analyzed. Analyze Layout. @@ -592,13 +597,17 @@ def begin_analyze_layout_async( :keyword polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns None :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', False) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) raw_result = self._analyze_layout_async_initial( file_stream=file_stream, cls=lambda x,y,z: x, @@ -609,15 +618,11 @@ def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - lro_delay = kwargs.get( - 'polling_interval', - self._config.polling_interval - ) - if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") + if polling is True: polling_method = LROBasePolling(lro_delay, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_analyze_layout_async.metadata = {'url': '/layout/analyze'} + begin_analyze_layout_async.metadata = {'url': '/layout/analyze'} # type: ignore @distributed_trace def get_analyze_layout_result( @@ -641,7 +646,7 @@ def get_analyze_layout_result( error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) # Construct URL - url = self.get_analyze_layout_result.metadata['url'] + url = self.get_analyze_layout_result.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), 'resultId': self._serialize.url("result_id", result_id, 'str'), @@ -671,21 +676,21 @@ def get_analyze_layout_result( return cls(pipeline_response, deserialized, {}) return deserialized - get_analyze_layout_result.metadata = {'url': '/layout/analyzeResults/{resultId}'} + get_analyze_layout_result.metadata = {'url': '/layout/analyzeResults/{resultId}'} # type: ignore @distributed_trace def list_custom_models( self, **kwargs # type: Any ): - # type: (...) -> "models.Models" + # type: (...) -> Iterable["models.Models"] """Get information about all custom models. List Custom Models. :keyword callable cls: A custom type or function that will be passed the direct response - :return: Models or the result of cls(response) - :rtype: ~azure.ai.formrecognizer.models.Models + :return: An iterator like instance of Models or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.ai.formrecognizer.models.Models] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Models"] @@ -695,7 +700,7 @@ def list_custom_models( def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_custom_models.metadata['url'] + url = self.list_custom_models.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } @@ -742,7 +747,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_custom_models.metadata = {'url': '/custom/models'} + list_custom_models.metadata = {'url': '/custom/models'} # type: ignore @distributed_trace def get_custom_models( @@ -764,7 +769,7 @@ def get_custom_models( op = "summary" # Construct URL - url = self.get_custom_models.metadata['url'] + url = self.get_custom_models.metadata['url'] # type: ignore path_format_arguments = { 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } @@ -794,4 +799,4 @@ def get_custom_models( return cls(pipeline_response, deserialized, {}) return deserialized - get_custom_models.metadata = {'url': '/custom/models'} + get_custom_models.metadata = {'url': '/custom/models'} # type: ignore diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_models.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_models.py index 75722c237766..09675a8ce849 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_models.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_models.py @@ -110,7 +110,7 @@ def __new__(cls, x, y): class PageRange(namedtuple("PageRange", "first_page last_page")): - """The 1 based page range of the document. + """The 1-based page range of the document. :ivar int first_page: The first page number of the document. :ivar int last_page: The last page number of the document. @@ -227,7 +227,7 @@ class FormField(object): :ivar value: The value for the recognized field. Possible types include: 'string', 'date', 'time', 'phoneNumber', 'number', 'integer', 'object', or 'array'. - :vartype value: str, int, float, ~datetime.date, ~datetime.time, + :vartype value: str, int, float, :class:`~datetime.date`, :class:`~datetime.time`, :class:`~azure.ai.formrecognizer.FormField`, or list[:class:`~azure.ai.formrecognizer.FormField`] :ivar float confidence: Confidence score. :ivar int page_number: diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_polling.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_polling.py index 424693df9324..15785d0aae18 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_polling.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_polling.py @@ -4,6 +4,7 @@ # Licensed under the MIT License. # ------------------------------------ +from typing import TYPE_CHECKING from azure.core.exceptions import HttpResponseError from azure.core.polling.base_polling import ( LocationPolling, @@ -12,6 +13,8 @@ _as_json, BadResponse ) +if TYPE_CHECKING: + from azure.core.pipeline import PipelineResponse class TrainingPolling(LocationPolling): @@ -25,10 +28,10 @@ def get_polling_url(self): return self._location_url + "?includeKeys=true" def get_status(self, pipeline_response): # pylint: disable=no-self-use - # type: (PipelineResponseType) -> str + # type: (PipelineResponse) -> str """Process the latest status update retrieved from a 'location' header. - :param azure.core.pipeline.PipelineResponse response: latest REST call response. + :param azure.core.pipeline.PipelineResponse pipeline_response: latest REST call response. :raises: BadResponse if response has no body. """ response = pipeline_response.http_response @@ -52,11 +55,11 @@ class AnalyzePolling(OperationResourcePolling): """ def get_status(self, pipeline_response): # pylint: disable=no-self-use - # type: (PipelineResponseType) -> str + # type: (PipelineResponse) -> str """Process the latest status update retrieved from an "Operation-Location" header. Raise errors for issues with input document. - :param azure.core.pipeline.PipelineResponse response: The response to extract the status. + :param azure.core.pipeline.PipelineResponse pipeline_response: The response to extract the status. :raises: BadResponse if response has no body, or body does not contain status. HttpResponseError if there is an error with the input document. """ diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_recognizer_client_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_recognizer_client_async.py index 83888e7b6a6a..b8fe0fac30f5 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_recognizer_client_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_recognizer_client_async.py @@ -6,7 +6,7 @@ # pylint: disable=protected-access -from typing import ( # pylint: disable=unused-import +from typing import ( Any, List, IO, @@ -47,6 +47,15 @@ class FormRecognizerClient(object): :param credential: Credentials needed for the client to connect to Azure. This is an instance of AzureKeyCredential if using an API key. :type credential: ~azure.core.credentials.AzureKeyCredential + + .. admonition:: Example: + + .. literalinclude:: ../samples/async_samples/sample_get_manual_validation_info_async.py + :start-after: [START create_form_recognizer_client_async] + :end-before: [END create_form_recognizer_client_async] + :language: python + :dedent: 8 + :caption: Creating the FormRecognizerClient with an endpoint and API key. """ def __init__( @@ -86,11 +95,23 @@ async def recognize_receipts( :keyword str content_type: Media type of the body sent to the API. Content-type is auto-detected, but can be overridden by passing this keyword argument. For options, see :class:`~azure.ai.formrecognizer.FormContentType`. + :keyword int polling_interval: Waiting time between two polls for LRO operations + if no Retry-After header is present. Defaults to 5 seconds. :return: A list of USReceipt. :rtype: list[~azure.ai.formrecognizer.USReceipt] :raises ~azure.core.exceptions.HttpResponseError: + + .. admonition:: Example: + + .. literalinclude:: ../samples/async_samples/sample_recognize_receipts_async.py + :start-after: [START recognize_receipts_async] + :end-before: [END recognize_receipts_async] + :language: python + :dedent: 8 + :caption: Recognize US sales receipt fields. """ + polling_interval = kwargs.pop("polling_interval", POLLING_INTERVAL) content_type = kwargs.pop("content_type", None) if content_type == "application/json": raise TypeError("Call begin_recognize_receipts_from_url() to analyze a receipt from a url.") @@ -100,12 +121,12 @@ async def recognize_receipts( if content_type is None: content_type = get_content_type(stream) - return await self._client.analyze_receipt_async( + return await self._client.analyze_receipt_async( # type: ignore file_stream=stream, content_type=content_type, include_text_details=include_text_content, cls=kwargs.pop("cls", self._receipt_callback), - polling=AsyncLROBasePolling(timeout=POLLING_INTERVAL, **kwargs), + polling=AsyncLROBasePolling(timeout=polling_interval, **kwargs), error_map=error_map, **kwargs ) @@ -122,18 +143,30 @@ async def recognize_receipts_from_url( :param url: The url of the receipt. Currently only supports US sales receipts. :type url: str :keyword bool include_text_content: Include text lines and text content references in the result. + :keyword int polling_interval: Waiting time between two polls for LRO operations + if no Retry-After header is present. Defaults to 5 seconds. :return: A list of USReceipt. :rtype: list[~azure.ai.formrecognizer.USReceipt] :raises ~azure.core.exceptions.HttpResponseError: + + .. admonition:: Example: + + .. literalinclude:: ../samples/async_samples/sample_recognize_receipts_from_url_async.py + :start-after: [START recognize_receipts_from_url_async] + :end-before: [END recognize_receipts_from_url_async] + :language: python + :dedent: 8 + :caption: Recognize US sales receipt fields from a URL. """ + polling_interval = kwargs.pop("polling_interval", POLLING_INTERVAL) include_text_content = kwargs.pop("include_text_content", False) - return await self._client.analyze_receipt_async( + return await self._client.analyze_receipt_async( # type: ignore file_stream={"source": url}, include_text_details=include_text_content, cls=kwargs.pop("cls", self._receipt_callback), - polling=AsyncLROBasePolling(timeout=POLLING_INTERVAL, **kwargs), + polling=AsyncLROBasePolling(timeout=polling_interval, **kwargs), error_map=error_map, **kwargs ) @@ -153,11 +186,23 @@ async def recognize_content(self, stream: Union[bytes, IO[bytes]], **kwargs: Any :keyword str content_type: Media type of the body sent to the API. Content-type is auto-detected, but can be overridden by passing this keyword argument. For options, see :class:`~azure.ai.formrecognizer.FormContentType`. + :keyword int polling_interval: Waiting time between two polls for LRO operations + if no Retry-After header is present. Defaults to 5 seconds. :return: A list of FormPage. :rtype: list[~azure.ai.formrecognizer.FormPage] :raises ~azure.core.exceptions.HttpResponseError: + + .. admonition:: Example: + + .. literalinclude:: ../samples/async_samples/sample_recognize_content_async.py + :start-after: [START recognize_content_async] + :end-before: [END recognize_content_async] + :language: python + :dedent: 8 + :caption: Recognize text and content/layout information from a form. """ + polling_interval = kwargs.pop("polling_interval", POLLING_INTERVAL) content_type = kwargs.pop("content_type", None) if content_type == "application/json": raise TypeError("Call begin_recognize_content_from_url() to analyze a document from a url.") @@ -165,11 +210,11 @@ async def recognize_content(self, stream: Union[bytes, IO[bytes]], **kwargs: Any if content_type is None: content_type = get_content_type(stream) - return await self._client.analyze_layout_async( + return await self._client.analyze_layout_async( # type: ignore file_stream=stream, content_type=content_type, cls=kwargs.pop("cls", self._content_callback), - polling=AsyncLROBasePolling(timeout=POLLING_INTERVAL, **kwargs), + polling=AsyncLROBasePolling(timeout=polling_interval, **kwargs), error_map=error_map, **kwargs ) @@ -181,15 +226,18 @@ async def recognize_content_from_url(self, url: str, **kwargs: Any) -> List["For :param url: The url of the document. :type url: str + :keyword int polling_interval: Waiting time between two polls for LRO operations + if no Retry-After header is present. Defaults to 5 seconds. :return: A list of FormPage. :rtype: list[~azure.ai.formrecognizer.FormPage] :raises ~azure.core.exceptions.HttpResponseError: """ - return await self._client.analyze_layout_async( + polling_interval = kwargs.pop("polling_interval", POLLING_INTERVAL) + return await self._client.analyze_layout_async( # type: ignore file_stream={"source": url}, cls=kwargs.pop("cls", self._content_callback), - polling=AsyncLROBasePolling(timeout=POLLING_INTERVAL, **kwargs), + polling=AsyncLROBasePolling(timeout=polling_interval, **kwargs), error_map=error_map, **kwargs ) @@ -213,12 +261,24 @@ async def recognize_custom_forms( :keyword str content_type: Media type of the body sent to the API. Content-type is auto-detected, but can be overridden by passing this keyword argument. For options, see :class:`~azure.ai.formrecognizer.FormContentType`. + :keyword int polling_interval: Waiting time between two polls for LRO operations + if no Retry-After header is present. Defaults to 5 seconds. :return: A list of RecognizedForm. :rtype: list[~azure.ai.formrecognizer.RecognizedForm] :raises ~azure.core.exceptions.HttpResponseError: + + .. admonition:: Example: + + .. literalinclude:: ../samples/async_samples/sample_recognize_custom_forms_async.py + :start-after: [START recognize_custom_forms_async] + :end-before: [END recognize_custom_forms_async] + :language: python + :dedent: 8 + :caption: Recognize fields and values from a custom form. """ cls = kwargs.pop("cls", None) + polling_interval = kwargs.pop("polling_interval", POLLING_INTERVAL) content_type = kwargs.pop("content_type", None) if content_type == "application/json": raise TypeError("Call begin_recognize_custom_forms_from_url() to analyze a document from a url.") @@ -233,13 +293,13 @@ def analyze_callback(raw_response, _, headers): # pylint: disable=unused-argume return prepare_form_result(analyze_result, model_id) deserialization_callback = cls if cls else analyze_callback - return await self._client.analyze_with_custom_model( + return await self._client.analyze_with_custom_model( # type: ignore file_stream=stream, model_id=model_id, include_text_details=include_text_content, content_type=content_type, cls=deserialization_callback, - polling=AsyncLROBasePolling(timeout=POLLING_INTERVAL, lro_algorithms=[AnalyzePolling()], **kwargs), + polling=AsyncLROBasePolling(timeout=polling_interval, lro_algorithms=[AnalyzePolling()], **kwargs), error_map=error_map, **kwargs ) @@ -259,12 +319,15 @@ async def recognize_custom_forms_from_url( :param url: The url of the document. :type url: str :keyword bool include_text_content: Include text lines and element references in the result. + :keyword int polling_interval: Waiting time between two polls for LRO operations + if no Retry-After header is present. Defaults to 5 seconds. :return: A list of RecognizedForm. :rtype: list[~azure.ai.formrecognizer.RecognizedForm] :raises ~azure.core.exceptions.HttpResponseError: """ cls = kwargs.pop("cls", None) + polling_interval = kwargs.pop("polling_interval", POLLING_INTERVAL) include_text_content = kwargs.pop("include_text_content", False) def analyze_callback(raw_response, _, headers): # pylint: disable=unused-argument @@ -272,17 +335,17 @@ def analyze_callback(raw_response, _, headers): # pylint: disable=unused-argume return prepare_form_result(analyze_result, model_id) deserialization_callback = cls if cls else analyze_callback - return await self._client.analyze_with_custom_model( + return await self._client.analyze_with_custom_model( # type: ignore file_stream={"source": url}, model_id=model_id, include_text_details=include_text_content, cls=deserialization_callback, - polling=AsyncLROBasePolling(timeout=POLLING_INTERVAL, lro_algorithms=[AnalyzePolling()], **kwargs), + polling=AsyncLROBasePolling(timeout=polling_interval, lro_algorithms=[AnalyzePolling()], **kwargs), error_map=error_map, **kwargs ) - def get_form_training_client(self, **kwargs) -> FormTrainingClient: + def get_form_training_client(self, **kwargs: Any) -> FormTrainingClient: """Get an instance of a FormTrainingClient from FormRecognizerClient. :rtype: ~azure.ai.formrecognizer.aio.FormTrainingClient diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_training_client_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_training_client_async.py index f216c3c5f182..977336ea55f2 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_training_client_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_form_training_client_async.py @@ -6,7 +6,7 @@ # pylint: disable=protected-access -from typing import ( # pylint: disable=unused-import +from typing import ( Optional, Any, AsyncIterable, @@ -43,6 +43,15 @@ class FormTrainingClient(object): :param credential: Credentials needed for the client to connect to Azure. This is an instance of AzureKeyCredential if using an API key. :type credential: ~azure.core.credentials.AzureKeyCredential + + .. admonition:: Example: + + .. literalinclude:: ../samples/async_samples/sample_train_labeled_model_async.py + :start-after: [START create_form_training_client_async] + :end-before: [END create_form_training_client_async] + :language: python + :dedent: 8 + :caption: Creating the FormTrainingClient with an endpoint and API key. """ def __init__( @@ -60,13 +69,13 @@ def __init__( ) @distributed_trace_async - async def training( + async def train_model( self, training_files: str, use_labels: Optional[bool] = False, **kwargs: Any ) -> CustomFormModel: - """Create and train a custom model. The request must include a training_files parameter that is an + """Create and train a custom model. The request must include a `training_files` parameter that is an externally accessible Azure storage blob container Uri (preferably a Shared Access Signature Uri). Models are trained using documents that are of the following content type - 'application/pdf', 'image/jpeg', 'image/png', 'image/tiff'. Other type of content in the container is ignored. @@ -75,17 +84,29 @@ async def training( :param bool use_labels: Whether to train with labels or not. Corresponding labeled files must exist in the blob container. :keyword str prefix: A case-sensitive prefix string to filter documents for training. - Use prefix to filter documents themselves, or to restrict sub folders for training + Use `prefix` to filter documents themselves, or to restrict sub folders for training when `include_sub_folders` is set to True. Not supported if training with labels. :keyword bool include_sub_folders: A flag to indicate if sub folders will also need to be included when searching for content to be preprocessed. - Use with prefix to filter for only certain sub folders. Not supported if training with labels. + Use with `prefix` to filter for only certain sub folders. Not supported if training with labels. + :keyword int polling_interval: Waiting time between two polls for LRO operations + if no Retry-After header is present. Defaults to 5 seconds. :return: CustomFormModel :rtype: ~azure.ai.formrecognizer.CustomFormModel :raises ~azure.core.exceptions.HttpResponseError: + + .. admonition:: Example: + + .. literalinclude:: ../samples/async_samples/sample_train_unlabeled_model_async.py + :start-after: [START training_async] + :end-before: [END training_async] + :language: python + :dedent: 8 + :caption: Training a model with your custom forms. """ cls = kwargs.pop("cls", None) + polling_interval = kwargs.pop("polling_interval", POLLING_INTERVAL) response = await self._client.train_custom_model_async( train_request=TrainRequest( source=training_files, @@ -109,17 +130,27 @@ def callback(raw_response): self._client._client, response, deserialization_callback, - AsyncLROBasePolling(timeout=POLLING_INTERVAL, lro_algorithms=[TrainingPolling()], **kwargs) + AsyncLROBasePolling(timeout=polling_interval, lro_algorithms=[TrainingPolling()], **kwargs) ) @distributed_trace_async async def delete_model(self, model_id: str, **kwargs: Any) -> None: - """Mark model for deletion. Model artifacts will be permanently removed within a predetermined period. + """Mark model for deletion. Model artifacts will be permanently + removed within a predetermined period. :param model_id: Model identifier. :type model_id: str :rtype: None :raises ~azure.core.exceptions.HttpResponseError or ~azure.core.exceptions.ResourceNotFoundError: + + .. admonition:: Example: + + .. literalinclude:: ../samples/async_samples/sample_manage_custom_models_async.py + :start-after: [START delete_model_async] + :end-before: [END delete_model_async] + :language: python + :dedent: 12 + :caption: Delete a custom model. """ return await self._client.delete_custom_model( model_id=model_id, @@ -132,8 +163,18 @@ def list_model_infos(self, **kwargs: Any) -> AsyncIterable[CustomFormModelInfo]: """List information for each model, including model id, model status, and when it was created and last modified. - :return: AsyncItemPaged[~azure.ai.formrecognizer.CustomFormModelInfo] + :return: AsyncItemPaged[:class:`~azure.ai.formrecognizer.CustomFormModelInfo`] + :rtype: ~azure.core.async_paging.AsyncItemPaged :raises ~azure.core.exceptions.HttpResponseError: + + .. admonition:: Example: + + .. literalinclude:: ../samples/async_samples/sample_manage_custom_models_async.py + :start-after: [START list_model_infos_async] + :end-before: [END list_model_infos_async] + :language: python + :dedent: 12 + :caption: List model information for each model on the account. """ return self._client.list_custom_models( cls=kwargs.pop("cls", lambda objs: [CustomFormModelInfo._from_generated(x) for x in objs]), @@ -145,9 +186,19 @@ def list_model_infos(self, **kwargs: Any) -> AsyncIterable[CustomFormModelInfo]: async def get_account_properties(self, **kwargs: Any) -> AccountProperties: """Get information about the models on the form recognizer account. - :return: Summary of models on account - count, limit. + :return: Summary of models on account - custom model count, + custom model limit. :rtype: ~azure.ai.formrecognizer.AccountProperties :raises ~azure.core.exceptions.HttpResponseError: + + .. admonition:: Example: + + .. literalinclude:: ../samples/async_samples/sample_manage_custom_models_async.py + :start-after: [START get_account_properties_async] + :end-before: [END get_account_properties_async] + :language: python + :dedent: 8 + :caption: Get properties for the form recognizer account. """ response = await self._client.get_custom_models(error_map=error_map, **kwargs) return AccountProperties._from_generated(response.summary) @@ -161,6 +212,15 @@ async def get_custom_model(self, model_id: str, **kwargs: Any) -> CustomFormMode :return: CustomFormModel :rtype: ~azure.ai.formrecognizer.CustomFormModel :raises ~azure.core.exceptions.HttpResponseError or ~azure.core.exceptions.ResourceNotFoundError: + + .. admonition:: Example: + + .. literalinclude:: ../samples/async_samples/sample_manage_custom_models_async.py + :start-after: [START get_custom_model_async] + :end-before: [END get_custom_model_async] + :language: python + :dedent: 12 + :caption: Get a custom model with a model ID. """ response = await self._client.get_custom_model( model_id=model_id, diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms.py index e2a906879273..41c794fa01ae 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms.py @@ -58,7 +58,7 @@ def test_auto_detect_unsupported_stream_content(self, resource_group, location, def test_custom_form_unlabeled(self, client, container_sas_url): training_client = client.get_form_training_client() - poller = training_client.begin_training(container_sas_url) + poller = training_client.begin_train_model(container_sas_url) model = poller.result() with open(self.form_jpg, "rb") as fd: @@ -86,7 +86,7 @@ def test_custom_form_unlabeled(self, client, container_sas_url): def test_custom_form_labeled(self, client, container_sas_url): training_client = client.get_form_training_client() - poller = training_client.begin_training( + poller = training_client.begin_train_model( container_sas_url, use_labels=True ) @@ -112,7 +112,7 @@ def test_custom_form_labeled(self, client, container_sas_url): def test_custom_form_unlabeled_transform(self, client, container_sas_url): training_client = client.get_form_training_client() - poller = training_client.begin_training(container_sas_url) + poller = training_client.begin_train_model(container_sas_url) model = poller.result() responses = [] @@ -149,7 +149,7 @@ def callback(raw_response, _, headers): def test_custom_form_labeled_transform(self, client, container_sas_url): training_client = client.get_form_training_client() - poller = training_client.begin_training(container_sas_url, use_labels=True) + poller = training_client.begin_train_model(container_sas_url, use_labels=True) model = poller.result() responses = [] diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_async.py index e198614c1a69..8d6ad16de65d 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_async.py @@ -60,7 +60,7 @@ async def test_auto_detect_unsupported_stream_content(self, resource_group, loca async def test_custom_form_unlabeled(self, client, container_sas_url): training_client = client.get_form_training_client() - model = await training_client.training(container_sas_url) + model = await training_client.train_model(container_sas_url) with open(self.form_jpg, "rb") as fd: myfile = fd.read() @@ -82,7 +82,7 @@ async def test_custom_form_unlabeled(self, client, container_sas_url): async def test_custom_form_labeled(self, client, container_sas_url): training_client = client.get_form_training_client() - model = await training_client.training(container_sas_url, use_labels=True) + model = await training_client.train_model(container_sas_url, use_labels=True) with open(self.form_jpg, "rb") as fd: myfile = fd.read() @@ -103,7 +103,7 @@ async def test_custom_form_labeled(self, client, container_sas_url): async def test_form_unlabeled_transform(self, client, container_sas_url): training_client = client.get_form_training_client() - model = await training_client.training(container_sas_url) + model = await training_client.train_model(container_sas_url) responses = [] @@ -139,7 +139,7 @@ def callback(raw_response, _, headers): async def test_form_labeled_transform(self, client, container_sas_url): training_client = client.get_form_training_client() - model = await training_client.training(container_sas_url, use_labels=True) + model = await training_client.train_model(container_sas_url, use_labels=True) responses = [] diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url.py index 911a5e8ae153..021fbd8283e4 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url.py @@ -54,7 +54,7 @@ def test_pass_stream_into_url(self, resource_group, location, form_recognizer_ac def test_custom_form_unlabeled(self, client, container_sas_url): training_client = client.get_form_training_client() - poller = training_client.begin_training(container_sas_url) + poller = training_client.begin_train_model(container_sas_url) model = poller.result() poller = client.begin_recognize_custom_forms_from_url(model.model_id, self.form_url_jpg) @@ -75,7 +75,7 @@ def test_custom_form_unlabeled(self, client, container_sas_url): def test_custom_form_labeled(self, client, container_sas_url): training_client = client.get_form_training_client() - poller = training_client.begin_training(container_sas_url, use_labels=True) + poller = training_client.begin_train_model(container_sas_url, use_labels=True) model = poller.result() poller = client.begin_recognize_custom_forms_from_url(model.model_id, self.form_url_jpg) @@ -95,7 +95,7 @@ def test_custom_form_labeled(self, client, container_sas_url): def test_form_unlbld_transform(self, client, container_sas_url): training_client = client.get_form_training_client() - poller = training_client.begin_training(container_sas_url) + poller = training_client.begin_train_model(container_sas_url) model = poller.result() responses = [] @@ -129,7 +129,7 @@ def callback(raw_response, _, headers): def test_form_labeled_transform(self, client, container_sas_url): training_client = client.get_form_training_client() - poller = training_client.begin_training(container_sas_url, use_labels=True) + poller = training_client.begin_train_model(container_sas_url, use_labels=True) model = poller.result() responses = [] diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url_async.py index ff03426dc7b2..a08878d24a5a 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_from_url_async.py @@ -54,7 +54,7 @@ async def test_pass_stream_into_url(self, resource_group, location, form_recogni async def test_form_unlabeled(self, client, container_sas_url): training_client = client.get_form_training_client() - model = await training_client.training(container_sas_url) + model = await training_client.train_model(container_sas_url) form = await client.recognize_custom_forms_from_url(model.model_id, self.form_url_jpg) @@ -73,7 +73,7 @@ async def test_form_unlabeled(self, client, container_sas_url): async def test_form_labeled(self, client, container_sas_url): training_client = client.get_form_training_client() - model = await training_client.training(container_sas_url, use_labels=True) + model = await training_client.train_model(container_sas_url, use_labels=True) form = await client.recognize_custom_forms_from_url(model.model_id, self.form_url_jpg) @@ -91,7 +91,7 @@ async def test_form_labeled(self, client, container_sas_url): async def test_fr_unlbld_trnsfrm(self, client, container_sas_url): training_client = client.get_form_training_client() - model = await training_client.training(container_sas_url) + model = await training_client.train_model(container_sas_url) responses = [] @@ -124,7 +124,7 @@ def callback(raw_response, _, headers): async def test_fr_lbld_transform(self, client, container_sas_url): training_client = client.get_form_training_client() - model = await training_client.training(container_sas_url, use_labels=True) + model = await training_client.train_model(container_sas_url, use_labels=True) responses = [] diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_mgmt.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_mgmt.py index b05305430a9d..70d5c9026187 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_mgmt.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_mgmt.py @@ -56,7 +56,7 @@ def test_account_properties(self, resource_group, location, form_recognizer_acco @GlobalTrainingAccountPreparer() def test_mgmt_model_labeled(self, client, container_sas_url): - poller = client.begin_training(container_sas_url, use_labels=True) + poller = client.begin_train_model(container_sas_url, use_labels=True) labeled_model_from_train = poller.result() labeled_model_from_get = client.get_custom_model(labeled_model_from_train.model_id) @@ -92,7 +92,7 @@ def test_mgmt_model_labeled(self, client, container_sas_url): @GlobalTrainingAccountPreparer() def test_mgmt_model_unlabeled(self, client, container_sas_url): - poller = client.begin_training(container_sas_url) + poller = client.begin_train_model(container_sas_url) unlabeled_model_from_train = poller.result() unlabeled_model_from_get = client.get_custom_model(unlabeled_model_from_train.model_id) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_mgmt_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_mgmt_async.py index 6f0725b0b66c..6a2b8abe4070 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_mgmt_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_mgmt_async.py @@ -57,7 +57,7 @@ async def test_account_properties(self, resource_group, location, form_recognize @GlobalTrainingAccountPreparer() async def test_mgmt_model_labeled(self, client, container_sas_url): - labeled_model_from_train = await client.training(container_sas_url, use_labels=True) + labeled_model_from_train = await client.train_model(container_sas_url, use_labels=True) labeled_model_from_get = await client.get_custom_model(labeled_model_from_train.model_id) @@ -91,7 +91,7 @@ async def test_mgmt_model_labeled(self, client, container_sas_url): @GlobalFormAndStorageAccountPreparer() @GlobalTrainingAccountPreparer() async def test_mgmt_model_unlabeled(self, client, container_sas_url): - unlabeled_model_from_train = await client.training(container_sas_url) + unlabeled_model_from_train = await client.train_model(container_sas_url) unlabeled_model_from_get = await client.get_custom_model(unlabeled_model_from_train.model_id) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_training.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_training.py index d7f43f2eefc1..d5ec01631db8 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_training.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_training.py @@ -23,13 +23,13 @@ class TestTraining(FormRecognizerTest): def test_training_auth_bad_key(self, resource_group, location, form_recognizer_account, form_recognizer_account_key): client = FormTrainingClient(form_recognizer_account, AzureKeyCredential("xxxx")) with self.assertRaises(ClientAuthenticationError): - poller = client.begin_training("xx") + poller = client.begin_train_model("xx") @GlobalFormAndStorageAccountPreparer() @GlobalTrainingAccountPreparer() def test_training(self, client, container_sas_url): - poller = client.begin_training(container_sas_url) + poller = client.begin_train_model(container_sas_url) model = poller.result() self.assertIsNotNone(model.model_id) @@ -60,7 +60,7 @@ def callback(response): raw_response.append(raw_model) raw_response.append(custom_model) - poller = client.begin_training(container_sas_url, cls=callback) + poller = client.begin_train_model(container_sas_url, cls=callback) model = poller.result() raw_model = raw_response[0] @@ -71,7 +71,7 @@ def callback(response): @GlobalTrainingAccountPreparer() def test_training_with_labels(self, client, container_sas_url): - poller = client.begin_training(container_sas_url, use_labels=True) + poller = client.begin_train_model(container_sas_url, use_labels=True) model = poller.result() self.assertIsNotNone(model.model_id) @@ -102,7 +102,7 @@ def callback(response): raw_response.append(raw_model) raw_response.append(custom_model) - poller = client.begin_training(container_sas_url, use_labels=True, cls=callback) + poller = client.begin_train_model(container_sas_url, use_labels=True, cls=callback) model = poller.result() raw_model = raw_response[0] @@ -113,7 +113,7 @@ def callback(response): @GlobalTrainingAccountPreparer() def test_training_with_files_filter(self, client, container_sas_url): - poller = client.begin_training(container_sas_url, include_sub_folders=True) + poller = client.begin_train_model(container_sas_url, include_sub_folders=True) model = poller.result() self.assertIsNotNone(model.model_id) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_training_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_training_async.py index 2273d46a4d63..f0b838c403d2 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_training_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_training_async.py @@ -23,13 +23,13 @@ class TestTrainingAsync(AsyncFormRecognizerTest): async def test_training_auth_bad_key(self, resource_group, location, form_recognizer_account, form_recognizer_account_key): client = FormTrainingClient(form_recognizer_account, AzureKeyCredential("xxxx")) with self.assertRaises(ClientAuthenticationError): - result = await client.training("xx") + result = await client.train_model("xx") @GlobalFormAndStorageAccountPreparer() @GlobalTrainingAccountPreparer() async def test_training(self, client, container_sas_url): - model = await client.training(container_sas_url) + model = await client.train_model(container_sas_url) self.assertIsNotNone(model.model_id) self.assertIsNotNone(model.created_on) @@ -59,7 +59,7 @@ def callback(response): raw_response.append(raw_model) raw_response.append(custom_model) - model = await client.training(container_sas_url, cls=callback) + model = await client.train_model(container_sas_url, cls=callback) raw_model = raw_response[0] custom_model = raw_response[1] @@ -69,7 +69,7 @@ def callback(response): @GlobalTrainingAccountPreparer() async def test_training_with_labels(self, client, container_sas_url): - model = await client.training(container_sas_url, use_labels=True) + model = await client.train_model(container_sas_url, use_labels=True) self.assertIsNotNone(model.model_id) self.assertIsNotNone(model.created_on) @@ -99,7 +99,7 @@ def callback(response): raw_response.append(raw_model) raw_response.append(custom_model) - model = await client.training(container_sas_url, use_labels=True, cls=callback) + model = await client.train_model(container_sas_url, use_labels=True, cls=callback) raw_model = raw_response[0] custom_model = raw_response[1] @@ -109,13 +109,13 @@ def callback(response): @GlobalTrainingAccountPreparer() async def test_training_with_files_filter(self, client, container_sas_url): - model = await client.training(container_sas_url, include_sub_folders=True) + model = await client.train_model(container_sas_url, include_sub_folders=True) self.assertEqual(len(model.training_documents), 6) self.assertEqual(model.training_documents[-1].document_name, "subfolder/Form_6.jpg") # we traversed subfolders - model = await client.training(container_sas_url, prefix="subfolder", include_sub_folders=True) + model = await client.train_model(container_sas_url, prefix="subfolder", include_sub_folders=True) self.assertEqual(len(model.training_documents), 1) self.assertEqual(model.training_documents[0].document_name, "subfolder/Form_6.jpg") # we filtered for only subfolders - model = await client.training(container_sas_url, prefix="xxx") + model = await client.train_model(container_sas_url, prefix="xxx") self.assertEqual(model.status, "invalid") # prefix doesn't include any files so training fails diff --git a/sdk/identity/azure-identity/tests/azure-functions/readme.md b/sdk/identity/azure-identity/tests/azure-functions/readme.md index 1e73a78608cb..5e9481832075 100644 --- a/sdk/identity/azure-identity/tests/azure-functions/readme.md +++ b/sdk/identity/azure-identity/tests/azure-functions/readme.md @@ -94,7 +94,7 @@ Allow the system-assigned identity to access the Key Vault: ```sh az keyvault set-policy -n $KEY_VAULT_NAME \ --object-id $(az functionapp identity show -g $RESOURCE_GROUP -n $FUNCTION_APP_SYSTEM_ASSIGNED --query principalId -o tsv) \ - --secret-permissions set delete + --secret-permissions list ``` @@ -108,7 +108,7 @@ Allow it to access the Key Vault: ```sh az keyvault set-policy -n $KEY_VAULT_NAME \ --object-id $(az identity show -g $RESOURCE_GROUP -n $MANAGED_IDENTITY_NAME --query principalId -o tsv) \ - --secret-permissions set delete + --secret-permissions list ``` diff --git a/sdk/identity/azure-identity/tests/managed-identity-live/appservice.md b/sdk/identity/azure-identity/tests/managed-identity-live/appservice.md index e7144247f6c0..9ac6684abc31 100644 --- a/sdk/identity/azure-identity/tests/managed-identity-live/appservice.md +++ b/sdk/identity/azure-identity/tests/managed-identity-live/appservice.md @@ -88,7 +88,7 @@ Allow the system-assigned identity to access the Key Vault: ```sh az keyvault set-policy -n $KEY_VAULT_NAME -g $RESOURCE_GROUP \ --object-id $(az webapp show -n $WEB_APP_SYSTEM_ASSIGNED -g $RESOURCE_GROUP --query identity.principalId -o tsv) \ - --secret-permissions set delete + --secret-permissions list ``` ### Managed identity @@ -103,7 +103,7 @@ Allow it to access the Key Vault: ```sh az keyvault set-policy -n $KEY_VAULT_NAME \ --object-id $(az identity show -g $RESOURCE_GROUP -n $MANAGED_IDENTITY_NAME --query principalId -o tsv) \ - --secret-permissions set delete + --secret-permissions list ``` ### Web app: user-assigned identity diff --git a/sdk/identity/azure-identity/tests/managed-identity-live/test_managed_identity_live.py b/sdk/identity/azure-identity/tests/managed-identity-live/test_managed_identity_live.py index 1fed87ad57ed..547c1ce3edb7 100644 --- a/sdk/identity/azure-identity/tests/managed-identity-live/test_managed_identity_live.py +++ b/sdk/identity/azure-identity/tests/managed-identity-live/test_managed_identity_live.py @@ -16,5 +16,5 @@ def test_managed_identity_live(live_managed_identity_config): # do something with Key Vault to verify the credential can get a valid token client = SecretClient(live_managed_identity_config["vault_url"], credential, logging_enable=True) - secret = client.set_secret("managed-identity-test-secret", "value") - client.begin_delete_secret(secret.name) + for _ in client.list_properties_of_secrets(): + pass diff --git a/sdk/identity/azure-identity/tests/managed-identity-live/test_managed_identity_live_async.py b/sdk/identity/azure-identity/tests/managed-identity-live/test_managed_identity_live_async.py index 20511997896d..8a420a348070 100644 --- a/sdk/identity/azure-identity/tests/managed-identity-live/test_managed_identity_live_async.py +++ b/sdk/identity/azure-identity/tests/managed-identity-live/test_managed_identity_live_async.py @@ -20,5 +20,5 @@ async def test_managed_identity_live(live_managed_identity_config): # do something with Key Vault to verify the credential can get a valid token client = SecretClient(live_managed_identity_config["vault_url"], credential, logging_enable=True) - secret = await client.set_secret("managed-identity-test-secret", "value") - await client.delete_secret(secret.name) + async for _ in client.list_properties_of_secrets(): + pass diff --git a/sdk/identity/azure-identity/tests/managed-identity-live/vm.md b/sdk/identity/azure-identity/tests/managed-identity-live/vm.md index 8186c2e4d145..32bc473a1151 100644 --- a/sdk/identity/azure-identity/tests/managed-identity-live/vm.md +++ b/sdk/identity/azure-identity/tests/managed-identity-live/vm.md @@ -82,14 +82,14 @@ Allow the VM with system-assigned identity to access the Key Vault's secrets: ```sh az keyvault set-policy -n $KEY_VAULT_NAME \ --object-id $(az vm show -n $VM_NAME_SYSTEM_ASSIGNED -g $RESOURCE_GROUP --query identity.principalId -o tsv) \ - --secret-permissions set delete + --secret-permissions list ``` Do the same for the user-assigned identity: ```sh az keyvault set-policy -n $KEY_VAULT_NAME \ --object-id $(az identity show -g $RESOURCE_GROUP -n $MANAGED_IDENTITY_NAME --query principalId -o tsv) \ - --secret-permissions set delete + --secret-permissions list ``` # Install dependencies diff --git a/sdk/identity/azure-identity/tests/pod-identity/readme.md b/sdk/identity/azure-identity/tests/pod-identity/readme.md index 3263698c4f10..bcfd697905ca 100644 --- a/sdk/identity/azure-identity/tests/pod-identity/readme.md +++ b/sdk/identity/azure-identity/tests/pod-identity/readme.md @@ -69,7 +69,7 @@ az keyvault create -g $RESOURCE_GROUP -n $KEY_VAULT_NAME --sku standard Add an access policy for the managed identity: ```sh -az keyvault set-policy -n $KEY_VAULT_NAME --object-id $MANAGED_IDENTITY_PRINCIPAL_ID --secret-permissions set delete +az keyvault set-policy -n $KEY_VAULT_NAME --object-id $MANAGED_IDENTITY_PRINCIPAL_ID --secret-permissions list ``` ### container registry diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/CHANGELOG.md b/sdk/loganalytics/azure-mgmt-loganalytics/CHANGELOG.md index 8f3939b95eab..5273164b2d9a 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/CHANGELOG.md +++ b/sdk/loganalytics/azure-mgmt-loganalytics/CHANGELOG.md @@ -1,5 +1,32 @@ # Release History +## 0.4.0 (2020-04-20) + +**Features** + + - Model LinkedService has a new parameter provisioning_state + - Added operation WorkspacesOperations.available_service_tiers + - Added operation group ManagementGroupsOperations + - Added operation group GatewaysOperations + - Added operation group OperationStatusesOperations + - Added operation group SchemaOperations + - Added operation group WorkspacePurgeOperations + - Added operation group UsagesOperations + - Added operation group SharedKeysOperations + - Added operation group StorageInsightConfigsOperations + - Added operation group IntelligencePacksOperations + +**Breaking changes** + + - Removed operation WorkspacesOperations.list_usages + - Removed operation WorkspacesOperations.get_shared_keys + - Removed operation WorkspacesOperations.disable_intelligence_pack + - Removed operation WorkspacesOperations.list_intelligence_packs + - Removed operation WorkspacesOperations.list_management_groups + - Removed operation WorkspacesOperations.enable_intelligence_pack + - Removed operation group StorageInsightsOperations + - Removed operation group OperationalInsightsManagementClientOperationsMixin + ## 0.3.0 (2020-04-08) **Features** diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/MANIFEST.in b/sdk/loganalytics/azure-mgmt-loganalytics/MANIFEST.in index efa752eaff96..a3cb07df8765 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/MANIFEST.in +++ b/sdk/loganalytics/azure-mgmt-loganalytics/MANIFEST.in @@ -1 +1,5 @@ +recursive-include tests *.py *.yaml include *.md +include azure/__init__.py +include azure/mgmt/__init__.py + diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/README.md b/sdk/loganalytics/azure-mgmt-loganalytics/README.md index beaa342dc92f..87dcf93e2334 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/README.md +++ b/sdk/loganalytics/azure-mgmt-loganalytics/README.md @@ -1,47 +1,21 @@ -## Microsoft Azure SDK for Python +# Microsoft Azure SDK for Python This is the Microsoft Azure Log Analytics Management Client Library. +This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. +For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/) -Azure Resource Manager (ARM) is the next generation of management APIs -that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +# Usage -For the older Azure Service Management (ASM) libraries, see -[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy) -library. +For code examples, see [Log Analytics Management](https://docs.microsoft.com/python/api/overview/azure/) +on docs.microsoft.com. -For a more complete set of Azure libraries, see the -[azure](https://pypi.python.org/pypi/azure) bundle package. -## Compatibility +# Provide Feedback -**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: - -``` shell -pip freeze -``` - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -``` shell -pip uninstall azure -``` - -## Usage - -For code examples, see [Log Analytics -Management](https://docs.microsoft.com/python/api/overview/azure/) on -docs.microsoft.com. - -## 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) +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-loganalytics%2FREADME.png) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-loganalytics%2FREADME.png) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/_operational_insights_management_client.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/_operational_insights_management_client.py index eac309bd9033..5a0407ade5c4 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/_operational_insights_management_client.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/_operational_insights_management_client.py @@ -13,20 +13,27 @@ from msrest import Serializer, Deserializer from ._configuration import OperationalInsightsManagementClientConfiguration -from .operations import OperationalInsightsManagementClientOperationsMixin from .operations import DataExportsOperations from .operations import DataSourcesOperations -from .operations import WorkspacesOperations +from .operations import IntelligencePacksOperations from .operations import LinkedServicesOperations from .operations import LinkedStorageAccountsOperations +from .operations import ManagementGroupsOperations from .operations import Operations +from .operations import OperationStatusesOperations +from .operations import SharedKeysOperations +from .operations import UsagesOperations +from .operations import WorkspacesOperations from .operations import ClustersOperations -from .operations import StorageInsightsOperations +from .operations import StorageInsightConfigsOperations from .operations import SavedSearchesOperations +from .operations import GatewaysOperations +from .operations import SchemaOperations +from .operations import WorkspacePurgeOperations from . import models -class OperationalInsightsManagementClient(OperationalInsightsManagementClientOperationsMixin, SDKClient): +class OperationalInsightsManagementClient(SDKClient): """Operational Insights Client :ivar config: Configuration for client. @@ -36,20 +43,36 @@ class OperationalInsightsManagementClient(OperationalInsightsManagementClientOpe :vartype data_exports: azure.mgmt.loganalytics.operations.DataExportsOperations :ivar data_sources: DataSources operations :vartype data_sources: azure.mgmt.loganalytics.operations.DataSourcesOperations - :ivar workspaces: Workspaces operations - :vartype workspaces: azure.mgmt.loganalytics.operations.WorkspacesOperations + :ivar intelligence_packs: IntelligencePacks operations + :vartype intelligence_packs: azure.mgmt.loganalytics.operations.IntelligencePacksOperations :ivar linked_services: LinkedServices operations :vartype linked_services: azure.mgmt.loganalytics.operations.LinkedServicesOperations :ivar linked_storage_accounts: LinkedStorageAccounts operations :vartype linked_storage_accounts: azure.mgmt.loganalytics.operations.LinkedStorageAccountsOperations + :ivar management_groups: ManagementGroups operations + :vartype management_groups: azure.mgmt.loganalytics.operations.ManagementGroupsOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.loganalytics.operations.Operations + :ivar operation_statuses: OperationStatuses operations + :vartype operation_statuses: azure.mgmt.loganalytics.operations.OperationStatusesOperations + :ivar shared_keys: SharedKeys operations + :vartype shared_keys: azure.mgmt.loganalytics.operations.SharedKeysOperations + :ivar usages: Usages operations + :vartype usages: azure.mgmt.loganalytics.operations.UsagesOperations + :ivar workspaces: Workspaces operations + :vartype workspaces: azure.mgmt.loganalytics.operations.WorkspacesOperations :ivar clusters: Clusters operations :vartype clusters: azure.mgmt.loganalytics.operations.ClustersOperations - :ivar storage_insights: StorageInsights operations - :vartype storage_insights: azure.mgmt.loganalytics.operations.StorageInsightsOperations + :ivar storage_insight_configs: StorageInsightConfigs operations + :vartype storage_insight_configs: azure.mgmt.loganalytics.operations.StorageInsightConfigsOperations :ivar saved_searches: SavedSearches operations :vartype saved_searches: azure.mgmt.loganalytics.operations.SavedSearchesOperations + :ivar gateways: Gateways operations + :vartype gateways: azure.mgmt.loganalytics.operations.GatewaysOperations + :ivar schema: Schema operations + :vartype schema: azure.mgmt.loganalytics.operations.SchemaOperations + :ivar workspace_purge: WorkspacePurge operations + :vartype workspace_purge: azure.mgmt.loganalytics.operations.WorkspacePurgeOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -74,17 +97,33 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.data_sources = DataSourcesOperations( self._client, self.config, self._serialize, self._deserialize) - self.workspaces = WorkspacesOperations( + self.intelligence_packs = IntelligencePacksOperations( self._client, self.config, self._serialize, self._deserialize) self.linked_services = LinkedServicesOperations( self._client, self.config, self._serialize, self._deserialize) self.linked_storage_accounts = LinkedStorageAccountsOperations( self._client, self.config, self._serialize, self._deserialize) + self.management_groups = ManagementGroupsOperations( + self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) + self.operation_statuses = OperationStatusesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.shared_keys = SharedKeysOperations( + self._client, self.config, self._serialize, self._deserialize) + self.usages = UsagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workspaces = WorkspacesOperations( + self._client, self.config, self._serialize, self._deserialize) self.clusters = ClustersOperations( self._client, self.config, self._serialize, self._deserialize) - self.storage_insights = StorageInsightsOperations( + self.storage_insight_configs = StorageInsightConfigsOperations( self._client, self.config, self._serialize, self._deserialize) self.saved_searches = SavedSearchesOperations( self._client, self.config, self._serialize, self._deserialize) + self.gateways = GatewaysOperations( + self._client, self.config, self._serialize, self._deserialize) + self.schema = SchemaOperations( + self._client, self.config, self._serialize, self._deserialize) + self.workspace_purge = WorkspacePurgeOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/__init__.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/__init__.py index d441d7803976..a25cdc5c9908 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/__init__.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/__init__.py @@ -10,11 +10,13 @@ # -------------------------------------------------------------------------- try: + from ._models_py3 import AvailableServiceTier from ._models_py3 import AzureEntityResource from ._models_py3 import Cluster from ._models_py3 import ClusterErrorResponse, ClusterErrorResponseException from ._models_py3 import ClusterPatch from ._models_py3 import ClusterSku + from ._models_py3 import CoreSummary from ._models_py3 import DataExport from ._models_py3 import DataExportErrorResponse, DataExportErrorResponseException from ._models_py3 import DataSource @@ -36,6 +38,11 @@ from ._models_py3 import Resource from ._models_py3 import SavedSearch from ._models_py3 import SavedSearchesListResult + from ._models_py3 import SearchGetSchemaResponse + from ._models_py3 import SearchMetadata + from ._models_py3 import SearchMetadataSchema + from ._models_py3 import SearchSchemaValue + from ._models_py3 import SearchSort from ._models_py3 import SharedKeys from ._models_py3 import StorageAccount from ._models_py3 import StorageInsight @@ -45,13 +52,19 @@ from ._models_py3 import UsageMetric from ._models_py3 import Workspace from ._models_py3 import WorkspacePatch + from ._models_py3 import WorkspacePurgeBody + from ._models_py3 import WorkspacePurgeBodyFilters + from ._models_py3 import WorkspacePurgeResponse + from ._models_py3 import WorkspacePurgeStatusResponse from ._models_py3 import WorkspaceSku except (SyntaxError, ImportError): + from ._models import AvailableServiceTier from ._models import AzureEntityResource from ._models import Cluster from ._models import ClusterErrorResponse, ClusterErrorResponseException from ._models import ClusterPatch from ._models import ClusterSku + from ._models import CoreSummary from ._models import DataExport from ._models import DataExportErrorResponse, DataExportErrorResponseException from ._models import DataSource @@ -73,6 +86,11 @@ from ._models import Resource from ._models import SavedSearch from ._models import SavedSearchesListResult + from ._models import SearchGetSchemaResponse + from ._models import SearchMetadata + from ._models import SearchMetadataSchema + from ._models import SearchSchemaValue + from ._models import SearchSort from ._models import SharedKeys from ._models import StorageAccount from ._models import StorageInsight @@ -82,6 +100,10 @@ from ._models import UsageMetric from ._models import Workspace from ._models import WorkspacePatch + from ._models import WorkspacePurgeBody + from ._models import WorkspacePurgeBodyFilters + from ._models import WorkspacePurgeResponse + from ._models import WorkspacePurgeStatusResponse from ._models import WorkspaceSku from ._paged_models import ClusterPaged from ._paged_models import DataExportPaged @@ -96,21 +118,28 @@ from ._operational_insights_management_client_enums import ( Type, DataSourceKind, + LinkedServiceEntityStatus, DataSourceType, WorkspaceSkuNameEnum, - EntityStatus, + WorkspaceEntityStatus, PublicNetworkAccessType, + ClusterEntityStatus, ClusterSkuNameEnum, IdentityType, StorageInsightState, + SkuNameEnum, + SearchSortEnum, + PurgeState, ) __all__ = [ + 'AvailableServiceTier', 'AzureEntityResource', 'Cluster', 'ClusterErrorResponse', 'ClusterErrorResponseException', 'ClusterPatch', 'ClusterSku', + 'CoreSummary', 'DataExport', 'DataExportErrorResponse', 'DataExportErrorResponseException', 'DataSource', @@ -132,6 +161,11 @@ 'Resource', 'SavedSearch', 'SavedSearchesListResult', + 'SearchGetSchemaResponse', + 'SearchMetadata', + 'SearchMetadataSchema', + 'SearchSchemaValue', + 'SearchSort', 'SharedKeys', 'StorageAccount', 'StorageInsight', @@ -141,24 +175,33 @@ 'UsageMetric', 'Workspace', 'WorkspacePatch', + 'WorkspacePurgeBody', + 'WorkspacePurgeBodyFilters', + 'WorkspacePurgeResponse', + 'WorkspacePurgeStatusResponse', 'WorkspaceSku', 'DataExportPaged', 'DataSourcePaged', - 'ManagementGroupPaged', - 'UsageMetricPaged', - 'WorkspacePaged', 'LinkedServicePaged', 'LinkedStorageAccountsResourcePaged', + 'ManagementGroupPaged', 'OperationPaged', + 'UsageMetricPaged', + 'WorkspacePaged', 'ClusterPaged', 'StorageInsightPaged', 'Type', 'DataSourceKind', + 'LinkedServiceEntityStatus', 'DataSourceType', 'WorkspaceSkuNameEnum', - 'EntityStatus', + 'WorkspaceEntityStatus', 'PublicNetworkAccessType', + 'ClusterEntityStatus', 'ClusterSkuNameEnum', 'IdentityType', 'StorageInsightState', + 'SkuNameEnum', + 'SearchSortEnum', + 'PurgeState', ] diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models.py index dec384ebc1f5..bb1bd8a415b8 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models.py @@ -13,6 +13,66 @@ from msrest.exceptions import HttpOperationError +class AvailableServiceTier(Model): + """Service Tier details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar service_tier: The name of the Service Tier. Possible values include: + 'Free', 'Standard', 'Premium', 'PerNode', 'PerGB2018', 'Standalone', + 'CapacityReservation' + :vartype service_tier: str or ~azure.mgmt.loganalytics.models.SkuNameEnum + :ivar enabled: True if the Service Tier is enabled for the workspace. + :vartype enabled: bool + :ivar minimum_retention: The minimum retention for the Service Tier, in + days. + :vartype minimum_retention: long + :ivar maximum_retention: The maximum retention for the Service Tier, in + days. + :vartype maximum_retention: long + :ivar default_retention: The default retention for the Service Tier, in + days. + :vartype default_retention: long + :ivar capacity_reservation_level: The capacity reservation level in GB per + day. Returned for the Capacity Reservation Service Tier. + :vartype capacity_reservation_level: long + :ivar last_sku_update: Time when the sku was last updated for the + workspace. Returned for the Capacity Reservation Service Tier. + :vartype last_sku_update: datetime + """ + + _validation = { + 'service_tier': {'readonly': True}, + 'enabled': {'readonly': True}, + 'minimum_retention': {'readonly': True}, + 'maximum_retention': {'readonly': True}, + 'default_retention': {'readonly': True}, + 'capacity_reservation_level': {'readonly': True}, + 'last_sku_update': {'readonly': True}, + } + + _attribute_map = { + 'service_tier': {'key': 'serviceTier', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'minimum_retention': {'key': 'minimumRetention', 'type': 'long'}, + 'maximum_retention': {'key': 'maximumRetention', 'type': 'long'}, + 'default_retention': {'key': 'defaultRetention', 'type': 'long'}, + 'capacity_reservation_level': {'key': 'capacityReservationLevel', 'type': 'long'}, + 'last_sku_update': {'key': 'lastSkuUpdate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(AvailableServiceTier, self).__init__(**kwargs) + self.service_tier = None + self.enabled = None + self.minimum_retention = None + self.maximum_retention = None + self.default_retention = None + self.capacity_reservation_level = None + self.last_sku_update = None + + class Resource(Model): """Resource. @@ -167,9 +227,9 @@ class Cluster(TrackedResource): :vartype cluster_id: str :ivar provisioning_state: The provisioning state of the cluster. Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', - 'ProvisioningAccount' + 'ProvisioningAccount', 'Updating' :vartype provisioning_state: str or - ~azure.mgmt.loganalytics.models.EntityStatus + ~azure.mgmt.loganalytics.models.ClusterEntityStatus :param key_vault_properties: The associated key properties. :type key_vault_properties: ~azure.mgmt.loganalytics.models.KeyVaultProperties @@ -283,6 +343,33 @@ def __init__(self, **kwargs): self.name = kwargs.get('name', None) +class CoreSummary(Model): + """The core summary of a search. + + All required parameters must be populated in order to send to Azure. + + :param status: The status of a core summary. + :type status: str + :param number_of_documents: Required. The number of documents of a core + summary. + :type number_of_documents: long + """ + + _validation = { + 'number_of_documents': {'required': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'number_of_documents': {'key': 'numberOfDocuments', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(CoreSummary, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.number_of_documents = kwargs.get('number_of_documents', None) + + class ProxyResource(Resource): """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags. @@ -703,6 +790,11 @@ class LinkedService(ProxyResource): be linked to the workspace. This should be used for linking resources which require write access :type write_access_resource_id: str + :param provisioning_state: The provisioning state of the linked service. + Possible values include: 'Succeeded', 'Deleting', 'ProvisioningAccount', + 'Updating' + :type provisioning_state: str or + ~azure.mgmt.loganalytics.models.LinkedServiceEntityStatus :param tags: Resource tags. :type tags: dict[str, str] """ @@ -719,6 +811,7 @@ class LinkedService(ProxyResource): 'type': {'key': 'type', 'type': 'str'}, 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, 'write_access_resource_id': {'key': 'properties.writeAccessResourceId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, } @@ -726,6 +819,7 @@ def __init__(self, **kwargs): super(LinkedService, self).__init__(**kwargs) self.resource_id = kwargs.get('resource_id', None) self.write_access_resource_id = kwargs.get('write_access_resource_id', None) + self.provisioning_state = kwargs.get('provisioning_state', None) self.tags = kwargs.get('tags', None) @@ -1028,6 +1122,198 @@ def __init__(self, **kwargs): self.value = kwargs.get('value', None) +class SearchGetSchemaResponse(Model): + """The get schema operation response. + + :param metadata: The metadata from search results. + :type metadata: ~azure.mgmt.loganalytics.models.SearchMetadata + :param value: The array of result values. + :type value: list[~azure.mgmt.loganalytics.models.SearchSchemaValue] + """ + + _attribute_map = { + 'metadata': {'key': 'metadata', 'type': 'SearchMetadata'}, + 'value': {'key': 'value', 'type': '[SearchSchemaValue]'}, + } + + def __init__(self, **kwargs): + super(SearchGetSchemaResponse, self).__init__(**kwargs) + self.metadata = kwargs.get('metadata', None) + self.value = kwargs.get('value', None) + + +class SearchMetadata(Model): + """Metadata for search results. + + :param search_id: The request id of the search. + :type search_id: str + :param result_type: The search result type. + :type result_type: str + :param total: The total number of search results. + :type total: long + :param top: The number of top search results. + :type top: long + :param id: The id of the search results request. + :type id: str + :param core_summaries: The core summaries. + :type core_summaries: list[~azure.mgmt.loganalytics.models.CoreSummary] + :param status: The status of the search results. + :type status: str + :param start_time: The start time for the search. + :type start_time: datetime + :param last_updated: The time of last update. + :type last_updated: datetime + :param e_tag: The ETag of the search results. + :type e_tag: str + :param sort: How the results are sorted. + :type sort: list[~azure.mgmt.loganalytics.models.SearchSort] + :param request_time: The request time. + :type request_time: long + :param aggregated_value_field: The aggregated value field. + :type aggregated_value_field: str + :param aggregated_grouping_fields: The aggregated grouping fields. + :type aggregated_grouping_fields: str + :param sum: The sum of all aggregates returned in the result set. + :type sum: long + :param max: The max of all aggregates returned in the result set. + :type max: long + :param schema: The schema. + :type schema: ~azure.mgmt.loganalytics.models.SearchMetadataSchema + """ + + _attribute_map = { + 'search_id': {'key': 'requestId', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'total': {'key': 'total', 'type': 'long'}, + 'top': {'key': 'top', 'type': 'long'}, + 'id': {'key': 'id', 'type': 'str'}, + 'core_summaries': {'key': 'coreSummaries', 'type': '[CoreSummary]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'sort': {'key': 'sort', 'type': '[SearchSort]'}, + 'request_time': {'key': 'requestTime', 'type': 'long'}, + 'aggregated_value_field': {'key': 'aggregatedValueField', 'type': 'str'}, + 'aggregated_grouping_fields': {'key': 'aggregatedGroupingFields', 'type': 'str'}, + 'sum': {'key': 'sum', 'type': 'long'}, + 'max': {'key': 'max', 'type': 'long'}, + 'schema': {'key': 'schema', 'type': 'SearchMetadataSchema'}, + } + + def __init__(self, **kwargs): + super(SearchMetadata, self).__init__(**kwargs) + self.search_id = kwargs.get('search_id', None) + self.result_type = kwargs.get('result_type', None) + self.total = kwargs.get('total', None) + self.top = kwargs.get('top', None) + self.id = kwargs.get('id', None) + self.core_summaries = kwargs.get('core_summaries', None) + self.status = kwargs.get('status', None) + self.start_time = kwargs.get('start_time', None) + self.last_updated = kwargs.get('last_updated', None) + self.e_tag = kwargs.get('e_tag', None) + self.sort = kwargs.get('sort', None) + self.request_time = kwargs.get('request_time', None) + self.aggregated_value_field = kwargs.get('aggregated_value_field', None) + self.aggregated_grouping_fields = kwargs.get('aggregated_grouping_fields', None) + self.sum = kwargs.get('sum', None) + self.max = kwargs.get('max', None) + self.schema = kwargs.get('schema', None) + + +class SearchMetadataSchema(Model): + """Schema metadata for search. + + :param name: The name of the metadata schema. + :type name: str + :param version: The version of the metadata schema. + :type version: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(SearchMetadataSchema, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.version = kwargs.get('version', None) + + +class SearchSchemaValue(Model): + """Value object for schema results. + + All required parameters must be populated in order to send to Azure. + + :param name: The name of the schema. + :type name: str + :param display_name: The display name of the schema. + :type display_name: str + :param type: The type. + :type type: str + :param indexed: Required. The boolean that indicates the field is + searchable as free text. + :type indexed: bool + :param stored: Required. The boolean that indicates whether or not the + field is stored. + :type stored: bool + :param facet: Required. The boolean that indicates whether or not the + field is a facet. + :type facet: bool + :param owner_type: The array of workflows containing the field. + :type owner_type: list[str] + """ + + _validation = { + 'indexed': {'required': True}, + 'stored': {'required': True}, + 'facet': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'indexed': {'key': 'indexed', 'type': 'bool'}, + 'stored': {'key': 'stored', 'type': 'bool'}, + 'facet': {'key': 'facet', 'type': 'bool'}, + 'owner_type': {'key': 'ownerType', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(SearchSchemaValue, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.type = kwargs.get('type', None) + self.indexed = kwargs.get('indexed', None) + self.stored = kwargs.get('stored', None) + self.facet = kwargs.get('facet', None) + self.owner_type = kwargs.get('owner_type', None) + + +class SearchSort(Model): + """The sort parameters for search. + + :param name: The name of the field the search query is sorted on. + :type name: str + :param order: The sort order of the search. Possible values include: + 'asc', 'desc' + :type order: str or ~azure.mgmt.loganalytics.models.SearchSortEnum + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SearchSort, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.order = kwargs.get('order', None) + + class SharedKeys(Model): """The shared keys for a workspace. @@ -1251,9 +1537,9 @@ class Workspace(TrackedResource): :type location: str :param provisioning_state: The provisioning state of the workspace. Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', - 'Deleting', 'ProvisioningAccount' + 'Deleting', 'ProvisioningAccount', 'Updating' :type provisioning_state: str or - ~azure.mgmt.loganalytics.models.EntityStatus + ~azure.mgmt.loganalytics.models.WorkspaceEntityStatus :ivar customer_id: This is a read-only property. Represents the ID associated with the workspace. :vartype customer_id: str @@ -1337,9 +1623,9 @@ class WorkspacePatch(AzureEntityResource): :vartype etag: str :param provisioning_state: The provisioning state of the workspace. Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', - 'Deleting', 'ProvisioningAccount' + 'Deleting', 'ProvisioningAccount', 'Updating' :type provisioning_state: str or - ~azure.mgmt.loganalytics.models.EntityStatus + ~azure.mgmt.loganalytics.models.WorkspaceEntityStatus :ivar customer_id: This is a read-only property. Represents the ID associated with the workspace. :vartype customer_id: str @@ -1404,6 +1690,115 @@ def __init__(self, **kwargs): self.tags = kwargs.get('tags', None) +class WorkspacePurgeBody(Model): + """Describes the body of a purge request for an App Insights Workspace. + + All required parameters must be populated in order to send to Azure. + + :param table: Required. Table from which to purge data. + :type table: str + :param filters: Required. The set of columns and filters (queries) to run + over them to purge the resulting data. + :type filters: + list[~azure.mgmt.loganalytics.models.WorkspacePurgeBodyFilters] + """ + + _validation = { + 'table': {'required': True}, + 'filters': {'required': True}, + } + + _attribute_map = { + 'table': {'key': 'table', 'type': 'str'}, + 'filters': {'key': 'filters', 'type': '[WorkspacePurgeBodyFilters]'}, + } + + def __init__(self, **kwargs): + super(WorkspacePurgeBody, self).__init__(**kwargs) + self.table = kwargs.get('table', None) + self.filters = kwargs.get('filters', None) + + +class WorkspacePurgeBodyFilters(Model): + """User-defined filters to return data which will be purged from the table. + + :param column: The column of the table over which the given query should + run + :type column: str + :param operator: A query operator to evaluate over the provided column and + value(s). Supported operators are ==, =~, in, in~, >, >=, <, <=, between, + and have the same behavior as they would in a KQL query. + :type operator: str + :param value: the value for the operator to function over. This can be a + number (e.g., > 100), a string (timestamp >= '2017-09-01') or array of + values. + :type value: object + :param key: When filtering over custom dimensions, this key will be used + as the name of the custom dimension. + :type key: str + """ + + _attribute_map = { + 'column': {'key': 'column', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkspacePurgeBodyFilters, self).__init__(**kwargs) + self.column = kwargs.get('column', None) + self.operator = kwargs.get('operator', None) + self.value = kwargs.get('value', None) + self.key = kwargs.get('key', None) + + +class WorkspacePurgeResponse(Model): + """Response containing operationId for a specific purge action. + + All required parameters must be populated in order to send to Azure. + + :param operation_id: Required. Id to use when querying for status for a + particular purge operation. + :type operation_id: str + """ + + _validation = { + 'operation_id': {'required': True}, + } + + _attribute_map = { + 'operation_id': {'key': 'operationId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkspacePurgeResponse, self).__init__(**kwargs) + self.operation_id = kwargs.get('operation_id', None) + + +class WorkspacePurgeStatusResponse(Model): + """Response containing status for a specific purge operation. + + All required parameters must be populated in order to send to Azure. + + :param status: Required. Status of the operation represented by the + requested Id. Possible values include: 'pending', 'completed' + :type status: str or ~azure.mgmt.loganalytics.models.PurgeState + """ + + _validation = { + 'status': {'required': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(WorkspacePurgeStatusResponse, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + + class WorkspaceSku(Model): """The SKU (tier) of a workspace. diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models_py3.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models_py3.py index 2ebee3fa3e3f..15cd80e08782 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models_py3.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_models_py3.py @@ -13,6 +13,66 @@ from msrest.exceptions import HttpOperationError +class AvailableServiceTier(Model): + """Service Tier details. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar service_tier: The name of the Service Tier. Possible values include: + 'Free', 'Standard', 'Premium', 'PerNode', 'PerGB2018', 'Standalone', + 'CapacityReservation' + :vartype service_tier: str or ~azure.mgmt.loganalytics.models.SkuNameEnum + :ivar enabled: True if the Service Tier is enabled for the workspace. + :vartype enabled: bool + :ivar minimum_retention: The minimum retention for the Service Tier, in + days. + :vartype minimum_retention: long + :ivar maximum_retention: The maximum retention for the Service Tier, in + days. + :vartype maximum_retention: long + :ivar default_retention: The default retention for the Service Tier, in + days. + :vartype default_retention: long + :ivar capacity_reservation_level: The capacity reservation level in GB per + day. Returned for the Capacity Reservation Service Tier. + :vartype capacity_reservation_level: long + :ivar last_sku_update: Time when the sku was last updated for the + workspace. Returned for the Capacity Reservation Service Tier. + :vartype last_sku_update: datetime + """ + + _validation = { + 'service_tier': {'readonly': True}, + 'enabled': {'readonly': True}, + 'minimum_retention': {'readonly': True}, + 'maximum_retention': {'readonly': True}, + 'default_retention': {'readonly': True}, + 'capacity_reservation_level': {'readonly': True}, + 'last_sku_update': {'readonly': True}, + } + + _attribute_map = { + 'service_tier': {'key': 'serviceTier', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'minimum_retention': {'key': 'minimumRetention', 'type': 'long'}, + 'maximum_retention': {'key': 'maximumRetention', 'type': 'long'}, + 'default_retention': {'key': 'defaultRetention', 'type': 'long'}, + 'capacity_reservation_level': {'key': 'capacityReservationLevel', 'type': 'long'}, + 'last_sku_update': {'key': 'lastSkuUpdate', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(AvailableServiceTier, self).__init__(**kwargs) + self.service_tier = None + self.enabled = None + self.minimum_retention = None + self.maximum_retention = None + self.default_retention = None + self.capacity_reservation_level = None + self.last_sku_update = None + + class Resource(Model): """Resource. @@ -167,9 +227,9 @@ class Cluster(TrackedResource): :vartype cluster_id: str :ivar provisioning_state: The provisioning state of the cluster. Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', - 'ProvisioningAccount' + 'ProvisioningAccount', 'Updating' :vartype provisioning_state: str or - ~azure.mgmt.loganalytics.models.EntityStatus + ~azure.mgmt.loganalytics.models.ClusterEntityStatus :param key_vault_properties: The associated key properties. :type key_vault_properties: ~azure.mgmt.loganalytics.models.KeyVaultProperties @@ -283,6 +343,33 @@ def __init__(self, *, capacity: int=None, name=None, **kwargs) -> None: self.name = name +class CoreSummary(Model): + """The core summary of a search. + + All required parameters must be populated in order to send to Azure. + + :param status: The status of a core summary. + :type status: str + :param number_of_documents: Required. The number of documents of a core + summary. + :type number_of_documents: long + """ + + _validation = { + 'number_of_documents': {'required': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'number_of_documents': {'key': 'numberOfDocuments', 'type': 'long'}, + } + + def __init__(self, *, number_of_documents: int, status: str=None, **kwargs) -> None: + super(CoreSummary, self).__init__(**kwargs) + self.status = status + self.number_of_documents = number_of_documents + + class ProxyResource(Resource): """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags. @@ -703,6 +790,11 @@ class LinkedService(ProxyResource): be linked to the workspace. This should be used for linking resources which require write access :type write_access_resource_id: str + :param provisioning_state: The provisioning state of the linked service. + Possible values include: 'Succeeded', 'Deleting', 'ProvisioningAccount', + 'Updating' + :type provisioning_state: str or + ~azure.mgmt.loganalytics.models.LinkedServiceEntityStatus :param tags: Resource tags. :type tags: dict[str, str] """ @@ -719,13 +811,15 @@ class LinkedService(ProxyResource): 'type': {'key': 'type', 'type': 'str'}, 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, 'write_access_resource_id': {'key': 'properties.writeAccessResourceId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, *, resource_id: str=None, write_access_resource_id: str=None, tags=None, **kwargs) -> None: + def __init__(self, *, resource_id: str=None, write_access_resource_id: str=None, provisioning_state=None, tags=None, **kwargs) -> None: super(LinkedService, self).__init__(**kwargs) self.resource_id = resource_id self.write_access_resource_id = write_access_resource_id + self.provisioning_state = provisioning_state self.tags = tags @@ -1028,6 +1122,198 @@ def __init__(self, *, value=None, **kwargs) -> None: self.value = value +class SearchGetSchemaResponse(Model): + """The get schema operation response. + + :param metadata: The metadata from search results. + :type metadata: ~azure.mgmt.loganalytics.models.SearchMetadata + :param value: The array of result values. + :type value: list[~azure.mgmt.loganalytics.models.SearchSchemaValue] + """ + + _attribute_map = { + 'metadata': {'key': 'metadata', 'type': 'SearchMetadata'}, + 'value': {'key': 'value', 'type': '[SearchSchemaValue]'}, + } + + def __init__(self, *, metadata=None, value=None, **kwargs) -> None: + super(SearchGetSchemaResponse, self).__init__(**kwargs) + self.metadata = metadata + self.value = value + + +class SearchMetadata(Model): + """Metadata for search results. + + :param search_id: The request id of the search. + :type search_id: str + :param result_type: The search result type. + :type result_type: str + :param total: The total number of search results. + :type total: long + :param top: The number of top search results. + :type top: long + :param id: The id of the search results request. + :type id: str + :param core_summaries: The core summaries. + :type core_summaries: list[~azure.mgmt.loganalytics.models.CoreSummary] + :param status: The status of the search results. + :type status: str + :param start_time: The start time for the search. + :type start_time: datetime + :param last_updated: The time of last update. + :type last_updated: datetime + :param e_tag: The ETag of the search results. + :type e_tag: str + :param sort: How the results are sorted. + :type sort: list[~azure.mgmt.loganalytics.models.SearchSort] + :param request_time: The request time. + :type request_time: long + :param aggregated_value_field: The aggregated value field. + :type aggregated_value_field: str + :param aggregated_grouping_fields: The aggregated grouping fields. + :type aggregated_grouping_fields: str + :param sum: The sum of all aggregates returned in the result set. + :type sum: long + :param max: The max of all aggregates returned in the result set. + :type max: long + :param schema: The schema. + :type schema: ~azure.mgmt.loganalytics.models.SearchMetadataSchema + """ + + _attribute_map = { + 'search_id': {'key': 'requestId', 'type': 'str'}, + 'result_type': {'key': 'resultType', 'type': 'str'}, + 'total': {'key': 'total', 'type': 'long'}, + 'top': {'key': 'top', 'type': 'long'}, + 'id': {'key': 'id', 'type': 'str'}, + 'core_summaries': {'key': 'coreSummaries', 'type': '[CoreSummary]'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'sort': {'key': 'sort', 'type': '[SearchSort]'}, + 'request_time': {'key': 'requestTime', 'type': 'long'}, + 'aggregated_value_field': {'key': 'aggregatedValueField', 'type': 'str'}, + 'aggregated_grouping_fields': {'key': 'aggregatedGroupingFields', 'type': 'str'}, + 'sum': {'key': 'sum', 'type': 'long'}, + 'max': {'key': 'max', 'type': 'long'}, + 'schema': {'key': 'schema', 'type': 'SearchMetadataSchema'}, + } + + def __init__(self, *, search_id: str=None, result_type: str=None, total: int=None, top: int=None, id: str=None, core_summaries=None, status: str=None, start_time=None, last_updated=None, e_tag: str=None, sort=None, request_time: int=None, aggregated_value_field: str=None, aggregated_grouping_fields: str=None, sum: int=None, max: int=None, schema=None, **kwargs) -> None: + super(SearchMetadata, self).__init__(**kwargs) + self.search_id = search_id + self.result_type = result_type + self.total = total + self.top = top + self.id = id + self.core_summaries = core_summaries + self.status = status + self.start_time = start_time + self.last_updated = last_updated + self.e_tag = e_tag + self.sort = sort + self.request_time = request_time + self.aggregated_value_field = aggregated_value_field + self.aggregated_grouping_fields = aggregated_grouping_fields + self.sum = sum + self.max = max + self.schema = schema + + +class SearchMetadataSchema(Model): + """Schema metadata for search. + + :param name: The name of the metadata schema. + :type name: str + :param version: The version of the metadata schema. + :type version: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, version: int=None, **kwargs) -> None: + super(SearchMetadataSchema, self).__init__(**kwargs) + self.name = name + self.version = version + + +class SearchSchemaValue(Model): + """Value object for schema results. + + All required parameters must be populated in order to send to Azure. + + :param name: The name of the schema. + :type name: str + :param display_name: The display name of the schema. + :type display_name: str + :param type: The type. + :type type: str + :param indexed: Required. The boolean that indicates the field is + searchable as free text. + :type indexed: bool + :param stored: Required. The boolean that indicates whether or not the + field is stored. + :type stored: bool + :param facet: Required. The boolean that indicates whether or not the + field is a facet. + :type facet: bool + :param owner_type: The array of workflows containing the field. + :type owner_type: list[str] + """ + + _validation = { + 'indexed': {'required': True}, + 'stored': {'required': True}, + 'facet': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'indexed': {'key': 'indexed', 'type': 'bool'}, + 'stored': {'key': 'stored', 'type': 'bool'}, + 'facet': {'key': 'facet', 'type': 'bool'}, + 'owner_type': {'key': 'ownerType', 'type': '[str]'}, + } + + def __init__(self, *, indexed: bool, stored: bool, facet: bool, name: str=None, display_name: str=None, type: str=None, owner_type=None, **kwargs) -> None: + super(SearchSchemaValue, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.type = type + self.indexed = indexed + self.stored = stored + self.facet = facet + self.owner_type = owner_type + + +class SearchSort(Model): + """The sort parameters for search. + + :param name: The name of the field the search query is sorted on. + :type name: str + :param order: The sort order of the search. Possible values include: + 'asc', 'desc' + :type order: str or ~azure.mgmt.loganalytics.models.SearchSortEnum + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, order=None, **kwargs) -> None: + super(SearchSort, self).__init__(**kwargs) + self.name = name + self.order = order + + class SharedKeys(Model): """The shared keys for a workspace. @@ -1251,9 +1537,9 @@ class Workspace(TrackedResource): :type location: str :param provisioning_state: The provisioning state of the workspace. Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', - 'Deleting', 'ProvisioningAccount' + 'Deleting', 'ProvisioningAccount', 'Updating' :type provisioning_state: str or - ~azure.mgmt.loganalytics.models.EntityStatus + ~azure.mgmt.loganalytics.models.WorkspaceEntityStatus :ivar customer_id: This is a read-only property. Represents the ID associated with the workspace. :vartype customer_id: str @@ -1337,9 +1623,9 @@ class WorkspacePatch(AzureEntityResource): :vartype etag: str :param provisioning_state: The provisioning state of the workspace. Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', - 'Deleting', 'ProvisioningAccount' + 'Deleting', 'ProvisioningAccount', 'Updating' :type provisioning_state: str or - ~azure.mgmt.loganalytics.models.EntityStatus + ~azure.mgmt.loganalytics.models.WorkspaceEntityStatus :ivar customer_id: This is a read-only property. Represents the ID associated with the workspace. :vartype customer_id: str @@ -1404,6 +1690,115 @@ def __init__(self, *, provisioning_state=None, sku=None, retention_in_days: int= self.tags = tags +class WorkspacePurgeBody(Model): + """Describes the body of a purge request for an App Insights Workspace. + + All required parameters must be populated in order to send to Azure. + + :param table: Required. Table from which to purge data. + :type table: str + :param filters: Required. The set of columns and filters (queries) to run + over them to purge the resulting data. + :type filters: + list[~azure.mgmt.loganalytics.models.WorkspacePurgeBodyFilters] + """ + + _validation = { + 'table': {'required': True}, + 'filters': {'required': True}, + } + + _attribute_map = { + 'table': {'key': 'table', 'type': 'str'}, + 'filters': {'key': 'filters', 'type': '[WorkspacePurgeBodyFilters]'}, + } + + def __init__(self, *, table: str, filters, **kwargs) -> None: + super(WorkspacePurgeBody, self).__init__(**kwargs) + self.table = table + self.filters = filters + + +class WorkspacePurgeBodyFilters(Model): + """User-defined filters to return data which will be purged from the table. + + :param column: The column of the table over which the given query should + run + :type column: str + :param operator: A query operator to evaluate over the provided column and + value(s). Supported operators are ==, =~, in, in~, >, >=, <, <=, between, + and have the same behavior as they would in a KQL query. + :type operator: str + :param value: the value for the operator to function over. This can be a + number (e.g., > 100), a string (timestamp >= '2017-09-01') or array of + values. + :type value: object + :param key: When filtering over custom dimensions, this key will be used + as the name of the custom dimension. + :type key: str + """ + + _attribute_map = { + 'column': {'key': 'column', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, *, column: str=None, operator: str=None, value=None, key: str=None, **kwargs) -> None: + super(WorkspacePurgeBodyFilters, self).__init__(**kwargs) + self.column = column + self.operator = operator + self.value = value + self.key = key + + +class WorkspacePurgeResponse(Model): + """Response containing operationId for a specific purge action. + + All required parameters must be populated in order to send to Azure. + + :param operation_id: Required. Id to use when querying for status for a + particular purge operation. + :type operation_id: str + """ + + _validation = { + 'operation_id': {'required': True}, + } + + _attribute_map = { + 'operation_id': {'key': 'operationId', 'type': 'str'}, + } + + def __init__(self, *, operation_id: str, **kwargs) -> None: + super(WorkspacePurgeResponse, self).__init__(**kwargs) + self.operation_id = operation_id + + +class WorkspacePurgeStatusResponse(Model): + """Response containing status for a specific purge operation. + + All required parameters must be populated in order to send to Azure. + + :param status: Required. Status of the operation represented by the + requested Id. Possible values include: 'pending', 'completed' + :type status: str or ~azure.mgmt.loganalytics.models.PurgeState + """ + + _validation = { + 'status': {'required': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, status, **kwargs) -> None: + super(WorkspacePurgeStatusResponse, self).__init__(**kwargs) + self.status = status + + class WorkspaceSku(Model): """The SKU (tier) of a workspace. diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_operational_insights_management_client_enums.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_operational_insights_management_client_enums.py index f1170dbd55cd..849d8895a5e7 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_operational_insights_management_client_enums.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_operational_insights_management_client_enums.py @@ -55,6 +55,14 @@ class DataSourceKind(str, Enum): sql_data_classification = "SqlDataClassification" +class LinkedServiceEntityStatus(str, Enum): + + succeeded = "Succeeded" + deleting = "Deleting" + provisioning_account = "ProvisioningAccount" + updating = "Updating" + + class DataSourceType(str, Enum): custom_logs = "CustomLogs" @@ -72,7 +80,7 @@ class WorkspaceSkuNameEnum(str, Enum): capacity_reservation = "CapacityReservation" -class EntityStatus(str, Enum): +class WorkspaceEntityStatus(str, Enum): creating = "Creating" succeeded = "Succeeded" @@ -80,6 +88,7 @@ class EntityStatus(str, Enum): canceled = "Canceled" deleting = "Deleting" provisioning_account = "ProvisioningAccount" + updating = "Updating" class PublicNetworkAccessType(str, Enum): @@ -88,6 +97,17 @@ class PublicNetworkAccessType(str, Enum): disabled = "Disabled" #: Disables public connectivity to Log Analytics through public DNS. +class ClusterEntityStatus(str, Enum): + + creating = "Creating" + succeeded = "Succeeded" + failed = "Failed" + canceled = "Canceled" + deleting = "Deleting" + provisioning_account = "ProvisioningAccount" + updating = "Updating" + + class ClusterSkuNameEnum(str, Enum): capacity_reservation = "CapacityReservation" @@ -103,3 +123,26 @@ class StorageInsightState(str, Enum): ok = "OK" error = "ERROR" + + +class SkuNameEnum(str, Enum): + + free = "Free" + standard = "Standard" + premium = "Premium" + per_node = "PerNode" + per_gb2018 = "PerGB2018" + standalone = "Standalone" + capacity_reservation = "CapacityReservation" + + +class SearchSortEnum(str, Enum): + + asc = "asc" + desc = "desc" + + +class PurgeState(str, Enum): + + pending = "pending" + completed = "completed" diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_paged_models.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_paged_models.py index 739b95705fa3..29e30db6410f 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_paged_models.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/models/_paged_models.py @@ -38,84 +38,84 @@ class DataSourcePaged(Paged): def __init__(self, *args, **kwargs): super(DataSourcePaged, self).__init__(*args, **kwargs) -class ManagementGroupPaged(Paged): +class LinkedServicePaged(Paged): """ - A paging container for iterating over a list of :class:`ManagementGroup ` object + A paging container for iterating over a list of :class:`LinkedService ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagementGroup]'} + 'current_page': {'key': 'value', 'type': '[LinkedService]'} } def __init__(self, *args, **kwargs): - super(ManagementGroupPaged, self).__init__(*args, **kwargs) -class UsageMetricPaged(Paged): + super(LinkedServicePaged, self).__init__(*args, **kwargs) +class LinkedStorageAccountsResourcePaged(Paged): """ - A paging container for iterating over a list of :class:`UsageMetric ` object + A paging container for iterating over a list of :class:`LinkedStorageAccountsResource ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[UsageMetric]'} + 'current_page': {'key': 'value', 'type': '[LinkedStorageAccountsResource]'} } def __init__(self, *args, **kwargs): - super(UsageMetricPaged, self).__init__(*args, **kwargs) -class WorkspacePaged(Paged): + super(LinkedStorageAccountsResourcePaged, self).__init__(*args, **kwargs) +class ManagementGroupPaged(Paged): """ - A paging container for iterating over a list of :class:`Workspace ` object + A paging container for iterating over a list of :class:`ManagementGroup ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Workspace]'} + 'current_page': {'key': 'value', 'type': '[ManagementGroup]'} } def __init__(self, *args, **kwargs): - super(WorkspacePaged, self).__init__(*args, **kwargs) -class LinkedServicePaged(Paged): + super(ManagementGroupPaged, self).__init__(*args, **kwargs) +class OperationPaged(Paged): """ - A paging container for iterating over a list of :class:`LinkedService ` object + A paging container for iterating over a list of :class:`Operation ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[LinkedService]'} + 'current_page': {'key': 'value', 'type': '[Operation]'} } def __init__(self, *args, **kwargs): - super(LinkedServicePaged, self).__init__(*args, **kwargs) -class LinkedStorageAccountsResourcePaged(Paged): + super(OperationPaged, self).__init__(*args, **kwargs) +class UsageMetricPaged(Paged): """ - A paging container for iterating over a list of :class:`LinkedStorageAccountsResource ` object + A paging container for iterating over a list of :class:`UsageMetric ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[LinkedStorageAccountsResource]'} + 'current_page': {'key': 'value', 'type': '[UsageMetric]'} } def __init__(self, *args, **kwargs): - super(LinkedStorageAccountsResourcePaged, self).__init__(*args, **kwargs) -class OperationPaged(Paged): + super(UsageMetricPaged, self).__init__(*args, **kwargs) +class WorkspacePaged(Paged): """ - A paging container for iterating over a list of :class:`Operation ` object + A paging container for iterating over a list of :class:`Workspace ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} + 'current_page': {'key': 'value', 'type': '[Workspace]'} } def __init__(self, *args, **kwargs): - super(OperationPaged, self).__init__(*args, **kwargs) + super(WorkspacePaged, self).__init__(*args, **kwargs) class ClusterPaged(Paged): """ A paging container for iterating over a list of :class:`Cluster ` object diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/__init__.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/__init__.py index c13b14cf3be5..074a8cd5a0a9 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/__init__.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/__init__.py @@ -11,24 +11,38 @@ from ._data_exports_operations import DataExportsOperations from ._data_sources_operations import DataSourcesOperations -from ._workspaces_operations import WorkspacesOperations +from ._intelligence_packs_operations import IntelligencePacksOperations from ._linked_services_operations import LinkedServicesOperations from ._linked_storage_accounts_operations import LinkedStorageAccountsOperations +from ._management_groups_operations import ManagementGroupsOperations from ._operations import Operations +from ._operation_statuses_operations import OperationStatusesOperations +from ._shared_keys_operations import SharedKeysOperations +from ._usages_operations import UsagesOperations +from ._workspaces_operations import WorkspacesOperations from ._clusters_operations import ClustersOperations -from ._storage_insights_operations import StorageInsightsOperations +from ._storage_insight_configs_operations import StorageInsightConfigsOperations from ._saved_searches_operations import SavedSearchesOperations -from ._operational_insights_management_client_operations import OperationalInsightsManagementClientOperationsMixin +from ._gateways_operations import GatewaysOperations +from ._schema_operations import SchemaOperations +from ._workspace_purge_operations import WorkspacePurgeOperations __all__ = [ 'DataExportsOperations', 'DataSourcesOperations', - 'WorkspacesOperations', + 'IntelligencePacksOperations', 'LinkedServicesOperations', 'LinkedStorageAccountsOperations', + 'ManagementGroupsOperations', 'Operations', + 'OperationStatusesOperations', + 'SharedKeysOperations', + 'UsagesOperations', + 'WorkspacesOperations', 'ClustersOperations', - 'StorageInsightsOperations', + 'StorageInsightConfigsOperations', 'SavedSearchesOperations', - 'OperationalInsightsManagementClientOperationsMixin', + 'GatewaysOperations', + 'SchemaOperations', + 'WorkspacePurgeOperations', ] diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_clusters_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_clusters_operations.py index 1dd6910a94fb..6acfcd956089 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_clusters_operations.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_clusters_operations.py @@ -277,25 +277,9 @@ def get_long_running_output(response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}'} - def delete( - self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): - """Deletes a cluster instance. - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param cluster_name: Name of the Log Analytics Cluster. - :type cluster_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ClusterErrorResponseException` - """ + def _delete_initial( + self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -328,6 +312,48 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + + def delete( + self, resource_group_name, cluster_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a cluster instance. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param cluster_name: Name of the Log Analytics Cluster. + :type cluster_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ClusterErrorResponseException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}'} def get( diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_gateways_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_gateways_operations.py new file mode 100644 index 000000000000..8252e30c17d8 --- /dev/null +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_gateways_operations.py @@ -0,0 +1,97 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class GatewaysOperations(object): + """GatewaysOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2020-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-03-01-preview" + + self.config = config + + def delete( + self, resource_group_name, workspace_name, gateway_id, custom_headers=None, raw=False, **operation_config): + """Delete a Log Analytics gateway. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param gateway_id: The Log Analytics gateway Id. + :type gateway_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), + 'gatewayId': self._serialize.url("gateway_id", gateway_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/gateways/{gatewayId}'} diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_intelligence_packs_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_intelligence_packs_operations.py new file mode 100644 index 000000000000..3d64f0fbbae5 --- /dev/null +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_intelligence_packs_operations.py @@ -0,0 +1,219 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class IntelligencePacksOperations(object): + """IntelligencePacksOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2020-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-03-01-preview" + + self.config = config + + def disable( + self, resource_group_name, workspace_name, intelligence_pack_name, custom_headers=None, raw=False, **operation_config): + """Disables an intelligence pack for a given workspace. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param intelligence_pack_name: The name of the intelligence pack to be + disabled. + :type intelligence_pack_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.disable.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), + 'intelligencePackName': self._serialize.url("intelligence_pack_name", intelligence_pack_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + disable.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks/{intelligencePackName}/Disable'} + + def enable( + self, resource_group_name, workspace_name, intelligence_pack_name, custom_headers=None, raw=False, **operation_config): + """Enables an intelligence pack for a given workspace. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param intelligence_pack_name: The name of the intelligence pack to be + enabled. + :type intelligence_pack_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.enable.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), + 'intelligencePackName': self._serialize.url("intelligence_pack_name", intelligence_pack_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + enable.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks/{intelligencePackName}/Enable'} + + def list( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Lists all the intelligence packs possible and whether they are enabled + or disabled for a given workspace. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.loganalytics.models.IntelligencePack] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[IntelligencePack]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks'} diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_linked_services_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_linked_services_operations.py index 636b5a9441d5..f5628b549e6d 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_linked_services_operations.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_linked_services_operations.py @@ -12,6 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -39,30 +41,9 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def create_or_update( - self, resource_group_name, workspace_name, linked_service_name, parameters, custom_headers=None, raw=False, **operation_config): - """Create or update a linked service. - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param workspace_name: The name of the workspace. - :type workspace_name: str - :param linked_service_name: Name of the linkedServices resource - :type linked_service_name: str - :param parameters: The parameters required to create or update a - linked service. - :type parameters: ~azure.mgmt.loganalytics.models.LinkedService - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: LinkedService or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.loganalytics.models.LinkedService or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ + def _create_or_update_initial( + self, resource_group_name, workspace_name, linked_service_name, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { @@ -101,6 +82,7 @@ def create_or_update( raise exp deserialized = None + if response.status_code == 200: deserialized = self._deserialize('LinkedService', response) if response.status_code == 201: @@ -111,28 +93,65 @@ def create_or_update( return client_raw_response return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}'} - def delete( - self, resource_group_name, workspace_name, linked_service_name, custom_headers=None, raw=False, **operation_config): - """Deletes a linked service instance. + def create_or_update( + self, resource_group_name, workspace_name, linked_service_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a linked service. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param workspace_name: The name of the workspace. :type workspace_name: str - :param linked_service_name: Name of the linked service. + :param linked_service_name: Name of the linkedServices resource :type linked_service_name: str + :param parameters: The parameters required to create or update a + linked service. + :type parameters: ~azure.mgmt.loganalytics.models.LinkedService :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns LinkedService or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.loganalytics.models.LinkedService] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.loganalytics.models.LinkedService]] :raises: :class:`CloudError` """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + linked_service_name=linked_service_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('LinkedService', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}'} + + + def _delete_initial( + self, resource_group_name, workspace_name, linked_service_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -149,6 +168,7 @@ def delete( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -165,9 +185,66 @@ def delete( exp.request_id = response.headers.get('x-ms-request-id') raise exp + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('LinkedService', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, workspace_name, linked_service_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes a linked service instance. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param linked_service_name: Name of the linked service. + :type linked_service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns LinkedService or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.loganalytics.models.LinkedService] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.loganalytics.models.LinkedService]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + workspace_name=workspace_name, + linked_service_name=linked_service_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('LinkedService', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}'} def get( diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_management_groups_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_management_groups_operations.py new file mode 100644 index 000000000000..65ef589a2f98 --- /dev/null +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_management_groups_operations.py @@ -0,0 +1,113 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ManagementGroupsOperations(object): + """ManagementGroupsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2020-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-03-01-preview" + + self.config = config + + def list( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of management groups connected to a workspace. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ManagementGroup + :rtype: + ~azure.mgmt.loganalytics.models.ManagementGroupPaged[~azure.mgmt.loganalytics.models.ManagementGroup] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ManagementGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/managementGroups'} diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_operational_insights_management_client_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_operation_statuses_operations.py similarity index 76% rename from sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_operational_insights_management_client_operations.py rename to sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_operation_statuses_operations.py index 2b18f5d5f66d..5a713df770a6 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_operational_insights_management_client_operations.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_operation_statuses_operations.py @@ -9,17 +9,37 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling + from .. import models -import uuid -class OperationalInsightsManagementClientOperationsMixin(object): +class OperationStatusesOperations(object): + """OperationStatusesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2020-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-03-01-preview" + + self.config = config - def get_async_operations_status( + def get( self, location, async_operation_id, custom_headers=None, raw=False, **operation_config): """Get the status of a long running azure asynchronous operation. @@ -38,7 +58,7 @@ def get_async_operations_status( :raises: :class:`CloudError` """ # Construct URL - url = self.get_async_operations_status.metadata['url'] + url = self.get.metadata['url'] path_format_arguments = { 'location': self._serialize.url("location", location, 'str'), 'asyncOperationId': self._serialize.url("async_operation_id", async_operation_id, 'str'), @@ -78,4 +98,4 @@ def get_async_operations_status( return client_raw_response return deserialized - get_async_operations_status.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/locations/{location}/operationStatuses/{asyncOperationId}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/locations/{location}/operationStatuses/{asyncOperationId}'} diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_schema_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_schema_operations.py new file mode 100644 index 000000000000..6674d9758e7f --- /dev/null +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_schema_operations.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class SchemaOperations(object): + """SchemaOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2020-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-03-01-preview" + + self.config = config + + def get( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Gets the schema for a given workspace. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SearchGetSchemaResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.SearchGetSchemaResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SearchGetSchemaResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/schema'} diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_shared_keys_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_shared_keys_operations.py new file mode 100644 index 000000000000..de18ff301a11 --- /dev/null +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_shared_keys_operations.py @@ -0,0 +1,166 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class SharedKeysOperations(object): + """SharedKeysOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2020-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-03-01-preview" + + self.config = config + + def get_shared_keys( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Gets the shared keys for a workspace. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SharedKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.SharedKeys or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_shared_keys.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SharedKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_shared_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/sharedKeys'} + + def regenerate( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Regenerates the shared keys for a Log Analytics Workspace. These keys + are used to connect Microsoft Operational Insights agents to the + workspace. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SharedKeys or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.SharedKeys or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.regenerate.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SharedKeys', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + regenerate.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/regenerateSharedKey'} diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_storage_insights_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_storage_insight_configs_operations.py similarity index 99% rename from sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_storage_insights_operations.py rename to sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_storage_insight_configs_operations.py index 903d10c6981b..589cb2e1dc66 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_storage_insights_operations.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_storage_insight_configs_operations.py @@ -16,8 +16,8 @@ from .. import models -class StorageInsightsOperations(object): - """StorageInsightsOperations operations. +class StorageInsightConfigsOperations(object): + """StorageInsightConfigsOperations operations. You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_usages_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_usages_operations.py new file mode 100644 index 000000000000..6c7405cedef7 --- /dev/null +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_usages_operations.py @@ -0,0 +1,113 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class UsagesOperations(object): + """UsagesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2020-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-03-01-preview" + + self.config = config + + def list( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of usage metrics for a workspace. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of UsageMetric + :rtype: + ~azure.mgmt.loganalytics.models.UsageMetricPaged[~azure.mgmt.loganalytics.models.UsageMetric] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.UsageMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/usages'} diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_workspace_purge_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_workspace_purge_operations.py new file mode 100644 index 000000000000..f82c65a55345 --- /dev/null +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_workspace_purge_operations.py @@ -0,0 +1,192 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class WorkspacePurgeOperations(object): + """WorkspacePurgeOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2020-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-03-01-preview" + + self.config = config + + def purge( + self, resource_group_name, workspace_name, table, filters, custom_headers=None, raw=False, **operation_config): + """Purges data in an Log Analytics workspace by a set of user-defined + filters. + In order to manage system resources, purge requests are throttled at 50 + requests per hour. You should batch the execution of purge requests by + sending a single command whose predicate includes all user identities + that require purging. Use the in operator to specify multiple + identities. You should run the query prior to using for a purge request + to verify that the results are expected. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param table: Table from which to purge data. + :type table: str + :param filters: The set of columns and filters (queries) to run over + them to purge the resulting data. + :type filters: + list[~azure.mgmt.loganalytics.models.WorkspacePurgeBodyFilters] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkspacePurgeResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.WorkspacePurgeResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + body = models.WorkspacePurgeBody(table=table, filters=filters) + + # Construct URL + url = self.purge.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(body, 'WorkspacePurgeBody') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + header_dict = {} + deserialized = None + if response.status_code == 202: + deserialized = self._deserialize('WorkspacePurgeResponse', response) + header_dict = { + 'x-ms-status-location': 'str', + } + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response + + return deserialized + purge.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/purge'} + + def get_purge_status( + self, resource_group_name, workspace_name, purge_id, custom_headers=None, raw=False, **operation_config): + """Gets status of an ongoing purge operation. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param purge_id: In a purge status request, this is the Id of the + operation the status of which is returned. + :type purge_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: WorkspacePurgeStatusResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.loganalytics.models.WorkspacePurgeStatusResponse + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_purge_status.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), + 'purgeId': self._serialize.url("purge_id", purge_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('WorkspacePurgeStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_purge_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/operations/{purgeId}'} diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_workspaces_operations.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_workspaces_operations.py index 27477b7d99ae..2c850d57d69e 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_workspaces_operations.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/operations/_workspaces_operations.py @@ -41,346 +41,25 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def disable_intelligence_pack( - self, resource_group_name, workspace_name, intelligence_pack_name, custom_headers=None, raw=False, **operation_config): - """Disables an intelligence pack for a given workspace. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param workspace_name: The name of the workspace. - :type workspace_name: str - :param intelligence_pack_name: The name of the intelligence pack to be - disabled. - :type intelligence_pack_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.disable_intelligence_pack.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), - 'intelligencePackName': self._serialize.url("intelligence_pack_name", intelligence_pack_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - disable_intelligence_pack.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks/{intelligencePackName}/Disable'} - - def enable_intelligence_pack( - self, resource_group_name, workspace_name, intelligence_pack_name, custom_headers=None, raw=False, **operation_config): - """Enables an intelligence pack for a given workspace. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param workspace_name: The name of the workspace. - :type workspace_name: str - :param intelligence_pack_name: The name of the intelligence pack to be - enabled. - :type intelligence_pack_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.enable_intelligence_pack.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), - 'intelligencePackName': self._serialize.url("intelligence_pack_name", intelligence_pack_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - enable_intelligence_pack.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks/{intelligencePackName}/Enable'} - - def list_intelligence_packs( - self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): - """Lists all the intelligence packs possible and whether they are enabled - or disabled for a given workspace. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param workspace_name: The name of the workspace. - :type workspace_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: list[~azure.mgmt.loganalytics.models.IntelligencePack] or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.list_intelligence_packs.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[IntelligencePack]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_intelligence_packs.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks'} - - def list_management_groups( - self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of management groups connected to a workspace. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param workspace_name: The name of the workspace. - :type workspace_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagementGroup - :rtype: - ~azure.mgmt.loganalytics.models.ManagementGroupPaged[~azure.mgmt.loganalytics.models.ManagementGroup] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_management_groups.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagementGroupPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_management_groups.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/managementGroups'} - - def get_shared_keys( - self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): - """Gets the shared keys for a workspace. - - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param workspace_name: The name of the workspace. - :type workspace_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SharedKeys or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.loganalytics.models.SharedKeys or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_shared_keys.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SharedKeys', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_shared_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/sharedKeys'} - - def list_usages( - self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): - """Gets a list of usage metrics for a workspace. + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets the workspaces in a subscription. - :param resource_group_name: The name of the resource group. The name - is case insensitive. - :type resource_group_name: str - :param workspace_name: The name of the workspace. - :type workspace_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of UsageMetric + :return: An iterator like instance of Workspace :rtype: - ~azure.mgmt.loganalytics.models.UsageMetricPaged[~azure.mgmt.loganalytics.models.UsageMetric] + ~azure.mgmt.loganalytics.models.WorkspacePaged[~azure.mgmt.loganalytics.models.Workspace] :raises: :class:`CloudError` """ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_usages.metadata['url'] + url = self.list.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } url = self._client.format_url(url, **path_format_arguments) @@ -423,10 +102,10 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.UsageMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.WorkspacePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/usages'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/workspaces'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -498,79 +177,13 @@ def internal_paging(next_link=None): return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces'} - def list( - self, custom_headers=None, raw=False, **operation_config): - """Gets the workspaces in a subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Workspace - :rtype: - ~azure.mgmt.loganalytics.models.WorkspacePaged[~azure.mgmt.loganalytics.models.Workspace] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.WorkspacePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/workspaces'} - def _create_or_update_initial( self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } @@ -620,7 +233,8 @@ def create_or_update( self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Create or update a workspace. - :param resource_group_name: The resource group name of the workspace. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param workspace_name: The name of the workspace. :type workspace_name: str @@ -673,7 +287,7 @@ def _delete_initial( # Construct URL url = self.delete.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } @@ -709,7 +323,8 @@ def delete( self, resource_group_name, workspace_name, custom_headers=None, raw=False, polling=True, **operation_config): """Deletes a workspace instance. - :param resource_group_name: The resource group name of the workspace. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param workspace_name: The name of the workspace. :type workspace_name: str @@ -750,7 +365,8 @@ def get( self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): """Gets a workspace instance. - :param resource_group_name: The resource group name of the workspace. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param workspace_name: The name of the workspace. :type workspace_name: str @@ -767,7 +383,7 @@ def get( # Construct URL url = self.get.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } @@ -811,7 +427,8 @@ def update( self, resource_group_name, workspace_name, parameters, custom_headers=None, raw=False, **operation_config): """Updates a workspace. - :param resource_group_name: The resource group name of the workspace. + :param resource_group_name: The name of the resource group. The name + is case insensitive. :type resource_group_name: str :param workspace_name: The name of the workspace. :type workspace_name: str @@ -830,7 +447,7 @@ def update( # Construct URL url = self.update.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) } @@ -873,3 +490,65 @@ def update( return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}'} + + def available_service_tiers( + self, resource_group_name, workspace_name, custom_headers=None, raw=False, **operation_config): + """Gets the available service tiers for the workspace. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.loganalytics.models.AvailableServiceTier] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.available_service_tiers.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=63, min_length=4, pattern=r'^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[AvailableServiceTier]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + available_service_tiers.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/availableServiceTiers'} diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/version.py b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/version.py index 3e682bbd5fb1..85da2c00c1a6 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/version.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.3.0" +VERSION = "0.4.0" diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/dev_requirements.txt b/sdk/loganalytics/azure-mgmt-loganalytics/dev_requirements.txt new file mode 100644 index 000000000000..0b288b2e1260 --- /dev/null +++ b/sdk/loganalytics/azure-mgmt-loganalytics/dev_requirements.txt @@ -0,0 +1,2 @@ +-e ../../../tools/azure-sdk-tools + diff --git a/sdk/loganalytics/azure-mgmt-loganalytics/setup.py b/sdk/loganalytics/azure-mgmt-loganalytics/setup.py index fffa7ef2147e..eea54942f3e7 100644 --- a/sdk/loganalytics/azure-mgmt-loganalytics/setup.py +++ b/sdk/loganalytics/azure-mgmt-loganalytics/setup.py @@ -64,10 +64,10 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'License :: OSI Approved :: MIT License', ], zip_safe=False, diff --git a/shared_requirements.txt b/shared_requirements.txt index be2db1ee2480..9c5347dd35fd 100644 --- a/shared_requirements.txt +++ b/shared_requirements.txt @@ -99,6 +99,7 @@ msal<2.0.0,>=1.0.0 msal-extensions~=0.1.3 msrest>=0.5.0 msrestazure<2.0.0,>=0.4.32 +azure-mgmt-core<2.0.0,>=1.0.0 requests>=2.18.4 uamqp~=1.2.0 enum34>=1.0.4 diff --git a/tools/azure-sdk-tools/packaging_tools/templates/setup.py b/tools/azure-sdk-tools/packaging_tools/templates/setup.py index e50d401cfe39..2a8e3ec8b041 100644 --- a/tools/azure-sdk-tools/packaging_tools/templates/setup.py +++ b/tools/azure-sdk-tools/packaging_tools/templates/setup.py @@ -84,6 +84,9 @@ 'msrestazure>=0.4.32,<2.0.0', {%- endif %} 'azure-common~=1.1', + {%- if need_azurecore %} + 'azure-mgmt-core>=1.0.0,<2.0.0', + {%- endif %} ], extras_require={ ":python_version<'3.0'": ['{{package_nspkg}}'],